fixed warnings when compiled with -Wmissing-declarations
Modified: trunk/reactos/apps/utils/net/finger/finger.c
Modified: trunk/reactos/apps/utils/net/finger/getopt.c
Modified: trunk/reactos/apps/utils/net/finger/various.h
Modified: trunk/reactos/apps/utils/net/ftp/cmds.c
Modified: trunk/reactos/apps/utils/net/ftp/cmdtab.c
Modified: trunk/reactos/apps/utils/net/ftp/domacro.c
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h
Modified: trunk/reactos/apps/utils/net/ftp/main.c
Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c
Modified: trunk/reactos/apps/utils/net/netstat/netstat.c
Modified: trunk/reactos/apps/utils/net/ping/ping.c
Modified: trunk/reactos/apps/utils/net/route/route.c
Modified: trunk/reactos/apps/utils/net/tracert/tracert.c
Modified: trunk/reactos/apps/utils/net/tracert/tracert.h
Modified: trunk/reactos/apps/utils/net/whois/whois.c
Modified: trunk/reactos/apps/utils/ps/ps.c
_____
Modified: trunk/reactos/apps/utils/net/finger/finger.c
--- trunk/reactos/apps/utils/net/finger/finger.c 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/finger/finger.c 2005-10-06
18:51:52 UTC (rev 18297)
@@ -74,7 +74,6 @@
static void userlist(int, char **);
void usage();
-void netfinger(char *);
int
main(int argc, char **argv)
_____
Modified: trunk/reactos/apps/utils/net/finger/getopt.c
--- trunk/reactos/apps/utils/net/finger/getopt.c 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/finger/getopt.c 2005-10-06
18:51:52 UTC (rev 18297)
@@ -42,6 +42,8 @@
#include <stdlib.h>
#include <string.h>
+#include "getopt.h"
+
/*
* get option letter from argument vector
*/
_____
Modified: trunk/reactos/apps/utils/net/finger/various.h
--- trunk/reactos/apps/utils/net/finger/various.h 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/finger/various.h 2005-10-06
18:51:52 UTC (rev 18297)
@@ -31,4 +31,6 @@
#define index(s, c) strchr(s, c)
#define rindex(s, c) strrchr(s, c)
+void netfinger(char *);
+
#endif
_____
Modified: trunk/reactos/apps/utils/net/ftp/cmds.c
--- trunk/reactos/apps/utils/net/ftp/cmds.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/cmds.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -46,7 +46,6 @@
#include "prototypes.h"
extern char *globerr;
-extern char **glob();
extern char home[];
extern char *remglob();
extern char *getenv();
@@ -67,7 +66,7 @@
*/
void setpeer(int argc, char *argv[])
{
- char *host, *hookup();
+ char *host;
if (connected) {
printf("Already connected to %s, use close first.\n",
@@ -266,9 +265,9 @@
/*
* Set file transfer mode.
*/
-#if 0
+
/*ARGSUSED*/
-void setmode(argc, argv)
+void fsetmode(argc, argv)
char *argv[];
{
@@ -276,8 +275,8 @@
(void) fflush(stdout);
code = -1;
}
-#endif
+
/*
* Set file transfer format.
*/
@@ -379,7 +378,6 @@
{
register int i;
int ointer;
- void mabort();
extern jmp_buf jabort;
char *tp;
@@ -650,7 +648,8 @@
return (0);
}
-void
+#if 0
+static void
mabort()
{
int ointer;
@@ -670,6 +669,7 @@
mflag = 0;
longjmp(jabort,0);
}
+#endif
/*
* Get multiple files.
@@ -679,7 +679,6 @@
{
char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN];
int ointer;
- void mabort();
extern jmp_buf jabort;
if (argc < 2) {
@@ -809,7 +808,7 @@
return (buf);
}
-char *
+static char *
onoff(bool)
int bool;
{
@@ -1094,7 +1093,6 @@
{
char *cp;
int ointer;
- void mabort();
extern jmp_buf jabort;
if (argc < 2) {
@@ -1217,7 +1215,6 @@
{
char *cmd, mode[1], *dest;
int ointer, i;
- void mabort();
extern jmp_buf jabort;
if (argc < 2) {
@@ -1276,7 +1273,7 @@
* Do a shell escape
*/
/*ARGSUSED*/
-int shell(argc, argv)
+void shell(argc, argv)
char *argv[];
{
#if 0
@@ -1344,7 +1341,7 @@
if (NumBytes == 0)
{
- return(-1);
+ return;
}
AppName = ShellCmd;
@@ -1391,21 +1388,12 @@
CloseHandle( ProcessInformation.hProcess);
}
-
- if (Result)
- {
- return(-1);
- }
- else
- {
- return(0);
- }
}
/*
* Send new user information (re-login)
*/
-int user(argc, argv)
+void user(argc, argv)
int argc;
char **argv;
{
@@ -1425,7 +1413,7 @@
printf("usage: %s username [password] [account]\n",
argv[0]);
(void) fflush(stdout);
code = -1;
- return (0);
+ return;
}
n = command("USER %s", argv[1]);
if (n == CONTINUE) {
@@ -1447,12 +1435,11 @@
if (n != COMPLETE) {
fprintf(stdout, "Login failed.\n");
(void) fflush(stdout);
- return (0);
+ return;
}
if (!aflag && argc == 4) {
(void) command("ACCT %s", argv[3]);
}
- return (1);
}
/*
@@ -1717,13 +1704,15 @@
return (*line != 'n' && *line != 'N');
}
-void fatal(msg)
+#if 0
+static void fatal(msg)
char *msg;
{
fprintf(stderr, "ftp: %s\n", msg);
exit(1);
}
+#endif
/*
* Glob a local file name specification with
@@ -1785,7 +1774,8 @@
jmp_buf abortprox;
-void
+#if 0
+static void
proxabort()
{
extern int proxy;
@@ -1802,12 +1792,12 @@
pswitch(0);
longjmp(abortprox,1);
}
+#endif
void doproxy(argc,argv)
int argc;
char *argv[];
{
- void proxabort();
register struct cmd *c;
struct cmd *getcmd();
// extern struct cmd cmdtab[];
_____
Modified: trunk/reactos/apps/utils/net/ftp/cmdtab.c
--- trunk/reactos/apps/utils/net/ftp/cmdtab.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/cmdtab.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -24,20 +24,6 @@
/*
* User FTP -- Command Tables.
*/
-int setascii(), setbell(), setbinary(), setdebug(), setform();
-int setglob(), sethash(), setmode(), setpeer(), setpassive(),
setport();
-int setprompt(), setstruct();
-int settenex(), settrace(), settype(), setverbose();
-int disconnect(), restart(), reget(), syst();
-int cd(), lcd(), delete(), mdelete(), user();
-int ls(), mls(), get(), mget(), help(), append(), put(), mput();
-int quit(), renamefile(), status();
-int quote(), rmthelp(), shell(), site();
-int pwd(), makedir(), removedir(), setcr();
-int account(), doproxy(), reset(), setcase(), setntrans(),
setnmap();
-int setsunique(), setrunique(), cdup(), macdef(), domacro();
-int sizecmd(), modtime(), newer(), rmtstatus();
-int do_chmod(), do_umask(), idle();
char accounthelp[] = "send account command to remote server";
char appendhelp[] = "append to a file";
@@ -140,7 +126,7 @@
{ "mget", mgethelp, 1, 1, 1, mget },
{ "mkdir", mkdirhelp, 0, 1, 1, makedir
},
{ "mls", mlshelp, 1, 1, 1, mls },
- { "mode", modehelp, 0, 1, 1, setmode
},
+ { "mode", modehelp, 0, 1, 1, fsetmode
},
{ "modtime", modtimehelp, 0, 1, 1, modtime
},
{ "mput", mputhelp, 1, 1, 1, mput },
{ "newer", newerhelp, 1, 1, 1, newer },
_____
Modified: trunk/reactos/apps/utils/net/ftp/domacro.c
--- trunk/reactos/apps/utils/net/ftp/domacro.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/domacro.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -36,7 +36,6 @@
register char *cp1, *cp2;
int count = 2, loopflg = 0;
char line2[200];
- extern char **glob();
struct cmd *getcmd(), *c;
if (argc < 2) {
_____
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
--- trunk/reactos/apps/utils/net/ftp/fake.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/fake.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -35,12 +35,11 @@
free(*av++);
}
-char *glob(register char *v)
+char **glob(register char *v)
{
return NULL;
}
-
int sleep(int time)
{
return time;
@@ -50,8 +49,8 @@
{
return 0;
}
+
#if 0
-
int gettimeofday(struct timeval *timenow,
struct timezone *zone)
{
@@ -294,11 +293,13 @@
return NULL;
}
+#if 0
// Stubbed out here. Should be changed in Source code...
int access(const char *filename, int accessmethod)
{
return 0;
}
+#endif
#ifndef __GNUC__
#define EPOCHFILETIME (116444736000000000i64)
_____
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
--- trunk/reactos/apps/utils/net/ftp/ftp.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/ftp.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -260,7 +260,7 @@
return (1);
}
-void
+static void
cmdabort(int sig)
{
extern jmp_buf ptabort;
@@ -422,7 +422,7 @@
}
}
-int
+static int
empty(mask, sec)
struct fd_set *mask;
int sec;
@@ -436,6 +436,7 @@
jmp_buf sendabort;
+#if 0
void abortsend()
{
@@ -445,6 +446,7 @@
(void) fflush(stdout);
longjmp(sendabort, 1);
}
+#endif
#define HASHBYTES 1024
@@ -454,7 +456,6 @@
int dout = 0;
int (*closefunc)(), _pclose(), fclose();
sig_t (*oldintr)(), (*oldintp)();
- void abortsend();
char buf[BUFSIZ], *bufp;
long bytes = 0, hashbytes = HASHBYTES;
register int c, d;
@@ -710,7 +711,7 @@
jmp_buf recvabort;
-
+#if 0
void abortrecv()
{
@@ -720,6 +721,7 @@
(void) fflush(stdout);
longjmp(recvabort, 1);
}
+#endif
void recvrequest(char *cmd, char *local, char *remote, char *mode,
int printnames)
@@ -728,9 +730,8 @@
int din = 0;
int (*closefunc)(), _pclose(), fclose();
void (*oldintr)(int), (*oldintp)(int);
- void abortrecv();
int oldverbose = 0, oldtype = 0, is_retr, tcrflag, nfnd,
bare_lfs = 0;
- char *gunique(), msg;
+ char msg;
// static char *buf; // Szurgot: Shouldn't this go SOMEWHERE?
char buf[1024];
static int bufsize = 1024;
@@ -1417,6 +1418,7 @@
jmp_buf ptabort;
int ptabflg;
+#if 0
void
abortpt()
{
@@ -1427,12 +1429,12 @@
abrtflag = 0;
longjmp(ptabort, 1);
}
+#endif
void proxtrans(cmd, local, remote)
char *cmd, *local, *remote;
{
// void (*oldintr)(int);
- //void abortpt(int);
int tmptype, oldtype = 0, secndflag = 0, nfnd;
extern jmp_buf ptabort;
char *cmd2;
@@ -1756,6 +1758,7 @@
}
}
+#if 0
char *
gunique(local)
char *local;
@@ -1802,6 +1805,7 @@
}
return(new);
}
+#endif
int null(void)
{
_____
Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h
--- trunk/reactos/apps/utils/net/ftp/ftp_var.h 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/ftp_var.h 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -1,18 +1,10 @@
#include <winsock.h>
#include "fake.h"
+#include "prototypes.h"
#include <setjmp.h>
//typedef void (*Sig_t)(int);
-int fgetcSocket(int s);
-char *fputsSocket(char *format, int s);
-
-char *fprintfSocket(int s, char *format, ...);
-
-int fputcSocket(int s, char putChar);
-int fputSocket(int s, char *putChar, int len);
-char *fgetsSocket(int s, char *string);
-
/* The following defines are from ftp.h and telnet.h from bsd.h */
/* All relevent copyrights below apply. */
@@ -153,7 +145,7 @@
char c_bell; /* give bell when command completes */
char c_conn; /* must be connected to use command */
char c_proxy; /* proxy server may execute */
- int (*c_handler)(); /* function to call */
+ void (*c_handler)(); /* function to call */
};
struct macel {
@@ -166,11 +158,6 @@
struct macel macros[16];
char macbuf[4096];
-extern char *tail();
-extern char *remglob();
-extern int errno;
-extern char *mktemp();
-
#if defined(__ANSI__) || defined(sparc)
typedef void sig_t;
#else
@@ -178,4 +165,4 @@
#endif
typedef int uid_t;
-int herror(char *s);
+
_____
Modified: trunk/reactos/apps/utils/net/ftp/main.c
--- trunk/reactos/apps/utils/net/ftp/main.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/main.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -121,6 +121,7 @@
int options; /* used during socket creation */
+static char *slurpstring();
int main(int argc, char *argv[])
@@ -310,8 +311,6 @@
int top;
{
register struct cmd *c;
- struct cmd *getcmd();
- extern int help();
if (!top)
(void) putchar('\n');
@@ -395,7 +394,6 @@
void makeargv()
{
char **argp;
- char *slurpstring();
margc = 0;
argp = margv;
@@ -411,7 +409,7 @@
* implemented with FSM to
* handle quoting and strings
*/
-char *
+static char *
slurpstring()
{
int got_one = 0;
@@ -535,7 +533,7 @@
* Help command.
* Call each command handler with argc == 0 and argv[0] == name.
*/
-int help(argc, argv)
+void help(argc, argv)
int argc;
char *argv[];
{
@@ -582,7 +580,7 @@
}
}
(void) fflush(stdout);
- return 0;
+ return;
}
while (--argc > 0) {
register char *arg;
@@ -597,5 +595,4 @@
c->c_name, c->c_help);
}
(void) fflush(stdout);
- return 0;
}
_____
Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
--- trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-10-06
18:51:52 UTC (rev 18297)
@@ -1,4 +1,17 @@
+int fgetcSocket(int s);
+char *fputsSocket(char *format, int s);
+
+char *fprintfSocket(int s, char *format, ...);
+
+int fputcSocket(int s, char putChar);
+int fputSocket(int s, char *putChar, int len);
+char *fgetsSocket(int s, char *string);
+
+char *hookup();
+char **glob();
+int herror(char *s);
+
int getreply(int expecteof);
int ruserpass(char *host, char **aname, char **apass, char **aacct);
char *getpass(const char *prompt);
@@ -29,3 +42,25 @@
void blkfree(char **av0);
int getit(int argc, char *argv[], int restartit, char *mode);
int sleep(int time);
+
+char *tail();
+int errno;
+char *mktemp();
+void setbell(), setdebug();
+void setglob(), sethash(), setport();
+void setprompt();
+void settrace(), setverbose();
+void settype(), setform(), setstruct();
+void restart(), syst();
+void cd(), lcd(), delete(), mdelete();
+void ls(), mls(), get(), mget(), help(), append(), put(), mput(),
reget();
+void status();
+void renamefile();
+void quote(), rmthelp(), site();
+void pwd(), makedir(), removedir(), setcr();
+void account(), doproxy(), reset(), setcase(), setntrans(),
setnmap();
+void setsunique(), setrunique(), cdup(), macdef();
+void sizecmd(), modtime(), newer(), rmtstatus();
+void do_chmod(), do_umask(), idle();
+void shell(), user(), fsetmode();
+struct cmd *getcmd();
_____
Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c
--- trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-10-06
18:51:52 UTC (rev 18297)
@@ -73,7 +73,7 @@
}
}
-void PrintPhysicalAddr(PBYTE Addr, UINT len)
+static void PrintPhysicalAddr(PBYTE Addr, UINT len)
{
UINT i=0;
for (i=0; i<len; i++)
_____
Modified: trunk/reactos/apps/utils/net/netstat/netstat.c
--- trunk/reactos/apps/utils/net/netstat/netstat.c 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/netstat/netstat.c 2005-10-06
18:51:52 UTC (rev 18297)
@@ -50,7 +50,7 @@
"DELETE_TCB"
};
-VOID PrintError(DWORD ErrorCode)
+static VOID PrintError(DWORD ErrorCode)
{
LPVOID lpMsgBuf;
@@ -182,37 +182,6 @@
}
#endif
-/*
-typedef struct {
- UINT idLength;
- UINT* ids;
-} AsnObjectIdentifier;
-
-VOID SnmpUtilPrintAsnAny(AsnAny* pAny); // pointer to value to print
-VOID SnmpUtilPrintOid(AsnObjectIdentifier* Oid); // object identifier
to print
-
- */
-void test_snmp(void)
-{
- int nBytes = 500;
- BYTE* pCache;
-
- pCache = (BYTE*)SnmpUtilMemAlloc(nBytes);
- if (pCache != NULL) {
- AsnObjectIdentifier* pOidSrc = NULL;
- AsnObjectIdentifier AsnObId;
- if (SnmpUtilOidCpy(&AsnObId, pOidSrc)) {
- //
- //
- //
- SnmpUtilOidFree(&AsnObId);
- }
- SnmpUtilMemFree(pCache);
- } else {
- _tprintf(_T("ERROR: call to SnmpUtilMemAlloc() failed\n"));
- }
-}
-
// Maximum string lengths for ASCII ip address and port names
//
#define HOSTNAMELEN 256
@@ -264,7 +233,7 @@
//
// Translate port numbers into their text equivalent if there is one
//
-PCHAR
+static PCHAR
GetPortName(DWORD Flags, UINT port, PCHAR proto, PCHAR name, int
namelen)
{
struct servent *psrvent;
@@ -288,7 +257,7 @@
//
// Translate IP addresses into their name-resolved form if possible.
//
-PCHAR
+static PCHAR
GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int
namelen)
{
// struct hostent *phostent;
@@ -352,7 +321,7 @@
return name;
}
-BOOLEAN usage(void)
+static BOOLEAN usage(void)
{
TCHAR buffer[MAX_RESLEN];
@@ -366,7 +335,7 @@
//
// Parses the command line arguments.
//
-BOOLEAN
+static BOOLEAN
GetOptions(int argc, char *argv[], PDWORD pFlags)
{
int i, j;
@@ -498,6 +467,37 @@
#else
+/*
+typedef struct {
+ UINT idLength;
+ UINT* ids;
+} AsnObjectIdentifier;
+
+VOID SnmpUtilPrintAsnAny(AsnAny* pAny); // pointer to value to print
+VOID SnmpUtilPrintOid(AsnObjectIdentifier* Oid); // object identifier
to print
+
+ */
+static void test_snmp(void)
+{
+ int nBytes = 500;
+ BYTE* pCache;
+
+ pCache = (BYTE*)SnmpUtilMemAlloc(nBytes);
+ if (pCache != NULL) {
+ AsnObjectIdentifier* pOidSrc = NULL;
+ AsnObjectIdentifier AsnObId;
+ if (SnmpUtilOidCpy(&AsnObId, pOidSrc)) {
+ //
+ //
+ //
+ SnmpUtilOidFree(&AsnObId);
+ }
+ SnmpUtilMemFree(pCache);
+ } else {
+ _tprintf(_T("ERROR: call to SnmpUtilMemAlloc() failed\n"));
+ }
+}
+
int main(int argc, char *argv[])
{
if (argc > 1) {
_____
Modified: trunk/reactos/apps/utils/net/ping/ping.c
--- trunk/reactos/apps/utils/net/ping/ping.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/ping/ping.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -106,7 +106,7 @@
/* Display the contents of a buffer */
-VOID DisplayBuffer(
+static VOID DisplayBuffer(
PVOID Buffer,
DWORD Size)
{
@@ -125,7 +125,7 @@
}
/* Display usage information on screen */
-VOID Usage(VOID)
+static VOID Usage(VOID)
{
printf("\nUsage: ping [-t] [-n count] [-l size] [-w timeout]
destination-host\n\n");
printf("Options:\n");
@@ -137,7 +137,7 @@
}
/* Reset configuration to default values */
-VOID Reset(VOID)
+static VOID Reset(VOID)
{
LARGE_INTEGER PerformanceCounterFrequency;
@@ -173,7 +173,7 @@
}
/* Return ULONG in a string */
-ULONG GetULONG(LPSTR String)
+static ULONG GetULONG(LPSTR String)
{
UINT i, Length;
ULONG Value;
@@ -191,7 +191,7 @@
}
/* Return ULONG in a string. Try next paramter if not successful */
-ULONG GetULONG2(LPSTR String1, LPSTR String2, PINT i)
+static ULONG GetULONG2(LPSTR String1, LPSTR String2, PINT i)
{
ULONG Value;
@@ -209,7 +209,7 @@
}
/* Parse command line parameters */
-BOOL ParseCmdline(int argc, char* argv[])
+static BOOL ParseCmdline(int argc, char* argv[])
{
INT i;
BOOL ShowUsage;
@@ -278,7 +278,7 @@
}
/* Calculate checksum of data */
-WORD Checksum(PUSHORT data, UINT size)
+static WORD Checksum(PUSHORT data, UINT size)
{
ULONG sum = 0;
@@ -297,7 +297,7 @@
}
/* Prepare to ping target */
-BOOL Setup(VOID)
+static BOOL Setup(VOID)
{
WORD wVersionRequested;
WSADATA WsaData;
@@ -354,7 +354,7 @@
}
/* Close socket */
-VOID Cleanup(VOID)
+static VOID Cleanup(VOID)
{
if (IcmpSock != INVALID_SOCKET)
closesocket(IcmpSock);
@@ -362,7 +362,7 @@
WSACleanup();
}
-VOID QueryTime(PLARGE_INTEGER Time)
+static VOID QueryTime(PLARGE_INTEGER Time)
{
if (UsePerformanceCounter) {
if (QueryPerformanceCounter(Time) == 0) {
@@ -384,7 +384,7 @@
}
}
-VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time)
+static VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time)
{
CHAR Convstr[40];
LARGE_INTEGER LargeTime;
@@ -398,7 +398,7 @@
/* Locate the ICMP data and print it. Returns TRUE if the packet was
good,
FALSE if not */
-BOOL DecodeResponse(PCHAR buffer, UINT size, PSOCKADDR_IN from)
+static BOOL DecodeResponse(PCHAR buffer, UINT size, PSOCKADDR_IN from)
{
PIPv4_HEADER IpHeader;
PICMP_ECHO_PACKET Icmp;
@@ -462,7 +462,7 @@
}
/* Send and receive one ping */
-BOOL Ping(VOID)
+static BOOL Ping(VOID)
{
INT Status;
SOCKADDR From;
_____
Modified: trunk/reactos/apps/utils/net/route/route.c
--- trunk/reactos/apps/utils/net/route/route.c 2005-10-06 15:02:50 UTC
(rev 18296)
+++ trunk/reactos/apps/utils/net/route/route.c 2005-10-06 18:51:52 UTC
(rev 18297)
@@ -20,7 +20,7 @@
#define IPBUF 17
#define IN_ADDR_OF(x) *((struct in_addr *)&(x))
-int Usage()
+static int Usage()
{
_ftprintf( stderr,
_T("route usage:\n"
@@ -33,7 +33,7 @@
return 1;
}
-int PrintRoutes()
+static int PrintRoutes()
{
PMIB_IPFORWARDTABLE IpForwardTable = NULL;
PIP_ADAPTER_INFO pAdapterInfo;
@@ -154,7 +154,7 @@
}
}
-int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd,
+static int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd,
int argc, TCHAR **argv ) {
int i;
#if UNICODE
@@ -205,7 +205,7 @@
return TRUE;
}
-int add_route( int argc, TCHAR **argv ) {
+static int add_route( int argc, TCHAR **argv ) {
MIB_IPFORWARDROW RowToAdd = { 0 };
DWORD Error;
@@ -229,7 +229,7 @@
return Error;
}
-int del_route( int argc, TCHAR **argv )
+static int del_route( int argc, TCHAR **argv )
{
MIB_IPFORWARDROW RowToDel = { 0 };
DWORD Error;
@@ -252,9 +252,11 @@
return Error;
}
+#if defined(_UNICODE) && defined(__GNUC__)
+static
+#endif
int _tmain( int argc, TCHAR **argv )
{
-
if( argc < 2 )
return Usage();
else if ( !_tcscmp( argv[1], _T("print") ) )
_____
Modified: trunk/reactos/apps/utils/net/tracert/tracert.c
--- trunk/reactos/apps/utils/net/tracert/tracert.c 2005-10-06
15:02:50 UTC (rev 18296)
+++ trunk/reactos/apps/utils/net/tracert/tracert.c 2005-10-06
18:51:52 UTC (rev 18297)
@@ -70,15 +70,27 @@
INT iHostList; // -j @UNIMPLEMENTED@
INT iTimeOut = 2000; // -w time before packet times out
+/* function definitions */
+static BOOL ParseCmdline(int argc, char* argv[]);
+static INT Driver(void);
+static INT Setup(INT ttl);
+static VOID SetupTimingMethod(void);
+static VOID ResolveHostname(void);
+static VOID PreparePacket(INT packetSize, INT seqNum);
+static INT SendPacket(INT datasize);
+static INT ReceivePacket(INT datasize);
+static INT DecodeResponse(INT packetSize, INT seqNum);
+static LONG GetTime(void);
+static WORD CheckSum(PUSHORT data, UINT size);
+static VOID Usage(void);
-
/*
*
* Parse command line parameters and set any options
*
*/
-BOOL ParseCmdline(int argc, char* argv[])
+static BOOL ParseCmdline(int argc, char* argv[])
{
int i;
@@ -122,7 +134,7 @@
* Driver function, controls the traceroute program
*
*/
-INT Driver(VOID)
+static INT Driver(VOID)
{
INT iHopCount = 1; // hop counter. default max is 30
@@ -311,7 +323,7 @@
* gettickcount, so set the figures to 1
*
*/
-VOID SetupTimingMethod(VOID)
+static VOID SetupTimingMethod(VOID)
{
LARGE_INTEGER PerformanceCounterFrequency;
@@ -343,7 +355,7 @@
* SOCKADDR_IN members needed for the connection.
*
*/
-VOID ResolveHostname(VOID)
+static VOID ResolveHostname(VOID)
{
HOSTENT *hp;
ULONG addr;
@@ -386,7 +398,7 @@
* set in the outgoing IP packet.
*
*/
-INT Setup(INT iTTL)
+static INT Setup(INT iTTL)
{
INT iSockRet;
@@ -422,7 +434,7 @@
* Calculate the packet checksum
*
*/
-VOID PreparePacket(INT iPacketSize, INT iSeqNum)
[truncated at 1000 lines; 125 more skipped]