OSSP CVS Repository

ossp - Check-in [1809]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1809
Date: 2002-Feb-05 20:12:24 (local)
2002-Feb-05 19:12:24 (UTC)
User:ms
Branch:
Comment: Popt option parsing works fundementally.

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/rc/rc.c      1.6 -> 1.7     5 inserted, 4 deleted
ossp-pkg/rc/rc_version.c      added-> 1.1

ossp-pkg/rc/rc.c 1.6 -> 1.7

--- rc.c 2002/02/05 17:29:17     1.6
+++ rc.c 2002/02/05 19:12:24     1.7
@@ -91,7 +91,8 @@
         /* Single argument long options with short keys */
         { "locate",  'L', POPT_ARG_STRING, 0, RC_LOC_VAL, RC_LOC_DESC, "regx" },
         { "conf",    'c', POPT_ARG_STRING, 0, RC_CNF_VAL, RC_CNF_DESC, "path" },
-        { "func",    'f', POPT_ARG_STRING, 0, RC_FNC_VAL, RC_FNC_DESC, "path" },
+        { "func",    'f', POPT_ARG_STRING, &szFuncfile,\
+            RC_FNC_VAL, RC_FNC_DESC, "path" },
         { "query",   'q', POPT_ARG_STRING, 0, RC_QRY_VAL, RC_QRY_DESC, "varx" },
         { "tmp",     't', POPT_ARG_STRING, 0, RC_TMP_VAL, RC_TMP_DESC, "path" },
 
@@ -161,13 +162,13 @@
         fprintf(stderr, "%s: %s\n",
             popt_badoption(optCon, POPT_BADOPTION_NOALIAS),
             popt_strerror(cOpt));
-        die(RC_ERR_INT);
+        die(RC_ERR_ARG);
     }
 
     /* Print out options, szCLIBuf chosen */
-    printf("Options chosen: ");
+    fprintf(stderr, "Options chosen: ");
     for (nIter = 0; nIter < iBufpos ; nIter++)
-        printf("-%c ", pcBuf[nIter]);
+        fprintf(stderr, "-%c ", pcBuf[nIter]);
     if (szFuncfile)
         fprintf(stderr, "-f %s ", szFuncfile);
     fprintf(stderr, "\nRun these commands: %s\n", szCLIBuf);


ossp-pkg/rc/rc_version.c -> 1.1

*** /dev/null    Fri Mar 29 06:30:35 2024
--- -    Fri Mar 29 06:32:21 2024
***************
*** 0 ****
--- 1,46 ----
+ /*
+ **  rc_version.c -- Version Information for OSSP rc (syntax: C/C++)
+ **  [automatically generated and maintained by GNU shtool]
+ */
+ 
+ #ifdef _RC_VERSION_C_AS_HEADER_
+ 
+ #ifndef _RC_VERSION_C_
+ #define _RC_VERSION_C_
+ 
+ #define RC_VERSION 0x001201
+ 
+ typedef struct {
+     const int   v_hex;
+     const char *v_short;
+     const char *v_long;
+     const char *v_tex;
+     const char *v_gnu;
+     const char *v_web;
+     const char *v_sccs;
+     const char *v_rcs;
+ } rc_version_t;
+ 
+ extern rc_version_t rc_version;
+ 
+ #endif /* _RC_VERSION_C_ */
+ 
+ #else /* _RC_VERSION_C_AS_HEADER_ */
+ 
+ #define _RC_VERSION_C_AS_HEADER_
+ #include "rc_version.c"
+ #undef  _RC_VERSION_C_AS_HEADER_
+ 
+ rc_version_t rc_version = {
+     0x001201,
+     "0.1.1",
+     "0.1.1 (05-Feb-2002)",
+     "This is OSSP rc, Version 0.1.1 (05-Feb-2002)",
+     "OSSP rc 0.1.1 (05-Feb-2002)",
+     "OSSP rc/0.1.1",
+     "@(#)OSSP rc 0.1.1 (05-Feb-2002)",
+     "$Id: rc_version.c,v 1.1 2002/02/05 19:12:24 ms Exp $"
+ };
+ 
+ #endif /* _RC_VERSION_C_AS_HEADER_ */
+ 

CVSTrac 2.0.1