diff options
author | SVN Migration <svn@php.net> | 2003-02-27 17:43:39 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2003-02-27 17:43:39 +0000 |
commit | 078bcec0997ad0e07b720c43cc9e6d0e046a75ab (patch) | |
tree | 36cb0f6be2ef078fe3374de8c087b93ecf82f812 /ext/gd/libgd/gdhelpers.c | |
parent | fd61f69077f6156ca71dde60ecfd9ed9765a02db (diff) | |
download | php-git-PHP-5.tar.gz |
This commit was manufactured by cvs2svn to create branch 'PHP_5'.PHP-5
Diffstat (limited to 'ext/gd/libgd/gdhelpers.c')
-rw-r--r-- | ext/gd/libgd/gdhelpers.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/ext/gd/libgd/gdhelpers.c b/ext/gd/libgd/gdhelpers.c deleted file mode 100644 index ae2428dfcd..0000000000 --- a/ext/gd/libgd/gdhelpers.c +++ /dev/null @@ -1,76 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gd.h" -#include "gdhelpers.h" -#include <stdlib.h> -#include <string.h> - -/* TBB: gd_strtok_r is not portable; provide an implementation */ - -#define SEP_TEST (separators[*((unsigned char *) s)]) - -char * -gd_strtok_r (char *s, char *sep, char **state) -{ - char separators[256]; - char *start; - char *result = 0; - memset (separators, 0, sizeof (separators)); - while (*sep) - { - separators[*((unsigned char *) sep)] = 1; - sep++; - } - if (!s) - { - /* Pick up where we left off */ - s = *state; - } - start = s; - /* 1. EOS */ - if (!(*s)) - { - *state = s; - return 0; - } - /* 2. Leading separators, if any */ - if (SEP_TEST) - { - do - { - s++; - } - while (SEP_TEST); - /* 2a. EOS after separators only */ - if (!(*s)) - { - *state = s; - return 0; - } - } - /* 3. A token */ - result = s; - do - { - /* 3a. Token at end of string */ - if (!(*s)) - { - *state = s; - return result; - } - s++; - } - while (!SEP_TEST); - /* 4. Terminate token and skip trailing separators */ - *s = '\0'; - do - { - s++; - } - while (SEP_TEST); - /* 5. Return token */ - *state = s; - return result; -} |