$NetBSD: patch-ab,v 1.1 2002/09/26 09:48:32 agc Exp $ --- main.c 2002/09/26 09:40:23 1.1 +++ main.c 2002/09/26 09:40:51 @@ -109,11 +109,12 @@ char *f; char *collseq; int flags; + int off; int i; (void) memset(&sam, 0, sizeof(sam)); command = f = (char *) NULL; - flags = 0; + off = flags = 0; collseq = getenv("UTFCOLLSEQ"); while ((i = getopt(argc, argv, "a:bf:nvwx")) != -1) { switch(i) { @@ -124,6 +125,7 @@ flags |= ByteOffsets; break; case 'f': + off = 1; f = optarg; break; case 'n': @@ -146,8 +148,8 @@ if ((command = getcommand(f, &argv[optind])) == (char *) NULL) { exit(1); } - argc -= optind + 1; - argv += optind + 1; + argc -= optind + 1 - off; + argv += optind + 1 - off; if (!ssamfiles(&sam, argc, argv)) { exit(1); }