From 652251701df7dec1401eab9b1dbc7e3ac5c7e7ad Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 May 2009 14:15:01 +0200 Subject: s3-printing: no need to define struct table_node 4 times. Guenther --- source3/include/nt_printing.h | 6 ++++++ source3/printing/nt_printing.c | 8 +------- source3/rpc_server/srv_spoolss_nt.c | 8 +------- source3/rpcclient/cmd_spoolss.c | 8 +------- source3/utils/net_rpc_printer.c | 9 +-------- 5 files changed, 10 insertions(+), 29 deletions(-) (limited to 'source3') diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index a25d984eb2..09878f9ec4 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -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_ */ diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 17e3d40152..34b7a577f8 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -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 }, diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 28c59d1fee..8280011cc2 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -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 }, diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 5ea812c1f5..cbff69ff17 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -32,12 +32,6 @@ 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 }, diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 3914a42ade..3376f5666d 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -19,15 +19,8 @@ #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 }, -- cgit