From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/lib9/fmt/dofmt.c | 2 +- src/lib9/fmt/fltfmt.c | 55 ++++++++++++++++++++++----------------------- src/lib9/fmt/fmtdef.h | 1 - src/lib9/fmt/fmtlocale.c | 3 +-- src/lib9/fmt/fmtnull.c | 1 - src/lib9/fmt/fmtprint.c | 1 - src/lib9/fmt/fmtvprint.c | 1 - src/lib9/fmt/nan64.c | 6 ++--- src/lib9/fmt/plan9.h | 1 - src/lib9/fmt/runesnprint.c | 1 - src/lib9/fmt/runevseprint.c | 1 - src/lib9/fmt/runevsmprint.c | 4 ++-- src/lib9/fmt/snprint.c | 1 - src/lib9/fmt/vseprint.c | 1 - src/lib9/fmt/vsmprint.c | 4 ++-- 15 files changed, 36 insertions(+), 47 deletions(-) (limited to 'src/lib9/fmt') diff --git a/src/lib9/fmt/dofmt.c b/src/lib9/fmt/dofmt.c index 353c76e3..f714f8ff 100644 --- a/src/lib9/fmt/dofmt.c +++ b/src/lib9/fmt/dofmt.c @@ -478,7 +478,7 @@ __ifmt(Fmt *f) if(fl & FmtApost) __needsep(&ndig, &grouping); } - + /* * Zero values don't get 0x. */ diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c index bfeb7e50..4045ffd8 100644 --- a/src/lib9/fmt/fltfmt.c +++ b/src/lib9/fmt/fltfmt.c @@ -26,22 +26,22 @@ enum */ static double pows10[] = { - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22, 1e23, 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, - 1e30, 1e31, 1e32, 1e33, 1e34, 1e35, 1e36, 1e37, 1e38, 1e39, - 1e40, 1e41, 1e42, 1e43, 1e44, 1e45, 1e46, 1e47, 1e48, 1e49, - 1e50, 1e51, 1e52, 1e53, 1e54, 1e55, 1e56, 1e57, 1e58, 1e59, - 1e60, 1e61, 1e62, 1e63, 1e64, 1e65, 1e66, 1e67, 1e68, 1e69, - 1e70, 1e71, 1e72, 1e73, 1e74, 1e75, 1e76, 1e77, 1e78, 1e79, - 1e80, 1e81, 1e82, 1e83, 1e84, 1e85, 1e86, 1e87, 1e88, 1e89, - 1e90, 1e91, 1e92, 1e93, 1e94, 1e95, 1e96, 1e97, 1e98, 1e99, - 1e100, 1e101, 1e102, 1e103, 1e104, 1e105, 1e106, 1e107, 1e108, 1e109, - 1e110, 1e111, 1e112, 1e113, 1e114, 1e115, 1e116, 1e117, 1e118, 1e119, - 1e120, 1e121, 1e122, 1e123, 1e124, 1e125, 1e126, 1e127, 1e128, 1e129, - 1e130, 1e131, 1e132, 1e133, 1e134, 1e135, 1e136, 1e137, 1e138, 1e139, - 1e140, 1e141, 1e142, 1e143, 1e144, 1e145, 1e146, 1e147, 1e148, 1e149, - 1e150, 1e151, 1e152, 1e153, 1e154, 1e155, 1e156, 1e157, 1e158, 1e159, + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, 1e23, 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, + 1e30, 1e31, 1e32, 1e33, 1e34, 1e35, 1e36, 1e37, 1e38, 1e39, + 1e40, 1e41, 1e42, 1e43, 1e44, 1e45, 1e46, 1e47, 1e48, 1e49, + 1e50, 1e51, 1e52, 1e53, 1e54, 1e55, 1e56, 1e57, 1e58, 1e59, + 1e60, 1e61, 1e62, 1e63, 1e64, 1e65, 1e66, 1e67, 1e68, 1e69, + 1e70, 1e71, 1e72, 1e73, 1e74, 1e75, 1e76, 1e77, 1e78, 1e79, + 1e80, 1e81, 1e82, 1e83, 1e84, 1e85, 1e86, 1e87, 1e88, 1e89, + 1e90, 1e91, 1e92, 1e93, 1e94, 1e95, 1e96, 1e97, 1e98, 1e99, + 1e100, 1e101, 1e102, 1e103, 1e104, 1e105, 1e106, 1e107, 1e108, 1e109, + 1e110, 1e111, 1e112, 1e113, 1e114, 1e115, 1e116, 1e117, 1e118, 1e119, + 1e120, 1e121, 1e122, 1e123, 1e124, 1e125, 1e126, 1e127, 1e128, 1e129, + 1e130, 1e131, 1e132, 1e133, 1e134, 1e135, 1e136, 1e137, 1e138, 1e139, + 1e140, 1e141, 1e142, 1e143, 1e144, 1e145, 1e146, 1e147, 1e148, 1e149, + 1e150, 1e151, 1e152, 1e153, 1e154, 1e155, 1e156, 1e157, 1e158, 1e159, }; #define npows10 ((int)(sizeof(pows10)/sizeof(pows10[0]))) #define pow10(x) fmtpow10(x) @@ -110,7 +110,7 @@ xadd1(char *a, int n) /* * subtract 1 from the decimal integer string a. * if 10000 underflows into 09999, make it 99999 - * and return 1 to tell caller to move the virtual + * and return 1 to tell caller to move the virtual * decimal point. this way, xsub1 is inverse of xadd1. */ static int @@ -206,7 +206,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) *ns = 1; return; } - + /* * find g,e such that f = g*10^e. * guess 10-exponent using 2-exponent, then fine tune. @@ -298,7 +298,7 @@ xdtoa(double f, char *s, int *exp, int *neg, int *ns) e = ee; } } - + /* * bump last few digits down to 0 as we can. */ @@ -342,13 +342,13 @@ __efgfmt(Fmt *fmt) int c, chr, dotwid, e, exp, fl, ndigits, neg, newndigits; int pad, point, prec, realchr, sign, sufwid, ucase, wid, z1, z2; Rune r, *rs, *rt; - + if(fmt->flags&FmtLong) f = va_arg(fmt->args, long double); else f = va_arg(fmt->args, double); - - /* + + /* * extract formatting flags */ fl = fmt->flags; @@ -425,7 +425,7 @@ __efgfmt(Fmt *fmt) exp += ndigits-prec; ndigits = prec; } - + /* * extra rules for %g (implemented below): * trailing zeros removed after decimal unless FmtSharp. @@ -435,12 +435,12 @@ __efgfmt(Fmt *fmt) /* fall through to %e */ default: case 'e': - /* + /* * one significant digit before decimal, no leading zeros. */ point = 1; z1 = 0; - + /* * decimal point is after ndigits digits right now. * slide to be after first. @@ -537,11 +537,11 @@ __efgfmt(Fmt *fmt) } z2 = 0; ndigits = newndigits; - } + } sufwid = 0; break; } - + /* * if %g is given without FmtSharp, remove trailing zeros. * must do after truncation, so that e.g. print %.3g 1.001 @@ -665,4 +665,3 @@ __efgfmt(Fmt *fmt) } return 0; } - diff --git a/src/lib9/fmt/fmtdef.h b/src/lib9/fmt/fmtdef.h index 1519ea42..5c8eb2cb 100644 --- a/src/lib9/fmt/fmtdef.h +++ b/src/lib9/fmt/fmtdef.h @@ -102,4 +102,3 @@ int __strfmt(Fmt *f); # define VA_COPY(a,b) (a) = (b) # define VA_END(a) #endif - diff --git a/src/lib9/fmt/fmtlocale.c b/src/lib9/fmt/fmtlocale.c index 9ebdced3..33ca4011 100644 --- a/src/lib9/fmt/fmtlocale.c +++ b/src/lib9/fmt/fmtlocale.c @@ -37,7 +37,7 @@ int __needsep(int *ndig, char **grouping) { int group; - + (*ndig)++; group = *(unsigned char*)*grouping; /* CHAR_MAX means no further grouping. \0 means we got the empty string */ @@ -52,4 +52,3 @@ __needsep(int *ndig, char **grouping) } return 0; } - diff --git a/src/lib9/fmt/fmtnull.c b/src/lib9/fmt/fmtnull.c index aa5124a5..22ac078f 100644 --- a/src/lib9/fmt/fmtnull.c +++ b/src/lib9/fmt/fmtnull.c @@ -30,4 +30,3 @@ fmtnullinit(Fmt *f) fmtlocaleinit(f, nil, nil, nil); return 0; } - diff --git a/src/lib9/fmt/fmtprint.c b/src/lib9/fmt/fmtprint.c index 868127e0..41fc8332 100644 --- a/src/lib9/fmt/fmtprint.c +++ b/src/lib9/fmt/fmtprint.c @@ -33,4 +33,3 @@ fmtprint(Fmt *f, char *fmt, ...) return 0; return n; } - diff --git a/src/lib9/fmt/fmtvprint.c b/src/lib9/fmt/fmtvprint.c index 66d3929f..694a6cf8 100644 --- a/src/lib9/fmt/fmtvprint.c +++ b/src/lib9/fmt/fmtvprint.c @@ -34,4 +34,3 @@ fmtvprint(Fmt *f, char *fmt, va_list args) return 0; return n; } - diff --git a/src/lib9/fmt/nan64.c b/src/lib9/fmt/nan64.c index d408695d..78c3fde3 100644 --- a/src/lib9/fmt/nan64.c +++ b/src/lib9/fmt/nan64.c @@ -2,7 +2,7 @@ /* * 64-bit IEEE not-a-number routines. - * This is big/little-endian portable assuming that + * This is big/little-endian portable assuming that * the 64-bit doubles and 64-bit integers have the * same byte ordering. */ @@ -51,7 +51,7 @@ int __isNaN(double d) { uvlong x; - + x = d2u(d); /* IEEE 754: exponent bits 0x7FF and non-zero mantissa */ return (x&uvinf) == uvinf && (x&~uvneginf) != 0; @@ -67,7 +67,7 @@ int __isInf(double d, int sign) { uvlong x; - + x = d2u(d); if(sign == 0) return x==uvinf || x==uvneginf; diff --git a/src/lib9/fmt/plan9.h b/src/lib9/fmt/plan9.h index 0872ac71..0de44f14 100644 --- a/src/lib9/fmt/plan9.h +++ b/src/lib9/fmt/plan9.h @@ -35,4 +35,3 @@ typedef uintptr_t uintptr; #undef nelem #define nelem(x) (sizeof (x)/sizeof (x)[0]) - diff --git a/src/lib9/fmt/runesnprint.c b/src/lib9/fmt/runesnprint.c index 50b4813d..afc3f506 100644 --- a/src/lib9/fmt/runesnprint.c +++ b/src/lib9/fmt/runesnprint.c @@ -16,4 +16,3 @@ runesnprint(Rune *buf, int len, char *fmt, ...) va_end(args); return n; } - diff --git a/src/lib9/fmt/runevseprint.c b/src/lib9/fmt/runevseprint.c index 24e2f178..213351ab 100644 --- a/src/lib9/fmt/runevseprint.c +++ b/src/lib9/fmt/runevseprint.c @@ -26,4 +26,3 @@ runevseprint(Rune *buf, Rune *e, char *fmt, va_list args) *(Rune*)f.to = '\0'; return (Rune*)f.to; } - diff --git a/src/lib9/fmt/runevsmprint.c b/src/lib9/fmt/runevsmprint.c index ef273752..de29d2c3 100644 --- a/src/lib9/fmt/runevsmprint.c +++ b/src/lib9/fmt/runevsmprint.c @@ -1,8 +1,8 @@ /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */ /* - * Plan 9 port version must include libc.h in order to + * Plan 9 port version must include libc.h in order to * get Plan 9 debugging malloc, which sometimes returns - * different pointers than the standard malloc. + * different pointers than the standard malloc. */ #ifdef PLAN9PORT #include diff --git a/src/lib9/fmt/snprint.c b/src/lib9/fmt/snprint.c index 64d2da43..d019b456 100644 --- a/src/lib9/fmt/snprint.c +++ b/src/lib9/fmt/snprint.c @@ -15,4 +15,3 @@ snprint(char *buf, int len, char *fmt, ...) va_end(args); return n; } - diff --git a/src/lib9/fmt/vseprint.c b/src/lib9/fmt/vseprint.c index 1b92d2a9..8266c65d 100644 --- a/src/lib9/fmt/vseprint.c +++ b/src/lib9/fmt/vseprint.c @@ -25,4 +25,3 @@ vseprint(char *buf, char *e, char *fmt, va_list args) *(char*)f.to = '\0'; return (char*)f.to; } - diff --git a/src/lib9/fmt/vsmprint.c b/src/lib9/fmt/vsmprint.c index 9576f800..0a88e98f 100644 --- a/src/lib9/fmt/vsmprint.c +++ b/src/lib9/fmt/vsmprint.c @@ -1,8 +1,8 @@ /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */ /* - * Plan 9 port version must include libc.h in order to + * Plan 9 port version must include libc.h in order to * get Plan 9 debugging malloc, which sometimes returns - * different pointers than the standard malloc. + * different pointers than the standard malloc. */ #ifdef PLAN9PORT #include -- cgit v1.2.3