Last change
on this file since 1570 was 1346, checked in by Gregg Young, 17 years ago |
Code cleanup; removal of dead 07 code copywrite updates etc
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
822 bytes
|
Line | |
---|
1 |
|
---|
2 | /***********************************************************************
|
---|
3 |
|
---|
4 | $Id: delims.c 1346 2008-12-20 04:18:30Z gyoung $
|
---|
5 |
|
---|
6 | Copyright (c) 1993-98 M. Kimes
|
---|
7 | Copyright (c) 2003, 2008 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 | #include "delims.h"
|
---|
20 |
|
---|
21 | char *skip_delim(char *a, register char *delim)
|
---|
22 | {
|
---|
23 |
|
---|
24 | register char *p = a;
|
---|
25 |
|
---|
26 | if (p && delim) {
|
---|
27 | while (*p) {
|
---|
28 | if (strchr(delim, *p))
|
---|
29 | p++;
|
---|
30 | else
|
---|
31 | break;
|
---|
32 | }
|
---|
33 | }
|
---|
34 | return p;
|
---|
35 | }
|
---|
36 |
|
---|
37 | char *to_delim(char *a, register char *delim)
|
---|
38 | {
|
---|
39 |
|
---|
40 | register char *p = a;
|
---|
41 |
|
---|
42 | if (p && delim) {
|
---|
43 | while (*p) {
|
---|
44 | if (strchr(delim, *p))
|
---|
45 | break;
|
---|
46 | p++;
|
---|
47 | }
|
---|
48 | }
|
---|
49 | return p;
|
---|
50 | }
|
---|
51 |
|
---|
52 | #pragma alloc_text(MISC8,skip_delim,to_delim)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.