[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1596-g6522517

Günther Deschner gd at samba.org
Wed May 13 13:28:01 GMT 2009


The branch, master has been updated
       via  652251701df7dec1401eab9b1dbc7e3ac5c7e7ad (commit)
      from  077327a923841338cf24162a67465c70fa3c4613 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 652251701df7dec1401eab9b1dbc7e3ac5c7e7ad
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 12 14:15:01 2009 +0200

    s3-printing: no need to define struct table_node 4 times.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 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(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index a25d984..09878f9 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 17e3d40..34b7a57 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 28c59d1..8280011 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 5ea812c..cbff69f 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 3914a42..3376f56 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 },


-- 
Samba Shared Repository


More information about the samba-cvs mailing list