This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[{AT


[PATCH RFC] Protoize ch-exp.c, core-regset.c
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

More protoization.  I'll commit this one after midnight GMT on
Saturday, Aug 5.

So far, on everything that I've protoized by hand, I've run the
transformed declaration through indent.  But indent did quite poorly
on fetch_core_registers().  (It put the function name, the parameter
declarations, and the comment for the final parameter on the same
line.  And then it put the right paren on a line of its own.)  So I
indented this one by hand so it'd look nice.

Since indent seems to have difficulty with comments in the parameter
list, I suspect that this isn't the only case that I'll have to
override indent on.  (But if the result looks at all reasonable, I'll
prefer indent output over my own hand formatting.)

I've also been running the diffs through check-decls and compiling the
result with "gcc -Wall" to catch any silly mistakes that I might've
made.  This is important since some of the code that's getting
transformed is disabled via ``#if 0'' and therefore wouldn't be
checked by doing a build of gdb.  Also, and more importantly, the
check-decls script checks the correctness of the transformation which
is something else that might not be caught by doing a gdb build.

	* ch-exp.c (parse_opt_name_string): Protoize.
	* core-regset.c (fetch_core_registers): Protoize.

Index: ch-exp.c
===================================================================
RCS file: /cvs/src/src/gdb/ch-exp.c,v
retrieving revision 1.4
diff -u -r1.4 ch-exp.c
--- ch-exp.c	2000/07/30 01:48:24	1.4
+++ ch-exp.c	2000/08/03 18:35:14
@@ -302,8 +302,7 @@
 
 #if 0
 static tree
-parse_opt_name_string (allow_all)
-     int allow_all;		/* 1 if ALL is allowed as a postfix */
+parse_opt_name_string (int allow_all /* 1 if ALL is allowed as a postfix */ )
 {
   int token = PEEK_TOKEN ();
   tree name;
Index: core-regset.c
===================================================================
RCS file: /cvs/src/src/gdb/core-regset.c,v
retrieving revision 1.5
diff -u -r1.5 core-regset.c
--- core-regset.c	2000/07/30 01:48:25	1.5
+++ core-regset.c	2000/08/03 18:35:14
@@ -81,11 +81,10 @@
  */
 
 static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
-     char *core_reg_sect;
-     unsigned core_reg_size;
-     int which;
-     CORE_ADDR reg_addr;	/* Unused in this version */
+fetch_core_registers (char *core_reg_sect,
+		      unsigned core_reg_size,
+		      int which,
+		      CORE_ADDR reg_addr /* Unused in this version */ )
 {
 #if defined (HAVE_GREGSET_T) && defined (HAVE_FPREGSET_T)
   gregset_t gregset;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]