Subversion Repositories planix.SVN

Rev

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

Rev 109 Rev 113
Line 54... Line 54...
54
 
54
 
55
	d = getchar();
55
	d = getchar();
56
	if (endcmd(d)) {
56
	if (endcmd(d)) {
57
		if (savedfile[0] == 0 && comm != 'f')
57
		if (savedfile[0] == 0 && comm != 'f')
58
			error("No file|No current filename");
58
			error("No file|No current filename");
59
		CP(file, savedfile);
59
		strcpy(file, savedfile);
60
		wasalt = (isalt > 0) ? isalt-1 : 0;
60
		wasalt = (isalt > 0) ? isalt-1 : 0;
61
		isalt = 0;
61
		isalt = 0;
62
		oldadot = altdot;
62
		oldadot = altdot;
63
		if (c == 'e' || c == 'E')
63
		if (c == 'e' || c == 'E')
64
			altdot = lineDOT();
64
			altdot = lineDOT();
Line 81... Line 81...
81
			/* fall into ... */
81
			/* fall into ... */
82
 
82
 
83
		case 'e':
83
		case 'e':
84
			if (savedfile[0]) {
84
			if (savedfile[0]) {
85
				altdot = lineDOT();
85
				altdot = lineDOT();
86
				CP(altfile, savedfile);
86
				strcpy(altfile, savedfile);
87
			}
87
			}
88
			CP(savedfile, file);
88
			strcpy(savedfile, file);
89
			break;
89
			break;
90
 
90
 
91
		default:
91
		default:
92
			if (file[0]) {
92
			if (file[0]) {
93
				if (c != 'E')
93
				if (c != 'E')
94
					altdot = lineDOT();
94
					altdot = lineDOT();
95
				CP(altfile, file);
95
				strcpy(altfile, file);
96
			}
96
			}
97
			break;
97
			break;
98
		}
98
		}
99
	}
99
	}
100
	if (hush && comm != 'f' || comm == 'E')
100
	if (hush && comm != 'f' || comm == 'E')
Line 146... Line 146...
146
			}
146
			}
147
		}
147
		}
148
	}
148
	}
149
	if (skipend())
149
	if (skipend())
150
		return (0);
150
		return (0);
151
	CP(genbuf, "echo "); cp = &genbuf[5];
151
	strcpy(genbuf, "echo "); cp = &genbuf[5];
152
	for (;;) {
152
	for (;;) {
153
		c = getchar();
153
		c = getchar();
154
		if (endcmd(c)) {
154
		if (endcmd(c)) {
155
			ungetchar(c);
155
			ungetchar(c);
156
			break;
156
			break;
Line 312... Line 312...
312
		error("Ambiguous|Too many file names");
312
		error("Ambiguous|Too many file names");
313
	str = G.argv[G.argc0 - 1];
313
	str = G.argv[G.argc0 - 1];
314
	if (strlen(str) > FNSIZE - 4)
314
	if (strlen(str) > FNSIZE - 4)
315
		error("Filename too long");
315
		error("Filename too long");
316
samef:
316
samef:
317
	CP(file, str);
317
	strcpy(file, str);
318
}
318
}
319
 
319
 
320
/*
320
/*
321
 * Read a file from the world.
321
 * Read a file from the world.
322
 * C is command, 'e' if this really an edit (or a recover).
322
 * C is command, 'e' if this really an edit (or a recover).
Line 551... Line 551...
551
			error("No file|No current filename");
551
			error("No file|No current filename");
552
		saddr1=addr1;
552
		saddr1=addr1;
553
		saddr2=addr2;
553
		saddr2=addr2;
554
		addr1=one;
554
		addr1=one;
555
		addr2=dol;
555
		addr2=dol;
556
		CP(file, savedfile);
556
		strcpy(file, savedfile);
557
		if (inopen) {
557
		if (inopen) {
558
			vclrech(0);
558
			vclrech(0);
559
			splitw++;
559
			splitw++;
560
		}
560
		}
561
		lprintf("\"%s\"", file);
561
		lprintf("\"%s\"", file);