[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet-texinfo] branch master updated: fix indent
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet-texinfo] branch master updated: fix indent |
Date: |
Thu, 15 Jun 2017 23:16:26 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet-texinfo.
The following commit(s) were added to refs/heads/master by this push:
new d933a7d fix indent
d933a7d is described below
commit d933a7d1ec2b90a2fcd58b353ad4d27088807c7c
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jun 15 21:43:11 2017 +0200
fix indent
---
developer.texi | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/developer.texi b/developer.texi
index 939455e..ceffaaa 100644
--- a/developer.texi
+++ b/developer.texi
@@ -764,9 +764,15 @@ is used if the method for advancing in the loop is not a
straightforward
increment operation. In particular, we use:@
@example
-next = head; while (NULL != (pos = next)) @{ next = pos->next; if (!
-should_free (pos)) continue; GNUNET_CONTAINER_DLL_remove (head, tail, pos);
-GNUNET_free (pos); @}
+next = head;
+while (NULL != (pos = next))
address@hidden
+ next = pos->next;
+ if (! should_free (pos))
+ continue;
+ GNUNET_CONTAINER_DLL_remove (head, tail, pos);
+ GNUNET_free (pos);
address@hidden
@end example
@@ -776,8 +782,11 @@ simple @code{for} paradigm of @code{for(INIT;TEST;INC)}).
However, for loops
that do follow the simple @code{for} paradigm we do use @code{for}, even if it
involves linked lists:
@example
-/* simple iteration over a linked list */ for
-(pos = head; NULL != pos; pos = pos->next) @{ use (pos); @}
+/* simple iteration over a linked list */
+for (pos = head; NULL != pos; pos = pos->next)
address@hidden
+ use (pos);
address@hidden
@end example
@@ -801,14 +810,17 @@ using deeply nested @code{if} statements. However, except
for addition and
multiplication, all operators should use parens. This is fine:@
@example
-if ( (1 == foo) || ((0 == bar) && (x != y)) ) return x;
+if ( (1 == foo) || ((0 == bar) && (x != y)) )
+ return x;
@end example
However, this is not:
@example
-if (1 == foo) return x; if (0 == bar && x != y)
-return x;
+if (1 == foo)
+ return x;
+if (0 == bar && x != y)
+ return x;
@end example
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet-texinfo] branch master updated: fix indent,
gnunet <=