Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

awk(1)

egrep(1)

fgrep(1)

grep(1)

sed(1)

lex(1)

regex(3c)



REGCMP(1)               COMMAND REFERENCE               REGCMP(1)



NAME
     regcmp - regular expression compile

SYNOPSIS
     regcmp [ - ] filename ...

DESCRIPTION
     Regcmp, in most cases, precludes the need for calling
     regcmp(3pw) from C programs.  This saves on both execution
     time and program size.  The command regcmp compiles the
     regular expressions in filename and places the output in
     filename.i.  If the - option is used, the output will be
     placed in filename.c.  The format of entries in filename is
     a name (C variable) followed by one or more blanks followed
     by a regular expression enclosed in double quotes.  The
     output of regcmp is C source code.  Compiled regular
     expressions are represented as extern char vectors.
     Filename.i files may thus be included into C programs, or
     filename.c files may be compiled and later loaded.  In the C
     program which uses the regcmp output, regex c,line) will
     apply the regular expression named abc to line.  Diagnostics
     are self-explanatory.

EXAMPLES
     The following is an example of the contents of filename:

          name "([A-Za-z][A-Za-z0-9_]*)$0"
          telno "\({0,1}([2-9][01][1-9])$0\){0,1} *"


     In the C program that uses the regcmp output,

          regex(telno, line, area, exch, rest)

     will apply the regular expression named telno to line.

RETURN VALUE
     [NO_ERRS]      Command completed without error.

     [USAGE]        Incorrect command line syntax. Execution
                    terminated.

     [NP_WARN]      An error warranting a warning message
                    occurred. Execution continues.

     [NP_ERR]       An error occurred that was not a system
                    error.  Execution terminated.

     [P_WARN]       A system error occurred. Execution continues.
                    See intro(2) for more information on system
                    errors.




Printed 4/6/89                                                  1





REGCMP(1)               COMMAND REFERENCE               REGCMP(1)



     [P_ERR]        A system error occurred. Execution
                    terminated.  See intro(2) for more
                    information on system errors.

SEE ALSO
     awk(1), egrep(1), fgrep(1), grep(1), sed(1), lex(1),
     regex(3c).
















































Printed 4/6/89                                                  2



%%index%%
na:288,87;
sy:375,207;
de:582,1719;
ex:2301,505;
rv:2806,663;3829,173;
se:4002,270;
%%index%%000000000117

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026