summaryrefslogtreecommitdiff
path: root/distrib/crunch
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-06-09 05:53:56 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-06-09 05:53:56 +0000
commitb13c289929e257cab1b006c9729ba42cb1a36e43 (patch)
treeb7fca2b7163335a580f5c3fbd9ee342a991c70d4 /distrib/crunch
parent05957ef75e5bfab37e160ad7ba105c09c4b972de (diff)
knf
Diffstat (limited to 'distrib/crunch')
-rw-r--r--distrib/crunch/crunchgen/crunched_main.c6
-rw-r--r--distrib/crunch/crunchgen/crunchgen.c56
-rw-r--r--distrib/crunch/crunchide/crunchide.c4
-rw-r--r--distrib/crunch/crunchide/elf_hide.c6
4 files changed, 36 insertions, 36 deletions
diff --git a/distrib/crunch/crunchgen/crunched_main.c b/distrib/crunch/crunchgen/crunched_main.c
index a4aa819b009..f0c83669c50 100644
--- a/distrib/crunch/crunchgen/crunched_main.c
+++ b/distrib/crunch/crunchgen/crunched_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunched_main.c,v 1.3 2001/12/28 00:03:23 angelos Exp $ */
+/* $OpenBSD: crunched_main.c,v 1.4 2002/06/09 05:53:53 todd Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -26,7 +26,7 @@
* University of Maryland at College Park
*/
/*
- * crunched_main.c - main program for crunched binaries, it branches to a
+ * crunched_main.c - main program for crunched binaries, it branches to a
* particular subprogram based on the value of argv[0]. Also included
* is a little program invoked when the crunched binary is called via
* its EXECNAME. This one prints out the list of compiled-in binaries,
@@ -71,7 +71,7 @@ int crunched_main(int argc, char **argv, char **envp)
struct stub *ep;
int columns, len;
- if(argc <= 1)
+ if(argc <= 1)
crunched_usage();
return main(--argc, ++argv, envp);
diff --git a/distrib/crunch/crunchgen/crunchgen.c b/distrib/crunch/crunchgen/crunchgen.c
index 621c976bbf7..817b6c0ca09 100644
--- a/distrib/crunch/crunchgen/crunchgen.c
+++ b/distrib/crunch/crunchgen/crunchgen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchgen.c,v 1.18 2000/11/24 04:18:20 millert Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.19 2002/06/09 05:53:53 todd Exp $ */
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
@@ -29,7 +29,7 @@
* crunchgen.c
*
* Generates a Makefile and main C file for a crunched executable,
- * from specs given in a .conf file.
+ * from specs given in a .conf file.
*/
#include <stdio.h>
#include <stdlib.h>
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
verbose = 1;
readcache = 1;
*outmkname = *outcfname = *execfname = '\0';
-
+
if(argc > 0) pname = argv[0];
while((optc = getopt(argc, argv, "m:c:e:fqD:EL:")) != -1) {
@@ -137,7 +137,7 @@ int main(int argc, char **argv)
case 'q': verbose = 0; break;
case 'm':
- if (strlcpy(outmkname, optarg, sizeof(outmkname)) >=
+ if (strlcpy(outmkname, optarg, sizeof(outmkname)) >=
sizeof(outmkname))
usage();
break;
@@ -171,7 +171,7 @@ int main(int argc, char **argv)
if(argc != 1) usage();
- /*
+ /*
* generate filenames
*/
@@ -199,7 +199,7 @@ int main(int argc, char **argv)
void usage(void)
{
- fprintf(stderr,
+ fprintf(stderr,
"%s [-fq] [-m <makefile>] [-c <c file>] [-e <exec file>] <conffile>\n",
pname);
exit(1);
@@ -215,7 +215,7 @@ void usage(void)
/* helper routines for parse_conf_file */
void parse_one_file(char *filename);
-void parse_line(char *line, int *fc, char **fv, int nf);
+void parse_line(char *line, int *fc, char **fv, int nf);
void add_srcdirs(int argc, char **argv);
void add_progs(int argc, char **argv);
void add_link(int argc, char **argv);
@@ -275,7 +275,7 @@ void parse_one_file(char *filename)
continue;
}
if(fieldc < 2) {
- fprintf(stderr,
+ fprintf(stderr,
"%s:%d: %s command needs at least 1 argument, skipping.\n",
curfilename, linenum, fieldv[0]);
goterror = 1;
@@ -321,7 +321,7 @@ void add_srcdirs(int argc, char **argv)
overflow = 0;
if (argv[i][0] == '/' || topdir[0] == '\0') {
if (strlcpy(tmppath, argv[i], sizeof(tmppath)) >= sizeof(tmppath))
- overflow = 1;
+ overflow = 1;
} else {
if (strlcpy(tmppath, topdir, sizeof(tmppath)) >= sizeof(tmppath)||
strlcat(tmppath, "/", sizeof(tmppath)) >= sizeof(tmppath) ||
@@ -337,7 +337,7 @@ void add_srcdirs(int argc, char **argv)
if(is_dir(tmppath))
add_string(&srcdirs, tmppath);
else {
- fprintf(stderr, "%s:%d: `%s' is not a directory, skipping it.\n",
+ fprintf(stderr, "%s:%d: `%s' is not a directory, skipping it.\n",
curfilename, linenum, tmppath);
goterror = 1;
}
@@ -365,7 +365,7 @@ void add_prog(char *progname)
p2 = calloc(1, sizeof(prog_t));
if(p2) p2->name = strdup(progname);
- if(!p2 || !p2->name)
+ if(!p2 || !p2->name)
out_of_memory();
p2->next = NULL;
@@ -384,7 +384,7 @@ void add_link(int argc, char **argv)
prog_t *p = find_prog(argv[1]);
if(p == NULL) {
- fprintf(stderr,
+ fprintf(stderr,
"%s:%d: no prog %s previously declared, skipping link.\n",
curfilename, linenum, argv[1]);
goterror = 1;
@@ -411,7 +411,7 @@ void add_special(int argc, char **argv)
if(p == NULL) {
if(reading_cache) return;
- fprintf(stderr,
+ fprintf(stderr,
"%s:%d: no prog %s previously declared, skipping special.\n",
curfilename, linenum, argv[1]);
goterror = 1;
@@ -457,7 +457,7 @@ void add_special(int argc, char **argv)
argcount:
- fprintf(stderr,
+ fprintf(stderr,
"%s:%d: too %s arguments, expected \"special %s %s <string>\".\n",
curfilename, linenum, argc < 4? "few" : "many", argv[1], argv[2]);
goterror = 1;
@@ -509,7 +509,7 @@ void gen_outputs(void)
gen_output_cfile();
gen_output_makefile();
status("");
- fprintf(stderr,
+ fprintf(stderr,
"Run \"make -f %s objs exe\" to build crunched binary.\n",
outmkname);
}
@@ -525,7 +525,7 @@ void fillin_program(prog_t *p)
snprintf(line, sizeof(line), "filling in parms for %s", p->name);
status(line);
- if(!p->ident)
+ if(!p->ident)
p->ident = genident(p->name);
if(!p->srcdir) {
srcparent = dir_search(p->name);
@@ -573,11 +573,11 @@ void fillin_program(prog_t *p)
fprintf(stderr, "%s: %s: warning: could not find source directory.\n",
infilename, p->name);
if(!p->objs && verbose)
- fprintf(stderr, "%s: %s: warning: could not find any .o files.\n",
+ fprintf(stderr, "%s: %s: warning: could not find any .o files.\n",
infilename, p->name);
if(!p->objpaths) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: %s: error: no objpaths specified or calculated.\n",
infilename, p->name);
p->goterror = goterror = 1;
@@ -645,8 +645,8 @@ void remove_error_progs(void)
{
prog_t *p1, *p2;
- p1 = NULL; p2 = progs;
- while(p2 != NULL) {
+ p1 = NULL; p2 = progs;
+ while(p2 != NULL) {
if(!p2->goterror)
p1 = p2, p2 = p2->next;
else {
@@ -716,7 +716,7 @@ void gen_output_makefile(void)
top_makefile_rules(outmk);
for(p = progs; p != NULL; p = p->next)
- prog_makefile_rules(outmk, p);
+ prog_makefile_rules(outmk, p);
fprintf(outmk, "\n# ========\n");
fclose(outmk);
@@ -740,7 +740,7 @@ void gen_output_cfile(void)
return;
}
- fprintf(outcf,
+ fprintf(outcf,
"/* %s - generated from %s by crunchgen %s */\n",
outcfname, infilename, CRUNCH_VERSION);
@@ -759,7 +759,7 @@ void gen_output_cfile(void)
fprintf(outcf, "\t{ \"%s\", _crunched_%s_stub },\n",
s->str, p->ident);
}
-
+
fprintf(outcf, "\t{ EXECNAME, crunched_main },\n");
fprintf(outcf, "\t{ NULL, NULL }\n};\n");
fclose(outcf);
@@ -819,7 +819,7 @@ void top_makefile_rules(FILE *outmk)
fprintf(outmk, " %s_make", p->ident);
fprintf(outmk, "\n\n");
- fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
+ fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
execfname, execfname);
fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
execfname, execfname);
@@ -840,11 +840,11 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "%s_OBJS=", p->ident);
output_strlst(outmk, p->objs);
fprintf(outmk, "%s_make:\n", p->ident);
- fprintf(outmk, "\t(cd $(%s_SRCDIR); make -f %s $(%s_OBJS))\n\n",
+ fprintf(outmk, "\t(cd $(%s_SRCDIR); make -f %s $(%s_OBJS))\n\n",
p->ident, p->mf_name, p->ident);
}
else
- fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
+ fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
p->ident, p->name);
fprintf(outmk, "%s_OBJPATHS=", p->ident);
@@ -857,9 +857,9 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
p->ident, p->name);
fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)\n",
p->name, p->name, p->ident);
- fprintf(outmk, "\t${LD} -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)\n",
+ fprintf(outmk, "\t${LD} -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)\n",
p->name, p->name, p->ident);
- fprintf(outmk, "\tcrunchide -k %s_crunched_%s_stub %s.lo\n",
+ fprintf(outmk, "\tcrunchide -k %s_crunched_%s_stub %s.lo\n",
elf_names ? "" : "_", p->ident, p->name);
}
diff --git a/distrib/crunch/crunchide/crunchide.c b/distrib/crunch/crunchide/crunchide.c
index 7698560f155..e46713251bb 100644
--- a/distrib/crunch/crunchide/crunchide.c
+++ b/distrib/crunch/crunchide/crunchide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchide.c,v 1.14 2001/09/18 21:23:41 jason Exp $ */
+/* $OpenBSD: crunchide.c,v 1.15 2002/06/09 05:53:53 todd Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -57,7 +57,7 @@
* - arrange that all the BSS segments start at the same address, so
* that the final crunched binary BSS size is the max of all the
* component programs' BSS sizes, rather than their sum.
- */
+ */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/distrib/crunch/crunchide/elf_hide.c b/distrib/crunch/crunchide/elf_hide.c
index ebb96d2c8a3..29dd9e4eeb6 100644
--- a/distrib/crunch/crunchide/elf_hide.c
+++ b/distrib/crunch/crunchide/elf_hide.c
@@ -1,9 +1,9 @@
-/* $OpenBSD: elf_hide.c,v 1.6 2001/01/23 21:00:20 art Exp $ */
+/* $OpenBSD: elf_hide.c,v 1.7 2002/06/09 05:53:53 todd Exp $ */
/*
* Copyright (c) 1997 Dale Rahn. All rights reserved.
*
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -28,7 +28,7 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ */
#include <sys/types.h>
#include <sys/mman.h>