[MPlayer-cvslog] r30215 - trunk/vidix/pci_db2c.awk

diego subversion at mplayerhq.hu
Mon Jan 4 22:10:15 CET 2010


Author: diego
Date: Mon Jan  4 22:10:15 2010
New Revision: 30215

Log:
cosmetics: Break multiple statements on one line apart.

Modified:
   trunk/vidix/pci_db2c.awk

Modified: trunk/vidix/pci_db2c.awk
==============================================================================
--- trunk/vidix/pci_db2c.awk	Mon Jan  4 21:53:57 2010	(r30214)
+++ trunk/vidix/pci_db2c.awk	Mon Jan  4 22:10:15 2010	(r30215)
@@ -65,13 +65,17 @@ BEGIN {
             init_device_db()
             svend_name = get_short_vendor_name(field[3])
             printf("#define VENDOR_%s\t", svend_name) > vendors_h_file;
-            if (length(svend_name) < 9) printf("\t") > vendors_h_file;
+            if (length(svend_name) < 9)
+                printf("\t") > vendors_h_file;
             printf("0x%s /*%s*/\n", field[2], name_field) > vendors_h_file;
-            if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file;
+            if (with_pci_db)
+                printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file;
             printf("/* Vendor: %s: %s */\n", field[2], name_field) > ids_h_file
-            if (first_pass == 1) first_pass = 0;
-            else print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file;
-            printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2])> dev_ids_c_file
+            if (first_pass == 1)
+                first_pass = 0;
+            else
+                print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file;
+            printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2]) > dev_ids_c_file
         }
         if (field[1] == "d" && length(field[3]) > 0 && field[4] == "0") {
             sdev_name = get_short_device_name(field[3])
@@ -100,7 +104,8 @@ BEGIN {
     }
     print_guards_end(vendors_h_file);
     print_guards_end(ids_h_file);
-    if (with_pci_db) print "};" > names_c_file
+    if (with_pci_db)
+        print "};" > names_c_file
     print "{ 0xFFFF, NULL }" > dev_ids_c_file;
     print "};" > dev_ids_c_file
     print_func_bodies(names_c_file);
@@ -174,7 +179,8 @@ function kill_double_quoting(fld)
 {
     n = split(fld, phrases, "[\"]");
     new_fld = phrases[1]
-    for (i = 2; i <= n; i++) new_fld = sprintf("%s\\\"%s", new_fld, phrases[i])
+    for (i = 2; i <= n; i++)
+        new_fld = sprintf("%s\\\"%s", new_fld, phrases[i])
     return new_fld
 }
 
@@ -186,10 +192,12 @@ function init_name_db()
 function init_device_db()
 {
     # delete device_names
-    for (i in device_names) delete device_names[i];
+    for (i in device_names)
+        delete device_names[i];
     device_names[1] = ""
     # delete subdevice_names
-    for (i in subdevice_names) delete subdevice_names[i];
+    for (i in subdevice_names)
+        delete subdevice_names[i];
     subdevice_names[1] = ""
 }
 
@@ -197,10 +205,12 @@ function get_short_vendor_name(from)
 {
     n = split(from, name, "[ ]");
     new_name = toupper(name[1]);
-    if (length(new_name) < 3) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+    if (length(new_name) < 3)
+        new_name = sprintf("%s_%s", new_name, toupper(name[2]));
     n = split(new_name, name, "[^0-9A-Za-z]");
     svendor = name[1];
-    for (i = 2; i <= n; i++) svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]);
+    for (i = 2; i <= n; i++)
+        svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]);
     new_name = svendor;
     vend_suffix = 2;
     # check for unique
@@ -217,11 +227,14 @@ function get_short_device_name(from_name
 {
     n = split(from_name, name, "[ ]");
     new_name = toupper(name[1]);
-    if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
-    if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3]));
+    if (length(name[2]))
+        new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+    if (length(name[3]))
+        new_name = sprintf("%s_%s", new_name, toupper(name[3]));
     n = split(new_name, name, "[^0-9A-Za-z]");
     sdevice = name[1];
-    for (i = 2; i <= n; i++) sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]);
+    for (i = 2; i <= n; i++)
+        sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]);
     new_name = sdevice;
     dev_suffix = 2;
     # check for unique
@@ -238,11 +251,14 @@ function get_short_subdevice_name(from_n
 {
     n = split(from_name, name, "[ ]");
     new_name = toupper(name[1]);
-    if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
-    if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3]));
+    if (length(name[2]))
+        new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+    if (length(name[3]))
+        new_name = sprintf("%s_%s", new_name, toupper(name[3]));
     n = split(new_name, name, "[^0-9A-Za-z]");
     ssdevice = name[1];
-    for (i = 2; i <= n; i++) ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]);
+    for (i = 2; i <= n; i++)
+        ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]);
     new_name = ssdevice;
     sdev_suffix = 2;
     # check for unique


More information about the MPlayer-cvslog mailing list