changeset 4113:1b61c1c982ae

Solaris compatibility
author nick
date Sat, 12 Jan 2002 18:26:13 +0000
parents 3822582553d6
children aeb27b09de8e
files libdha/pci_db2c.awk
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libdha/pci_db2c.awk	Sat Jan 12 18:00:25 2002 +0000
+++ b/libdha/pci_db2c.awk	Sat Jan 12 18:26:13 2002 +0000
@@ -2,9 +2,11 @@
 # For latest version of pci ids see: http://pciids.sf.net
 # Copyright 2002 Nick Kurshev
 #
-# Usage gawk -f pci_db2c.awk pci.db
+# Usage: awk -f pci_db2c.awk pci.db
 #
 # Tested with Gawk v 3.0.3
+# But there are reports that it works with Awk and Mawk
+# (Nobody tested it with Nawk).
 #
 
 BEGIN {
@@ -15,11 +17,6 @@
 	exit(1);
     }
     in_file = ARGV[1];
-# Try get input file attributes.
-    system("ls -o -q --time=ctime "in_file" >.tmp_file")
-    getline <".tmp_file"
-    in_file_attr = $0
-    system("rm -f .tmp_file")
     vendor_file = "pci_vendors.h";
     ids_file = "pci_ids.h"
     name_file = "pci_names.c"
@@ -115,7 +112,7 @@
 {
     print "/*" >out_file;
     printf(" * File: %s\n", out_file) >out_file;
-    printf(" * This file was generated automatically from:\n * %s\n", in_file_attr) >out_file;
+    printf(" * This file was generated automatically. Don't modify it.\n") >out_file;
     print "*/" >out_file;
     return;
 }
@@ -196,9 +193,11 @@
 
 function init_device_db()
 {
-  delete device_names
+#  delete device_names
+  for( i in device_names ) delete device_names[i];
   device_names[1]=""
-  delete subdevice_names
+#  delete subdevice_names
+  for( i in subdevice_names ) delete subdevice_names[i];
   subdevice_names[1] = ""
 }
 
@@ -265,4 +264,4 @@
 # Add new name in array of subdevice names
   subdevice_names[new_name] = new_name
   return new_name;
-}
\ No newline at end of file
+}