1) RCSid police
2) Add __RCSIDs where apropriate. 3) WARNS=1, and clean up sources for WARNS=1 (including replacement of a mktemp with a mkstemp even though it was probably safe...) 4) Some other small cosmetic changes
This commit is contained in:
parent
7de054cd87
commit
88a54d8a99
|
@ -1,3 +1,4 @@
|
||||||
|
/* $NetBSD: COPYRIGHT,v 1.2 1997/08/02 21:30:05 perry Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# $NetBSD: Makefile,v 1.2 1997/08/02 21:30:06 perry Exp $
|
||||||
|
|
||||||
SUBDIR=crunchgen crunchide
|
SUBDIR=crunchgen crunchide
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# modify to taste
|
# $NetBSD: Makefile.inc,v 1.3 1997/08/02 21:30:07 perry Exp $
|
||||||
|
|
||||||
BINDIR?= /usr/bin
|
BINDIR?= /usr/bin
|
||||||
|
WARNS?= 1
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
$NetBSD: README,v 1.2 1997/08/02 21:30:08 perry Exp $
|
||||||
|
|
||||||
CRUNCH 0.3 README 7/23/94
|
CRUNCH 0.3 README 7/23/94
|
||||||
|
|
||||||
|
@ -87,3 +88,4 @@ Jaime
|
||||||
............................................................................
|
............................................................................
|
||||||
: Stand on my shoulders, : jds@cs.umd.edu : James da Silva
|
: Stand on my shoulders, : jds@cs.umd.edu : James da Silva
|
||||||
: not on my toes. : uunet!mimsy!jds : http://www.cs.umd.edu/users/jds
|
: not on my toes. : uunet!mimsy!jds : http://www.cs.umd.edu/users/jds
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
# $NetBSD: Makefile,v 1.3 1997/08/02 21:30:09 perry Exp $
|
||||||
|
|
||||||
PROG=crunchgen
|
PROG=crunchgen
|
||||||
SRCS=crunchgen.c crunched_skel.c
|
SRCS=crunchgen.c crunched_skel.c
|
||||||
CFLAGS+=-g -Wall
|
#CFLAGS+=-g
|
||||||
CLEANFILES+= crunched_skel.c
|
CLEANFILES+= crunched_skel.c
|
||||||
|
|
||||||
crunched_skel.c: crunched_main.c
|
crunched_skel.c: crunched_main.c
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* $NetBSD: crunched_main.c,v 1.2 1997/08/02 21:30:10 perry Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
|
@ -31,6 +32,11 @@
|
||||||
* or calls one of them based on argv[1]. This allows the testing of
|
* or calls one of them based on argv[1]. This allows the testing of
|
||||||
* the crunched binary without creating all the links.
|
* the crunched binary without creating all the links.
|
||||||
*/
|
*/
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: crunched_main.c,v 1.2 1997/08/02 21:30:10 perry Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
.\" $NetBSD: crunchgen.1,v 1.4 1997/08/02 21:30:11 perry Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1994 University of Maryland
|
.\" Copyright (c) 1994 University of Maryland
|
||||||
.\" All Rights Reserved.
|
.\" All Rights Reserved.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* $NetBSD: crunchgen.c,v 1.7 1997/08/02 21:30:12 perry Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
|
@ -30,6 +31,11 @@
|
||||||
* Generates a Makefile and main C file for a crunched executable,
|
* 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 <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: crunchgen.c,v 1.7 1997/08/02 21:30:12 perry Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -156,10 +162,6 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
sprintf(cachename, "%s.cache", confname);
|
sprintf(cachename, "%s.cache", confname);
|
||||||
sprintf(tempfname, ".tmp_%sXXXXXX", confname);
|
sprintf(tempfname, ".tmp_%sXXXXXX", confname);
|
||||||
if(mktemp(tempfname) == NULL) {
|
|
||||||
perror(tempfname);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_conf_file();
|
parse_conf_file();
|
||||||
gen_outputs();
|
gen_outputs();
|
||||||
|
@ -541,11 +543,17 @@ void fillin_program_objs(prog_t *p, char *path)
|
||||||
{
|
{
|
||||||
char *obj, *cp;
|
char *obj, *cp;
|
||||||
int rc;
|
int rc;
|
||||||
|
int fd;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
/* discover the objs from the srcdir Makefile */
|
/* discover the objs from the srcdir Makefile */
|
||||||
|
|
||||||
if((f = fopen(tempfname, "w")) == NULL) {
|
if((fd = mkstemp(tempfname)) < 0) {
|
||||||
|
perror(tempfname);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((f = fdopen(fd, "w")) == NULL) {
|
||||||
perror(tempfname);
|
perror(tempfname);
|
||||||
goterror = 1;
|
goterror = 1;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#! /bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# $NetBSD: mkskel.sh,v 1.2 1997/08/02 21:30:13 perry Exp $
|
||||||
|
|
||||||
# idea and sed lines taken straight from flex
|
# idea and sed lines taken straight from flex
|
||||||
|
|
||||||
cat <<!EOF
|
cat <<!EOF
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# $NetBSD: Makefile,v 1.4 1997/08/02 21:30:14 perry Exp $
|
||||||
|
|
||||||
PROG= crunchide
|
PROG= crunchide
|
||||||
SRCS= crunchide.c exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c
|
SRCS= crunchide.c exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
.\" $NetBSD: crunchide.1,v 1.5 1997/08/02 21:30:15 perry Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1994 University of Maryland
|
.\" Copyright (c) 1994 University of Maryland
|
||||||
.\" All Rights Reserved.
|
.\" All Rights Reserved.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* $NetBSD: crunchide.c,v 1.6 1997/08/02 21:30:16 perry Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
|
@ -56,7 +57,12 @@
|
||||||
* - arrange that all the BSS segments start at the same address, so
|
* - 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
|
* that the final crunched binary BSS size is the max of all the
|
||||||
* component programs' BSS sizes, rather than their sum.
|
* component programs' BSS sizes, rather than their sum.
|
||||||
*/
|
*/
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: crunchide.c,v 1.6 1997/08/02 21:30:16 perry Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -80,6 +86,8 @@ int hide_syms(const char *filename);
|
||||||
|
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
|
int main __P((int, char *[]));
|
||||||
|
|
||||||
int main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
@ -161,6 +169,8 @@ int in_keep_list(const char *symbol)
|
||||||
struct keep *curp;
|
struct keep *curp;
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
|
cmp = 0;
|
||||||
|
|
||||||
for(curp = keep_list; curp; curp = curp->next)
|
for(curp = keep_list; curp; curp = curp->next)
|
||||||
if((cmp = strcmp(symbol, curp->sym)) <= 0) break;
|
if((cmp = strcmp(symbol, curp->sym)) <= 0) break;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* $NetBSD: exec_aout.c,v 1.6 1997/08/02 21:30:17 perry Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
|
@ -24,7 +25,11 @@
|
||||||
* Computer Science Department
|
* Computer Science Department
|
||||||
* University of Maryland at College Park
|
* University of Maryland at College Park
|
||||||
*/
|
*/
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: exec_aout.c,v 1.6 1997/08/02 21:30:17 perry Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: exec_ecoff.c,v 1.1 1997/01/22 23:57:19 cgd Exp $ */
|
/* $NetBSD: exec_ecoff.c,v 1.2 1997/08/02 21:30:18 perry Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||||
|
@ -30,10 +30,11 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char *rcsid = "$NetBSD: exec_ecoff.c,v 1.1 1997/01/22 23:57:19 cgd Exp $";
|
__RCSID("$NetBSD: exec_ecoff.c,v 1.2 1997/08/02 21:30:18 perry Exp $");
|
||||||
#endif /* not lint */
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: exec_elf32.c,v 1.2 1997/01/23 05:43:29 cgd Exp $ */
|
/* $NetBSD: exec_elf32.c,v 1.3 1997/08/02 21:30:19 perry Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||||
|
@ -30,10 +30,11 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char *e32rcsid = "$NetBSD: exec_elf32.c,v 1.2 1997/01/23 05:43:29 cgd Exp $";
|
__RCSID("$NetBSD: exec_elf32.c,v 1.3 1997/08/02 21:30:19 perry Exp $");
|
||||||
#endif /* not lint */
|
#endif
|
||||||
|
|
||||||
#ifndef ELFSIZE
|
#ifndef ELFSIZE
|
||||||
#define ELFSIZE 32
|
#define ELFSIZE 32
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: exec_elf64.c,v 1.1 1997/01/22 23:57:21 cgd Exp $ */
|
/* $NetBSD: exec_elf64.c,v 1.2 1997/08/02 21:30:19 perry Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||||
|
@ -30,10 +30,11 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char *e64rcsid = "$NetBSD: exec_elf64.c,v 1.1 1997/01/22 23:57:21 cgd Exp $";
|
__IDSTRING(elf64rcsid, "$NetBSD: exec_elf64.c,v 1.2 1997/08/02 21:30:19 perry Exp $");
|
||||||
#endif /* not lint */
|
#endif
|
||||||
|
|
||||||
#define ELFSIZE 64
|
#define ELFSIZE 64
|
||||||
|
|
||||||
#include "exec_elf32.c"
|
#include "exec_elf32.c"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# $NetBSD: Makefile,v 1.2 1997/08/02 21:30:21 perry Exp $
|
||||||
|
|
||||||
CRUNCHED= fixit
|
CRUNCHED= fixit
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# $NetBSD: fixit.conf,v 1.2 1997/08/02 21:30:22 perry Exp $
|
||||||
|
#
|
||||||
# fixit.conf - put in anything we think we might want on a fixit floppy
|
# fixit.conf - put in anything we think we might want on a fixit floppy
|
||||||
|
|
||||||
# first, we list the source dirs that our programs reside in. These are
|
# first, we list the source dirs that our programs reside in. These are
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: freebsd-filesystem.conf,v 1.1.1.1 1994/08/29 14:47:30 cgd Exp $
|
# $NetBSD: freebsd-filesystem.conf,v 1.2 1997/08/02 21:30:23 perry Exp $
|
||||||
|
|
||||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/gnu/usr.bin /usr/src/usr.sbin
|
srcdirs /usr/src/bin /usr/src/sbin /usr/src/gnu/usr.bin /usr/src/usr.sbin
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: freebsd-kcopy.conf,v 1.1.1.1 1994/08/29 14:47:30 cgd Exp $
|
# $NetBSD: freebsd-kcopy.conf,v 1.2 1997/08/02 21:30:24 perry Exp $
|
||||||
|
|
||||||
srcdirs /usr/src/bin /usr/src/sbin
|
srcdirs /usr/src/bin /usr/src/sbin
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# $NetBSD: really-big.conf,v 1.2 1997/08/02 21:30:25 perry Exp $
|
||||||
|
#
|
||||||
# really-big.conf - just about everything, just for testing.
|
# really-big.conf - just about everything, just for testing.
|
||||||
# This ends up having some good examples of the use of specials for
|
# This ends up having some good examples of the use of specials for
|
||||||
# those hard-to-reach programs. I stopped when I got tired, but we
|
# those hard-to-reach programs. I stopped when I got tired, but we
|
||||||
|
|
Loading…
Reference in New Issue