aboutsummaryrefslogtreecommitdiffstats
path: root/com32/libutil
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
commit28eecd8965aedbd75727fb0797a2e7033d5c54ee (patch)
tree1cac9ffc5f7fe7fd82d59b4accd7b8cf85762f74 /com32/libutil
parentf8c463722022008c8412a69f90576d2bf38818ed (diff)
downloadsyslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.gz
syslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.xz
syslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.zip
Across-the-board stealth whitespace cleanup
Diffstat (limited to 'com32/libutil')
-rw-r--r--com32/libutil/Makefile7
-rw-r--r--com32/libutil/ansiline.c11
-rw-r--r--com32/libutil/ansiraw.c11
-rw-r--r--com32/libutil/get_key.c11
-rw-r--r--com32/libutil/idle.c6
-rw-r--r--com32/libutil/include/base64.h6
-rw-r--r--com32/libutil/include/consoles.h7
-rw-r--r--com32/libutil/include/getkey.h6
-rw-r--r--com32/libutil/include/libutil.h6
-rw-r--r--com32/libutil/include/minmax.h7
-rw-r--r--com32/libutil/loadfile.c4
-rw-r--r--com32/libutil/movebits.c15
-rw-r--r--com32/libutil/sha1hash.c12
-rw-r--r--com32/libutil/unbase64.c13
14 files changed, 54 insertions, 68 deletions
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index d66a8245..c46e05e4 100644
--- a/com32/libutil/Makefile
+++ b/com32/libutil/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
## sell copies of the Software, and to permit persons to whom
## the Software is furnished to do so, subject to the following
## conditions:
-##
+##
## The above copyright notice and this permission notice shall
## be included in all copies or substantial portions of the Software.
-##
+##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
## OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -110,4 +110,3 @@ spotless: clean
install: all
mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
install -m 644 libutil_com.a libutil_lnx.a $(INSTALLROOT)$(COM32DIR)
-
diff --git a/com32/libutil/ansiline.c b/com32/libutil/ansiline.c
index f79d229f..7ca7ca0e 100644
--- a/com32/libutil/ansiline.c
+++ b/com32/libutil/ansiline.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -51,7 +51,7 @@ void console_ansi_std(void)
fputs("\033[0m\033[20h", stdout);
}
-#else
+#else
#include <stdio.h>
#include <termios.h>
@@ -68,7 +68,7 @@ static void __attribute__((destructor)) console_cleanup(void)
fputs("\033[0m\033[20l", stdout);
tcsetattr(0, TCSANOW, &original_termios_settings);
}
-
+
void console_ansi_std(void)
{
@@ -89,4 +89,3 @@ void console_ansi_std(void)
}
#endif
-
diff --git a/com32/libutil/ansiraw.c b/com32/libutil/ansiraw.c
index 8761b596..8d85e257 100644
--- a/com32/libutil/ansiraw.c
+++ b/com32/libutil/ansiraw.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -51,7 +51,7 @@ void console_ansi_raw(void)
fputs("\033[0m\033[20h", stdout);
}
-#else
+#else
#include <stdio.h>
#include <termios.h>
@@ -68,7 +68,7 @@ static void __attribute__((destructor)) console_cleanup(void)
fputs("\033[0m\033[20l", stdout);
tcsetattr(0, TCSANOW, &original_termios_settings);
}
-
+
void console_ansi_raw(void)
{
@@ -91,4 +91,3 @@ void console_ansi_raw(void)
}
#endif
-
diff --git a/com32/libutil/get_key.c b/com32/libutil/get_key.c
index bd06008e..37241775 100644
--- a/com32/libutil/get_key.c
+++ b/com32/libutil/get_key.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -170,8 +170,3 @@ int get_key(FILE *f, clock_t timeout)
/* We really should remember this and return subsequent characters later */
return buffer[0];
}
-
-
-
-
-
diff --git a/com32/libutil/idle.c b/com32/libutil/idle.c
index 7f724900..c350a9fc 100644
--- a/com32/libutil/idle.c
+++ b/com32/libutil/idle.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/base64.h b/com32/libutil/include/base64.h
index 45c69afc..e17f11bf 100644
--- a/com32/libutil/include/base64.h
+++ b/com32/libutil/include/base64.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/consoles.h b/com32/libutil/include/consoles.h
index 81f17bf6..ca962b9e 100644
--- a/com32/libutil/include/consoles.h
+++ b/com32/libutil/include/consoles.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -39,4 +39,3 @@ void console_ansi_std(void);
void console_ansi_raw(void);
#endif /* LIBUTIL_CONSOLES_H */
-
diff --git a/com32/libutil/include/getkey.h b/com32/libutil/include/getkey.h
index 97a4ed84..d4e650d0 100644
--- a/com32/libutil/include/getkey.h
+++ b/com32/libutil/include/getkey.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/libutil.h b/com32/libutil/include/libutil.h
index 9138b6db..5c76fa33 100644
--- a/com32/libutil/include/libutil.h
+++ b/com32/libutil/include/libutil.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/minmax.h b/com32/libutil/include/minmax.h
index 319db164..b333a656 100644
--- a/com32/libutil/include/minmax.h
+++ b/com32/libutil/include/minmax.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -41,4 +41,3 @@
xx > yy ? xx : yy; })
#endif /* _MINMAX_H */
-
diff --git a/com32/libutil/loadfile.c b/com32/libutil/loadfile.c
index 05f71184..3b580afe 100644
--- a/com32/libutil/loadfile.c
+++ b/com32/libutil/loadfile.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -68,5 +68,3 @@ int loadfile(const char *filename, void **ptr, size_t *len)
fclose(f);
return -1;
}
-
-
diff --git a/com32/libutil/movebits.c b/com32/libutil/movebits.c
index 07cc59f9..00bdad79 100644
--- a/com32/libutil/movebits.c
+++ b/com32/libutil/movebits.c
@@ -30,7 +30,7 @@ make_movelist(struct movelist *pptr, uintptr_t dst, uintptr_t src, uintptr_t len
if ( !ml )
return NULL;
-
+
ml->dst = dst;
ml->src = src;
ml->len = len;
@@ -102,7 +102,7 @@ split_movelist(uintptr_t start, uintptr_t len, struct movelist **parentptr)
assert(start >= ml->src);
assert(start < ml->src+ml->len);
-
+
/* Split off the beginning */
if ( start > ml->src ) {
uintptr_t l = start - ml->src;
@@ -210,7 +210,7 @@ allocate_from(uintptr_t start, uintptr_t len, struct movelist **parentptr)
parentptr = split_movelist(start, len, parentptr);
c = *parentptr;
}
-
+
*parentptr = c->next;
free(c);
}
@@ -218,7 +218,7 @@ allocate_from(uintptr_t start, uintptr_t len, struct movelist **parentptr)
/*
* Remove any chunk from the freelist which is already
* claimed by source data. This somewhat frivolously
- * assumes that the fragments are either completely
+ * assumes that the fragments are either completely
* covered by a free zone or not covered at all.
*/
static void
@@ -316,7 +316,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
copylen = (*ep)->len;
}
allocate_from(copydst, copylen, ep);
-
+
if ( copylen >= o->len - (needbase-o->src) ) {
copysrc = o->src + (o->len - copylen);
} else {
@@ -354,7 +354,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
goto move_chunk;
}
return -1; /* Stuck! */
-
+
move_chunk:
/* We're allowed to move the chunk into place now. */
@@ -363,7 +363,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
fp = split_movelist(f->src, copylen+(needbase-f->dst), fp);
f = *fp;
}
-
+
mv = new_movelist(f->dst, f->src, f->len);
dprintf("A: 0x%08x bytes at 0x%08x -> 0x%08x\n",
mv->len, mv->src, mv->dst);
@@ -431,4 +431,3 @@ int main(int argc, char *argv[])
}
#endif /* TEST */
-
diff --git a/com32/libutil/sha1hash.c b/com32/libutil/sha1hash.c
index fc5cc358..6bd3f4be 100644
--- a/com32/libutil/sha1hash.c
+++ b/com32/libutil/sha1hash.c
@@ -4,7 +4,7 @@ By Steve Reid <sreid@sea-to-sky.net>
100% Public Domain
-----------------
-Modified 7/98
+Modified 7/98
By James H. Brown <jbrown@burgoyne.com>
Still 100% Public Domain
@@ -26,7 +26,7 @@ Since the file IO in main() reads 16K at a time, any file 8K or larger would
be guaranteed to generate the wrong hash (e.g. Test Vector #3, a million
"a"s).
-I also changed the declaration of variables i & j in SHA1Update to
+I also changed the declaration of variables i & j in SHA1Update to
unsigned long from unsigned int for the same reason.
These changes should make no difference to any 32 bit implementations since
@@ -53,7 +53,7 @@ Still 100% public domain
Modified 4/01
By Saul Kravitz <Saul.Kravitz@celera.com>
Still 100% PD
-Modified to run on Compaq Alpha hardware.
+Modified to run on Compaq Alpha hardware.
-----------------
Modified 2/03
@@ -103,7 +103,7 @@ A million repetitions of "a"
void SHAPrintContext(SHA1_CTX *context, char *msg){
printf("%s (%d,%d) %x %x %x %x %x\n",
msg,
- context->count[0], context->count[1],
+ context->count[0], context->count[1],
context->state[0],
context->state[1],
context->state[2],
@@ -241,7 +241,7 @@ unsigned char finalcount[8];
SHA1Transform(context->state, context->buffer);
#endif
}
-
+
/*************************************************************/
/* This is not quite the MIME base64 algorithm: it uses _ instead of /,
@@ -291,7 +291,7 @@ int main(int argc, char** argv)
fputs("Unable to open file.", stderr);
return(-1);
}
- }
+ }
SHA1Init(&context);
while (!feof(file)) { /* note: what if ferror(file) */
i = fread(buffer, 1, 16384, file);
diff --git a/com32/libutil/unbase64.c b/com32/libutil/unbase64.c
index a3948aa9..57671a02 100644
--- a/com32/libutil/unbase64.c
+++ b/com32/libutil/unbase64.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -47,13 +47,13 @@ size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
char v;
size_t nbytes = 0;
-
+
memset(base64tbl, -1, sizeof base64tbl);
for ( i = 0 ; _base64chars[i] ; i++ ) {
base64tbl[_base64chars[i]] = i;
}
-
+
/* Also support filesystem safe alternate base64 encoding */
base64tbl['.'] = 62;
base64tbl['-'] = 62;
@@ -70,10 +70,9 @@ size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
nbytes++;
nbits -= 8;
}
- }
+ }
txt++;
}
return nbytes;
}
-