diff options
author | Haru <haru@dotalux.com> | 2014-11-16 06:35:51 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-11-16 07:16:23 +0100 |
commit | 02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f (patch) | |
tree | 3161fd5786bb563c32059068eb3b4876d2ae11ca /src/common/strlib.c | |
parent | 31bff051ee3c353fb7ee5e544d68feeaefd4941f (diff) | |
download | hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.gz hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.bz2 hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.xz hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.zip |
Whitespace cleanup (no code changes)
This includes, and is not limited to: mixed or wrong indentation, excess
whitespace (horizontal and vertical), misalignment, trailing spaces.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/strlib.c')
-rw-r--r-- | src/common/strlib.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/common/strlib.c b/src/common/strlib.c index 35e0c63b0..8b63b4161 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -62,11 +62,12 @@ char* jstrescapecpy (char* pt, const char* spt) //a escape character is found, the target's final length increases! [Skotlex] int i =0, j=0; - if (!spt) { //Return an empty string [Skotlex] + if (!spt) { + //Return an empty string [Skotlex] pt[0] = '\0'; return &pt[0]; } - + while (spt[i] != '\0') { switch (spt[i]) { case '\'': @@ -252,7 +253,8 @@ char* strtok_r_(char *s1, const char *s2, char **lasts) { // for NetBSD 5.x and possibly some Solaris versions. #if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN) /* Find the length of STRING, but scan at most MAXLEN characters. - If no '\0' terminator is found in that many characters, return MAXLEN. */ + * If no '\0' terminator is found in that many characters, return MAXLEN. + */ size_t strnlen(const char* string, size_t maxlen) { const char* end = (const char*)memchr(string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; @@ -1136,13 +1138,13 @@ void strlib_defaults(void) { strlib->trim = trim; strlib->normalize_name = normalize_name; strlib->stristr = stristr; - + #if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN) strlib->strnlen = strnlen; #else strlib->strnlen = NULL; #endif - + #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200 strlib->strtoull = strtoull; #else @@ -1155,7 +1157,7 @@ void strlib_defaults(void) { strlib->safesnprintf = safesnprintf; strlib->strline = strline; strlib->bin2hex = bin2hex; - + StrBuf->Malloc = StringBuf_Malloc; StrBuf->Init = StringBuf_Init; StrBuf->Printf = StringBuf_Printf; @@ -1167,7 +1169,7 @@ void strlib_defaults(void) { StrBuf->Clear = StringBuf_Clear; StrBuf->Destroy = StringBuf_Destroy; StrBuf->Free = StringBuf_Free; - + sv->parse_next = sv_parse_next; sv->parse = sv_parse; sv->split = sv_split; |