source: buchla-68k/libsm/rindex.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: 421 bytes
RevLine 
[f40a309]1/*
2 ============================================================================
3 rindex.c -- BSD style rindex function
4 Version 2 -- 1987-06-12 -- D.N. Lynx Crowe
5 ============================================================================
6*/
7
[7258c6a]8int8_t *rindex(int8_t *str, int8_t c)
[f40a309]9{
[7258c6a]10 register int8_t *cp;
[f40a309]11
12 for (cp = str ;*cp++ ; )
13 ;
14
15 while (cp > str)
16 if (*--cp == c)
17 return(cp);
18
[7258c6a]19 return((int8_t *)0);
[f40a309]20}
[7258c6a]21
Note: See TracBrowser for help on using the repository browser.