From be76b2691088b4cc312d2c13d5c924145b21ff9e Mon Sep 17 00:00:00 2001 From: elliotth Date: Fri, 15 Jun 2007 19:17:02 +0000 Subject: [PATCH] trunk/debug.c: trunk/debug.h: trunk/vstring.c: replace "clearString" and its single caller with memset(3), which lets me scan JDK6 with dctags in 40 seconds rather than 4 minutes. git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@558 c5d04d22-be80-434c-894e-aa346cc9e8e8 --- debug.c | 7 ------- debug.h | 1 - vstring.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/debug.c b/debug.c index 24a1c20..e11eca6 100644 --- a/debug.c +++ b/debug.c @@ -68,13 +68,6 @@ extern void debugCppIgnore (const boolean ignore) debugPrintf (DEBUG_CPP, "<*cpp:%s ignore*>", ignore ? "begin":"end"); } -extern void clearString (char *const string, const int length) -{ - int i; - for (i = 0 ; i < length ; ++i) - string [i] = '\0'; -} - extern void debugEntry (const tagEntryInfo *const tag) { const char *const scope = tag->isFileScope ? "{fs}" : ""; diff --git a/debug.h b/debug.h index 56ef7d1..fab93c2 100644 --- a/debug.h +++ b/debug.h @@ -63,7 +63,6 @@ extern void debugPutc (const int level, const int c); extern void debugParseNest (const boolean increase, const unsigned int level); extern void debugCppNest (const boolean begin, const unsigned int level); extern void debugCppIgnore (const boolean ignore); -extern void clearString (char *const string, const int length); extern void debugEntry (const tagEntryInfo *const tag); #endif /* _DEBUG_H */ diff --git a/vstring.c b/vstring.c index 7ee16f9..eb4020c 100644 --- a/vstring.c +++ b/vstring.c @@ -60,7 +60,7 @@ extern void vStringClear (vString *const string) { string->length = 0; string->buffer [0] = '\0'; - DebugStatement ( clearString (string->buffer, string->size); ) + DebugStatement ( memset (string->buffer, 0, string->size); ) } extern void vStringDelete (vString *const string)