Fri Jul 20 10:33:31 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/src/slonik slonik.c
- Next message: [Slony1-commit] slony1-engine/src/slon slon.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv18296/slon
Modified Files:
slon.c
Log Message:
Patch per Drew Hammond
- add support longopt options for --help, --version and add them to
help output for slon
Index: slon.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/slon.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** slon.c 27 Jun 2007 16:20:24 -0000 1.74
--- slon.c 20 Jul 2007 17:33:29 -0000 1.75
***************
*** 96,99 ****
--- 96,101 ----
fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -h, --help print usage message and exit\n")
+ fprintf(stedrr, " -v, --version print version and exit\n");
fprintf(stderr, " -d <debuglevel> verbosity of logging (1..4)\n");
fprintf(stderr, " -s <milliseconds> SYNC check interval (default 10000)\n");
***************
*** 135,138 ****
--- 137,145 ----
extern char *optarg;
+ static struct option longopts[] = {
+ { "help", no_argument, NULL, "h"},
+ { "version", no_argument, NULL, "v"}
+ };
+
#ifdef WIN32
WSADATA wsaData;
***************
*** 166,170 ****
InitializeConfOptions();
! while ((c = getopt(argc, argv, "f:a:d:s:t:g:c:p:o:q:r:l:x:hv?")) != EOF)
{
switch (c)
--- 173,177 ----
InitializeConfOptions();
! while ((c = getopt_long(argc, argv, "f:a:d:s:t:g:c:p:o:q:r:l:x:hv?", longopts, NULL)) != -1)
{
switch (c)
- Previous message: [Slony1-commit] slony1-engine/src/slonik slonik.c
- Next message: [Slony1-commit] slony1-engine/src/slon slon.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list