source: buchla-68k/libsm/rindex.c@ b28a12e

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

Zero redundant declarations.

  • Property mode set to 100644
File size: 439 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
[b28a12e]8#include "ram.h"
[6262b5c]9
[7258c6a]10int8_t *rindex(int8_t *str, int8_t c)
[f40a309]11{
[7258c6a]12 register int8_t *cp;
[f40a309]13
14 for (cp = str ;*cp++ ; )
15 ;
16
17 while (cp > str)
18 if (*--cp == c)
19 return(cp);
20
[7258c6a]21 return((int8_t *)0);
[f40a309]22}
[7258c6a]23
Note: See TracBrowser for help on using the repository browser.