| Last change
 on this file since 872 was             793, checked in by Gregg Young, 18 years ago | 
        
          | 
Move #pragma alloc_text to end for OpenWatcom compat
 | 
        
          | 
              
Property                 svn:eol-style
 set to                 native
Property                 svn:keywords
 set to                 Author Date Id Revision | 
        
          | File size:
            801 bytes | 
      
      
| Line |  | 
|---|
| 1 |  | 
|---|
| 2 | /*********************************************************************** | 
|---|
| 3 |  | 
|---|
| 4 | $Id: delims.c 793 2007-08-21 02:53:38Z gyoung $ | 
|---|
| 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 |  | 
|---|
| 15 | #include <os2.h> | 
|---|
| 16 | #include <stdlib.h> | 
|---|
| 17 | #include <string.h> | 
|---|
| 18 |  | 
|---|
| 19 | char *skip_delim(char *a, register char *delim) | 
|---|
| 20 | { | 
|---|
| 21 |  | 
|---|
| 22 | register char *p = a; | 
|---|
| 23 |  | 
|---|
| 24 | if (p && delim) { | 
|---|
| 25 | while (*p) { | 
|---|
| 26 | if (strchr(delim, *p)) | 
|---|
| 27 | p++; | 
|---|
| 28 | else | 
|---|
| 29 | break; | 
|---|
| 30 | } | 
|---|
| 31 | } | 
|---|
| 32 | return p; | 
|---|
| 33 | } | 
|---|
| 34 |  | 
|---|
| 35 | char *to_delim(char *a, register char *delim) | 
|---|
| 36 | { | 
|---|
| 37 |  | 
|---|
| 38 | register char *p = a; | 
|---|
| 39 |  | 
|---|
| 40 | if (p && delim) { | 
|---|
| 41 | while (*p) { | 
|---|
| 42 | if (strchr(delim, *p)) | 
|---|
| 43 | break; | 
|---|
| 44 | p++; | 
|---|
| 45 | } | 
|---|
| 46 | } | 
|---|
| 47 | return p; | 
|---|
| 48 | } | 
|---|
| 49 |  | 
|---|
| 50 | #pragma alloc_text(MISC8,skip_delim,to_delim) | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.