diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-24 13:59:57 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-24 13:59:57 +0000 |
commit | b4c624a2a52f28442a1ceab080d491d83f3b7731 (patch) | |
tree | a72b1e5b8dac00117d4a07c86d6c10e163f2b39e /nuttx/lib | |
parent | b1ba6835d554382c77a216a3f2eb3fa7ded96535 (diff) | |
download | px4-nuttx-b4c624a2a52f28442a1ceab080d491d83f3b7731.tar.gz px4-nuttx-b4c624a2a52f28442a1ceab080d491d83f3b7731.tar.bz2 px4-nuttx-b4c624a2a52f28442a1ceab080d491d83f3b7731.zip |
fs/ and lib/ debug can be selectively enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@406 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r-- | nuttx/lib/lib_getenv.c | 8 | ||||
-rw-r--r-- | nuttx/lib/lib_sscanf.c | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/nuttx/lib/lib_getenv.c b/nuttx/lib/lib_getenv.c index dd659393a..bddd2cb0a 100644 --- a/nuttx/lib/lib_getenv.c +++ b/nuttx/lib/lib_getenv.c @@ -103,7 +103,7 @@ char *getenv(const char *name) const char *pend = &environment[size-1]; const char *ptmp; - dbg("name=\"%s\"\n", name); + ldbg("name=\"%s\"\n", name); if (name) { @@ -111,7 +111,7 @@ char *getenv(const char *name) while (penv < pend) { - vdbg("Compare to=\"%s\"\n", penv); + lvdbg("Compare to=\"%s\"\n", penv); /* The logic below basically implements a version of * strcmp where the strings may be terminated with = signs. @@ -130,7 +130,7 @@ char *getenv(const char *name) { /* Yes.. return the pointer to the value. */ - dbg("Returning \"%s\"\n", penv+1); + ldbg("Returning \"%s\"\n", penv+1); return ((char*)penv+1); } else @@ -165,6 +165,6 @@ char *getenv(const char *name) /* If we got here, then no matching string was found. */ - dbg("Returning NULL\n"); + ldbg("Returning NULL\n"); return NULL; } diff --git a/nuttx/lib/lib_sscanf.c b/nuttx/lib/lib_sscanf.c index af3193e44..e06839f47 100644 --- a/nuttx/lib/lib_sscanf.c +++ b/nuttx/lib/lib_sscanf.c @@ -121,7 +121,7 @@ int vsscanf(char *buf, const char *s, va_list ap) const char *tc; char tmp[MAXLN]; - vdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s); + lvdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s); count = noassign = width = lflag = 0; while (*s && *buf) @@ -135,13 +135,13 @@ int vsscanf(char *buf, const char *s, va_list ap) if (*s == '%') { - vdbg("vsscanf: Specifier found\n"); + lvdbg("vsscanf: Specifier found\n"); /* Check for qualifiers on the conversion specifier */ s++; for (; *s; s++) { - vdbg("vsscanf: Processing %c\n", *s); + lvdbg("vsscanf: Processing %c\n", *s); if (strchr("dibouxcsefg%", *s)) break; @@ -163,7 +163,7 @@ int vsscanf(char *buf, const char *s, va_list ap) if (*s == 's') { - vdbg("vsscanf: Performing string conversion\n"); + lvdbg("vsscanf: Performing string conversion\n"); while (isspace(*buf)) buf++; @@ -184,7 +184,7 @@ int vsscanf(char *buf, const char *s, va_list ap) else if (*s == 'c') { - vdbg("vsscanf: Performing character conversion\n"); + lvdbg("vsscanf: Performing character conversion\n"); if (!width) width = 1; @@ -201,7 +201,7 @@ int vsscanf(char *buf, const char *s, va_list ap) else if (strchr("dobxu", *s)) { - vdbg("vsscanf: Performing integer conversion\n"); + lvdbg("vsscanf: Performing integer conversion\n"); /* Skip over any white space before the integer string */ @@ -237,7 +237,7 @@ int vsscanf(char *buf, const char *s, va_list ap) strncpy(tmp, buf, width); tmp[width] = '\0'; - vdbg("vsscanf: tmp[]=\"%s\"\n", tmp); + lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp); /* Perform the integer conversion */ @@ -251,7 +251,7 @@ int vsscanf(char *buf, const char *s, va_list ap) #else int tmpint = strtol(tmp, NULL, base); #endif - vdbg("vsscanf: Return %d to 0x%p\n", tmpint, pint); + lvdbg("vsscanf: Return %d to 0x%p\n", tmpint, pint); *pint = tmpint; } } @@ -264,10 +264,10 @@ int vsscanf(char *buf, const char *s, va_list ap) # warning "No floating point conversions" void *pv = va_arg(ap, void*); - vdbg("vsscanf: Return 0.0 to %p\n", pv); + lvdbg("vsscanf: Return 0.0 to %p\n", pv); *((double_t*)pv) = 0.0; #else - vdbg("vsscanf: Performing floating point conversion\n"); + lvdbg("vsscanf: Performing floating point conversion\n"); /* Skip over any white space before the real string */ @@ -293,7 +293,7 @@ int vsscanf(char *buf, const char *s, va_list ap) tmp[width] = '\0'; buf += width; - vdbg("vsscanf: tmp[]=\"%s\"\n", tmp); + lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp); /* Perform the floating point conversion */ @@ -308,7 +308,7 @@ int vsscanf(char *buf, const char *s, va_list ap) #endif void *pv = va_arg(ap, void*); - vdbg("vsscanf: Return %f to %p\n", dvalue, pv); + lvdbg("vsscanf: Return %f to %p\n", dvalue, pv); /* But we have to check whether we need to return a * float or a double. |