This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

[patch] gas/hash.c: Fix formatting.


Hi,

Attached is a patch to fix formatting of gas/hash.c.

Thankls,

Kazu Hirata

===File ~/gnu/binutils/ChangeLog-hash.c=====================
2000-08-09  Kazu Hirata  <kazu@hxi.com>

	* hash.c: Fix formatting.

============================================================

===File ~/gnu/binutils/hash.c.patch=========================
Index: hash.c
===================================================================
RCS file: /cvs/src/src/gas/hash.c,v
retrieving revision 1.4
diff -u -r1.4 hash.c
--- hash.c	2000/07/10 15:15:01	1.4
+++ hash.c	2000/08/08 19:19:05
@@ -99,7 +99,7 @@
   ret->deletions = 0;
 #endif
 
-  return ret;  
+  return ret;
 }
 
 /* Delete a hash table, freeing all allocated memory.  */
@@ -222,7 +222,7 @@
   ++table->insertions;
 #endif
 
-  p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof(*p));
+  p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
   p->string = key;
   p->hash = hash;
   p->data = value;
@@ -262,7 +262,7 @@
       ++table->insertions;
 #endif
 
-      p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof(*p));
+      p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
       p->string = key;
       p->hash = hash;
       p->data = value;
@@ -414,15 +414,24 @@
 #ifdef TEST
 
 /* This test program is left over from the old hash table code.  */
+
+/* Number of hash tables to maintain (at once) in any testing.  */
+#define TABLES (6)
+
+/* We can have 12 statistics.  */
+#define STATBUFSIZE (12)
+
+/* Display statistics here.  */
+int statbuf[STATBUFSIZE];
+
+/* Human farts here.  */
+char answer[100];
+
+/* We test many hash tables at once.  */
+char *hashtable[TABLES];
 
-#define TABLES (6)		/* number of hash tables to maintain */
-				/* (at once) in any testing */
-#define STATBUFSIZE (12)	/* we can have 12 statistics */
-
-int statbuf[STATBUFSIZE];	/* display statistics here */
-char answer[100];		/* human farts here */
-char *hashtable[TABLES];	/* we test many hash tables at once */
-char *h;			/* points to curent hash_control */
+/* Points to curent hash_control.  */
+char *h;
 char **pp;
 char *p;
 char *name;
@@ -430,9 +439,10 @@
 int size;
 int used;
 char command;
-int number;			/* number 0:TABLES-1 of current hashed */
-				/* symbol table */
 
+/* Number 0:TABLES-1 of current hashed symbol table.  */
+int number;
+
 int
 main ()
 {
@@ -450,7 +460,7 @@
       gets (answer);
       command = answer[0];
       if (isupper (command))
-	command = tolower (command);	/* ecch! */
+	command = tolower (command);	/* Ecch!  */
       switch (command)
 	{
 	case '#':
@@ -460,8 +470,8 @@
 	case '?':
 	  for (pp = hashtable; pp < hashtable + TABLES; pp++)
 	    {
-	      printf ("address of hash table #%d control block is %xx\n"
-		      ,pp - hashtable, *pp);
+	      printf ("address of hash table #%d control block is %xx\n",
+		      pp - hashtable, *pp);
 	    }
 	  break;
 	case 'a':
@@ -542,7 +552,7 @@
 
   printf ("   %s : ", description);
   gets (answer);
-  /* will one day clean up answer here */
+  /* Will one day clean up answer here.  */
   retval = malloc (strlen (answer) + 1);
   if (!retval)
     {
@@ -561,7 +571,6 @@
   free (value);
 }
 
-
 void
 applicatee (string, value)
      char *string;
@@ -570,11 +579,12 @@
   printf ("%.20s-%.20s\n", string, value);
 }
 
+/* Determine number: what hash table to use.
+   Also determine h: points to hash_control.  */
+
 void
-whattable ()			/* determine number: what hash table to use */
-			        /* also determine h: points to hash_control */
+whattable ()
 {
-
   for (;;)
     {
       printf ("   what hash table (%d:%d) ?  ", 0, TABLES - 1);
@@ -595,7 +605,5 @@
 	}
     }
 }
-
-#endif /* #ifdef TEST */
 
-/* end of hash.c */
+#endif /* TEST */
============================================================


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