[commit] typeprint.c whitespace/formatting cleanup

Doug Evans dje@google.com
Sun Feb 3 01:25:00 GMT 2008


On Jan 28, 2008 8:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Mon, 28 Jan 2008 19:42:12 -0800 (PST)
> > From: dje@google.com (Doug Evans)
> >
> > Hi.  Do changes like the following fall under the "obvious" rule?
>
> Yes.

Thanks.  I checked this patch in under the obvious rule.
[Removing the extra parens is not unreasonable - there are folks on
both sides of this issue - I left it for another day.]

2008-02-02  Doug Evans  <dje@google.com>

	* typeprint.c (*): Whitespace cleanup.

Index: typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/typeprint.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -u -p -r1.30 -r1.31
--- typeprint.c	1 Jan 2008 22:53:13 -0000	1.30
+++ typeprint.c	3 Feb 2008 01:02:47 -0000	1.31
@@ -133,10 +133,9 @@ whatis_exp (char *exp, int show)

   if (objectprint)
     {
-      if (((TYPE_CODE (type) == TYPE_CODE_PTR) ||
-           (TYPE_CODE (type) == TYPE_CODE_REF))
-          &&
-          (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+      if (((TYPE_CODE (type) == TYPE_CODE_PTR)
+	   || (TYPE_CODE (type) == TYPE_CODE_REF))
+	  && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
         {
           real_type = value_rtti_target_type (val, &full, &top, &using_enc);
           if (real_type)
@@ -148,7 +147,7 @@ whatis_exp (char *exp, int show)
             }
         }
       else if (TYPE_CODE (type) == TYPE_CODE_CLASS)
-  real_type = value_rtti_type (val, &full, &top, &using_enc);
+	real_type = value_rtti_type (val, &full, &top, &using_enc);
     }

   printf_filtered ("type = ");
@@ -196,7 +195,7 @@ ptype_command (char *typename, int from_
    currently use it, and it wasn't clear if it really belonged somewhere
    else (like printcmd.c).  There are a lot of other gdb routines that do
    something similar, but they are generally concerned with printing values
-   that come from the inferior in target byte order and target size. */
+   that come from the inferior in target byte order and target size.  */

 void
 print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
@@ -271,7 +270,7 @@ print_type_scalar (struct type *type, LO

 /* Dump details of a type specified either directly or indirectly.
    Uses the same sort of type lookup mechanism as ptype_command()
-   and whatis_command(). */
+   and whatis_command().  */

 void
 maintenance_print_type (char *typename, int from_tty)
@@ -309,7 +308,6 @@ maintenance_print_type (char *typename,
 void
 _initialize_typeprint (void)
 {
-
   add_com ("ptype", class_vars, ptype_command, _("\
 Print definition of type TYPE.\n\
 Argument may be a type name defined by typedef, or \"struct STRUCT-TAG\"\n\
@@ -318,5 +316,4 @@ The selected stack frame's lexical conte

   add_com ("whatis", class_vars, whatis_command,
 	   _("Print data type of expression EXP."));
-
 }



More information about the Gdb-patches mailing list