annotate test/simp.c @ 492:cc1a5f764782

*** empty log message ***
author kono
date Wed, 21 Dec 2005 12:10:43 +0900
parents 8bec605d1701
children 5640fb7a270d
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
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 172
diff changeset
19 printf("#0013:%d\n",ac);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
20 for(i=0;i<ac;i++) {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 172
diff changeset
21 printf("#0015:%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;
444
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
35 printf("#0028:%d %c\n",ac,ch);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
36 for(i=0;i<ac;i++) {
444
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
37 printf("#0030:%s\n",&av[i][3]);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
38 }
444
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
39 printf("#0032:%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 {
444
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
46 printf("#0038:%d\n", ((l+0)<-511||(l+0)>511));
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
47 if ((l+0)<-511||(l+0)>511) printf("#0039:yes\n");
442
86b04fb4562e minor fix...
kono
parents: 427
diff changeset
48 l = -1;
444
8bec605d1701 small sized struct
kono
parents: 442
diff changeset
49 printf("#0041:%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