FreeCalypso > hg > freecalypso-tools
annotate target-utils/libc/index.c @ 956:b0b6966fa62e
doc/Target-boot-control: update for -Petmoff
| author | Mychaela Falconia <falcon@freecalypso.org> | 
|---|---|
| date | Wed, 07 Jun 2023 23:52:31 +0000 | 
| parents | 7fb62fc724dc | 
| children | 
| rev | line source | 
|---|---|
| 
87
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
1 char * | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
2 index(p, ch) | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
3 register char *p, ch; | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
4 { | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
5 for (;; ++p) { | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
6 if (*p == ch) | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
7 return(p); | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
8 if (!*p) | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
9 return((char *)0); | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
10 } | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
11 /* NOTREACHED */ | 
| 
 
7fb62fc724dc
target-utils/libc: beginning of newlib-ectomy
 
Mychaela Falconia <falcon@freecalypso.org> 
parents:  
diff
changeset
 | 
12 } | 
