| 
            Last change
 on this file since 109c83b was             109c83b, checked in by Thomas Lopatic <thomas@…>, 8 years ago           | 
        
        
          | 
             
Compiled full ROM in Hatari. 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            451 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [109c83b] | 1 | /*
 | 
|---|
 | 2 |    ============================================================================
 | 
|---|
 | 3 |         rindex.c -- BSD style rindex function
 | 
|---|
 | 4 |         Version 2 -- 1987-06-12 -- D.N. Lynx Crowe
 | 
|---|
 | 5 |    ============================================================================
 | 
|---|
 | 6 | */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | char *
 | 
|---|
 | 9 | rindex(str, c)
 | 
|---|
 | 10 | register char *str;
 | 
|---|
 | 11 | char c;
 | 
|---|
 | 12 | {
 | 
|---|
 | 13 |         register char *cp;
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 |         for (cp = str ;*cp++ ; )
 | 
|---|
 | 16 |                 ;
 | 
|---|
 | 17 | 
 | 
|---|
 | 18 |         while (cp > str)
 | 
|---|
 | 19 |                 if (*--cp == c)
 | 
|---|
 | 20 |                         return(cp);
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 |         return((char *)0);
 | 
|---|
 | 23 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.