source: buchla-68k/libsm/index.c@ 7258c6a

Last change on this file since 7258c6a was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Use standard integer types.

  • Property mode set to 100644
File size: 376 bytes
Line 
1/*
2 ============================================================================
3 index.c -- BSD style index function
4 Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
5 ============================================================================
6*/
7
8int8_t *index(int8_t *str, int8_t c)
9{
10 while (*str) {
11
12 if (*str == c)
13 return(str);
14
15 ++str;
16 }
17
18 return((int8_t *)0);
19}
20
Note: See TracBrowser for help on using the repository browser.