home *** CD-ROM | disk | FTP | other *** search
- BEGIN {
- #
- # ANSI C reserved words
- #
- # expression for leader
- ldr = /(^|[\s\t\*\(,])/;
- # upper case letters
- upr = /[A-Z]/;
- # lower case letters
- lwr = /[a-z]/;
- # characters allowed in names
- alwd = /[A-Za-z0-9_]/;
- # abbreviation
- f = /[fl]/;
- # opening function parenthesis
- o_p = /{_w}*\(/;
- }
- #
- #
- #1 <errno.h> reserved words
- /{ldr}E{upr}{alwd}+/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #2 <ctype.h> reserved words
- /{ldr}(is|to){lwr}{alwd}+{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #3 <locale.h> reserved words
- /{ldr}LC_{upr}{alwd}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #4 <math.h> reserved words
- /{ldr}a(cos|sin|tan2?){f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #5 <math.h> reserved words
- /{ldr}(cos|sin|tan)h?{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #6 <math.h> reserved words
- /{ldr}(fr|ld)?exp{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #7 <math.h> reserved words
- /{ldr}log(10)?{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #8 <math.h> reserved words
- /{ldr}modf{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #9 <math.h> reserved words
- /{ldr}pow{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #10 <math.h> reserved words
- /{ldr}sqrt{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #11 <math.h> reserved words
- /{ldr}ceil{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #12 <math.h> reserved words
- /{ldr}(f|l)?abs{f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #13 <math.h> reserved words
- /{ldr}f(loor|mod){f}{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #14 <signal.h> reserved words
- /{ldr}SIG_{upr}{alwd}+/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #15 <string.h> reserved words
- /{ldr}(str|mem){lwr}{alwd}+{o_p}/ { printf("%u: %s\n",FNR,$0); next; }
- #
- #99 Variable Names Reserved by Committee for Standard Library
- # ALL identifiers starting with '_'
- /{ldr}_{alwd}+/ { printf("%u: %s\n",FNR,$0); }
-
- FINAL {
- printf("Lines Scanned: %lu\n",NR);
- }
-