diff options
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/debugmalloc.c | 16 | ||||
-rw-r--r-- | src/lib9/encodefmt.c | 4 | ||||
-rw-r--r-- | src/lib9/errstr.c | 2 | ||||
-rw-r--r-- | src/lib9/fmt/fltfmt.c | 2 | ||||
-rw-r--r-- | src/lib9/fmt/fmtquote.c | 2 | ||||
-rw-r--r-- | src/lib9/fmt/strtod.c | 2 | ||||
-rw-r--r-- | src/lib9/notify.c | 2 | ||||
-rw-r--r-- | src/lib9/utf/rune.c | 2 | ||||
-rw-r--r-- | src/lib9/utf/utfecpy.c | 1 |
9 files changed, 17 insertions, 16 deletions
diff --git a/src/lib9/debugmalloc.c b/src/lib9/debugmalloc.c index 3958e243..8df27219 100644 --- a/src/lib9/debugmalloc.c +++ b/src/lib9/debugmalloc.c @@ -111,13 +111,13 @@ p9malloc(ulong n) void *v; if(n == 0) n++; -//fprint(2, "%s %d malloc\n", argv0, getpid()); +/*fprint(2, "%s %d malloc\n", argv0, getpid()); */ lock(&malloclock); mallocpid = getpid(); v = malloc(n+Overhead); v = mark(v, getcallerpc(&n), n, MallocMagic); unlock(&malloclock); -//fprint(2, "%s %d donemalloc\n", argv0, getpid()); +/*fprint(2, "%s %d donemalloc\n", argv0, getpid()); */ return v; } @@ -127,13 +127,13 @@ p9free(void *v) if(v == nil) return; -//fprint(2, "%s %d free\n", argv0, getpid()); +/*fprint(2, "%s %d free\n", argv0, getpid()); */ lock(&malloclock); mallocpid = getpid(); v = mark(v, getcallerpc(&v), 0, FreeMagic); free(v); unlock(&malloclock); -//fprint(2, "%s %d donefree\n", argv0, getpid()); +/*fprint(2, "%s %d donefree\n", argv0, getpid()); */ } void* @@ -141,26 +141,26 @@ p9calloc(ulong a, ulong b) { void *v; -//fprint(2, "%s %d calloc\n", argv0, getpid()); +/*fprint(2, "%s %d calloc\n", argv0, getpid()); */ lock(&malloclock); mallocpid = getpid(); v = calloc(a*b+Overhead, 1); v = mark(v, getcallerpc(&a), a*b, CallocMagic); unlock(&malloclock); -//fprint(2, "%s %d donecalloc\n", argv0, getpid()); +/*fprint(2, "%s %d donecalloc\n", argv0, getpid()); */ return v; } void* p9realloc(void *v, ulong n) { -//fprint(2, "%s %d realloc\n", argv0, getpid()); +/*fprint(2, "%s %d realloc\n", argv0, getpid()); */ lock(&malloclock); mallocpid = getpid(); v = mark(v, getcallerpc(&v), 0, CheckMagic); v = realloc(v, n+Overhead); v = mark(v, getcallerpc(&v), n, ReallocMagic); unlock(&malloclock); -//fprint(2, "%s %d donerealloc\n", argv0, getpid()); +/*fprint(2, "%s %d donerealloc\n", argv0, getpid()); */ return v; } diff --git a/src/lib9/encodefmt.c b/src/lib9/encodefmt.c index 94458097..50335052 100644 --- a/src/lib9/encodefmt.c +++ b/src/lib9/encodefmt.c @@ -9,7 +9,7 @@ encodefmt(Fmt *f) int ilen; int rv; uchar *b; - char obuf[64]; // rsc optimization + char obuf[64]; /* rsc optimization */ b = va_arg(f->args, uchar*); if(b == 0) @@ -44,7 +44,7 @@ encodefmt(Fmt *f) } else buf = obuf; - // convert + /* convert */ out = buf; switch(f->r){ case '<': diff --git a/src/lib9/errstr.c b/src/lib9/errstr.c index af989f47..caf71532 100644 --- a/src/lib9/errstr.c +++ b/src/lib9/errstr.c @@ -12,7 +12,7 @@ enum { - EPLAN9 = 0x19283745, + EPLAN9 = 0x19283745 }; char *(*_syserrstr)(void); diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c index 14ad8679..9c94f156 100644 --- a/src/lib9/fmt/fltfmt.c +++ b/src/lib9/fmt/fltfmt.c @@ -286,7 +286,7 @@ found: if(e >= -5 && e <= prec) { c1 = -e - 1; c4 = prec - e; - chr = 'h'; // flag for 'f' style + chr = 'h'; /* flag for 'f' style */ } break; case 'f': diff --git a/src/lib9/fmt/fmtquote.c b/src/lib9/fmt/fmtquote.c index b6f2e179..2304c4e5 100644 --- a/src/lib9/fmt/fmtquote.c +++ b/src/lib9/fmt/fmtquote.c @@ -209,7 +209,7 @@ __quotestrfmt(int runesin, Fmt *f) outlen = (char*)f->stop - (char*)f->to; __quotesetup(s, r, nin, outlen, &q, f->flags&FmtSharp, f->runes); -//print("bytes in %d bytes out %d runes in %d runesout %d\n", q.nbytesin, q.nbytesout, q.nrunesin, q.nrunesout); +/*print("bytes in %d bytes out %d runes in %d runesout %d\n", q.nbytesin, q.nbytesout, q.nrunesin, q.nrunesout); */ if(runesin){ if(!q.quoted) diff --git a/src/lib9/fmt/strtod.c b/src/lib9/fmt/strtod.c index fbc1c59e..c19c2849 100644 --- a/src/lib9/fmt/strtod.c +++ b/src/lib9/fmt/strtod.c @@ -67,7 +67,7 @@ enum S4, /* _+#.# #S4 eS5 */ S5, /* _+#.#e +S6 #S7 */ S6, /* _+#.#e+ #S7 */ - S7, /* _+#.#e+# #S7 */ + S7 /* _+#.#e+# #S7 */ }; static int xcmp(char*, char*); diff --git a/src/lib9/notify.c b/src/lib9/notify.c index 2a562b62..8480b246 100644 --- a/src/lib9/notify.c +++ b/src/lib9/notify.c @@ -37,7 +37,7 @@ struct Sig enum { Restart = 1<<0, - Ignore = 1<<1, + Ignore = 1<<1 }; static Sig sigs[] = { diff --git a/src/lib9/utf/rune.c b/src/lib9/utf/rune.c index 88484f60..3d6831b0 100644 --- a/src/lib9/utf/rune.c +++ b/src/lib9/utf/rune.c @@ -37,7 +37,7 @@ enum Maskx = (1<<Bitx)-1, /* 0011 1111 */ Testx = Maskx ^ 0xFF, /* 1100 0000 */ - Bad = Runeerror, + Bad = Runeerror }; int diff --git a/src/lib9/utf/utfecpy.c b/src/lib9/utf/utfecpy.c index f254c13a..cf3535fb 100644 --- a/src/lib9/utf/utfecpy.c +++ b/src/lib9/utf/utfecpy.c @@ -11,6 +11,7 @@ * ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ +#define _BSD_SOURCE 1 /* memccpy */ #include <stdarg.h> #include <string.h> #include "plan9.h" |