- Notifications
You must be signed in to change notification settings - Fork 453
/
Copy pathind.b
26 lines (25 loc) · 447 Bytes
/
ind.b
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
main $(
extrn read, write;
auto i, c, state, line 100;
loop:
state = i = 0;
loop1:
c = read();
if(c==4) return;
if(c==':' & state==0) state = 2;
if((c<'0' ^ c>'9'&c<'a' ^ c>'z') & state==0) state = 1;
line[i] = c;
i = i+1;
if(c!=012) goto loop1;
if(state==2 ^ i==1) goto noi;
write(' ');
write(' ');
noi:
i = 0;
loop3:
c = line[i];
write(c);
i = i+1;
if(c!=012) goto loop3;
goto loop;
$)