diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-03-17 12:36:14 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-03-18 00:00:21 -0700 |
commit | 2f2e6b497412abebb3b55be68f05e3751a46fc9b (patch) | |
tree | 503df27c19a300da7b631f206192f2387b687dd2 /src/txt-converter/char/strlib.c | |
parent | ee705b39fdbf0169613da263d12ae6694e5eee68 (diff) | |
download | tmwa-2f2e6b497412abebb3b55be68f05e3751a46fc9b.tar.gz tmwa-2f2e6b497412abebb3b55be68f05e3751a46fc9b.tar.bz2 tmwa-2f2e6b497412abebb3b55be68f05e3751a46fc9b.tar.xz tmwa-2f2e6b497412abebb3b55be68f05e3751a46fc9b.zip |
Delete nonfunctional sql versions
Diffstat (limited to 'src/txt-converter/char/strlib.c')
-rw-r--r-- | src/txt-converter/char/strlib.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/txt-converter/char/strlib.c b/src/txt-converter/char/strlib.c deleted file mode 100644 index 463b830..0000000 --- a/src/txt-converter/char/strlib.c +++ /dev/null @@ -1,76 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "strlib.h" - -//----------------------------------------------- -// string lib. -unsigned char *jstrescape (unsigned char *pt) -{ - //copy from here - unsigned char *ptr; - int i = 0, j = 0; - - //copy string to temporary - ptr = malloc (J_MAX_MALLOC_SIZE); - strcpy (ptr, pt); - - while (ptr[i] != '\0') - { - switch (ptr[i]) - { - case '\'': - pt[j++] = '\\'; - pt[j++] = ptr[i++]; - break; - default: - pt[j++] = ptr[i++]; - } - } - pt[j++] = '\0'; - free (ptr); - return (unsigned char *) &pt[0]; -} - -unsigned char *jstrescapecpy (unsigned char *pt, unsigned char *spt) -{ - //copy from here - int i = 0, j = 0; - - while (spt[i] != '\0') - { - switch (spt[i]) - { - case '\'': - pt[j++] = '\\'; - pt[j++] = spt[i++]; - break; - default: - pt[j++] = spt[i++]; - } - } - pt[j++] = '\0'; - return (unsigned char *) &pt[0]; -} - -int jmemescapecpy (unsigned char *pt, unsigned char *spt, int size) -{ - //copy from here - int i = 0, j = 0; - - while (i < size) - { - switch (spt[i]) - { - case '\'': - pt[j++] = '\\'; - pt[j++] = spt[i++]; - break; - default: - pt[j++] = spt[i++]; - } - } - // copy size is 0 ~ (j-1) - return j; -} |