1: int offset 0;
2:
3: main(argc, argv)
4: char *argv[];
5: {
6: extern fin;
7: char line[64];
8:
9: if (argc<2 || ttyn(0)!='x') {
10: write(1, "goto error\n", 11);
11: seek(0, 0, 2);
12: return;
13: }
14: seek(0, 0, 0);
15: fin = dup(0);
16:
17: loop:
18: if (getlin(line)) {
19: write(1, "label not found\n", 16);
20: return;
21: }
22: if (compar(line, argv[1])) goto loop;
23: seek(0, offset, 0);
24: }
25:
26: getlin(s)
27: char s[];
28: {
29: int ch, i;
30:
31: i = 0;
32: l:
33: if ((ch=getc())=='\0') return(1);
34: if (ch!=':') {
35: while(ch!='\n' && ch!='\0')
36: ch = getc();
37: goto l;
38: }
39: while ((ch=getc())==' ');
40: while (ch!=' ' && ch!='\n' && ch!='\0') {
41: s[i++] = ch;
42: ch = getc();
43: }
44: while(ch != '\n')
45: ch = getc();
46: s[i] = '\0';
47: return(0);
48: }
49:
50: compar(s1, s2)
51: char s1[], s2[];
52: {
53: int c, i;
54:
55: i = 0;
56: l:
57: if(s1[i] != s2[i]) return(1);
58: if (s1[i++] == '\0') return(0);
59: goto l;
60: }
61:
62: getc()
63: {
64:
65: offset++;
66: return(getchar());
67: }
Defined functions
getc
defined in line
62; used 30 times
- in line 33-45(5)
- in /usr/source/s1/ac.c line
88
- in /usr/source/s1/cc.c line
249,
491
- in /usr/source/s1/cmp.c line
42-43(2)
- in /usr/source/s1/comm.c line
99
- in /usr/source/s1/cron.c line
147,
160,
178-181(2),
197-200(2),
214,
231
- in /usr/source/s1/diff1.c line
351-360(4),
368,
375,
382
- in /usr/source/s1/fc.c line
141,
322
- in /usr/source/s1/ls.c line
242,
346
main
defined in line
3;
never used
Defined variables
offset
defined in line
1; used 2 times