doc: Remove C++ style comments and update HACKING.

--
This commit is contained in:
Werner Koch 2015-08-20 17:42:55 +02:00
parent 0d5a4138f2
commit b8adfc4186
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 37 additions and 13 deletions

View File

@ -27,7 +27,7 @@ every_other_filter (void *opaque, int control,
else
c2 = iobuf_readbyte (chain);
// printf ("Discarding %d (%c); return %d (%c)\n", c, c, c2, c2);
/* printf ("Discarding %d (%c); return %d (%c)\n", c, c, c2, c2); */
if (c2 == -1)
{
@ -149,12 +149,12 @@ main (int argc, char *argv[])
n = 0;
while ((c = iobuf_readbyte (iobuf)) != -1)
{
// printf ("%d: %c\n", n + 1, (char) c);
/* printf ("%d: %c\n", n + 1, (char) c); */
assert (content[2 * n + 1] == c);
n ++;
}
// printf ("Got EOF after reading %d bytes (content: %d)\n",
// n, strlen (content));
/* printf ("Got EOF after reading %d bytes (content: %d)\n", */
/* n, strlen (content)); */
assert (n == strlen (content) / 2);
iobuf_close (iobuf);
@ -185,7 +185,7 @@ main (int argc, char *argv[])
while ((c = iobuf_readbyte (iobuf)) != -1)
{
// printf ("%d: %c\n", n + 1, (char) c);
/* printf ("%d: %c\n", n + 1, (char) c); */
assert (content[2 * (n - 5) + 1] == c);
n ++;
}
@ -293,7 +293,7 @@ main (int argc, char *argv[])
c = iobuf_readbyte (iobuf);
if (c == -1 && lastc == -1)
{
// printf("Two EOFs in a row. Done.\n");
/* printf("Two EOFs in a row. Done.\n"); */
assert (n == 44);
break;
}
@ -302,13 +302,13 @@ main (int argc, char *argv[])
if (c == -1)
{
// printf("After %d bytes, got EOF.\n", n);
/* printf("After %d bytes, got EOF.\n", n); */
assert (n == 27 || n == 44);
}
else
{
n ++;
// printf ("%d: '%c' (%d)\n", n, c, c);
/* printf ("%d: '%c' (%d)\n", n, c, c); */
}
}
}
@ -366,7 +366,7 @@ main (int argc, char *argv[])
for (n = 0; (c = iobuf_get (iobuf)) != -1; n ++)
{
// printf ("%d: `%c'\n", n, c);
/* printf ("%d: `%c'\n", n, c); */
buffer[n] = c;
}

View File

@ -32,11 +32,31 @@ TAB, will not exceed 80 columns. If you want to add text which shall
not be copied to the ChangeLog, separate it by a line consisting of
two dashes at the begin of a line.
Typo fixes and documentation updates don't need a ChangeLog Entry,
The one-line summary usually starts with a keyword to identify the
mainly affected subsystem. If more than one keyword is required the
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
- common :: Code in common
- iobuf :: The IOBUF system in common
- gpg :: The gpg or gpgv components
- gpgsm :: The gpgsm component
- scd :: The scdaemon component
- ccid :: The CCID driver in scdaemon
- dirmngr :: The dirmngr component
- w32 :: Windows related code
- po :: Translations
- build :: Changes to the build system
- speedo :: Speedo build system specific changes
- doc :: Documentation changes
Typo fixes and documentation updates don't need a ChangeLog entry;
thus you would use a commit message like
#+begin_example
Fix type in a comment
Fix typo in a comment
--
#+end_example
@ -54,7 +74,6 @@ Note that such a comment will be removed if the git commit option
=--cleanup=scissor= is used.
** License policy
GnuPG is licensed under the GPLv3+ with some files under a mixed
@ -104,6 +123,12 @@ Note that such a comment will be removed if the git commit option
need. If you really need to do it, use a separate commit for such a
change.
- C99 syntax should not be used; stick to C90.
- Please do not use C++ =//= style comments.
- Try to fit lines into 80 columns.
- Ignore signed/unsigned pointer mismatches
- No arithmetic on void pointers; cast to char* first.
** Commit log keywords
- GnuPG-bug-id :: Values are comma or space delimited bug numbers
@ -156,7 +181,6 @@ Note that such a comment will be removed if the git commit option
the git repositories. In case of problems, don't hesitate to ask
on the gnupg-devel mailing for help.
* Debug hints
See the manual for some hints.