bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question and test patch


From: William Pursell
Subject: question and test patch
Date: Sun, 09 Dec 2007 09:41:41 +0000
User-agent: Icedove 1.5.0.14pre (X11/20071018)


The reason I'm starting to look at indent is that I have recently
decided that I really like the following style:

if( a )...
for( a = 0; b; ++c ) ...
f( a, b, c )

(In particular, I like <open-paren><space> ... <space><close-paren>)
I don't believe I can currently get indent to make that style
happen, and if someone can show me how, that'd be great.

I had to make a few minor edits to build from the 2.2.9 tarball,
and I'm not sure that the output of git-format-patch is
usable.  I'll post them here, and would appreciate advice on
the proper way to submit a patch if this is unacceptable.


From 377f861aa0ba6727946abfeaa86fb75f7575d961 Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Sun, 9 Dec 2007 09:32:37 +0000
Subject: [PATCH] Added stdlib.h

stdlib.h is needed for a declaration of exit().
---
 man/texinfo2man.c |    1 +
 src/output.c      |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/man/texinfo2man.c b/man/texinfo2man.c
index e301761..889d2b7 100644
--- a/man/texinfo2man.c
+++ b/man/texinfo2man.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h> /* For exit() */
 #include <malloc.h>
 #include <string.h>
 #include <ctype.h>
diff --git a/src/output.c b/src/output.c
index f9a8464..70263ae 100644
--- a/src/output.c
+++ b/src/output.c
@@ -12,6 +12,7 @@
  */

 #include <stdio.h>
+#include <stdlib.h> /* For exit() */
 #include <sys/types.h>
 #include <utime.h>
 #include <sys/stat.h>
--
1.4.4.4


From 68643d65c76e44d49915b7cb260bf41386405170 Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Sun, 9 Dec 2007 09:32:03 +0000
Subject: [PATCH] Removed external declaration of output file.

The external declaration conflicts with the
static symbol in output.c, and the file is
not used outside of output.c, so there is no
need for the external declaration.
---
 src/indent.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/indent.h b/src/indent.h
index 76a8a39..c321c2e 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -97,7 +97,6 @@ extern char *cur_line;
 extern unsigned long in_prog_size;

 /* The output file. */
-extern FILE *output;



--
1.4.4.4






reply via email to

[Prev in Thread] Current Thread [Next in Thread]