patch-2.4.9 linux/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c

Next file: linux/drivers/scsi/aic7xxx/cam.h
Previous file: linux/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c linux/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
@@ -14,7 +14,7 @@
  *    derived from this software without specific prior written permission.
  *
  * Alternatively, this software may be distributed under the terms of the
- * GNU Public License ("GPL").
+ * GNU General Public License ("GPL").
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: //depot/src/aic7xxx/aicasm/aicasm_symbol.c#5 $
+ * $Id: //depot/src/aic7xxx/aicasm/aicasm_symbol.c#7 $
  *
  * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c,v 1.11 2000/09/22 22:19:54 gibbs Exp $
  */
@@ -191,11 +191,11 @@
 {
 	symbol_node_t *curnode;
 
-	curnode = symlist->slh_first;
+	curnode = SLIST_FIRST(symlist);
 	while(curnode != NULL) {
 		if (strcmp(symname, curnode->symbol->name) == 0)
 			break;
-		curnode = curnode->links.sle_next;
+		curnode = SLIST_NEXT(curnode, links);
 	}
 	return (curnode);
 }
@@ -231,7 +231,7 @@
 			/* NOTREACHED */
 		}
 
-		curnode = symlist->slh_first;
+		curnode = SLIST_FIRST(symlist);
 		if (curnode == NULL
 		 || (mask && (curnode->symbol->info.minfo->mask >
 		              newnode->symbol->info.minfo->mask))
@@ -242,14 +242,14 @@
 		}
 
 		while (1) {
-			if (curnode->links.sle_next == NULL) {
+			if (SLIST_NEXT(curnode, links) == NULL) {
 				SLIST_INSERT_AFTER(curnode, newnode,
 						   links);
 				break;
 			} else {
 				symbol_t *cursymbol;
 
-				cursymbol = curnode->links.sle_next->symbol;
+				cursymbol = SLIST_NEXT(curnode, links)->symbol;
 				if ((mask && (cursymbol->info.minfo->mask >
 				              symbol->info.minfo->mask))
 				 || (!mask &&(cursymbol->info.rinfo->address >
@@ -259,7 +259,7 @@
 					break;
 				}
 			}
-			curnode = curnode->links.sle_next;
+			curnode = SLIST_NEXT(curnode, links);
 		}
 	} else {
 		SLIST_INSERT_HEAD(symlist, newnode, links);
@@ -271,9 +271,9 @@
 {
 	symbol_node_t *node1, *node2;
 
-	node1 = symlist->slh_first;
+	node1 = SLIST_FIRST(symlist);
 	while (node1 != NULL) {
-		node2 = node1->links.sle_next;
+		node2 = SLIST_NEXT(node1, links);
 		free(node1);
 		node1 = node2;
 	}
@@ -287,7 +287,7 @@
 	symbol_node_t *node;
 
 	*symlist_dest = *symlist_src1;
-	while((node = symlist_src2->slh_first) != NULL) {
+	while((node = SLIST_FIRST(symlist_src2)) != NULL) {
 		SLIST_REMOVE_HEAD(symlist_src2, links);
 		SLIST_INSERT_HEAD(symlist_dest, node, links);
 	}
@@ -357,28 +357,28 @@
 		}
 
 		/* Put in the masks and bits */
-		while (masks.slh_first != NULL) {
+		while (SLIST_FIRST(&masks) != NULL) {
 			symbol_node_t *curnode;
 			symbol_node_t *regnode;
 			char *regname;
 
-			curnode = masks.slh_first;
+			curnode = SLIST_FIRST(&masks);
 			SLIST_REMOVE_HEAD(&masks, links);
 
 			regnode =
-			    curnode->symbol->info.minfo->symrefs.slh_first;
+			    SLIST_FIRST(&curnode->symbol->info.minfo->symrefs);
 			regname = regnode->symbol->name;
 			regnode = symlist_search(&registers, regname);
 			SLIST_INSERT_AFTER(regnode, curnode, links);
 		}
 
 		/* Add the aliases */
-		while (aliases.slh_first != NULL) {
+		while (SLIST_FIRST(&aliases) != NULL) {
 			symbol_node_t *curnode;
 			symbol_node_t *regnode;
 			char *regname;
 
-			curnode = aliases.slh_first;
+			curnode = SLIST_FIRST(&aliases);
 			SLIST_REMOVE_HEAD(&aliases, links);
 
 			regname = curnode->symbol->info.ainfo->parent->name;
@@ -389,15 +389,17 @@
 		/* Output what we have */
 		fprintf(ofile,
 "/*
-  * DO NOT EDIT - This file is automatically generated.
-  */\n");
-		while (registers.slh_first != NULL) {
+ * DO NOT EDIT - This file is automatically generated
+ *		 from the following source files:
+ *
+%s */\n", versions);
+		while (SLIST_FIRST(&registers) != NULL) {
 			symbol_node_t *curnode;
 			u_int8_t value;
 			char *tab_str;
 			char *tab_str2;
 
-			curnode = registers.slh_first;
+			curnode = SLIST_FIRST(&registers);
 			SLIST_REMOVE_HEAD(&registers, links);
 			switch(curnode->symbol->type) {
 			case REGISTER:
@@ -439,10 +441,10 @@
 		}
 		fprintf(ofile, "\n\n");
 
-		while (constants.slh_first != NULL) {
+		while (SLIST_FIRST(&constants) != NULL) {
 			symbol_node_t *curnode;
 
-			curnode = constants.slh_first;
+			curnode = SLIST_FIRST(&constants);
 			SLIST_REMOVE_HEAD(&constants, links);
 			fprintf(ofile, "#define\t%-8s\t0x%02x\n",
 				curnode->symbol->name,
@@ -453,10 +455,10 @@
 		
 		fprintf(ofile, "\n\n/* Downloaded Constant Definitions */\n");
 
-		while (download_constants.slh_first != NULL) {
+		while (SLIST_FIRST(&download_constants) != NULL) {
 			symbol_node_t *curnode;
 
-			curnode = download_constants.slh_first;
+			curnode = SLIST_FIRST(&download_constants);
 			SLIST_REMOVE_HEAD(&download_constants, links);
 			fprintf(ofile, "#define\t%-8s\t0x%02x\n",
 				curnode->symbol->name,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)