summaryrefslogtreecommitdiff
path: root/source3/utils/make_smbcodepage.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
commite9ea36e4d2270bd7d32da12ef6d6e2299641582d (patch)
tree34905bbfb6adde96be7234d122562e678aa6efd8 /source3/utils/make_smbcodepage.c
parent766aa4ff5c6007669010d8c284de20111e633b25 (diff)
downloadsamba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.gz
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.bz2
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.zip
tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
Diffstat (limited to 'source3/utils/make_smbcodepage.c')
-rw-r--r--source3/utils/make_smbcodepage.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/utils/make_smbcodepage.c b/source3/utils/make_smbcodepage.c
index 67cd3d4f6f..0653fd31f1 100644
--- a/source3/utils/make_smbcodepage.c
+++ b/source3/utils/make_smbcodepage.c
@@ -28,7 +28,7 @@ static char *prog_name = NULL;
* Print program usage and die.
*/
-void codepage_usage(char *progname)
+static void codepage_usage(char *progname)
{
fprintf(stderr, "Usage is : %s [c|d] <codepage> <inputfile> <outputfile>\n",
progname);
@@ -40,7 +40,7 @@ void codepage_usage(char *progname)
* terminated.
*/
-void read_line( char **buf, char *line_buf, int size)
+static void read_line( char **buf, char *line_buf, int size)
{
char *p = *buf;
int num = 0;
@@ -62,7 +62,7 @@ void read_line( char **buf, char *line_buf, int size)
* Returns the number of lines copied.
*/
-int clean_data( char **buf, uint32 *size)
+static int clean_data( char **buf, uint32 *size)
{
pstring linebuf;
char *p = *buf;
@@ -108,7 +108,7 @@ int clean_data( char **buf, uint32 *size)
* Parse a byte from a codepage file.
*/
-BOOL parse_byte(char *buf, unsigned char *bp)
+static BOOL parse_byte(char *buf, unsigned char *bp)
{
unsigned int b;
char *endptr = NULL;
@@ -125,7 +125,7 @@ BOOL parse_byte(char *buf, unsigned char *bp)
* Parse a bool from a codepage file.
*/
-BOOL parse_bool(char *buf, unsigned char *bp)
+static BOOL parse_bool(char *buf, unsigned char *bp)
{
if(isdigit((int)*buf))
{
@@ -151,7 +151,7 @@ BOOL parse_bool(char *buf, unsigned char *bp)
* Print a parse error and exit.
*/
-void parse_error(char *buf, char *msg)
+static void parse_error(char *buf, char *msg)
{
fprintf(stderr, "%s: %s whilst parsing line \n%s\n", prog_name,
msg, buf);
@@ -162,7 +162,7 @@ void parse_error(char *buf, char *msg)
* Create a compiled codepage file from a codepage definition file.
*/
-int do_compile(int codepage, char *input_file, char *output_file)
+static int do_compile(int codepage, char *input_file, char *output_file)
{
FILE *fp = NULL;
uint32 size = 0;
@@ -307,7 +307,7 @@ definition file. File %s has %d.\n", prog_name, MAXCODEPAGELINES, input_file, nu
* Placeholder for now.
*/
-int do_decompile( int codepage, char *input_file, char *output_file)
+static int do_decompile( int codepage, char *input_file, char *output_file)
{
uint32 size = 0;
SMB_STRUCT_STAT st;