s3-printing: no need to define struct table_node 4 times.
authorGünther Deschner <gd@samba.org>
Tue, 12 May 2009 12:15:01 +0000 (14:15 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 13 May 2009 13:27:06 +0000 (15:27 +0200)
Guenther

source3/include/nt_printing.h
source3/printing/nt_printing.c
source3/rpc_server/srv_spoolss_nt.c
source3/rpcclient/cmd_spoolss.c
source3/utils/net_rpc_printer.c

index a25d984eb24cb4e505074f9b7ad2b7153e76cb78..09878f9ec474d1bc786e0669a478bef190ff3c67 100644 (file)
@@ -475,4 +475,10 @@ typedef struct _Printer{
 #define DRIVER_ANY_VERSION             0xffffffff
 #define DRIVER_MAX_VERSION             4
 
+struct print_architecture_table_node {
+       const char      *long_archi;
+       const char      *short_archi;
+       int     version;
+};
+
 #endif /* NT_PRINTING_H_ */
index 17e3d40152aed8ca8d8f184f1262f10d1cd8529e..34b7a577f89ca1e37b5c37ed28d40edc331e6c8d 100644 (file)
@@ -204,13 +204,7 @@ static const nt_forms_struct default_forms[] = {
        {"PRC Envelope #10 Rotated",0x1,0x6fd10,0x4f1a0,0x0,0x0,0x6fd10,0x4f1a0}
 };
 
-struct table_node {
-       const char      *long_archi;
-       const char      *short_archi;
-       int     version;
-};
-
-static const struct table_node archi_table[]= {
+static const struct print_architecture_table_node archi_table[]= {
 
        {"Windows 4.0",          SPL_ARCH_WIN40,        0 },
        {"Windows NT x86",       SPL_ARCH_W32X86,       2 },
index 28c59d1feeaf4963bec69e6c136e3b87569c0e67..8280011cc207a2e985a3282c030db9cd5243845c 100644 (file)
@@ -53,12 +53,6 @@ extern userdom_struct current_user_info;
 #define MAGIC_DISPLAY_FREQUENCY 0xfade2bad
 #define PHANTOM_DEVMODE_KEY "_p_f_a_n_t_0_m_"
 
-struct table_node {
-       const char    *long_archi;
-       const char    *short_archi;
-       int     version;
-};
-
 static Printer_entry *printers_list;
 
 typedef struct _counter_printer_0 {
@@ -2079,7 +2073,7 @@ WERROR _spoolss_DeletePrinter(pipes_struct *p,
 static int get_version_id(const char *arch)
 {
        int i;
-       struct table_node archi_table[]= {
+       struct print_architecture_table_node archi_table[]= {
 
                {"Windows 4.0",          "WIN40",       0 },
                {"Windows NT x86",       "W32X86",      2 },
index 5ea812c1f5e969d937b9f1868f85bffbcf0e403c..cbff69ff17fd8c961685e823564624cd573af76f 100644 (file)
        W_ERROR_HAVE_NO_MEMORY(_printername); \
 }
 
-struct table_node {
-       const char      *long_archi;
-       const char      *short_archi;
-       int     version;
-};
-
 /* The version int is used by getdrivers.  Note that
    all architecture strings that support mutliple
    versions must be grouped together since enumdrivers
@@ -45,7 +39,7 @@ struct table_node {
    enumdriver calls for the same arch */
 
 
-static const struct table_node archi_table[]= {
+static const struct print_architecture_table_node archi_table[]= {
 
        {"Windows 4.0",          "WIN40",       0 },
        {"Windows NT x86",       "W32X86",      2 },
index 3914a42aded14dc06b9c25cd846f788f21119ccb..3376f5666d7e4b82439d625c0c0b8dc027731f97 100644 (file)
 #include "includes.h"
 #include "utils/net.h"
 
-struct table_node {
-       const char *long_archi;
-       const char *short_archi;
-       int version;
-};
-
-
 /* support itanium as well */
-static const struct table_node archi_table[]= {
+static const struct print_architecture_table_node archi_table[]= {
 
        {"Windows 4.0",          "WIN40",       0 },
        {"Windows NT x86",       "W32X86",      2 },