Subversion Repositories planix.SVN

Rev

Rev 113 | Rev 119 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 113 Rev 115
Line 86... Line 86...
86
 */
86
 */
87
main(ac, av)
87
main(ac, av)
88
	register int ac;
88
	register int ac;
89
	register char *av[];
89
	register char *av[];
90
{
90
{
91
	
-
 
92
 
-
 
93
#ifndef VMUNIX
91
#ifndef VMUNIX
94
	char *erpath = EXSTRINGS;
92
	char *erpath = EXSTRINGS;
95
#endif
93
#endif
96
	register char *cp;
94
	register char *cp;
97
	register int c;
95
	register int c;
98
	bool recov = 0;
96
	bool recov = 0;
99
	bool ivis;
97
	bool ivis;
100
	bool itag = 0;
98
	bool itag = 0;
101
	bool fast = 0;
99
	bool fast = 0;
102
	extern int onemt();
100
	extern int onemt();
103
#ifdef TRACE
101
#ifdef TRACE
104
	register char *tracef;
102
	register char *tracef;
105
#endif
103
#endif
106
 
104
 
107
#if defined (__GLIBC__) && (__GLIBC__ >= 2)
105
#if defined (__GLIBC__) && (__GLIBC__ >= 2)
108
	/*
106
	/*
109
	 * Disable the use of brk() by malloc,
107
	 * Disable the use of brk() by malloc,
110
	 * it has to use mmap() instead.
108
	 * it has to use mmap() instead.
111
	 */
109
	 */
112
	mallopt(M_MMAP_THRESHOLD, 0);
110
	mallopt(M_MMAP_THRESHOLD, 0);
113
#endif
111
#endif
114
 
-
 
115
	
-
 
116
 
112
 
117
	/*
113
	/*
118
	 * Immediately grab the tty modes so that we wont
114
	 * Immediately grab the tty modes so that we wont
119
	 * get messed up if an interrupt comes in quickly.
115
	 * get messed up if an interrupt comes in quickly.
120
	 */
116
	 */
Line 229... Line 225...
229
		case 't':
225
		case 't':
230
			if (ac > 1 && av[1][0] != '-') {
226
			if (ac > 1 && av[1][0] != '-') {
231
				ac--, av++;
227
				ac--, av++;
232
				itag = 1;
228
				itag = 1;
233
				/* BUG: should check for too long tag. */
229
				/* BUG: should check for too long tag. */
234
				strcpy(lasttag, av[0]);
230
				CP(lasttag, av[0]);
235
			}
231
			}
236
			break;
232
			break;
237
 
233
 
238
		case 'v':
234
		case 'v':
239
			ivis = 1;
235
			ivis = 1;
Line 294... Line 290...
294
			setrupt();
290
			setrupt();
295
			execl(EXRECOVER, "exrecover", "-r", 0);
291
			execl(EXRECOVER, "exrecover", "-r", 0);
296
			filioerr(EXRECOVER);
292
			filioerr(EXRECOVER);
297
			exit(1);
293
			exit(1);
298
		}
294
		}
299
		strcpy(savedfile, *av++), ac--;
295
		CP(savedfile, *av++), ac--;
300
	}
296
	}
301
 
297
 
302
	/*
298
	/*
303
	 * Initialize the argument list.
299
	 * Initialize the argument list.
304
	 */
300
	 */
Line 314... Line 310...
314
	if (setexit() == 0) {
310
	if (setexit() == 0) {
315
		setrupt();
311
		setrupt();
316
		intty = isatty(0);
312
		intty = isatty(0);
317
		value(PROMPT) = intty;
313
		value(PROMPT) = intty;
318
		if (cp = getenv("SHELL"))
314
		if (cp = getenv("SHELL"))
319
			strcpy(shell, cp);
315
			CP(shell, cp);
320
		if (fast || !intty)
316
		if (fast || !intty)
321
			setterm("dumb");
317
			setterm("dumb");
322
		else {
318
		else {
323
			gettmode();
319
			gettmode();
324
			if ((cp = getenv("TERM")) != 0 && *cp) {
320
			if ((cp = getenv("TERM")) != 0 && *cp) {