diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-23 20:38:44 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-23 20:38:44 +0000 |
commit | 2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b (patch) | |
tree | 89c47d81729687d5a69cadde99ee350306eb814f /src/common/strlib.c | |
parent | c4e6857d4774b25dcd9b9137f76c14c92015d691 (diff) | |
download | hercules-2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b.tar.gz hercules-2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b.tar.bz2 hercules-2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b.tar.xz hercules-2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b.zip |
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/strlib.c')
-rw-r--r-- | src/common/strlib.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/common/strlib.c b/src/common/strlib.c index 9114c3d03..ca6e38761 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -8,15 +8,15 @@ //----------------------------------------------- // string lib. -unsigned char* jstrescape (unsigned char* pt) { +char* jstrescape (char* pt) { //copy from here unsigned char * ptr; int i =0, j=0; - + //copy string to temporary - CREATE(ptr, char, J_MAX_MALLOC_SIZE); + CREATE_A(ptr, char, J_MAX_MALLOC_SIZE); strcpy (ptr,pt); - + while (ptr[i] != '\0') { switch (ptr[i]) { case '\'': @@ -32,14 +32,14 @@ unsigned char* jstrescape (unsigned char* pt) { } } pt[j++] = '\0'; - free (ptr); - return (unsigned char*) &pt[0]; + aFree (ptr); + return &pt[0]; } -unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) { +char* jstrescapecpy (char* pt,char* spt) { //copy from here int i =0, j=0; - + while (spt[i] != '\0') { switch (spt[i]) { case '\'': @@ -55,12 +55,12 @@ unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) { } } pt[j++] = '\0'; - return (unsigned char*) &pt[0]; + return &pt[0]; } -int jmemescapecpy (unsigned char* pt,unsigned char* spt, int size) { +int jmemescapecpy (char* pt,char* spt, int size) { //copy from here int i =0, j=0; - + while (i < size) { switch (spt[i]) { case '\'': |