+
+ /* this is a bit of a hack to prevent getopt from choking on
+ * negative numbers. */
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ tmplen = 2;
+ if (optarg) tmplen += strlen(optarg);
+ tmp = malloc(tmplen + 1);
+
+ if (optarg) snprintf(tmp, tmplen + 1, "-%c%s", (char) opt, optarg);
+ else snprintf(tmp, tmplen + 1, "-%c", (char) opt);
+
+ offset = atoi(tmp);
+ free(tmp);
+ break;
+
+