about summary refs log tree commit diff stats
path: root/src/LYMain.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-04-23 12:35:00 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-04-23 12:35:00 -0400
commit2a94396ccd9cf5ade728c53e02cba28e06af4378 (patch)
tree0ee1558f3e81f97725d83250f944aafa4eb43d54 /src/LYMain.c
parent84271e583d80f546251ea914a33f8c537fddbac7 (diff)
downloadlynx-snapshots-2a94396ccd9cf5ade728c53e02cba28e06af4378.tar.gz
snapshot of project "lynx", label v2-8-1dev_7
Diffstat (limited to 'src/LYMain.c')
-rw-r--r--src/LYMain.c56
1 files changed, 24 insertions, 32 deletions
diff --git a/src/LYMain.c b/src/LYMain.c
index 9f39c5db..f1af2f06 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -164,7 +164,7 @@ PUBLIC int LYShowColor = SHOW_COLOR_UNKNOWN; /* to show or not to show */
 PUBLIC int LYChosenShowColor = SHOW_COLOR_UNKNOWN; /* whether to show and save */
 PUBLIC int LYrcShowColor = SHOW_COLOR_UNKNOWN;	/* ... as last read or written */
 PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */
-PUBLIC BOOLEAN verbose_img = VERBOSE_IMAGES;  /* show filenames or not */ 
+PUBLIC BOOLEAN verbose_img = VERBOSE_IMAGES;  /* show filenames or not */
 PUBLIC BOOLEAN LYUseDefShoCur = TRUE;	/* Command line -show_cursor toggle */
 PUBLIC BOOLEAN LYforce_no_cache = FALSE;
 PUBLIC BOOLEAN LYoverride_no_cache = FALSE;/*override no-cache b/c history etc*/
@@ -387,7 +387,7 @@ PRIVATE BOOLEAN number_links = FALSE;
 PRIVATE BOOLEAN LYPrependBase = FALSE;
 PRIVATE HTList *LYStdinArgs = NULL;
 
-PRIVATE void parse_arg PARAMS((char **arg, int *i, int argc));
+PRIVATE void parse_arg PARAMS((char **arg, int *i));
 #ifndef VMS
 PUBLIC BOOLEAN LYNoCore = NO_FORCED_CORE_DUMP;
 PRIVATE void FatalProblem PARAMS((int sig));
@@ -589,7 +589,7 @@ else {init_ctrl_break[0] = 1;}
      */
     for (i = 1; i < argc; i++) {
 	if (strncmp(argv[i], "-help", 5) == 0) {
-	    parse_arg(&argv[i], &i, argc);
+	    parse_arg(&argv[i], &i);
 	}
     }
 
@@ -684,7 +684,7 @@ else {init_ctrl_break[0] = 1;}
     if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL)
 	StrAllocCopy(lynx_temp_space, cp);
     else
-#ifdef DOSPATH
+#if defined (DOSPATH) || defined (__EMX__)
     if ((cp = getenv("TEMP")) != NULL)
 	StrAllocCopy(lynx_temp_space, cp);
     else if ((cp = getenv("TMP")) != NULL)
@@ -842,8 +842,7 @@ else {init_ctrl_break[0] = 1;}
 		StrAllocCopy(lynx_lss_file, argv[i+1]);
 		i++;
 	    }
-	    if (TRACE)
-		fprintf(stderr, "LYMain found -lss flag, lss file is %s\n",
+	    CTRACE(tfp, "LYMain found -lss flag, lss file is %s\n",
 		    lynx_lss_file ? lynx_lss_file : "<NONE>");
 #endif
 	}
@@ -926,8 +925,7 @@ else {init_ctrl_break[0] = 1;}
 		    if (*cp)
 			StrAllocCopy(lynx_cfg_file, cp);
 		}
-		if (TRACE)
-		    fprintf(stderr, "LYMain found -lss flag, lss file is %s\n",
+		CTRACE(tfp, "LYMain found -lss flag, lss file is %s\n",
 			lynx_lss_file ? lynx_lss_file : "<NONE>");
 #endif
 	    } else if (strcmp(buf, "-get_data") == 0) {
@@ -1092,15 +1090,15 @@ else {init_ctrl_break[0] = 1;}
 	fflush(stdout);
 	fflush(stderr);
 	*stderr = *LYTraceLogFP;
-	fprintf(stderr, "\t\t%s\n\n", LYNX_TRACELOG_TITLE);
+	fprintf(tfp, "\t\t%s\n\n", LYNX_TRACELOG_TITLE);
     }
 
     /*
      *	If TRACE is on, indicate whether the
      *	anonymous restrictions are set. - FM
      */
-    if (TRACE && anon_restrictions_set) {
-	fprintf(stderr, "LYMain: Anonymous restrictions set.\n");
+    if (anon_restrictions_set) {
+	CTRACE(tfp, "LYMain: Anonymous restrictions set.\n");
     }
 
     /*
@@ -1116,8 +1114,7 @@ else {init_ctrl_break[0] = 1;}
 	} else {
 	    sprintf(temp, "JUMPFILE:%s", jumpfile);
 	    if (!LYJumpInit(temp)) {
-		if (TRACE)
-		    fprintf(stderr, "Failed to register %s\n", temp);
+		CTRACE(tfp, "Failed to register %s\n", temp);
 	    }
 	    FREE(temp);
 	}
@@ -1252,12 +1249,9 @@ else {init_ctrl_break[0] = 1;}
 	StrAllocCopy(LynxSigFile, filename);
 	LYAddPathToHome(filename, sizeof(filename), LynxSigFile);
 	StrAllocCopy(LynxSigFile, filename);
-	if (TRACE)
-	    fprintf(stderr, "LYNX_SIG_FILE set to '%s'\n", LynxSigFile);
+	CTRACE(tfp, "LYNX_SIG_FILE set to '%s'\n", LynxSigFile);
     } else {
-	if (TRACE)
-	    fprintf(stderr, "LYNX_SIG_FILE '%s' is bad. Ignoring.\n",
-			    LYNX_SIG_FILE);
+	CTRACE(tfp, "LYNX_SIG_FILE '%s' is bad. Ignoring.\n", LYNX_SIG_FILE);
     }
 
     /*
@@ -1372,7 +1366,7 @@ else {init_ctrl_break[0] = 1;}
      *	Process any command line arguments not already handled. - FM
      */
     for (i = 1; i < argc; i++) {
-	parse_arg(&argv[i], &i, argc);
+	parse_arg(&argv[i], &i);
     }
 
     /*
@@ -1385,7 +1379,7 @@ else {init_ctrl_break[0] = 1;}
 
 	my_args[1] = NULL;
 	while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) {
-	    parse_arg(my_args, NULL, -1);
+	    parse_arg(my_args, (int *)0);
 	}
 	LYStdinArgs_free();
     }
@@ -1566,16 +1560,14 @@ else {init_ctrl_break[0] = 1;}
 	ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && !no_outside_rlogin && rlogin_ok;
 #else
-	if (TRACE)
-	   fprintf(stderr,"LYMain.c: User in Local domain\n");
+	CTRACE(tfp,"LYMain.c: User in Local domain\n");
 	telnet_ok = !no_inside_telnet && telnet_ok;
 	news_ok = !no_inside_news && news_ok;
 	ftp_ok = !no_inside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && rlogin_ok;
 #endif /* !HAVE_UTMP || VMS */
     } else {
-	if (TRACE)
-	   fprintf(stderr,"LYMain.c: User in REMOTE domain\n");
+	CTRACE(tfp,"LYMain.c: User in REMOTE domain\n");
 	telnet_ok = !no_outside_telnet && telnet_ok;
 	news_ok = !no_outside_news && news_ok;
 	ftp_ok = !no_outside_ftp && ftp_ok;
@@ -1736,6 +1728,7 @@ else {init_ctrl_break[0] = 1;}
     }
 
     exit(status);
+    return(status);	/* though redundant, for compiler-warnings */
 }
 
 /*
@@ -1781,10 +1774,9 @@ PRIVATE char * scan3D ARGS2(
     return argv[1];
 }
 
-PRIVATE void parse_arg ARGS3(
+PRIVATE void parse_arg ARGS2(
 	char **,	argv,
-	int *,		i,
-	int,		argc)
+	int *,		i)
 {
     static int ignored;
     char *cp;
@@ -1885,8 +1877,8 @@ PRIVATE void parse_arg ARGS3(
 	if (auth_info != NULL)	{
 	    if ((cp = strchr(auth_info, ':')) != NULL) {	/* Pw */
 		*cp++ = '\0';	/* Terminate ID */
-		HTUnEscape(cp); 
-		StrAllocCopy(authentication_info[1], cp); 
+		HTUnEscape(cp);
+		StrAllocCopy(authentication_info[1], cp);
 	    }
 	    if (*auth_info) {					/* Id */
 		HTUnEscape(auth_info);
@@ -2355,8 +2347,8 @@ PRIVATE void parse_arg ARGS3(
 	if (pauth_info != NULL)  {
 	    if ((cp = strchr(pauth_info, ':')) != NULL) {	/* Pw */
 		*cp++ = '\0';	/* Terminate ID */
-		HTUnEscape(cp); 
-		StrAllocCopy(proxyauth_info[1], cp); 
+		HTUnEscape(cp);
+		StrAllocCopy(proxyauth_info[1], cp);
 	    }
 	    if (*pauth_info) {					/* Id */
 		HTUnEscape(pauth_info);
@@ -2572,7 +2564,7 @@ PRIVATE void parse_arg ARGS3(
 
     case 't':
     if (strncmp(argv[0], "-tagsoup", 8) == 0) {
-        HTSwitchDTD(New_DTD = NO);
+	HTSwitchDTD(New_DTD = NO);
 
     } else if (strncmp(argv[0], "-telnet", 7) == 0) {
 	telnet_ok = FALSE;
akkartik/mu/commit/html/subx/021byte_addressing.cc.html?h=main&id=4c37b3e91b3e9c891c22379f029c42abc38e408c'>4c37b3e9 ^
c504ca56 ^
104e521c ^





c504ca56 ^
104e521c ^
9c1056f5 ^

c504ca56 ^


52daf072 ^
9c1056f5 ^


52daf072 ^
9c1056f5 ^

8aeb85f0 ^
9c1056f5 ^
c504ca56 ^
9c1056f5 ^

c504ca56 ^
9c1056f5 ^



c504ca56 ^
9c1056f5 ^





c504ca56 ^
9c1056f5 ^





c504ca56 ^
9c1056f5 ^


c504ca56 ^


52daf072 ^
9c1056f5 ^


52daf072 ^
9c1056f5 ^

8aeb85f0 ^
9c1056f5 ^
c504ca56 ^
9c1056f5 ^

c504ca56 ^
9c1056f5 ^




c504ca56 ^
9c1056f5 ^




c504ca56 ^
9c1056f5 ^

c504ca56 ^
9c1056f5 ^




c504ca56 ^


52daf072 ^
9c1056f5 ^



8aeb85f0 ^
9c1056f5 ^




c504ca56 ^
9c1056f5 ^
db8a9ab5 ^
9c1056f5 ^


c504ca56 ^
9c1056f5 ^


c504ca56 ^

52daf072 ^
9c1056f5 ^


52daf072 ^
9c1056f5 ^

8aeb85f0 ^
9c1056f5 ^
c504ca56 ^
9c1056f5 ^

c504ca56 ^
9c1056f5 ^



c504ca56 ^

9c1056f5 ^
c504ca56 ^
9c1056f5 ^

c504ca56 ^
9c1056f5 ^




c504ca56 ^
9c1056f5 ^

104e521c ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239