OSSP CVS Repository

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

Check-in Number: 325
Date: 2001-Jan-19 16:01:19 (local)
2001-Jan-19 15:01:19 (UTC)
User:rse
Branch:
Comment: First step in GNu shtool version support: Add version.c and use it for "petidomo --version". Support for handling version.c in Makefile.in is coming later.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/Makefile.in      1.32 -> 1.33     1 inserted, 1 deleted
ossp-pkg/petidomo/main.c      1.13 -> 1.14     6 inserted, 2 deleted
ossp-pkg/petidomo/version.c      added-> 1.1

ossp-pkg/petidomo/Makefile.in 1.32 -> 1.33

--- Makefile.in  2001/01/19 14:14:18     1.32
+++ Makefile.in  2001/01/19 15:01:19     1.33
@@ -32,7 +32,7 @@
                   filter.o handleacl.o help.o hermes.o index.o io.o        \
                   listserv.o mailer.o members.o parsearray.o password.o    \
                   rfcparse.o subscribe.o tool.o unsubscribe.o main.o       \
-                  queue_command.o queue_posting.o approve.o address-db.o
+                  queue_command.o queue_posting.o approve.o address-db.o version.o
 LIBS            = librfc822/librfc822.a libmpools/libmpools.a              \
                   liblists/liblists.a libargv/libargv.a                    \
                   libconfigfile/libconfigfile.a libtext/libtext.a


ossp-pkg/petidomo/main.c 1.13 -> 1.14

--- main.c       2001/01/19 14:26:48     1.13
+++ main.c       2001/01/19 15:01:19     1.14
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.13 $
+   $Revision: 1.14 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -27,6 +27,10 @@
 #include "libtext/text.h"
 #include "petidomo.h"
 
+#define _VERSION_C_AS_HEADER_
+#include "version.c"
+#undef  _VERSION_C_AS_HEADER_
+
 #ifndef LOG_PERROR
 #  define LOG_PERROR 0
 #endif
@@ -83,7 +87,7 @@
     /* Parse the command line. */
 
     argv_help_string = "Petidomo Mailing List Server";
-    argv_version_string = "Petidomo";
+    argv_version_string = (char *)petidomo_version.v_gnu;
     argv_process(args, argc, argv);
 
     /* Log a few helpful facts about this Petidomo instance. */


ossp-pkg/petidomo/version.c -> 1.1

*** /dev/null    Mon Apr 29 08:22:10 2024
--- -    Mon Apr 29 08:26:51 2024
***************
*** 0 ****
--- 1,46 ----
+ /*
+ **  version.c -- Version Information for Petidomo (syntax: C/C++)
+ **  [automatically generated and maintained by GNU shtool]
+ */
+ 
+ #ifdef _VERSION_C_AS_HEADER_
+ 
+ #ifndef _VERSION_C_
+ #define _VERSION_C_
+ 
+ #define PETIDOMO_VERSION 0x400101
+ 
+ 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;
+ } petidomo_version_t;
+ 
+ extern petidomo_version_t petidomo_version;
+ 
+ #endif /* _VERSION_C_ */
+ 
+ #else /* _VERSION_C_AS_HEADER_ */
+ 
+ #define _VERSION_C_AS_HEADER_
+ #include "version.c"
+ #undef  _VERSION_C_AS_HEADER_
+ 
+ petidomo_version_t petidomo_version = {
+     0x400101,
+     "4.0b1",
+     "4.0b1 (18-Jan-2001)",
+     "This is Petidomo, Version 4.0b1 (18-Jan-2001)",
+     "Petidomo 4.0b1 (18-Jan-2001)",
+     "Petidomo/4.0b1",
+     "@(#)Petidomo 4.0b1 (18-Jan-2001)",
+     "$Id: version.c,v 1.1 2001/01/19 15:01:19 rse Exp $"
+ };
+ 
+ #endif /* _VERSION_C_AS_HEADER_ */
+ 

CVSTrac 2.0.1