[MPlayer-cvslog] r30088 - in trunk: Makefile vidix vidix/pci_db2c.awk vidix/pci_names.h

diego subversion at mplayerhq.hu
Sun Dec 20 18:49:07 CET 2009


Author: diego
Date: Sun Dec 20 18:49:07 2009
New Revision: 30088

Log:
Do not autogenerate vidix/pci_names.h.
Its contents is always the same, so there is no point in generating it.

Added:
   trunk/vidix/pci_names.h
Modified:
   trunk/Makefile
   trunk/vidix/   (props changed)
   trunk/vidix/pci_db2c.awk

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Sun Dec 20 18:42:35 2009	(r30087)
+++ trunk/Makefile	Sun Dec 20 18:49:07 2009	(r30088)
@@ -896,7 +896,7 @@ tremor/%: CFLAGS += $(CFLAGS_TREMOR_LOW)
 vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER)
 
 VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \
-                  vidix/pci_names.h vidix/pci_vendors.h
+                  vidix/pci_vendors.h
 
 $(VIDIX_PCI_FILES): vidix/pci_db2c.awk vidix/pci.db
 	$^ $(VIDIX_PCIDB)

Modified: trunk/vidix/pci_db2c.awk
==============================================================================
--- trunk/vidix/pci_db2c.awk	Sun Dec 20 18:42:35 2009	(r30087)
+++ trunk/vidix/pci_db2c.awk	Sun Dec 20 18:49:07 2009	(r30088)
@@ -35,23 +35,19 @@ BEGIN {
     vendor_file  = "vidix/pci_vendors.h";
     ids_file     = "vidix/pci_ids.h"
     name_file    = "vidix/pci_names.c"
-    name_h_file  = "vidix/pci_names.h"
     dev_ids_file = "vidix/pci_dev_ids.c"
     line = 0;
     # print out head lines
     print_head(vendor_file);
     print_head(ids_file);
     print_head(name_file);
-    print_head(name_h_file);
     print_head(dev_ids_file);
     print_includes(dev_ids_file);
     print_guards_start(vendor_file);
-    print_guards_start(name_h_file);
     print_guards_start(ids_file);
     print "#include \"pci_vendors.h\"" > ids_file
     print "" > ids_file
 
-    print_name_struct(name_h_file);
     print "#include <stddef.h>" > name_file
     print "#include \"pci_names.h\"" > name_file
     if (with_pci_db) {
@@ -105,7 +101,6 @@ BEGIN {
     }
     #print "Total lines parsed:", line;
     print_guards_end(vendor_file);
-    print_guards_end(name_h_file);
     print_guards_end(ids_file);
     if (with_pci_db) print "};" > name_file
     print "{ 0xFFFF, NULL }" > dev_ids_file;
@@ -148,22 +143,6 @@ function print_head(out_file)
     print "" > out_file
 }
 
-function print_name_struct(out_file)
-{
-    print "struct device_id_s {" > out_file
-    print "    unsigned short id;" > out_file
-    print "    const char *name;" > out_file
-    print "};" > out_file
-    print "" > out_file
-    print "struct vendor_id_s {" > out_file
-    print "    unsigned short id;" > out_file
-    print "    const char *name;" > out_file
-    print "    const struct device_id_s *dev_list;" > out_file
-    print "};" > out_file
-    print "const char *pci_vendor_name(unsigned short id);" > out_file
-    print "const char *pci_device_name(unsigned short vendor_id, unsigned short device_id);" > out_file
-}
-
 function print_func_bodies(out_file)
 {
     print "" > out_file

Added: trunk/vidix/pci_names.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/vidix/pci_names.h	Sun Dec 20 18:49:07 2009	(r30088)
@@ -0,0 +1,38 @@
+/*
+ * VIDIX - VIDeo Interface for *niX.
+ *
+ * This file is part of MPlayer.
+ *
+ * MPlayer is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * MPlayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef MPLAYER_PCI_NAMES_H
+#define MPLAYER_PCI_NAMES_H
+
+struct device_id_s {
+    unsigned short  id;
+    const char     *name;
+};
+
+struct vendor_id_s {
+    unsigned short            id;
+    const char               *name;
+    const struct device_id_s *dev_list;
+};
+const char *pci_vendor_name(unsigned short id);
+const char *pci_device_name(unsigned short vendor_id,
+                            unsigned short device_id);
+
+#endif /* MPLAYER_PCI_NAMES_H */


More information about the MPlayer-cvslog mailing list