diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-05-19 23:45:07 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-05-19 23:45:07 -0400 |
commit | cdf892a07fa67c635997e41ee8fe175aaafb2431 (patch) | |
tree | 46245d7f88797b98dbb60e60b223b3da9ff13cd1 /main.c | |
parent | 0f2e51f9b18a1c4e203e0bd0ac3c68db9faa9b6d (diff) | |
download | egawk-cdf892a07fa67c635997e41ee8fe175aaafb2431.tar.gz egawk-cdf892a07fa67c635997e41ee8fe175aaafb2431.tar.bz2 egawk-cdf892a07fa67c635997e41ee8fe175aaafb2431.zip |
Add -i option, append .awk if initial search fails, and allow -f repeats.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -202,7 +202,7 @@ main(int argc, char **argv) /* * The + on the front tells GNU getopt not to rearrange argv. */ - const char *optlist = "+F:f:v:W;m:bcCd::D::e:E:gh:l:L:nNo::Op::MPrStVY"; + const char *optlist = "+F:f:v:W;m:bcCd::D::e:E:gh:i:l:L:nNo::Op::MPrStVY"; bool stopped_early = false; int old_optind; int i; @@ -397,6 +397,10 @@ main(int argc, char **argv) usage(EXIT_SUCCESS, stdout); break; + case 'i': + (void) add_srcfile(SRC_INC, optarg, srcfiles, NULL, NULL); + break; + case 'l': (void) add_srcfile(SRC_EXTLIB, optarg, srcfiles, NULL, NULL); break; @@ -638,7 +642,7 @@ out: for (s = srcfiles->next; s != srcfiles; s = s->next) { if (s->stype == SRC_EXTLIB) (void) load_ext(s->fullpath, "dlload", NULL); - else + else if (s->stype != SRC_INC) have_srcfile++; } @@ -781,6 +785,7 @@ usage(int exitval, FILE *fp) fputs(_("\t-E file\t\t\t--exec=file\n"), fp); fputs(_("\t-g\t\t\t--gen-pot\n"), fp); fputs(_("\t-h\t\t\t--help\n"), fp); + fputs(_("\t-i includefile\t\t--include=includefile\n"), fp); fputs(_("\t-l library\t\t--load=library\n"), fp); fputs(_("\t-L [fatal]\t\t--lint[=fatal]\n"), fp); fputs(_("\t-n\t\t\t--non-decimal-data\n"), fp); |