[exim-cvs] cvs commit: exim/exim-doc/doc-docbook spec.xfpt …

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Phil Pennock
Date:  
À: exim-cvs
Sujet: [exim-cvs] cvs commit: exim/exim-doc/doc-docbook spec.xfpt exim/exim-doc/doc-txt ChangeLog OptionLists.txt exim/exim-src/src exim.c
pdp 2010/06/06 03:08:51 BST

  Modified files:
    exim-doc/doc-docbook spec.xfpt 
    exim-doc/doc-txt     ChangeLog OptionLists.txt 
    exim-src/src         exim.c 
  Log:
  Implement --version.  Fixes: #973


  Revision  Changes    Path
  1.82      +5 -0      exim/exim-doc/doc-docbook/spec.xfpt
  1.625     +2 -0      exim/exim-doc/doc-txt/ChangeLog
  1.37      +1 -0      exim/exim-doc/doc-txt/OptionLists.txt
  1.68      +17 -12    exim/exim-src/src/exim.c


  Index: spec.xfpt
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-docbook/spec.xfpt,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- spec.xfpt    6 Jun 2010 01:35:41 -0000    1.81
  +++ spec.xfpt    6 Jun 2010 02:08:50 -0000    1.82
  @@ -1,4 +1,4 @@
  -. $Cambridge: exim/exim-doc/doc-docbook/spec.xfpt,v 1.81 2010/06/06 01:35:41 pdp Exp $
  +. $Cambridge: exim/exim-doc/doc-docbook/spec.xfpt,v 1.82 2010/06/06 02:08:50 pdp Exp $
   .
   . /////////////////////////////////////////////////////////////////////////////
   . This is the primary source of the Exim Manual. It is an xfpt document that is
  @@ -2604,6 +2604,11 @@
   The same output is generated if the Exim binary is called with no options and
   no arguments.


+.vitem &%--version%&
+.oindex "&%--version%&"
+This option is an alias for &%-bV%& and causes version information to be
+displayed.
+
.vitem &%-B%&<&'type'&>
.oindex "&%-B%&"
.cindex "8-bit characters"

  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.624
  retrieving revision 1.625
  diff -u -r1.624 -r1.625
  --- ChangeLog    6 Jun 2010 01:35:41 -0000    1.624
  +++ ChangeLog    6 Jun 2010 02:08:50 -0000    1.625
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.624 2010/06/06 01:35:41 pdp Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.625 2010/06/06 02:08:50 pdp Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -38,6 +38,8 @@

PP/11 Bugzilla 922: Documentation dusting, patch provided by John Horne.

+PP/12 Bugzilla 973: Implement --version.
+

Exim version 4.72
-----------------

  Index: OptionLists.txt
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/OptionLists.txt,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- OptionLists.txt    5 Jun 2010 21:42:53 -0000    1.36
  +++ OptionLists.txt    6 Jun 2010 02:08:50 -0000    1.37
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.36 2010/06/05 21:42:53 pdp Exp $
  +$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.37 2010/06/06 02:08:50 pdp Exp $


LISTS OF EXIM OPTIONS
---------------------
@@ -600,6 +600,7 @@

   --               Terminate options
   --help           Give a little help (not a lot)
  +--version        Give version information (alias for -bV)
   -B             * Ignored
   -bd            + Start daemon
   -bdf           + Start daemon and run it in the foreground


  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- exim.c    6 Jun 2010 00:27:52 -0000    1.67
  +++ exim.c    6 Jun 2010 02:08:50 -0000    1.68
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.67 2010/06/06 00:27:52 pdp Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.68 2010/06/06 02:08:50 pdp Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -685,8 +685,8 @@
   *          Show supported features               *
   *************************************************/


-/* This function is called for -bV and for -d to output the optional features
-of the current Exim binary.
+/* This function is called for -bV/--version and for -d to output the optional
+features of the current Exim binary.

   Arguments:  a FILE for printing
   Returns:    nothing
  @@ -1489,16 +1489,6 @@


unprivileged = (real_uid != root_uid && original_euid != root_uid);

  -/* If the first argument is --help, set usage_wanted and pretend there
  -are no arguments. This will cause a brief message to be given.   We do
  -the message generation downstream so we can pick up how we were invoked */
  -
  -if (argc > 1 && Ustrcmp(argv[1], "--help") == 0)
  -  {
  -  argc = 1;
  -  usage_wanted = TRUE;
  -  }
  -
   /* Scan the program's arguments. Some can be dealt with right away; others are
   simply recorded for checking and handling afterwards. Do a high-level switch
   on the second character (the one after '-'), to save some effort. */
  @@ -1563,6 +1553,21 @@
       argrest++;
       }


  +  /* deal with --option_aliases */
  +  else if (switchchar == '-')
  +    {
  +    if (Ustrcmp(argrest, "help") == 0)
  +      {
  +      usage_wanted = TRUE;
  +      break;
  +      }
  +    else if (Ustrcmp(argrest, "version") == 0)
  +      {
  +      switchchar = 'b';
  +      argrest = "V";
  +      }
  +    }
  +
     /* High-level switch on active initial letter */


     switch(switchchar)