Function options now returns arg with error option.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 4 Oct 1994 17:46:43 +0000 (17:46 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 4 Oct 1994 17:46:43 +0000 (17:46 +0000)
dfa/grepper.c
dfa/lexer.c
dict/dictext.c
dict/dicttest.c
util/Makefile
util/res-test.c

index cb55b53..97df6b1 100644 (file)
@@ -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);
         }
     }
index 998b69f..b4c592d 100644 (file)
@@ -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
index cb8f41e..ebace7a 100644 (file)
@@ -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);
         }
     }
index d9acca4..1ba36b7 100644 (file)
@@ -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);
         }
     }
index 477739c..733cd68 100644 (file)
@@ -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)
 
index 0e6df18..d947dde 100644 (file)
@@ -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);