[patch] binutils/[abc]*.[ch]: Fix formatting.

Kazu Hirata kazu@cs.umass.edu
Sun May 19 09:19:00 GMT 2002


Hi,

Attached is a patch to fix formatting.  Committed as obvious.

Kazu Hirata

2002-05-19  Kazu Hirata  <kazu@cs.umass.edu>

	* addr2line.c: Fix formatting.
	* ar.c: Likewise.
	* arsup.c: Likewise.
	* arsup.h: Likewise.
	* binemul.c: Likewise.
	* binemul.h: Likewise.
	* bucomm.c: Likewise.
	* coffdump.c: Likewise.
	* coffgrok.c: Likewise.
	* coffgrok.h: Likewise.

Index: addr2line.c
===================================================================
RCS file: /cvs/src/src/binutils/addr2line.c,v
retrieving revision 1.13
diff -u -r1.13 addr2line.c
--- addr2line.c	23 Jan 2002 16:12:55 -0000	1.13
+++ addr2line.c	19 May 2002 15:45:13 -0000
@@ -20,10 +20,10 @@
 
 /* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de
 
-   Usage: 
+   Usage:
    addr2line [options] addr addr ...
    or
-   addr2line [options] 
+   addr2line [options]
 
    both forms write results to stdout, the second form reads addresses
    to be converted from stdin.  */
@@ -314,14 +314,14 @@
 	  if (optarg != NULL)
 	    {
 	      enum demangling_styles style;
-	      
+
 	      style = cplus_demangle_name_to_style (optarg);
-	      if (style == unknown_demangling) 
+	      if (style == unknown_demangling)
 		fatal (_("unknown demangling style `%s'"),
 		       optarg);
-	      
+
 	      cplus_demangle_set_style (style);
-           }
+	    }
 	  break;
 	case 'e':
 	  filename = optarg;
Index: ar.c
===================================================================
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.25
diff -u -r1.25 ar.c
--- ar.c	4 May 2002 01:55:39 -0000	1.25
+++ ar.c	19 May 2002 15:45:14 -0000
@@ -222,7 +222,7 @@
 	    {
 	      ++match_count;
 	      if (counted_name_mode
-		  && match_count != counted_name_counter) 
+		  && match_count != counted_name_counter)
 		{
 		  /* Counting, and didn't match on count; go on to the
                      next one.  */
@@ -248,7 +248,7 @@
   FILE *s;
 
   s = help ? stdout : stderr;
-  
+
   if (! is_ranlib)
     {
       /* xgettext:c-format */
@@ -283,7 +283,7 @@
     }
   else
     {
-    /* xgettext:c-format */
+      /* xgettext:c-format */
       fprintf (s, _("Usage: %s [options] archive\n"), program_name);
       fprintf (s, _(" Generate an index to speed access to archives\n"));
       fprintf (s, _(" The options are:\n\
@@ -405,14 +405,14 @@
 
       temp = strrchr (program_name, '/');
 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
-	{
-	  /* We could have foo/bar\\baz, or foo\\bar, or d:bar.  */
-	  char *bslash = strrchr (program_name, '\\');
-	  if (temp == NULL || (bslash != NULL && bslash > temp))
-	    temp = bslash;
-	  if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
-	    temp = program_name + 1;
-	}
+      {
+	/* We could have foo/bar\\baz, or foo\\bar, or d:bar.  */
+	char *bslash = strrchr (program_name, '\\');
+	if (temp == NULL || (bslash != NULL && bslash > temp))
+	  temp = bslash;
+	if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
+	  temp = program_name + 1;
+      }
 #endif
       if (temp == NULL)
 	temp = program_name;
@@ -452,7 +452,7 @@
       break;
   argv += (i - 1);
   argc -= (i - 1);
-  	  
+
   if (is_ranlib)
     {
       boolean touch = false;
@@ -626,12 +626,12 @@
       if (postype != pos_default)
 	posname = argv[arg_index++];
 
-      if (counted_name_mode) 
+      if (counted_name_mode)
 	{
-          if (operation != extract && operation != delete) 
+	  if (operation != extract && operation != delete)
 	     fatal (_("`N' is only meaningful with the `x' and `d' options."));
 	  counted_name_counter = atoi (argv[arg_index++]);
-          if (counted_name_counter <= 0)
+	  if (counted_name_counter <= 0)
 	    fatal (_("Value for `N' must be positive."));
 	}
 
@@ -667,7 +667,7 @@
       if (operation == quick_append)
 	{
 	  /* Note that quick appending to a non-existent archive creates it,
-	     even if there are no files to append. */
+	     even if there are no files to append.  */
 	  do_quick_append (inarch_filename, files);
 	  xexit (0);
 	}
@@ -882,7 +882,7 @@
   long ncopied = 0;
   long size;
   struct stat buf;
-  
+
   if (bfd_stat_arch_elt (abfd, &buf) != 0)
     /* xgettext:c-format */
     fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
@@ -891,7 +891,7 @@
   if (size < 0)
     /* xgettext:c-format */
     fatal (_("stat returns negative size for %s"), bfd_get_filename (abfd));
-  
+
   if (verbose)
     printf ("x - %s\n", bfd_get_filename (abfd));
 
@@ -1203,11 +1203,11 @@
       while (*current_ptr_ptr)
 	{
 	  if (FILENAME_CMP (normalize (*files_to_delete, arch),
-		      (*current_ptr_ptr)->filename) == 0)
+			    (*current_ptr_ptr)->filename) == 0)
 	    {
 	      ++match_count;
 	      if (counted_name_mode
-		  && match_count != counted_name_counter) 
+		  && match_count != counted_name_counter)
 		{
 		  /* Counting, and didn't match on count; go on to the
                      next one.  */
@@ -1339,7 +1339,7 @@
 
 		  after_bfd = get_pos_bfd (&arch->next, pos_after,
 					   current->filename);
-		  if (ar_emul_replace (after_bfd, *files_to_move, 
+		  if (ar_emul_replace (after_bfd, *files_to_move,
 				       verbose))
 		    {
 		      /* Snip out this entry from the chain.  */
Index: arsup.c
===================================================================
RCS file: /cvs/src/src/binutils/arsup.c,v
retrieving revision 1.5
diff -u -r1.5 arsup.c
--- arsup.c	5 Nov 2001 16:20:37 -0000	1.5
+++ arsup.c	19 May 2002 15:45:14 -0000
@@ -74,7 +74,7 @@
 	  boolean found = false;
 	  bfd *prev = arch;
 
-	  for (head = arch->next; head; head = head->next) 
+	  for (head = arch->next; head; head = head->next)
 	    {
 	      if (head->filename != NULL
 		  && FILENAME_CMP (ptr->name, head->filename) == 0)
@@ -121,7 +121,7 @@
 	  output = 0;
 	}
     }
-  else 
+  else
     outfile = stdout;
 
   map_over_list (arch, ar_directory_doer, list);
@@ -136,23 +136,23 @@
 DEFUN_VOID(prompt)
 {
   extern int interactive;
-  if (interactive) 
+  if (interactive)
   {
     printf("AR >");
-    fflush(stdout); 
+    fflush(stdout);
   }
 }
 
 void
 maybequit ()
 {
-  if (! interactive) 
+  if (! interactive)
     xexit (9);
 }
 
 
 bfd *obfd;
-char *real_name ; 
+char *real_name ;
 void
 DEFUN(ar_open,(name, t),
       char *name AND
@@ -250,7 +250,7 @@
     fprintf(stderr, _("%s: no open output archive\n"), program_name);
     maybequit();
   }
-  else 
+  else
   {
     while (list) {
       bfd *abfd = bfd_openr(list->name, NULL);
@@ -273,7 +273,7 @@
 void
 DEFUN_VOID(ar_clear)
 {
-if (obfd) 
+if (obfd)
  obfd->archive_head = 0;
 }
 
@@ -285,7 +285,7 @@
     fprintf(stderr, _("%s: no open output archive\n"), program_name);
     maybequit();
   }
-  else 
+  else
   {
     while (list) {
       /* Find this name in the archive */
@@ -324,7 +324,7 @@
   else {
     char *ofilename = xstrdup (bfd_get_filename (obfd));
     bfd_close(obfd);
-    
+
     rename (ofilename, real_name);
     obfd = 0;
     free(ofilename);
@@ -341,20 +341,20 @@
     fprintf(stderr, _("%s: no open output archive\n"), program_name);
     maybequit();
   }
-  else 
+  else
   {
     while (list) {
       /* Find this name in the archive */
       bfd *member = obfd->archive_head;
       bfd **prev = &(obfd->archive_head);
       int found = 0;
-      while (member) 
+      while (member)
       {
-	if (FILENAME_CMP(member->filename, list->name) == 0) 
+	if (FILENAME_CMP(member->filename, list->name) == 0)
 	{
 	  /* Found the one to replace */
 	  bfd *abfd = bfd_openr(list->name, 0);
-	  if (!abfd) 
+	  if (!abfd)
 	  {
 	    fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
 	    maybequit();
@@ -374,12 +374,12 @@
 	bfd *abfd = bfd_openr(list->name, 0);
 	fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
 		list->name);
-	if (!abfd) 
+	if (!abfd)
 	{
 	  fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
 	  maybequit();
 	}
-	else 
+	else
 	{
 	  *prev = abfd;
 	}
@@ -394,7 +394,7 @@
 void
 DEFUN_VOID(ar_list)
 {
-  if (!obfd) 
+  if (!obfd)
   {
     fprintf(stderr, _("%s: no open output archive\n"), program_name);
     maybequit();
@@ -406,7 +406,7 @@
     printf(_("Current open archive is %s\n"), bfd_get_filename (obfd));
     for (abfd = obfd->archive_head;
 	 abfd != (bfd *)NULL;
-	 abfd = abfd->next) 
+	 abfd = abfd->next)
     {
       ar_directory_doer (abfd, (bfd *) NULL);
     }
@@ -414,7 +414,7 @@
 }
 
 
-void 
+void
 DEFUN_VOID(ar_end)
 {
   if (obfd)
@@ -427,21 +427,21 @@
 DEFUN(ar_extract,(list),
       struct list *list)
 {
-  if (!obfd) 
+  if (!obfd)
   {
 
     fprintf(stderr, _("%s: no open  archive\n"), program_name);
     maybequit();
   }
-  else 
+  else
   {
     while (list) {
       /* Find this name in the archive */
       bfd *member = obfd->archive_head;
       int found = 0;
-      while (member && !found) 
+      while (member && !found)
       {
-	if (FILENAME_CMP(member->filename, list->name) == 0) 
+	if (FILENAME_CMP(member->filename, list->name) == 0)
 	{
 	  extract_file(member);
 	  found = 1;
Index: arsup.h
===================================================================
RCS file: /cvs/src/src/binutils/arsup.h,v
retrieving revision 1.3
diff -u -r1.3 arsup.h
--- arsup.h	4 Dec 2001 14:29:11 -0000	1.3
+++ arsup.h	19 May 2002 15:45:14 -0000
@@ -18,7 +18,7 @@
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 struct list {
-	char *name;	
+	char *name;
 	struct list *next;
 };
 
Index: binemul.c
===================================================================
RCS file: /cvs/src/src/binutils/binemul.c,v
retrieving revision 1.2
diff -u -r1.2 binemul.c
--- binemul.c	4 May 2002 01:55:39 -0000	1.2
+++ binemul.c	19 May 2002 15:45:14 -0000
@@ -108,7 +108,7 @@
      char *file_name;
 {
   if (bin_dummy_emulation.ar_create)
-    return bin_dummy_emulation.ar_create (abfd_out, archive_file_name, 
+    return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
 					  file_name);
 
   return false;
Index: binemul.h
===================================================================
RCS file: /cvs/src/src/binutils/binemul.h,v
retrieving revision 1.1
diff -u -r1.1 binemul.h
--- binemul.h	18 Mar 2002 12:45:54 -0000	1.1
+++ binemul.h	19 May 2002 15:45:14 -0000
@@ -50,7 +50,7 @@
 #define AR_EMUL_REPLACE_PRINT_VERBOSE(verbose, file_name) \
   do { if (verbose) printf ("r - %s\n", file_name); } while (0)
 
-typedef struct bin_emulation_xfer_struct 
+typedef struct bin_emulation_xfer_struct
 {
   /* Print out the extra options.  */
   void    (* ar_usage)     PARAMS ((FILE *fp));
@@ -61,4 +61,4 @@
 }
 bin_emulation_xfer_type;
 
-#endif 
+#endif
Index: bucomm.c
===================================================================
RCS file: /cvs/src/src/binutils/bucomm.c,v
retrieving revision 1.13
diff -u -r1.13 bucomm.c
--- bucomm.c	29 Nov 2001 18:51:21 -0000	1.13
+++ bucomm.c	19 May 2002 15:45:15 -0000
@@ -257,7 +257,7 @@
   const char *end;
 
   ret = bfd_scan_vma (s, &end, 0);
-  
+
   if (*end != '\0')
     fatal (_("%s: bad number: %s"), arg, s);
 
Index: coffdump.c
===================================================================
RCS file: /cvs/src/src/binutils/coffdump.c,v
retrieving revision 1.8
diff -u -r1.8 coffdump.c
--- coffdump.c	10 Feb 2002 18:47:48 -0000	1.8
+++ coffdump.c	19 May 2002 15:45:15 -0000
@@ -106,7 +106,7 @@
   tab (1);
   printf (_("#lines %d "),p->nlines);
 
-  for (i = 0; i < p->nlines; i++) 
+  for (i = 0; i < p->nlines; i++)
     {
       printf ("(%d 0x%x)", p->lines[i], p->addresses[i]);
 
@@ -133,7 +133,7 @@
   switch (p->type)
     {
     case coff_secdef_type:
-      printf ("section definition at %x size %x\n", 
+      printf ("section definition at %x size %x\n",
 	      p->u.asecdef.address,
 	      p->u.asecdef.size);
       nl ();
@@ -427,14 +427,14 @@
   int i;
 
   tab (1);
-  printf ("section %s %d %d address %x size %x number %d nrelocs %d", 
+  printf ("section %s %d %d address %x size %x number %d nrelocs %d",
 	  ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
 	  ptr->number, ptr->nrelocs);
   nl ();
 
-  for (i = 0; i < ptr->nrelocs; i++) 
+  for (i = 0; i < ptr->nrelocs; i++)
     {
-      tab (0);    
+      tab (0);
       printf ("(%x %s %x)",
 	      ptr->relocs[i].offset,
 	      ptr->relocs[i].symbol->name,
Index: coffgrok.c
===================================================================
RCS file: /cvs/src/src/binutils/coffgrok.c,v
retrieving revision 1.4
diff -u -r1.4 coffgrok.c
--- coffgrok.c	21 Aug 2001 10:02:26 -0000	1.4
+++ coffgrok.c	19 May 2002 15:45:15 -0000
@@ -145,7 +145,7 @@
       if (relsize < 0)
 	bfd_fatal (bfd_get_filename (abfd));
       if (relsize == 0)
-        continue;
+	continue;
       relpp = (arelent **) xmalloc (relsize);
       relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
       if (relcount < 0)
@@ -277,7 +277,7 @@
 		  /* These lines are for this function - so count them and stick them on */
 		  int c = 0;
 		  /* Find the linenumber of the top of the function, since coff linenumbers
-		     are relative to the start of the function. */
+		     are relative to the start of the function.  */
 		  int start_line = rawsyms[i + 3].u.auxent.x_sym.x_misc.x_lnsz.x_lnno;
 
 		  l++;
@@ -605,7 +605,7 @@
   int i;
   int infile = 0;
   struct coff_ofile *head =
-  (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
+    (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
   ofile = head;
   head->source_head = 0;
   head->source_tail = 0;
Index: coffgrok.h
===================================================================
RCS file: /cvs/src/src/binutils/coffgrok.h,v
retrieving revision 1.3
diff -u -r1.3 coffgrok.h
--- coffgrok.h	21 Aug 2001 10:02:27 -0000	1.3
+++ coffgrok.h	19 May 2002 15:45:15 -0000
@@ -1,4 +1,4 @@
-/* coffgrok.h 
+/* coffgrok.h
    Copyright 2001 Free Software Foundation, Inc.
 
 This file is part of GNU Binutils.
@@ -43,7 +43,7 @@
    int addend;
  };
 
- struct coff_section 
+ struct coff_section
  {
    char *name;
    int code;
@@ -82,7 +82,7 @@
 
   /* Vector which maps where in each output section
      the input file has it's data */
-  struct coff_isection *section; 
+  struct coff_isection *section;
 
 };
 
@@ -97,7 +97,7 @@
       } type;
   union
     {
-      struct 
+      struct
 	{
 	int address;
 	int size;
@@ -147,7 +147,7 @@
 };
 
 
- struct coff_line 
+ struct coff_line
  {
    int nlines;
    int *lines;
@@ -188,7 +188,7 @@
 	 coff_vis_tag,
 	 coff_vis_member_of_struct,
 	 coff_vis_member_of_enum,
-	 coff_vis_autoparam,	
+	 coff_vis_autoparam,
 	 coff_vis_regparam,
        } type;
    };



More information about the Binutils mailing list