[git] GnuPG - branch, master, updated. gnupg-2.1.15-154-g05e4889

by Werner Koch cvs at cvs.gnupg.org
Tue Sep 20 09:01:01 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  05e488943ca5d980b9bda2f21426cc7a17b41410 (commit)
       via  81cb71ab4d516a1e8b09a69508f7887f98508642 (commit)
      from  9c1b3bc25a1b38c4eda31bf12ccc10d94bb05212 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 05e488943ca5d980b9bda2f21426cc7a17b41410
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Sep 20 08:55:04 2016 +0200

    doc: Add a few extra coding standard notes.
    
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/HACKING b/doc/HACKING
index 1888b29..bb04fdf 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -38,28 +38,31 @@ are delimited by a comma (e.g. =scd,w32:=). Commonly found keywords
 are
 
  - agent   :: The gpg-agent component
- - ssh     :: The ssh-agent part of the agent
+ - build   :: Changes to the build system
+ - ccid    :: The CCID driver in scdaemon
  - common  :: Code in common
- - iobuf   :: The IOBUF system in common
+ - dirmngr :: The dirmngr component
+ - doc     :: Documentation changes
  - gpg     :: The gpg or gpgv components
- - gpgsm   :: The gpgsm component
+ - sm      :: The gpgsm component (also "gpgsm")
+ - gpgscm  :: The regression test driver
+ - indent  :: Indentation and similar changes
+ - iobuf   :: The IOBUF system in common
+ - po      :: Translations
  - scd     :: The scdaemon component
- - ccid    :: The CCID driver in scdaemon
- - dirmngr :: The dirmngr component
- - wks     :: The web key service tools
+ - speedo  :: Speedo build system specific changes
+ - ssh     :: The ssh-agent part of the agent
+ - tests   :: The regressions tests
  - tools   :: Other code in tools
  - w32     :: Windows related code
- - po      :: Translations
- - build   :: Changes to the build system
- - speedo  :: Speedo build system specific changes
- - doc     :: Documentation changes
- - indent  :: Indentation and similar changes
+ - wks     :: The web key service tools
+ - yat2m   :: The yat2m tool.
 
 Typo fixes and documentation updates don't need a ChangeLog entry;
 thus you would use a commit message like
 
 #+begin_example
-Fix typo in a comment
+doc: Fix typo in a comment
 
 --
 #+end_example
@@ -128,9 +131,28 @@ Note that such a comment will be removed if the git commit option
   - Only certain C99 features may be used (see below); in general
     stick to C90.
   - Please do not use C++ =//= style comments.
+  - Do not use comments like:
+#+begin_src
+      if (foo)
+        /* Now that we know that foo is true we can call bar.  */
+        bar ();
+#+end_src
+    instead write the comment on the if line or before it.  You may
+    also use a block and put the comment inside.
+  - Please use asterisks on the left of longer comments.  This makes
+    it easier to read without syntax highlighting, on printouts, and
+    for blind people.
   - Try to fit lines into 80 columns.
   - Ignore signed/unsigned pointer mismatches
   - No arithmetic on void pointers; cast to char* first.
+  - Do not use
+#+begin_src
+      if ( 42 == foo )
+#+end_src
+    this is harder to read and modern compilers are pretty good in
+    detecing accidential assignments.  It is also suggested not to
+    compare to 0 or NULL but to test the value direct or with a '!';
+    this makes it easier to see that a boolean test is done.
   - We use our own printf style functions like =es_printf=, and
     =gpgrt_asprintf= (or the =es_asprintf= macro) which implement most
     C99 features with the exception of =wchar_t= (which should anyway
@@ -145,12 +167,15 @@ Note that such a comment will be removed if the git commit option
   - Always use xfree() instead of free().  If it is not easy to see
     that the freed variable is not anymore used, explicitly set the
     variable to NULL.
+  - New code shall in general use xtrymalloc or xtrycalloc and check
+    for an error (use gpg_error_from_errno()).
   - Init function local variables only if needed so that the compiler
     can do a better job in detecting uninitialized variables which may
     indicate a problem with the code.
   - Never init static or file local variables to 0 to make sure they
     end up in BSS.
-  - Use --enable-maintainer-mode with configure.
+  - Use --enable-maintainer-mode with configure so that all suitable
+    warnings are enabled.
 
 ** Variable names
 

commit 81cb71ab4d516a1e8b09a69508f7887f98508642
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Sep 20 08:32:25 2016 +0200

    doc: Fix fix "Not(e) that you can(not) abbreviate".
    
    --
    
    The commands --help, --version, --dump-options are special in that
    they can't be abbreciated on the command line.  This is to avoid
    problems with regular options with the same prefix.
    
    Fixes-commit: 0a27d8a57c4c990fcada4278a1ce2e6fc9043e9
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
index a6b7885..49e0f34 100644
--- a/doc/dirmngr.texi
+++ b/doc/dirmngr.texi
@@ -66,7 +66,7 @@ abbreviate this command.
 @item --help, -h
 @opindex help
 Print a usage message summarizing the most useful command-line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --dump-options
 @opindex dump-options
diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi
index 498e034..b933b80 100644
--- a/doc/gpg-agent.texi
+++ b/doc/gpg-agent.texi
@@ -137,7 +137,7 @@ abbreviate this command.
 @itemx -h
 @opindex help
 Print a usage message summarizing the most useful command-line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --dump-options
 @opindex dump-options
diff --git a/doc/gpg.texi b/doc/gpg.texi
index f97b440..21f413e 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -141,7 +141,7 @@ cannot abbreviate this command.
 @itemx -h
 @opindex help
 Print a usage message summarizing the most useful command line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --warranty
 @opindex warranty
diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi
index 2012582..0082c19 100644
--- a/doc/gpgsm.texi
+++ b/doc/gpgsm.texi
@@ -85,7 +85,7 @@ cannot abbreviate this command.
 @item --help, -h
 @opindex help
 Print a usage message summarizing the most useful command-line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --warranty
 @opindex warranty
diff --git a/doc/scdaemon.texi b/doc/scdaemon.texi
index 4ae7bc0..1724b42 100644
--- a/doc/scdaemon.texi
+++ b/doc/scdaemon.texi
@@ -72,7 +72,7 @@ abbreviate this command.
 @item --help, -h
 @opindex help
 Print a usage message summarizing the most useful command-line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --dump-options
 @opindex dump-options
diff --git a/doc/tools.texi b/doc/tools.texi
index 37a65d3..899b00b 100644
--- a/doc/tools.texi
+++ b/doc/tools.texi
@@ -1542,7 +1542,7 @@ abbreviate this command.
 @item --help, -h
 @opindex help
 Print a usage message summarizing the most useful command-line options.
-Note that you can abbreviate this command.
+Note that you cannot abbreviate this command.
 
 @item --quiet, -q
 @opindex quiet

-----------------------------------------------------------------------

Summary of changes:
 doc/HACKING        | 51 ++++++++++++++++++++++++++++++++++++++-------------
 doc/dirmngr.texi   |  2 +-
 doc/gpg-agent.texi |  2 +-
 doc/gpg.texi       |  2 +-
 doc/gpgsm.texi     |  2 +-
 doc/scdaemon.texi  |  2 +-
 doc/tools.texi     |  2 +-
 7 files changed, 44 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list