From a7f3726a0a7f16bccb664871fe35e8d2f2572f00 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Mon, 3 Nov 2008 07:00:17 +0000 Subject: Do a bit of cleanup I never got around to do, before moving from my repo to sf.net --- misc/src/txt-converter/char/strlib.c | 66 ------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 misc/src/txt-converter/char/strlib.c (limited to 'misc/src/txt-converter/char/strlib.c') diff --git a/misc/src/txt-converter/char/strlib.c b/misc/src/txt-converter/char/strlib.c deleted file mode 100644 index 60803c1..0000000 --- a/misc/src/txt-converter/char/strlib.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include - -#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; -} -- cgit v1.2.3-70-g09d2