| 
            Last change
 on this file since 1220 was             1185, checked in by John Small, 17 years ago           | 
        
        
          | 
             
Ticket 187: Draft 2: Move remaining function declarations 
 
           | 
        
        
          
            
              - 
Property                 svn:eol-style
 set to                 
native
               
              - 
Property                 svn:keywords
 set to                 
Author Date Id Revision
               
             
           | 
        
        
          | 
            File size:
            822 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [793] | 1 | 
 | 
|---|
 | 2 | /***********************************************************************
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 |   $Id: delims.c 1185 2008-09-10 21:57:10Z jbs $
 | 
|---|
 | 5 | 
 | 
|---|
 | 6 |   Copyright (c) 1993-98 M. Kimes
 | 
|---|
 | 7 |   Copyright (c) 2003, 2007 Steven H.Levine
 | 
|---|
 | 8 | 
 | 
|---|
 | 9 |   Delimit chars
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 |   20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | ***********************************************************************/
 | 
|---|
 | 14 | 
 | 
|---|
| [2] | 15 | #include <os2.h>
 | 
|---|
 | 16 | #include <stdlib.h>
 | 
|---|
 | 17 | #include <string.h>
 | 
|---|
 | 18 | 
 | 
|---|
| [1185] | 19 | #include "delims.h"
 | 
|---|
 | 20 | 
 | 
|---|
| [551] | 21 | char *skip_delim(char *a, register char *delim)
 | 
|---|
 | 22 | {
 | 
|---|
| [2] | 23 | 
 | 
|---|
 | 24 |   register char *p = a;
 | 
|---|
 | 25 | 
 | 
|---|
| [551] | 26 |   if (p && delim) {
 | 
|---|
 | 27 |     while (*p) {
 | 
|---|
 | 28 |       if (strchr(delim, *p))
 | 
|---|
 | 29 |         p++;
 | 
|---|
| [2] | 30 |       else
 | 
|---|
| [551] | 31 |         break;
 | 
|---|
| [2] | 32 |     }
 | 
|---|
 | 33 |   }
 | 
|---|
 | 34 |   return p;
 | 
|---|
 | 35 | }
 | 
|---|
 | 36 | 
 | 
|---|
| [551] | 37 | char *to_delim(char *a, register char *delim)
 | 
|---|
 | 38 | {
 | 
|---|
| [2] | 39 | 
 | 
|---|
 | 40 |   register char *p = a;
 | 
|---|
 | 41 | 
 | 
|---|
| [551] | 42 |   if (p && delim) {
 | 
|---|
 | 43 |     while (*p) {
 | 
|---|
 | 44 |       if (strchr(delim, *p))
 | 
|---|
 | 45 |         break;
 | 
|---|
| [2] | 46 |       p++;
 | 
|---|
 | 47 |     }
 | 
|---|
 | 48 |   }
 | 
|---|
 | 49 |   return p;
 | 
|---|
 | 50 | }
 | 
|---|
| [793] | 51 | 
 | 
|---|
 | 52 | #pragma alloc_text(MISC8,skip_delim,to_delim)
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.