summaryrefslogtreecommitdiff
path: root/sys/src/libc/port
diff options
context:
space:
mode:
authorBurnZeZ <brz-9dev@feline.systems>2016-03-19 17:35:36 -0400
committerBurnZeZ <brz-9dev@feline.systems>2016-03-19 17:35:36 -0400
commite387915a8f408ad8d40ea93f6a72a7a782e58899 (patch)
tree65ff8117991d0e657c2d08aa5bb08e15518db453 /sys/src/libc/port
parentd094b7faa1151c60d829a3988bae819f76be75d3 (diff)
libc: trailing whitespace cleanup
Diffstat (limited to 'sys/src/libc/port')
-rw-r--r--sys/src/libc/port/cleanname.c2
-rw-r--r--sys/src/libc/port/malloc.c6
-rw-r--r--sys/src/libc/port/pool.c38
-rw-r--r--sys/src/libc/port/pow10.c20
-rw-r--r--sys/src/libc/port/profile.c4
-rw-r--r--sys/src/libc/port/quote.c4
-rw-r--r--sys/src/libc/port/runestrdup.c4
-rw-r--r--sys/src/libc/port/strdup.c4
-rw-r--r--sys/src/libc/port/u64.c2
9 files changed, 42 insertions, 42 deletions
diff --git a/sys/src/libc/port/cleanname.c b/sys/src/libc/port/cleanname.c
index 1dae7bb84..3a0a10fa3 100644
--- a/sys/src/libc/port/cleanname.c
+++ b/sys/src/libc/port/cleanname.c
@@ -53,7 +53,7 @@ cleanname(char *name)
if(q == name) /* empty string is really ``.'' */
*q++ = '.';
*q = '\0';
- if(erasedprefix && name[0] == '#'){
+ if(erasedprefix && name[0] == '#'){
/* this was not a #x device path originally - make it not one now */
memmove(name+2, name, strlen(name)+1);
name[0] = '.';
diff --git a/sys/src/libc/port/malloc.c b/sys/src/libc/port/malloc.c
index af52dce42..a96ff8f78 100644
--- a/sys/src/libc/port/malloc.c
+++ b/sys/src/libc/port/malloc.c
@@ -135,7 +135,7 @@ pprint(Pool *p, char *fmt, ...)
static char panicbuf[256];
static void
-ppanic(Pool *p, char *fmt, ...)
+ppanic(Pool *p, char *fmt, ...)
{
va_list v;
int n;
@@ -170,7 +170,7 @@ ppanic(Pool *p, char *fmt, ...)
/* - except the code for malloc(), which alternately doesn't clear or does. - */
/*
- * Npadlong is the number of ulongs's to leave at the beginning of
+ * Npadlong is the number of ulongs's to leave at the beginning of
* each allocated buffer for our own bookkeeping. We return to the callers
* a pointer that points immediately after our bookkeeping area. Incoming pointers
* must be decremented by that much, and outgoing pointers incremented.
@@ -269,7 +269,7 @@ realloc(void *v, ulong size)
setrealloctag(nv, getcallerpc(&v));
if(v == nil)
setmalloctag(nv, getcallerpc(&v));
- }
+ }
return nv;
}
diff --git a/sys/src/libc/port/pool.c b/sys/src/libc/port/pool.c
index 3dad7f74f..25ad52c57 100644
--- a/sys/src/libc/port/pool.c
+++ b/sys/src/libc/port/pool.c
@@ -1,7 +1,7 @@
/*
* This allocator takes blocks from a coarser allocator (p->alloc) and
* uses them as arenas.
- *
+ *
* An arena is split into a sequence of blocks of variable size. The
* blocks begin with a Bhdr that denotes the length (including the Bhdr)
* of the block. An arena begins with an Arena header block (Arena,
@@ -9,17 +9,17 @@
* size 0. Intermediate blocks are either allocated or free. At the end
* of each intermediate block is a Btail, which contains information
* about where the block starts. This is useful for walking backwards.
- *
+ *
* Free blocks (Free*) have a magic value of FREE_MAGIC in their Bhdr
* headers. They are kept in a binary tree (p->freeroot) traversible by
* walking ->left and ->right. Each node of the binary tree is a pointer
* to a circular doubly-linked list (next, prev) of blocks of identical
* size. Blocks are added to this ``tree of lists'' by pooladd(), and
* removed by pooldel().
- *
+ *
* When freed, adjacent blocks are coalesced to create larger blocks when
* possible.
- *
+ *
* Allocated blocks (Alloc*) have one of two magic values: ALLOC_MAGIC or
* UNALLOC_MAGIC. When blocks are released from the pool, they have
* magic value UNALLOC_MAGIC. Once the block has been trimmed by trim()
@@ -27,11 +27,11 @@
* datasize field of the tail, the magic value is changed to ALLOC_MAGIC.
* All blocks returned to callers should be of type ALLOC_MAGIC, as
* should all blocks passed to us by callers. The amount of data the user
- * asked us for can be found by subtracting the short in tail->datasize
+ * asked us for can be found by subtracting the short in tail->datasize
* from header->size. Further, the up to at most four bytes between the
* end of the user-requested data block and the actual Btail structure are
* marked with a magic value, which is checked to detect user overflow.
- *
+ *
* The arenas returned by p->alloc are kept in a doubly-linked list
* (p->arenalist) running through the arena headers, sorted by descending
* base address (prev, next). When a new arena is allocated, we attempt
@@ -159,12 +159,12 @@ static Free* treesplay(Free*, ulong);
/*
* Debugging
- *
+ *
* Antagonism causes blocks to always be filled with garbage if their
* contents are undefined. This tickles both programs and the library.
* It's a linear time hit but not so noticeable during nondegenerate use.
* It would be worth leaving in except that it negates the benefits of the
- * kernel's demand-paging. The tail magic and end-of-data magic
+ * kernel's demand-paging. The tail magic and end-of-data magic
* provide most of the user-visible benefit that antagonism does anyway.
*
* Paranoia causes the library to recheck the entire pool on each lock
@@ -220,7 +220,7 @@ checktree(Free *t, int a, int b)
checktree(t->left, a, t->size);
if(t->right)
checktree(t->right, t->size, b);
-
+
}
/* treelookupgt: find smallest node in tree with size >= size */
@@ -379,7 +379,7 @@ pooldel(Pool *p, Free *node)
}
/*
- * Block maintenance
+ * Block maintenance
*/
/* block allocation */
static ulong
@@ -527,7 +527,7 @@ freefromfront(Pool *p, Alloc *b, ulong skip)
pooladd(p, b);
return bb;
}
- return b;
+ return b;
}
/*
@@ -656,7 +656,7 @@ arenamerge(Pool *p, Arena *bot, Arena *top)
bot->aup->down = bot;
else
p->arenalist = bot;
-
+
/* save ptrs to last block in bot, first block in top */
t = B2PT(A2TB(bot));
bbot = T2HDR(t);
@@ -848,7 +848,7 @@ arenacompact(Pool *p, Arena *a)
pooladd(p, (Alloc*)wb);
}
- return compacted;
+ return compacted;
}
/*
@@ -1033,7 +1033,7 @@ poolreallocl(Pool *p, void *v, ulong ndsize)
/* enough cleverness */
memmove(nv, v, odsize);
- antagonism {
+ antagonism {
memset((char*)nv+odsize, 0xDE, ndsize-odsize);
}
poolfreel(p, v);
@@ -1078,7 +1078,7 @@ poolallocalignl(Pool *p, ulong dsize, ulong align, long offset, ulong span)
*
* to satisfy alignment, just allocate an extra
* align bytes and then shift appropriately.
- *
+ *
* to satisfy span, try once and see if we're
* lucky. the second time, allocate 2x asize
* so that we definitely get one not crossing
@@ -1133,7 +1133,7 @@ poolallocalignl(Pool *p, ulong dsize, ulong align, long offset, ulong span)
trim(p, b, skip+dsize);
p->curalloc += b->size;
assert(D2B(p, c) == b);
- antagonism {
+ antagonism {
memset(c, 0xDD, dsize);
}
return c;
@@ -1159,7 +1159,7 @@ poolfreel(Pool *p, void *v)
n = getdsize(ab)-8;
if(n > 0)
memset((uchar*)v+8, 0xDA, n);
- return;
+ return;
}
p->nfree++;
@@ -1297,7 +1297,7 @@ poolfree(Pool *p, void *v)
}
/*
- * Return the real size of a block, and let the user use it.
+ * Return the real size of a block, and let the user use it.
*/
ulong
poolmsize(Pool *p, void *v)
@@ -1333,7 +1333,7 @@ poolmsize(Pool *p, void *v)
}
/*
- * Debugging
+ * Debugging
*/
static void
diff --git a/sys/src/libc/port/pow10.c b/sys/src/libc/port/pow10.c
index 7e09f3cc4..b327c1092 100644
--- a/sys/src/libc/port/pow10.c
+++ b/sys/src/libc/port/pow10.c
@@ -12,16 +12,16 @@
static
double tab[] =
{
- 1.0e0, 1.0e1, 1.0e2, 1.0e3, 1.0e4, 1.0e5, 1.0e6, 1.0e7, 1.0e8, 1.0e9,
- 1.0e10, 1.0e11, 1.0e12, 1.0e13, 1.0e14, 1.0e15, 1.0e16, 1.0e17, 1.0e18, 1.0e19,
- 1.0e20, 1.0e21, 1.0e22, 1.0e23, 1.0e24, 1.0e25, 1.0e26, 1.0e27, 1.0e28, 1.0e29,
- 1.0e30, 1.0e31, 1.0e32, 1.0e33, 1.0e34, 1.0e35, 1.0e36, 1.0e37, 1.0e38, 1.0e39,
- 1.0e40, 1.0e41, 1.0e42, 1.0e43, 1.0e44, 1.0e45, 1.0e46, 1.0e47, 1.0e48, 1.0e49,
- 1.0e50, 1.0e51, 1.0e52, 1.0e53, 1.0e54, 1.0e55, 1.0e56, 1.0e57, 1.0e58, 1.0e59,
- 1.0e60, 1.0e61, 1.0e62, 1.0e63, 1.0e64, 1.0e65, 1.0e66, 1.0e67, 1.0e68, 1.0e69,
- 1.0e70, 1.0e71, 1.0e72, 1.0e73, 1.0e74, 1.0e75, 1.0e76, 1.0e77, 1.0e78, 1.0e79,
- 1.0e80, 1.0e81, 1.0e82, 1.0e83, 1.0e84, 1.0e85, 1.0e86, 1.0e87, 1.0e88, 1.0e89,
- 1.0e90, 1.0e91, 1.0e92, 1.0e93, 1.0e94, 1.0e95, 1.0e96, 1.0e97, 1.0e98, 1.0e99,
+ 1.0e0, 1.0e1, 1.0e2, 1.0e3, 1.0e4, 1.0e5, 1.0e6, 1.0e7, 1.0e8, 1.0e9,
+ 1.0e10, 1.0e11, 1.0e12, 1.0e13, 1.0e14, 1.0e15, 1.0e16, 1.0e17, 1.0e18, 1.0e19,
+ 1.0e20, 1.0e21, 1.0e22, 1.0e23, 1.0e24, 1.0e25, 1.0e26, 1.0e27, 1.0e28, 1.0e29,
+ 1.0e30, 1.0e31, 1.0e32, 1.0e33, 1.0e34, 1.0e35, 1.0e36, 1.0e37, 1.0e38, 1.0e39,
+ 1.0e40, 1.0e41, 1.0e42, 1.0e43, 1.0e44, 1.0e45, 1.0e46, 1.0e47, 1.0e48, 1.0e49,
+ 1.0e50, 1.0e51, 1.0e52, 1.0e53, 1.0e54, 1.0e55, 1.0e56, 1.0e57, 1.0e58, 1.0e59,
+ 1.0e60, 1.0e61, 1.0e62, 1.0e63, 1.0e64, 1.0e65, 1.0e66, 1.0e67, 1.0e68, 1.0e69,
+ 1.0e70, 1.0e71, 1.0e72, 1.0e73, 1.0e74, 1.0e75, 1.0e76, 1.0e77, 1.0e78, 1.0e79,
+ 1.0e80, 1.0e81, 1.0e82, 1.0e83, 1.0e84, 1.0e85, 1.0e86, 1.0e87, 1.0e88, 1.0e89,
+ 1.0e90, 1.0e91, 1.0e92, 1.0e93, 1.0e94, 1.0e95, 1.0e96, 1.0e97, 1.0e98, 1.0e99,
1.0e100,1.0e101,1.0e102,1.0e103,1.0e104,1.0e105,1.0e106,1.0e107,1.0e108,1.0e109,
1.0e110,1.0e111,1.0e112,1.0e113,1.0e114,1.0e115,1.0e116,1.0e117,1.0e118,1.0e119,
1.0e120,1.0e121,1.0e122,1.0e123,1.0e124,1.0e125,1.0e126,1.0e127,1.0e128,1.0e129,
diff --git a/sys/src/libc/port/profile.c b/sys/src/libc/port/profile.c
index b1eb0afaa..8a8cd41b3 100644
--- a/sys/src/libc/port/profile.c
+++ b/sys/src/libc/port/profile.c
@@ -73,7 +73,7 @@ out:
/* Add kernel cycles on proc entry */
p->time = p->time + _tos->kcycles;
/* fall through */
- case Proftime:
+ case Proftime:
proftime: /* Subtract cycle counter on proc entry */
cycles((uvlong*)&t);
p->time = p->time - t;
@@ -104,7 +104,7 @@ _profout(void)
case Profuser: /* Subtract kernel cycles on proc entry */
p->time = p->time - _tos->kcycles;
/* fall through */
- case Proftime:
+ case Proftime:
proftime: /* Add cycle counter on proc entry */
cycles((uvlong*)&t);
p->time = p->time + t;
diff --git a/sys/src/libc/port/quote.c b/sys/src/libc/port/quote.c
index 99f70084c..8adf37bec 100644
--- a/sys/src/libc/port/quote.c
+++ b/sys/src/libc/port/quote.c
@@ -91,7 +91,7 @@ quotestrdup(char *s)
if(_needsquotes(s, &quotelen) == 0)
return strdup(s);
-
+
ret = malloc(quotelen+1);
if(ret == nil)
return nil;
@@ -117,7 +117,7 @@ quoterunestrdup(Rune *s)
if(_runeneedsquotes(s, &quotelen) == 0)
return runestrdup(s);
-
+
ret = malloc((quotelen+1)*sizeof(Rune));
if(ret == nil)
return nil;
diff --git a/sys/src/libc/port/runestrdup.c b/sys/src/libc/port/runestrdup.c
index c25420654..592f6d7cd 100644
--- a/sys/src/libc/port/runestrdup.c
+++ b/sys/src/libc/port/runestrdup.c
@@ -2,8 +2,8 @@
#include <libc.h>
Rune*
-runestrdup(Rune *s)
-{
+runestrdup(Rune *s)
+{
Rune *ns;
ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
diff --git a/sys/src/libc/port/strdup.c b/sys/src/libc/port/strdup.c
index 8ced7f21e..e5a2ec46f 100644
--- a/sys/src/libc/port/strdup.c
+++ b/sys/src/libc/port/strdup.c
@@ -2,8 +2,8 @@
#include <libc.h>
char*
-strdup(char *s)
-{
+strdup(char *s)
+{
char *ns;
ns = malloc(strlen(s) + 1);
diff --git a/sys/src/libc/port/u64.c b/sys/src/libc/port/u64.c
index bf86c634c..432cec899 100644
--- a/sys/src/libc/port/u64.c
+++ b/sys/src/libc/port/u64.c
@@ -36,7 +36,7 @@ dec64(uchar *out, int lim, char *in, int n)
b24 = 0;
i = 0;
while(n-- > 0){
-
+
c = t64d[*(uchar*)in++];
if(c == INVAL)
continue;