annotate test/simp.c @ 496:5640fb7a270d

more bugs...
author kono
date Thu, 22 Dec 2005 00:20:09 +0900
parents cc1a5f764782
children 4d853ee76ad6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 #include "stdio.h"
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
492
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
3 int
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
4 alpha(c)
d35df41eac69 Initial revision
kono
parents:
diff changeset
5 char c;
d35df41eac69 Initial revision
kono
parents:
diff changeset
6 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
7 return(('a'<=c&&c<='z')||('A'<=c&&c<='Z')||c=='_');
d35df41eac69 Initial revision
kono
parents:
diff changeset
8 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
9 char ch;
d35df41eac69 Initial revision
kono
parents:
diff changeset
10
492
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
11 void main1();
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
12 int main0() ;
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
13
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
14 int
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
15 main(int ac,char *av[])
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
17 int i;
172
096559f07a70 some check
kono
parents: 0
diff changeset
18
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
19 printf("#0018:%d\n",ac);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
20 for(i=0;i<ac;i++) {
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
21 printf("#0020:%s\n",&av[i][3]);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
22 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
23 ch = 'E';
442
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
24 main1(-8);
172
096559f07a70 some check
kono
parents: 0
diff changeset
25 return main0(ac,ch,av);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
26 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
27
492
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
28 int
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
29 main0(ac,ch,av)
d35df41eac69 Initial revision
kono
parents:
diff changeset
30 int ac;
d35df41eac69 Initial revision
kono
parents:
diff changeset
31 char ch;
d35df41eac69 Initial revision
kono
parents:
diff changeset
32 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
33 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
34 int i;
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
35 printf("#0034:%d %c\n",ac,ch);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
36 for(i=0;i<ac;i++) {
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
37 printf("#0036:%s\n",&av[i][3]);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
38 }
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
39 printf("#0038:%d==1\n",alpha(ch));
172
096559f07a70 some check
kono
parents: 0
diff changeset
40 return 0;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
41 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
42
492
cc1a5f764782 *** empty log message ***
kono
parents: 444
diff changeset
43 void
442
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
44 main1(int l)
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
45 {
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
46 printf("#0045:%d\n", ((l+0)<-511||(l+0)>511));
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
47 if ((l+0)<-511||(l+0)>511) printf("#0046:yes\n");
442
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
48 l = -1;
496
5640fb7a270d more bugs...
kono
parents: 492
diff changeset
49 printf("#0048:%d\n", l==-1? 555:333);
442
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
50 }
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
51
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
52