fixed warnings when compiled with -Wwrite-strings
Modified: trunk/reactos/apps/utils/net/finger/getopt.c
Modified: trunk/reactos/apps/utils/net/finger/getopt.h
Modified: trunk/reactos/apps/utils/net/ftp/cmds.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/ftp/ruserpass.c
Modified: trunk/reactos/apps/utils/net/telnet/src/ansiprsr.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/ansiprsr.h
Modified: trunk/reactos/apps/utils/net/telnet/src/tconsole.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/tnconfig.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/tnconfig.h
Modified: trunk/reactos/apps/utils/net/telnet/src/tnmain.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/tscroll.cpp

Modified: trunk/reactos/apps/utils/net/finger/getopt.c
--- trunk/reactos/apps/utils/net/finger/getopt.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/finger/getopt.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -50,7 +50,7 @@
 int	opterr = 1,		/* if error message should be printed */
 	optind = 1,		/* index into parent argv vector */
 	optopt;			/* character checked for validity */
-char	*optarg;		/* argument associated with option */
+const char	*optarg;		/* argument associated with option */
 
 #define	BADCH	(int)'?'
 #define	EMSG	""
@@ -58,7 +58,7 @@
 int
 getopt(int nargc, char * const *nargv, const char *ostr)
 {
-	static char *place = EMSG;		/* option letter processing */
+	static const char *place = EMSG;		/* option letter processing */
 	register char *oli;			/* option letter list index */
 	char *p;
 

Modified: trunk/reactos/apps/utils/net/finger/getopt.h
--- trunk/reactos/apps/utils/net/finger/getopt.h	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/finger/getopt.h	2005-11-11 16:11:13 UTC (rev 19131)
@@ -1,6 +1,6 @@
 /* getopt.h */
 
-extern char *optarg;
+extern const char *optarg;
 extern int optind;
 
 int

Modified: trunk/reactos/apps/utils/net/ftp/cmds.c
--- trunk/reactos/apps/utils/net/ftp/cmds.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/cmds.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -53,9 +53,9 @@
 extern off_t restart_point;
 extern char reply_string[];
 
-char *mname;
+const char *mname;
 jmp_buf jabort;
-char *dotrans(), *domap();
+const char *dotrans(), *domap();
 
 extern short portnum;
 extern char *hostname;
@@ -64,7 +64,7 @@
  * Connect to peer server and
  * auto-login, if possible.
  */
-void setpeer(int argc, char *argv[])
+void setpeer(int argc, const char *argv[])
 {
 	char *host;
 
@@ -154,8 +154,8 @@
 }
 
 struct	types {
-	char	*t_name;
-	char	*t_mode;
+	const char	*t_name;
+	const char	*t_mode;
 	int	t_type;
 	char	*t_arg;
 } types[] = {
@@ -171,13 +171,13 @@
  * Set transfer type.
  */
 void settype(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	register struct types *p;
 	int comret;
 
 	if (argc > 2) {
-		char *sep;
+		const char *sep;
 
 		printf("usage: %s [", argv[0]);
 		sep = " ";
@@ -216,7 +216,7 @@
 	}
 }
 
-char *stype[] = {
+const char *stype[] = {
 	"type",
 	"",
 	0
@@ -308,11 +308,11 @@
  */
 void put(argc, argv)
 	int argc;
-	char *argv[];
+	const char *argv[];
 {
-	char *cmd;
+	const char *cmd;
 	int loc = 0;
-	char *oldargv1, *oldargv2;
+	const char *oldargv1, *oldargv2;
 
 	if (argc == 2) {
 		argc++;
@@ -374,12 +374,12 @@
  * Send multiple files.
  */
 void mput(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	register int i;
 	int ointer;
 	extern jmp_buf jabort;
-	char *tp;
+	const char *tp;
 
 	if (argc < 2) {
 		(void) strcat(line, " ");
@@ -505,13 +505,13 @@
 }
 
 void reget(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	(void) getit(argc, argv, 1, "r+w");
 }
 
 void get(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	(void) getit(argc, argv, 0, restart_point ? "r+w" : "w" );
 }
@@ -520,11 +520,11 @@
  * Receive one file.
  */
 int getit(argc, argv, restartit, mode)
-	char *argv[];
-	char *mode;
+	const char *argv[];
+	const char *mode;
 {
 	int loc = 0;
-	char *oldargv1, *oldargv2;
+	const char *oldargv1, *oldargv2;
 
 	if (argc == 2) {
 		argc++;
@@ -565,7 +565,8 @@
 		return (0);
 	}
 	if (loc && mcase) {
-		char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN];
+		const char *tp = argv[1];
+        char *tp2, tmpbuf[MAXPATHLEN];
 
 		while (*tp && !islower(*tp)) {
 			tp++;
@@ -675,9 +676,10 @@
  * Get multiple files.
  */
 void mget(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
-	char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN];
+	const char *cp, *tp;
+    char *tp2, tmpbuf[MAXPATHLEN];
 	int ointer;
 	extern jmp_buf jabort;
 
@@ -756,7 +758,8 @@
 	static FILE *ftemp = NULL;
 	static char **args;
 	int oldverbose, oldhash;
-	char *cp, *mode;
+	char *cp;
+    const char *mode;
 
 	if (!mflag) {
 		if (!doglob) {
@@ -808,7 +811,7 @@
 	return (buf);
 }
 
-static char *
+static const char *
 onoff(bool)
 	int bool;
 {
@@ -1002,7 +1005,7 @@
  * on remote machine.
  */
 void cd(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -1034,7 +1037,7 @@
  * on local machine.
  */
 void lcd(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	char buf[MAXPATHLEN];
 
@@ -1064,7 +1067,7 @@
  * Delete a single file.
  */
 void delete(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -1089,7 +1092,7 @@
  * Delete multiple files.
  */
 void mdelete(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	char *cp;
 	int ointer;
@@ -1139,7 +1142,7 @@
  * Rename a remote file.
  */
 void renamefile(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -1178,9 +1181,9 @@
  * of remote files.
  */
 void ls(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
-	char *cmd;
+	const char *cmd;
 
 	if (argc < 2)
 		argc++, argv[1] = NULL;
@@ -1211,9 +1214,10 @@
  * of multiple remote files.
  */
 void mls(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
-	char *cmd, mode[1], *dest;
+	const char *cmd, *dest;
+	char mode[1];
 	int ointer, i;
 	extern jmp_buf jabort;
 
@@ -1395,7 +1399,7 @@
  */
 void user(argc, argv)
 	int argc;
-	char **argv;
+	const char **argv;
 {
 	char acct[80], *getpass();
 	int n, aflag = 0;
@@ -1466,7 +1470,7 @@
  * Make a directory.
  */
 void makedir(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -1497,7 +1501,7 @@
  * Remove a directory.
  */
 void removedir(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -1528,7 +1532,7 @@
  * Send a line, verbatim, to the remote machine.
  */
 void quote(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	int i;
 	char buf[BUFSIZ];
@@ -1565,7 +1569,7 @@
  */
 
 void site(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	int i;
 	char buf[BUFSIZ];
@@ -1597,7 +1601,7 @@
 }
 
 void do_chmod(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	if (argc == 2) {
 		printf("usage: %s mode file-name\n", argv[0]);
@@ -1692,7 +1696,7 @@
 }
 
 int confirm(cmd, file)
-	char *cmd, *file;
+	const char *cmd, *file;
 {
 	char line[BUFSIZ];
 
@@ -1721,7 +1725,7 @@
  * from the expression, we return only the first.
  */
 int globulize(cpp)
-	char **cpp;
+	const char **cpp;
 {
 	char **globbed;
 
@@ -1796,7 +1800,7 @@
 
 void doproxy(argc,argv)
 	int argc;
-	char *argv[];
+	const char *argv[];
 {
 	register struct cmd *c;
 	struct cmd *getcmd();
@@ -1901,12 +1905,13 @@
 	ntout[16] = '\0';
 }
 
-char *
+const char *
 dotrans(name)
-	char *name;
+	const char *name;
 {
 	static char new[MAXPATHLEN];
-	char *cp1, *cp2 = new;
+	const char *cp1;
+    char *cp2 = new;
 	register int i, ostop, found;
 
 	for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++);
@@ -1943,7 +1948,7 @@
 
 void setnmap(argc, argv)
 	int argc;
-	char *argv[];
+	const char *argv[];
 {
 	char *cp;
 
@@ -1983,13 +1988,14 @@
 	(void) strncpy(mapout, cp, MAXPATHLEN - 1);
 }
 
-char *
+const char *
 domap(name)
-	char *name;
+	const char *name;
 {
 	static char new[MAXPATHLEN];
-	register char *cp1 = name, *cp2 = mapin;
-	char *tp[9], *te[9];
+	const char *cp1 = name;
+    char *cpn, *cp2 = mapin;
+	const char *tp[9], *te[9];
 	int i, toks[9], toknum = 0, match = 1;
 
 	for (i=0; i < 9; ++i) {
@@ -2032,33 +2038,34 @@
 	{
 		toks[toknum] = 0;
 	}
-	cp1 = new;
-	*cp1 = '\0';
+
+	cpn = new;
+	*cpn = '\0';
 	cp2 = mapout;
 	while (*cp2) {
 		match = 0;
 		switch (*cp2) {
 			case '\\':
 				if (*(cp2 + 1)) {
-					*cp1++ = *++cp2;
+					*cpn++ = *++cp2;
 				}
 				break;
 			case '[':
 LOOP:
 				if (*++cp2 == '$' && isdigit(*(cp2+1))) {
 					if (*++cp2 == '0') {
-						char *cp3 = name;
+						const char *cp3 = name;
 
 						while (*cp3) {
-							*cp1++ = *cp3++;
+							*cpn++ = *cp3++;
 						}
 						match = 1;
 					}
 					else if (toks[toknum = *cp2 - '1']) {
-						char *cp3 = tp[toknum];
+						const char *cp3 = tp[toknum];
 
 						while (cp3 != te[toknum]) {
-							*cp1++ = *cp3++;
+							*cpn++ = *cp3++;
 						}
 						match = 1;
 					}
@@ -2072,24 +2079,24 @@
 						else if (*cp2 == '$' &&
    						        isdigit(*(cp2+1))) {
 							if (*++cp2 == '0') {
-							   char *cp3 = name;
+							   const char *cp3 = name;
 
 							   while (*cp3) {
-								*cp1++ = *cp3++;
+								*cpn++ = *cp3++;
 							   }
 							}
 							else if (toks[toknum =
 							    *cp2 - '1']) {
-							   char *cp3=tp[toknum];
+							   const char *cp3=tp[toknum];
 
 							   while (cp3 !=
 								  te[toknum]) {
-								*cp1++ = *cp3++;
+								*cpn++ = *cp3++;
 							   }
 							}
 						}
 						else if (*cp2) {
-							*cp1++ = *cp2++;
+							*cpn++ = *cp2++;
 						}
 					}
 					if (!*cp2) {
@@ -2126,29 +2133,29 @@
 			case '$':
 				if (isdigit(*(cp2 + 1))) {
 					if (*++cp2 == '0') {
-						char *cp3 = name;
+						const char *cp3 = name;
 
 						while (*cp3) {
-							*cp1++ = *cp3++;
+							*cpn++ = *cp3++;
 						}
 					}
 					else if (toks[toknum = *cp2 - '1']) {
-						char *cp3 = tp[toknum];
+						const char *cp3 = tp[toknum];
 
 						while (cp3 != te[toknum]) {
-							*cp1++ = *cp3++;
+							*cpn++ = *cp3++;
 						}
 					}
 					break;
 				}
 				/* intentional drop through */
 			default:
-				*cp1++ = *cp2;
+				*cpn++ = *cp2;
 				break;
 		}
 		cp2++;
 	}
-	*cp1 = '\0';
+	*cpn = '\0';
 	if (!*new) {
 		return(name);
 	}
@@ -2207,7 +2214,7 @@
 
 void macdef(argc, argv)
 	int argc;
-	char *argv[];
+	const char *argv[];
 {
 	char *tmp;
 	int c;
@@ -2283,7 +2290,7 @@
  * get size of file on remote machine
  */
 void sizecmd(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 
 	if (argc < 2) {
@@ -2308,7 +2315,7 @@
  * get last modification time of file on remote machine
  */
 void modtime(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	int overbose;
 
@@ -2347,7 +2354,7 @@
  * show status on reomte machine
  */
 void rmtstatus(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	(void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]);
 }
@@ -2356,7 +2363,7 @@
  * get file if modtime is more recent than current file
  */
 void newer(argc, argv)
-	char *argv[];
+	const char *argv[];
 {
 	if (getit(argc, argv, -1, "w")) {
 		printf("Local file \"%s\" is newer than remote file \"%s\"\n",

Modified: trunk/reactos/apps/utils/net/ftp/domacro.c
--- trunk/reactos/apps/utils/net/ftp/domacro.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/domacro.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -30,10 +30,11 @@
 
 void domacro(argc, argv)
 	int argc;
-	char *argv[];
+	const char *argv[];
 {
-	register int i, j;
-	register char *cp1, *cp2;
+	int i, j;
+	const char *cp1;
+    char *cp2;
 	int count = 2, loopflg = 0;
 	char line2[200];
 	struct cmd *getcmd(), *c;

Modified: trunk/reactos/apps/utils/net/ftp/fake.c
--- trunk/reactos/apps/utils/net/ftp/fake.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/fake.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -113,7 +113,7 @@
 
 #endif
 
-char *fprintfSocket(int s, char *format, ...)
+const char *fprintfSocket(int s, const char *format, ...)
 {
    va_list argptr;
    char buffer[10009];
@@ -127,7 +127,7 @@
    return NULL;
 }
 
-char *fputsSocket(char *format, int s)
+const char *fputsSocket(const char *format, int s)
 {
    send(s, format, strlen(format), 0);
 

Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
--- trunk/reactos/apps/utils/net/ftp/ftp.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/ftp.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -98,9 +98,9 @@
 off_t	restart_point = 0;
 
 SOCKET cin, cout;
-int	dataconn(char *mode);
+int	dataconn(const char *mode);
 
-int command(char *fmt, ...);
+int command(const char *fmt, ...);
 
 char *hostname;
 
@@ -203,19 +203,23 @@
 	return ((char *)0);
 }
 
-int login(char *host)
+int login(const char *host)
 {
 	char tmp[80];
-	char *user, *pass, *acct;
+	char *puser, *ppass, *pacct;
+	const char *user, *pass, *acct;
 	int n, aflag = 0;
 
 	user = pass = acct = 0;
-	if (ruserpass(host, &user, &pass, &acct) < 0) {
+	if (ruserpass(host, &puser, &ppass, &pacct) < 0) {
 		code = -1;
 		return(0);
 	}
+	user = puser;
+	pass = ppass;
+	acct = pacct;
 	while (user == NULL) {
-           char *myname = "none"; // This needs to become the usename env
+           const char *myname = "none"; // This needs to become the usename env
 
            if (myname)
               printf("Name (%s:%s): ", host, myname);
@@ -273,7 +277,7 @@
 }
 
 /*VARARGS1*/
-int command(char *fmt, ...)
+int command(const char *fmt, ...)
 {
 	va_list ap;
 	int r;
@@ -450,7 +454,7 @@
 
 #define HASHBYTES 1024
 
-void sendrequest(char *cmd, char *local, char *remote, int printnames)
+void sendrequest(const char *cmd, const char *local, const char *remote, int printnames)
 {
 	FILE *fin;
         int dout = 0;
@@ -461,7 +465,7 @@
 	register int c, d;
 	struct stat st;
 	struct timeval start, stop;
-	char *mode;
+	const char *mode;
 
 	if (verbose && printnames) {
 		if (local && *local != '-')
@@ -723,7 +727,7 @@
 }
 #endif
 
-void recvrequest(char *cmd, char *local, char *remote, char *mode,
+void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode,
                 int printnames)
 {
 	FILE *fout = stdout;
@@ -1253,7 +1257,7 @@
 	return (1);
 }
 
-int dataconn(char *mode)
+int dataconn(const char *mode)
 {
    struct sockaddr_in from;
    int s, fromlen = sizeof (from);
@@ -1278,7 +1282,7 @@
 }
 
 void ptransfer(direction, bytes, t0, t1)
-	char *direction;
+	const char *direction;
 	long bytes;
 	struct timeval *t0, *t1;
 {
@@ -1432,12 +1436,12 @@
 #endif
 
 void proxtrans(cmd, local, remote)
-	char *cmd, *local, *remote;
+	const char *cmd, *local, *remote;
 {
 //	void (*oldintr)(int);
 	int tmptype, oldtype = 0, secndflag = 0, nfnd;
 	extern jmp_buf ptabort;
-	char *cmd2;
+	const char *cmd2;
 //	struct
 	fd_set mask;
 

Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h
--- trunk/reactos/apps/utils/net/ftp/ftp_var.h	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/ftp_var.h	2005-11-11 16:11:13 UTC (rev 19131)
@@ -130,7 +130,7 @@
 extern char	argbuf[200];		/* argument storage buffer */
 extern char	*argbase;		/* current storage point in arg buffer */
 extern int	margc;			/* count of arguments on input line */
-extern char	*margv[20];		/* args parsed from input line */
+extern const char	*margv[20];		/* args parsed from input line */
 extern int     cpend;                  /* flag: if != 0, then pending server reply */
 extern int	mflag;			/* flag: if != 0, then active multi command */
 
@@ -140,8 +140,8 @@
  * Format of command table.
  */
 struct cmd {
-	char	*c_name;	/* name of command */
-	char	*c_help;	/* help string */
+	const char	*c_name;	/* name of command */
+	const char	*c_help;	/* help string */
 	char	c_bell;		/* give bell when command completes */
 	char	c_conn;		/* must be connected to use command */
 	char	c_proxy;	/* proxy server may execute */

Modified: trunk/reactos/apps/utils/net/ftp/main.c
--- trunk/reactos/apps/utils/net/ftp/main.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/main.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -115,18 +115,18 @@
 char	argbuf[200];		/* argument storage buffer */
 char	*argbase;		/* current storage point in arg buffer */
 int	margc;			/* count of arguments on input line */
-char	*margv[20];		/* args parsed from input line */
+const char	*margv[20];		/* args parsed from input line */
 int     cpend;                  /* flag: if != 0, then pending server reply */
 int	mflag;			/* flag: if != 0, then active multi command */
 
 int	options;		/* used during socket creation */
 
-static char *slurpstring();
+static const char *slurpstring();
 
 
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
 {
-	register char *cp;
+	const char *cp;
 	int top;
 #if 0
 	char homedir[MAXPATHLEN];
@@ -357,12 +357,12 @@
 
 struct cmd *
 getcmd(name)
-	register char *name;
+	const char *name;
 {
 	extern struct cmd cmdtab[];
-	register char *p, *q;
-	register struct cmd *c, *found;
-	register int nmatches, longest;
+	const char *p, *q;
+	struct cmd *c, *found;
+	int nmatches, longest;
 
 	longest = 0;
 	nmatches = 0;
@@ -393,7 +393,7 @@
 
 void makeargv()
 {
-	char **argp;
+	const char **argp;
 
 	margc = 0;
 	argp = margv;
@@ -409,7 +409,7 @@
  * implemented with FSM to
  * handle quoting and strings
  */
-static char *
+static const char *
 slurpstring()
 {
 	int got_one = 0;

Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
--- trunk/reactos/apps/utils/net/ftp/prototypes.h	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/prototypes.h	2005-11-11 16:11:13 UTC (rev 19131)
@@ -1,8 +1,8 @@
 
 int fgetcSocket(int s);
-char *fputsSocket(char *format, int s);
+const char *fputsSocket(const char *format, int s);
 
-char *fprintfSocket(int s, char *format, ...);
+const char *fprintfSocket(int s, const char *format, ...);
 
 int fputcSocket(int s, char putChar);
 int fputSocket(int s, char *putChar, int len);
@@ -13,34 +13,34 @@
 int herror(char *s);
 
 int getreply(int expecteof);
-int ruserpass(char *host, char **aname, char **apass, char **aacct);
+int ruserpass(const char *host, char **aname, char **apass, char **aacct);
 char *getpass(const char *prompt);
 void makeargv(void);
-void domacro(int argc, char *argv[]);
-void proxtrans(char *cmd, char *local, char *remote);
+void domacro(int argc, const char *argv[]);
+void proxtrans(const char *cmd, const char *local, const char *remote);
 int null(void);
 int initconn(void);
 void disconnect(void);
-void ptransfer(char *direction, long bytes, struct timeval *t0, struct timeval *t1);
+void ptransfer(const char *direction, long bytes, struct timeval *t0, struct timeval *t1);
 void setascii(void);
 void setbinary(void);
 void setebcdic(void);
 void settenex(void);
 void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0);
 void setpassive(int argc, char *argv[]);
-void setpeer(int argc, char *argv[]);
+void setpeer(int argc, const char *argv[]);
 void cmdscanner(int top);
 void pswitch(int flag);
 void quit(void);
-int login(char *host);
-int command(char *fmt, ...);
-int globulize(char **cpp);
-void sendrequest(char *cmd, char *local, char *remote, int printnames);
-void recvrequest(char *cmd, char *local, char *remote, char *mode,
+int login(const char *host);
+int command(const char *fmt, ...);
+int globulize(const char **cpp);
+void sendrequest(const char *cmd, const char *local, const char *remote, int printnames);
+void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode,
                 int printnames);
-int confirm(char *cmd, char *file);
+int confirm(const char *cmd, const char *file);
 void blkfree(char **av0);
-int getit(int argc, char *argv[], int restartit, char *mode);
+int getit(int argc, const char *argv[], int restartit, const char *mode);
 int sleep(int time);
 
 char *tail();

Modified: trunk/reactos/apps/utils/net/ftp/ruserpass.c
--- trunk/reactos/apps/utils/net/ftp/ruserpass.c	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/ftp/ruserpass.c	2005-11-11 16:11:13 UTC (rev 19131)
@@ -50,7 +50,7 @@
 static char tokval[100];
 
 static struct toktab {
-	char *tokstr;
+	const char *tokstr;
 	int tval;
 } toktab[]= {
 	{"default",	DEFAULT},
@@ -66,10 +66,11 @@
 extern char *hostname;
 static int token(void);
 
-int ruserpass(char *host, char **aname, char **apass, char **aacct)
+int ruserpass(const char *host, char **aname, char **apass, char **aacct)
 {
-	char *hdir, buf[BUFSIZ], *tmp;
-	char myname[MAXHOSTNAMELEN], *mydomain;
+	const char *hdir, *mydomain;
+    char buf[BUFSIZ], *tmp;
+	char myname[MAXHOSTNAMELEN];
 	int t, i, c, usedefault = 0;
 	struct stat stb;
 	extern int errno;

Modified: trunk/reactos/apps/utils/net/telnet/src/ansiprsr.cpp
--- trunk/reactos/apps/utils/net/telnet/src/ansiprsr.cpp	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/ansiprsr.cpp	2005-11-11 16:11:13 UTC (rev 19131)
@@ -219,7 +219,7 @@
 		Console.SetCursorPosition(x, y);
 }
 
-char* TANSIParser::GetTerminalID()
+const char* TANSIParser::GetTerminalID()
 {
 	return "\033[?1;2c";
 }
@@ -479,7 +479,7 @@
 		// Get Terminal ID
 		case 'c': 
 			{
-				char* szTerminalId = GetTerminalID();
+				const char* szTerminalId = GetTerminalID();
 				Network.WriteString(szTerminalId, strlen(szTerminalId));
 				break;
 			}
@@ -1005,7 +1005,7 @@
 		// Terminal ID Request
 		case 'Z':
 			{
-				char* szTerminalId = GetTerminalID();
+				const char* szTerminalId = GetTerminalID();
 				Network.WriteString(szTerminalId, strlen(szTerminalId));
 				break;
 			}

Modified: trunk/reactos/apps/utils/net/telnet/src/ansiprsr.h
--- trunk/reactos/apps/utils/net/telnet/src/ansiprsr.h	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/ansiprsr.h	2005-11-11 16:11:13 UTC (rev 19131)
@@ -40,7 +40,7 @@
 #endif
 
 	void ConSetAttribute(unsigned char wAttr);
-	char *GetTerminalID();
+	const char *GetTerminalID();
 	void ConSetCursorPos(int x, int y);
 	void ResetTerminal();
 	void Init();

Modified: trunk/reactos/apps/utils/net/telnet/src/tconsole.cpp
--- trunk/reactos/apps/utils/net/telnet/src/tconsole.cpp	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/tconsole.cpp	2005-11-11 16:11:13 UTC (rev 19131)
@@ -60,17 +60,17 @@
 	GetConsoleScreenBufferInfo(hConsole, &ConsoleInfo);
 
 	// Start with correct colors
-	int fg = ini.get_normal_fg();
-	int bg = ini.get_normal_bg();
-	if(fg == -1)
-		fg = defaultfg = origfg = ConsoleInfo.wAttributes & 0xF;
+	int color_fg = ini.get_normal_fg();
+	int color_bg = ini.get_normal_bg();
+	if(color_fg == -1)
+		color_fg = defaultfg = origfg = ConsoleInfo.wAttributes & 0xF;
 	else
-		defaultfg = origfg = fg;
-	if(bg == -1)
-		bg = defaultbg = origbg = (ConsoleInfo.wAttributes >> 4) & 0xF;
+		defaultfg = origfg = color_fg;
+	if(color_bg == -1)
+		color_bg = defaultbg = origbg = (ConsoleInfo.wAttributes >> 4) & 0xF;
 	else
-		defaultbg = origbg = bg;
-	wAttributes = fg | (bg << 4);
+		defaultbg = origbg = color_bg;
+	wAttributes = color_fg | (color_bg << 4);
 	reverse = blink = underline = false;
 	SetConsoleTextAttribute(hConsole, wAttributes);
 

Modified: trunk/reactos/apps/utils/net/telnet/src/tnconfig.cpp
--- trunk/reactos/apps/utils/net/telnet/src/tnconfig.cpp	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/tnconfig.cpp	2005-11-11 16:11:13 UTC (rev 19131)
@@ -186,8 +186,8 @@
 };
 
 struct ini_variable {
-	char *name;				// variable name
-	char *section;			// name of ini file section the variable is in
+	const char *name;				// variable name
+	const char *section;			// name of ini file section the variable is in
 	enum ini_data_type data_type;		// type of data
 	void *ini_data;			// pointer to data
 	int  max_size;			// max size if string

Modified: trunk/reactos/apps/utils/net/telnet/src/tnconfig.h
--- trunk/reactos/apps/utils/net/telnet/src/tnconfig.h	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/tnconfig.h	2005-11-11 16:11:13 UTC (rev 19131)
@@ -198,7 +198,7 @@
 
 	// Host configration
 	char host[128];
-	char *port;
+	const char *port;
 
 	// Aliases
 	char **aliases;

Modified: trunk/reactos/apps/utils/net/telnet/src/tnmain.cpp
--- trunk/reactos/apps/utils/net/telnet/src/tnmain.cpp	2005-11-11 11:59:56 UTC (rev 19130)
+++ trunk/reactos/apps/utils/net/telnet/src/tnmain.cpp	2005-11-11 16:11:13 UTC (rev 19131)
@@ -146,13 +146,13 @@
 					if (cursor < current)
 						if (InputRecord.Event.KeyEvent.dwControlKeyState &
 							(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
-							unsigned int i,j;
+							unsigned int j, k;
 							for (j = cursor; j <= current; j++)
 								if (buf[j+1] == ' ' || (j+1)==current)
 									break;
-								for (i = ++j; i <= current; i++)
-									if (buf[i] != ' ' || i == current) {
-										cursor = i == current ? --i : i;
+								for (k = ++j; k <= current; k++)
+									if (buf[k] != ' ' || k == current) {
+										cursor = k == current ? --k : k;
 										break;
[truncated at 1000 lines; 49 more skipped]