]> git.samba.org - samba.git/commitdiff
Move param helper routines to one place.
authorGünther Deschner <gd@samba.org>
Fri, 30 Nov 2007 17:47:25 +0000 (18:47 +0100)
committerVolker Lendecke <vl@sernet.de>
Fri, 30 Nov 2007 21:25:01 +0000 (22:25 +0100)
Guenther
(This used to be commit 6bf2c8038c4bc7a52b7f260209ade0bdeb95c685)

source3/Makefile.in
source3/param/util.c [new file with mode: 0644]
source3/utils/net_ads.c
source3/utils/net_groupmap.c

index 4cec671891b205d7fe61a543e98d9a66404a3ca4..307eabe201789178ac1481290b655934a8c4cedc 100644 (file)
@@ -318,7 +318,7 @@ READLINE_OBJ = lib/readline.o
 # Be sure to include them into your application
 POPT_LIB_OBJ = lib/popt_common.o
 
-PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o lib/sharesec.o
+PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o param/util.o lib/sharesec.o
 PARAM_REG_ADD_OBJ = $(UTIL_REG_API_OBJ)
 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
 
diff --git a/source3/param/util.c b/source3/param/util.c
new file mode 100644 (file)
index 0000000..f953484
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  param helper routines
+ *  Copyright (C) Gerald Carter                2003
+ *
+ *  This program 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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+
+/*********************************************************
+ utility function to parse an integer parameter from
+ "parameter = value"
+**********************************************************/
+uint32 get_int_param( const char* param )
+{
+       char *p;
+
+       p = strchr( param, '=' );
+       if ( !p )
+               return 0;
+
+       return atoi(p+1);
+}
+
+/*********************************************************
+ utility function to parse an integer parameter from
+ "parameter = value"
+**********************************************************/
+char* get_string_param( const char* param )
+{
+       char *p;
+
+       p = strchr( param, '=' );
+       if ( !p )
+               return NULL;
+
+       return (p+1);
+}
index ac8f79435492817603727a4b72b350314c725b52..d54b817d155dd0934cb34e1a532d8637df0c9dab 100644 (file)
@@ -1429,20 +1429,6 @@ static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads)
 #endif
 
 
-/*******************************************************************
- utility function to parse an integer parameter from
- "parameter = value"
-**********************************************************/
-static char* get_string_param( const char* param )
-{
-       char *p;
-
-       if ( (p = strchr( param, '=' )) == NULL )
-               return NULL;
-
-       return (p+1);
-}
-
 /*******************************************************************
  ********************************************************************/
 
index d2ed696eb1f4f57feba35c8ce2ddce0389ee9262..8aead50b9f580eaec78ca68908a3e7b48ee97fb5 100644 (file)
 #include "includes.h"
 #include "utils/net.h"
 
-
-/*********************************************************
- utility function to parse an integer parameter from 
- "parameter = value"
-**********************************************************/
-static uint32 get_int_param( const char* param )
-{
-       char *p;
-       
-       p = strchr( param, '=' );
-       if ( !p )
-               return 0;
-               
-       return atoi(p+1);
-}
-
-/*********************************************************
- utility function to parse an integer parameter from 
- "parameter = value"
-**********************************************************/
-static char* get_string_param( const char* param )
-{
-       char *p;
-       
-       p = strchr( param, '=' );
-       if ( !p )
-               return NULL;
-               
-       return (p+1);
-}
-
 /*********************************************************
  Figure out if the input was an NT group or a SID string.
  Return the SID.