summaryrefslogtreecommitdiff
path: root/source3/client/client.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/client/client.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/client/client.c')
-rw-r--r--source3/client/client.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index d5dece1626..0d1fe6721c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -47,6 +47,9 @@ extern BOOL doencrypt;
extern pstring user_socket_options;
+static int process_tok(fstring tok);
+static void cmd_help(char *dum_in, char *dum_out);
+
/* 30 second timeout on most commands */
#define CLIENT_TIMEOUT (30*1000)
#define SHORT_TIMEOUT (5*1000)
@@ -134,7 +137,7 @@ extern int Client;
/****************************************************************************
send an SMBclose on an SMB file handle
****************************************************************************/
-void cli_smb_close(char *inbuf, char *outbuf, int clnt_fd, int c_num, int f_num)
+static void cli_smb_close(char *inbuf, char *outbuf, int clnt_fd, int c_num, int f_num)
{
bzero(outbuf,smb_size);
set_message(outbuf,3,0,True);
@@ -149,6 +152,7 @@ void cli_smb_close(char *inbuf, char *outbuf, int clnt_fd, int c_num, int f_num)
client_receive_smb(clnt_fd,inbuf,CLIENT_TIMEOUT);
}
+
/****************************************************************************
write to a local file with CR/LF->LF translation if appropriate. return the
number taken from the buffer. This may not equal the number written.
@@ -472,7 +476,7 @@ static void display_finfo(file_info *finfo)
DEBUG(0,(" %-30s%7.7s%10d %s",
CNV_LANG(finfo->name),
attrib_string(finfo->mode),
- finfo->size,
+ (int)finfo->size,
asctime(LocalTime(&t))));
#endif /* LARGE_SMB_OFF_T */
dir_total += finfo->size;
@@ -1206,7 +1210,7 @@ static void do_get(char *rname,char *lname,file_info *finfo1)
#else /* LARGE_SMB_OFF_T */
DEBUG(2,("getting file %s of size %d bytes as %s ",
CNV_LANG(finfo.name),
- finfo.size,
+ (int)finfo.size,
lname));
#endif /* LARGE_SMB_OFF_T */
@@ -1220,7 +1224,8 @@ static void do_get(char *rname,char *lname,file_info *finfo1)
#ifdef LARGE_SMB_OFF_T
DEBUG(3,("nread=%d max_xmit=%d fsize=%.0f\n",nread,max_xmit,(double)finfo.size));
#else /* LARGE_SMB_OFF_T */
- DEBUG(3,("nread=%d max_xmit=%d fsize=%d\n",nread,max_xmit,finfo.size));
+ DEBUG(3,("nread=%d max_xmit=%d fsize=%d\n",nread,max_xmit,
+ (int)finfo.size));
#endif /* LARGE_SMB_OFF_T */
/* 3 possible read types. readbraw if a large block is required.
@@ -1902,7 +1907,8 @@ static void do_put(char *rname,char *lname,file_info *finfo)
#ifdef LARGE_SMB_OFF_T
DEBUG(1,("putting file %s of size %.0f bytes as %s ",lname,(double)finfo->size,CNV_LANG(rname)));
#else /* LARGE_SMB_OFF_T */
- DEBUG(1,("putting file %s of size %d bytes as %s ",lname,finfo->size,CNV_LANG(rname)));
+ DEBUG(1,("putting file %s of size %d bytes as %s ",lname,
+ (int)finfo->size,CNV_LANG(rname)));
#endif /* LARGE_SMB_OFF_T */
if (!maxwrite)
@@ -3318,7 +3324,7 @@ static int process_tok(fstring tok)
/****************************************************************************
help
****************************************************************************/
-void cmd_help(char *dum_in, char *dum_out)
+static void cmd_help(char *dum_in, char *dum_out)
{
int i=0,j;
fstring buf;
@@ -3339,6 +3345,8 @@ void cmd_help(char *dum_in, char *dum_out)
}
}
+
+
/****************************************************************************
wait for keyboard activity, swallowing network packets
****************************************************************************/