From 02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 16 Nov 2014 06:35:51 +0100 Subject: 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 --- src/common/strlib.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/common/strlib.c') 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; -- cgit v1.2.3-60-g2f50