diff -Nur ezload-0.3.1.orig/aw/aw.c ezload-0.3.1/aw/aw.c
--- ezload-0.3.1.orig/aw/aw.c	Tue Nov 23 01:31:46 1999
+++ ezload-0.3.1/aw/aw.c	Tue Oct 22 00:08:07 2002
@@ -84,19 +84,19 @@
 	(((x!=NULL) && (*x !='\0')) ? x : "<not defined>")
 
         printf("Device information: vendor %04x (%s) product %04x (%s) rev %s addr %x\n",
-                        udi.vendorNo, SURE(udi.vendor), 
-                        udi.productNo, SURE(udi.product),
-                        SURE(udi.release), udi.addr);
+                        udi.udi_vendorNo, SURE(udi.udi_vendor), 
+                        udi.udi_productNo, SURE(udi.udi_product),
+                        SURE(udi.udi_release), udi.udi_addr);
 	close(fd);
 
 	/* vendor 0854 (ActiveWire, Inc.) product 0101 (ActiveWire USB) rev 0.00 
 	 */
-	if ((udi.vendorNo != 0x854) || (udi.productNo != 0x101)) {
+	if ((udi.udi_vendorNo != 0x854) || (udi.udi_productNo != 0x101)) {
 		fprintf(stderr,"Sorry, does not seem to be an ActiveWire board. Aborted\n");
 		exit(1);
 	}
 #if 0
-	if (!strcmp(udi.revision,"0.00")) {
+	if (!strcmp(udi.udi_revision,"0.00")) {
 		fprintf(stderr,"Looks like an ActiveWire board, but without the firmware. Did\n"
 			"you download that using ezdownload(8) ?\n"
 			);
diff -Nur ezload-0.3.1.orig/ezdownload/ezdownload.c ezload-0.3.1/ezdownload/ezdownload.c
--- ezload-0.3.1.orig/ezdownload/ezdownload.c	Tue Nov 23 03:30:13 1999
+++ ezload-0.3.1/ezdownload/ezdownload.c	Tue Oct 22 11:55:07 2002
@@ -2,7 +2,7 @@
  * Copyright (C) 1999 Dirk-Willem van Gulik, dirkx@webweaving.org
  *	WebWeaving Consultancy, All rights reserved.
  *
- * Original version for FreeBSD; Changes for Linux by Brad Hards, 
+ * Original version for FreeBSD; Changes for Linux by Brad Hards,
  * brad.hards@dao.defence.gov.au. See '#ifdef BSD'.
  *
  *
@@ -130,7 +130,7 @@
 	while(!feof(fh)) {
 
 		/*
-		 * read in the first 9 bytes: 
+		 * read in the first 9 bytes:
 	         * : <len> <addr> <type>  -> 1+2+4+2 = 9
 		 */
 
@@ -175,7 +175,7 @@
 
 		if (last[0] != '\0')		/* up to end of string? */
 			BAIL("Could not convert len");
-		if (len < 0 || len > 255)	
+		if (len < 0 || len > 255)
 			BAIL("Bad len (>255)");
 
 		/* the addr field */
@@ -234,7 +234,7 @@
 		for(crc = 0, i = 0; i < 4+len;i++)
 			crc += data[i];
 
-		crc = ~crc + 1;	
+		crc = ~crc + 1;
 		if (crc != data[len+4])
 			BAIL("Checksum mismatch");
 
@@ -268,26 +268,26 @@
 	int err;
 
 #ifdef BSD
-	ur.request.bmRequestType= 0x40;		/* see TRM v1.6 page 64 */
-	ur.request.bRequest = 0xA0;		/* Anchor Download */
-	USETW(ur.request.wValue, at);		/* Starting Address */
-	USETW(ur.request.wIndex, 0);		/* unused */
-	USETW(ur.request.wLength, len);		/* payload len in bytes */
-	ur.flags = 0;
-	ur.actlen = 0;
+	ur.ucr_request.bmRequestType= 0x40;		/* see TRM v1.6 page 64 */
+	ur.ucr_request.bRequest = 0xA0;		/* Anchor Download */
+	USETW(ur.ucr_request.wValue, at);		/* Starting Address */
+	USETW(ur.ucr_request.wIndex, 0);		/* unused */
+	USETW(ur.ucr_request.wLength, len);		/* payload len in bytes */
+	ur.ucr_flags = 0;
+	ur.ucr_actlen = 0;
 #else
-	ur.requesttype= 0x40;           /* see TRM v1.6 page 64 */
-	ur.request = 0xA0;              /* Anchor Download */
-	ur.value = at;                  /* Starting Address */
-	ur.index = 0;                   /* unused */
-	ur.length = len;                /* payload len in bytes */
+	ur.ucr_requesttype= 0x40;           /* see TRM v1.6 page 64 */
+	ur.ucr_request = 0xA0;              /* Anchor Download */
+	ur.ucr_value = at;                  /* Starting Address */
+	ur.ucr_index = 0;                   /* unused */
+	ur.ucr_length = len;                /* payload len in bytes */
 #endif
-	ur.data	= (void *) d;
+	ur.ucr_data	= (void *) d;
 
 	/* Although USB does not limit you here, the Anchor docs
    	 * quote 64 as a limit, and Mato@activewireinc.com suggested
  	 * to use 16. As only the latter works, we'll flag any packet.
-	 * which is too big as an error for now. 
+	 * which is too big as an error for now.
 	 * Another advantage of keeping it to 16 is that we do not
 	 * get bitten by the bug <rev E which is described in
 	 * the Erratum as the 64*n+1 bug.
@@ -304,14 +304,14 @@
 		return err;
 
 #ifdef BSD
-	if (ur.actlen != len)
+	if (ur.ucr_actlen != len)
 		return EAGAIN;			/* or too obscure ? */
 #endif
 
 	return(0);
 }
 char * progname;
-void usage() 
+void usage()
 {
 	fprintf(stderr, "Syntax: %s [-r] [-v] [-f hexfile] device\n", progname);
 	exit(1);
@@ -337,7 +337,7 @@
 	progname = argv[0];
 
 	/* handle the arguments */
-	while((ch = getopt(argc, argv, "xrvf:")) != -1) 
+	while((ch = getopt(argc, argv, "xrvf:")) != -1)
 		switch (ch) {
 		case 'v':
 			verbose = 1;
@@ -364,7 +364,7 @@
 
 	devicename = argv[argc-1];
 
-	/* open the device, check what vendor/product it is 
+	/* open the device, check what vendor/product it is
 	 */
     	fd = open(devicename, O_WRONLY, 0);
         if ( fd == -1) {
@@ -387,15 +387,15 @@
 #define	SURE(x) (((x!=NULL) && (*x !='\0')) ? x : "<not defined>")
 	if (verbose)
 		printf("Device information: vendor %04x (%s) product %04x (%s) rev 0x%04x addr %x\n",
-			udi.vendorNo, SURE(udi.vendor), 
-			udi.productNo, SURE(udi.product),
-			udi.releaseNo, udi.addr);
+			udi.udi_vendorNo, SURE(udi.udi_vendor),
+			udi.udi_productNo, SURE(udi.udi_product),
+			udi.udi_releaseNo, udi.udi_addr);
 
 	/* standard setup for AnchorChips ISAIK
 	 */
-        ai.config_index         = 0;
-        ai.interface_index      = 0;
-        ai.alt_no               = 0;
+        ai.uai_config_index         = 0;
+        ai.uai_interface_index      = 0;
+        ai.uai_alt_no               = 0;
 
         if ( ioctl(fd, USB_SET_ALTINTERFACE, &ai) == -1 ) {
                 fprintf(stderr, "ioctl 1 returned: %s\n",
@@ -417,16 +417,16 @@
 		 * environment :-)
 		 */
 		if ((p=strdup(p)) == NULL) {
-			perror(""); 
+			perror("");
 			return(1);
 		}
 
 		for(;(dir=strsep(&p," \t:;"))!=NULL;) {
 			/* XXX  is the revision # really hardware specific ? Is it a string
-			 *	or a BCD number ? 
+			 *	or a BCD number ?
 			 */
 			snprintf(tmp,sizeof(tmp),"%s/%04x.%04x.%04x.hex",
-				dir,udi.vendorNo,udi.productNo,udi.releaseNo);
+				dir,udi.udi_vendorNo,udi.udi_productNo,udi.udi_releaseNo);
 
 			/* we could just do a loop through the directory
 			 * and slack compare ?
@@ -435,26 +435,26 @@
 				hexfile = tmp;
 				break;
 			};
-			if (verbose) 
+			if (verbose)
 				printf("No %s\n",tmp);
 		};
 		if (!hexfile) {
 			fprintf(stderr,"No hexfile with firmware for "
 				"%04x.%04x.%04x available.\n",
-				udi.vendorNo,udi.productNo,udi.releaseNo);
+				udi.udi_vendorNo,udi.udi_productNo,udi.udi_releaseNo);
 			if (!force) return(1);
 		};
 	} else {
 		/* take the leafname of the file and check the various ID's.
 		 */
 		char * l = rindex(hexfile,'/');
-		if (l==NULL) 
+		if (l==NULL)
 			l=hexfile;
 		else
 			l++;
 
 		snprintf(tmp,sizeof(tmp),"%04x.%04x.%04x",
-			udi.vendorNo,udi.productNo,udi.releaseNo);
+			udi.udi_vendorNo,udi.udi_productNo,udi.udi_releaseNo);
 
 		if (strncmp(l,tmp,strlen(tmp))) {
 			fprintf(stderr,"The firmware specified does not match the device: %s\n",tmp);
@@ -469,7 +469,7 @@
 		return(1);
 	}
 
-	hx = NULL;	
+	hx = NULL;
 	if (read_head(f, &hx)) {
 		if (verbose)
 			printf("Read hex file\n");
@@ -497,7 +497,7 @@
 		if ((d->len == 1) && (plen == 64) && (d->nxt == NULL))
 			fprintf(stderr,"Warning - Some chips cannot cope with 64*n+1 downloads\n"
 					"See the erratum on the anchorchip.com site\n");
-#endif		
+#endif
 		if (shunt(fd, d->addr, (void *) (d->data), d->len)) {
 			perror("Download failed");
 			return(1);
@@ -515,7 +515,7 @@
 		printf("all %d packets downloaded\n", count);
 
 
-	usleep(250000); 
+	usleep(250000);
 
 	b[0] = 0;
 	if (shunt(fd, CPUCS, (void *) b, 1)) {
@@ -538,8 +538,8 @@
 	};
 
 	if (verbose)
-		printf("It might take seconds before the entire cycle\n" 
-		       "is completed and the usb(4) bus has noticed\n" 
+		printf("It might take seconds before the entire cycle\n"
+		       "is completed and the usb(4) bus has noticed\n"
 		       "the renummeration.\n");
 	return 0;
 }
diff -Nur ezload-0.3.1.orig/ezupload/ezupload.c ezload-0.3.1/ezupload/ezupload.c
--- ezload-0.3.1.orig/ezupload/ezupload.c	Tue Nov 23 03:09:20 1999
+++ ezload-0.3.1/ezupload/ezupload.c	Tue Oct 22 11:54:52 2002
@@ -1,8 +1,8 @@
 /*
- * Copyright (C) 1999 Dirk-Willem van Gulik, dirkx@webweaving.org 
+ * Copyright (C) 1999 Dirk-Willem van Gulik, dirkx@webweaving.org
  *	WebWeaving Consultancy, All rights reserved.
  *
- * Original version for FreeBSD; Changes for Linux by Brad Hards, 
+ * Original version for FreeBSD; Changes for Linux by Brad Hards,
  * brad.hards@dao.defence.gov.au. See '#ifdef BSD'.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,16 +27,16 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD$
- * 
+ *
  * This uploader should work with all with all USB-EZ Anchorchips which
  * have on board ram; i.e. the AN21y1, AN21y5 and AN21y6QC series. Where y
  * is the log2 of the internal memory size (i.e. aAN2146QC has 2^64=16kByte
  * of ram.)
  *
  * It has however only been tested; and written specifically for the
- * ActiveWire Inc. USB board. See 
+ * ActiveWire Inc. USB board. See
  *	http://www.activewireinc.com
- * 
+ *
  * Anchorchips has excelent documentation on line at
  *     http://www.anchorchips.com
  */
@@ -77,10 +77,10 @@
 	exit(1);
 }
 extern char *optarg;
-int 
-main(int argc, char ** argv) 
+int
+main(int argc, char ** argv)
 {
-	int fd; 
+	int fd;
 	int at = 0, en = 0, s = 0;
 	FILE *fout = stdout;
 #ifdef BSD
@@ -105,7 +105,7 @@
              case 'o':
                      if ((fout = fopen(optarg, "w")) < 0) {
                              fprintf(stderr,
-                                 "%s: Could not open out file %s: %s\n", 
+                                 "%s: Could not open out file %s: %s\n",
 					argv[0], optarg, strerror(errno));
                              exit(1);
                      }
@@ -163,7 +163,7 @@
 
 	/* Although USB does not limit you here; the Anchor docs
    	 * quote 64 as a limit; and Mato@activewireinc.com suggested
- 	 * to use 16. 
+ 	 * to use 16.
  	 */
 #define LEN 16
 
@@ -172,30 +172,30 @@
 		printf("; Uploading from %04x to %04x (%d bytes) "
 			"in chunks of %d bytes.\n",
 			at, at+s, s,LEN);
-	
+
 	for(; at <= en; at += LEN) {
 		int i, l=LEN;
-		if (at+l > en) 
+		if (at+l > en)
 			l = en-at;
 
 #ifdef BSD
-		ur.request.bmRequestType= 0xC0;		/* see Anchor TRM v1.6 page 64 */
-		ur.request.bRequest 	= 0xA0; 	/* Anchor Down/Upload */
+		ur.ucr_request.bmRequestType= 0xC0;		/* see Anchor TRM v1.6 page 64 */
+		ur.ucr_request.bRequest 	= 0xA0; 	/* Anchor Down/Upload */
+
+		USETW(ur.ucr_request.wValue,at);		/* Starting Address */
+		USETW(ur.ucr_request.wIndex,0);		/* unused */
+		USETW(ur.ucr_request.wLength,l);		/* payload len in bytes */
 
-		USETW(ur.request.wValue,at);		/* Starting Address */
-		USETW(ur.request.wIndex,0);		/* unused */
-		USETW(ur.request.wLength,l);		/* payload len in bytes */
-	
-		ur.flags = 0;
-		ur.actlen = 0;
+		ur.ucr_flags = 0;
+		ur.ucr_actlen = 0;
 #else
-                ur.requesttype= 0xC0;           /* see Anchor TRM v1.6 page 64 */
-                ur.request      = 0xA0;         /* Anchor Down/Upload */
-                ur.value = at;          /* Starting Address */
-                ur.index = 0;           /* unused */
-                ur.length = l;          /* payload len in bytes */
+                ur.ucr_requesttype= 0xC0;           /* see Anchor TRM v1.6 page 64 */
+                ur.ucr_request      = 0xA0;         /* Anchor Down/Upload */
+                ur.ucr_value = at;          /* Starting Address */
+                ur.ucr_index = 0;           /* unused */
+                ur.ucr_length = l;          /* payload len in bytes */
 #endif
-		ur.data	= (void *)d;
+		ur.ucr_data	= (void *)d;
 
 #ifdef BSD
         	if(ioctl(fd, USB_DO_REQUEST,&ur)) {
@@ -207,7 +207,7 @@
 			break;
 		}
 #ifdef BSD
-		if (ur.actlen != l) {
+		if (ur.ucr_actlen != l) {
 			fprintf(stderr,"Failed to get full %d chunk at adr %X: %s\nAborted\n",
 				l,at,strerror(errno));
 			break;
@@ -215,14 +215,14 @@
 #endif
 		if(outtype == HEX) {
 			/* and create an intel hex line...*/
-			fprintf(fout,":%02X%04X%02X",l,at, 
+			fprintf(fout,":%02X%04X%02X",l,at,
 				(at+l<en) ? 0 : 1 );
-	
+
 			crc = l;
 			crc += ((at>>8) & 0xff);
 			crc += ( at & 0xff);
 			crc += (at+l<en) ? 0 : 1;
-	
+
 			for(i=0;i<l;i++) {
 				fprintf(fout,"%02X",d[i]);
 				crc += d[i];
@@ -248,4 +248,4 @@
 	fclose(fout);
 	return 0;
 }
-	
+
