=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/grep/util.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/grep/util.c 2003/06/24 17:32:10 1.7 +++ src/usr.bin/grep/util.c 2003/06/24 18:45:30 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.7 2003/06/24 17:32:10 tedu Exp $ */ +/* $OpenBSD: util.c,v 1.8 2003/06/24 18:45:30 tedu Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -246,6 +246,11 @@ int firstLastHalfDot = -1; int lastHalfDot = 0; + if (Fflag) { + fg->pattern = NULL; + return (-1); + } + /* Initialize. */ origPatternLen = fg->patternLen = strlen(pattern); fg->bol = 0; @@ -269,8 +274,8 @@ } /* - * Copy pattern minus '^' and '$' characters at the beginning and ending of - * the string respectively. + * Copy pattern minus '^' and '$' characters at the beginning and + * ending of the string respectively. */ fg->pattern = grep_strdup(pattern + bol);