grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep ./ChangeLog src/Makefile.am src/grep.h src...


From: Charles Levert
Subject: grep ./ChangeLog src/Makefile.am src/grep.h src...
Date: Tue, 08 Nov 2005 21:47:39 -0500

CVSROOT:        /cvsroot/grep
Module name:    grep
Branch:         
Changes by:     Charles Levert <address@hidden> 05/11/09 02:47:35

Modified files:
        .              : ChangeLog 
        src            : Makefile.am grep.h grep.c search.c 
        bootstrap      : Makefile.try 
Added files:
        src            : egrep.c esearch.c fgrep.c fsearch.c 
Removed files:
        src            : grepmat.c 

Log message:
        The following set of changes aims to make "egrep" and "fgrep"
        minimal executable programs for legacy applications, instead of
        shell scripts.  This "fgrep" is much smaller than "grep".
        This set of changes appears more daunting than it really is.
        
        * src/egrep.c, src/fgrep.c, src/esearch.c, src/fsearch.c: New files
        that #define either EGREP_PROGRAM or FGREP_PROGRAM and #include
        the corresponding generic (i.e., non e or f specific) *.c file.
        * src/grepmat.c: Remove whole file.
        * src/Makefile.am: Remove no-dependencies from AUTOMAKE_OPTIONS.
        Add definitions to make "egrep" and "fgrep" specific standalone
        executable programs that only use the source files they need.
        Remove rules for "egrep" and "fgrep" shell scripts.
        * src/grep.h: #define GREP_PROGRAM if both EGREP_PROGRAM and
        FGREP_PROGRAM are #undef.  Only declare matchers[] in this case
        along with the compile_fp_t and execute_fp_t function pointers
        typedefs, otherwise declare prototypes for straight compile()
        and execute() functions for the specialized "egrep" and "fgrep"
        programs.  Remove the extern declaration for matcher.
        Define COMPILE_RET, COMPILE_ARGS, EXECUTE_RET, EXECUTE_ARGS,
        COMPILE_FCT, and EXECUTE_FCT helper preprocessor macros.
        * src/grep.c (short_options, long_options, usage, main): Only
        support -G, -E, -F, -P, and -X for GREP_PROGRAM, but not for
        EGREP_PROGRAM or FGREP_PROGRAM.  Customize usage messages.
        * src/grep.c (set_limits): New function with unchanged code,
        called from main(), because it shouldn't be in install_matcher()
        since it was already matcher-independent.
        * src/grep.c (matcher): Add as static, only for GREP_PROGRAM.
        * src/grep.c (setmatcher, install_matcher): Only for GREP_PROGRAM.
        * src/grep.c (main): Remove any tweaking and dependence on argv[0].
        * src/grep.c (print_line_middle, prpending, grepbuf, main): Call
        compile() and execute() directly, not through a function
        pointer dereferencing notation, so that it works with both
        straight functions (in EGREP_PROGRAM and FGREP_PROGRAM) and
        function pointers (in GREP_PROGRAM).
        * src/search.c (<regex.h>, "dfa.h", dfa, pattern0, patterns,
        pcount, dfaerror, kwset_exact_matches, kwsmusts): Only
        include/declare/define if not FGREP_PROGRAM.
        * src/search.c: Remove function prototypes for all functions
        that are not used before their definition, since this is just
        a hassle now with their varying names and conditional definition.
        * src/search.c (GEAcompile): Rename from Ecompile().  Add new
        syntax_bits argument/variable.  Use as compile() for EGREP_PROGRAM.
        Put in the needed RE_ICASE fix, albeit commented-out for now.
        Make sure to free() modified word/line pattern after use, if any.
        * src/search.c (Gcompile): Merge with GEAcompile() then remove.
        * src/search.c (Gcompile, Acompile, Ecompile): New small functions
        that call GEAcompile(), now that matcher is not an extern variable.
        * src/search.c (GEAcompile, Gcompile, Acompile, Ecompile,
        Fcompile, Pcompile, EGexecute, Fexecute, Pexecute, matchers):
        Only define when needed according to *GREP_PROGRAM, and rename
        to just compile() and execute() when appropriate.
        * grep/bootstrap/Makefile.try: Similar changes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/ChangeLog.diff?tr1=1.276&tr2=1.277&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/egrep.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/esearch.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/fgrep.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/fsearch.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/Makefile.am.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/grep.h.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/grep.c.diff?tr1=1.114&tr2=1.115&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/search.c.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/bootstrap/Makefile.try.diff?tr1=1.9&tr2=1.10&r1=text&r2=text





reply via email to

[Prev in Thread] Current Thread [Next in Thread]