From: Adam Dickmeiss Date: Tue, 4 Oct 1994 17:46:43 +0000 (+0000) Subject: Function options now returns arg with error option. X-Git-Tag: ZEBRA.1.0~823 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=1b29b77f09ae310c41f9cd0a6eeea2d562b7729e Function options now returns arg with error option. --- diff --git a/dfa/grepper.c b/dfa/grepper.c index cb55b53..97df6b1 100644 --- a/dfa/grepper.c +++ b/dfa/grepper.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: grepper.c,v $ - * Revision 1.2 1994-10-03 17:22:18 adam + * Revision 1.3 1994-10-04 17:46:43 adam + * Function options now returns arg with error option. + * + * Revision 1.2 1994/10/03 17:22:18 adam * Optimization of grepper. * * Revision 1.1 1994/09/27 16:31:18 adam @@ -394,7 +397,7 @@ int main (int argc, char **argv) } else { - log (LOG_FATAL, "unknown option"); + log (LOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } diff --git a/dfa/lexer.c b/dfa/lexer.c index 998b69f..b4c592d 100644 --- a/dfa/lexer.c +++ b/dfa/lexer.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: lexer.c,v $ - * Revision 1.3 1994-10-03 17:22:19 adam + * Revision 1.4 1994-10-04 17:46:44 adam + * Function options now returns arg with error option. + * + * Revision 1.3 1994/10/03 17:22:19 adam * Optimization of grepper. * * Revision 1.2 1994/09/27 16:31:20 adam @@ -126,16 +129,16 @@ int main (int argc, char **argv) return 1; } else while (--argc > 0) - if (**++argv != '-' && **argv) - { - ++no; - i = read_file (*argv, &dfa); - if (i) - return i; - dfas = mk_dfas (dfa, 2000); - rm_dfa (&dfa); - rm_dfas (&dfas); - } + if (**++argv != '-' && **argv) + { + ++no; + i = read_file (*argv, &dfa); + if (i) + return i; + dfas = mk_dfas (dfa, 2000); + rm_dfa (&dfa); + rm_dfas (&dfas); + } #ifdef MEMDEBUG imemstat(); #endif diff --git a/dict/dictext.c b/dict/dictext.c index cb8f41e..ebace7a 100644 --- a/dict/dictext.c +++ b/dict/dictext.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dictext.c,v $ - * Revision 1.2 1994-09-28 13:07:08 adam + * Revision 1.3 1994-10-04 17:46:54 adam + * Function options now returns arg with error option. + * + * Revision 1.2 1994/09/28 13:07:08 adam * Use log_mask_str now. * * Revision 1.1 1994/09/16 15:39:11 adam @@ -55,7 +58,7 @@ int main (int argc, char **argv) } else { - log (LOG_FATAL, "unknown option"); + log (LOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } diff --git a/dict/dicttest.c b/dict/dicttest.c index d9acca4..1ba36b7 100644 --- a/dict/dicttest.c +++ b/dict/dicttest.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dicttest.c,v $ - * Revision 1.13 1994-10-04 12:08:05 adam + * Revision 1.14 1994-10-04 17:46:55 adam + * Function options now returns arg with error option. + * + * Revision 1.13 1994/10/04 12:08:05 adam * Some bug fixes and some optimizations. * * Revision 1.12 1994/10/03 17:23:03 adam @@ -142,7 +145,7 @@ int main (int argc, char **argv) } else { - log (LOG_FATAL, "unknown option"); + log (LOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } diff --git a/util/Makefile b/util/Makefile index 477739c..733cd68 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,7 +1,7 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.14 1994-09-22 10:45:19 adam Exp $ +# $Id: Makefile,v 1.15 1994-10-04 17:47:09 adam Exp $ SHELL=/bin/sh INCLUDE=-I../include @@ -14,6 +14,8 @@ CPP=cc -E all: $(LIB) +alll: opt-test res-test all + opt-test: opt-test.o $(LIB) $(CC) -o opt-test opt-test.o $(LIB) diff --git a/util/res-test.c b/util/res-test.c index 0e6df18..d947dde 100644 --- a/util/res-test.c +++ b/util/res-test.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: res-test.c,v $ - * Revision 1.3 1994-08-18 11:02:27 adam + * Revision 1.4 1994-10-04 17:47:11 adam + * Function options now returns arg with error option. + * + * Revision 1.3 1994/08/18 11:02:27 adam * Implementation of res_write. * * Revision 1.2 1994/08/18 10:02:01 adam @@ -45,12 +48,12 @@ int main(int argc, char **argv) write_flag = 1; else { - log (LOG_FATAL, "unknown option"); + log (LOG_FATAL, "Unknown option '-%s'", arg); exit (1); } if (!resfile) { - log (LOG_FATAL, "Now resource file given."); + log (LOG_FATAL, "No resource file given."); exit (1); } res = res_open (resfile);