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:
perry 1997-08-02 21:30:05 +00:00
parent 7de054cd87
commit 88a54d8a99
21 changed files with 74 additions and 24 deletions

View File

@ -1,3 +1,4 @@
/* $NetBSD: COPYRIGHT,v 1.2 1997/08/02 21:30:05 perry Exp $ */
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.

View File

@ -1,3 +1,4 @@
# $NetBSD: Makefile,v 1.2 1997/08/02 21:30:06 perry Exp $
SUBDIR=crunchgen crunchide

View File

@ -1,2 +1,4 @@
# modify to taste
# $NetBSD: Makefile.inc,v 1.3 1997/08/02 21:30:07 perry Exp $
BINDIR?= /usr/bin
WARNS?= 1

View File

@ -1,3 +1,4 @@
$NetBSD: README,v 1.2 1997/08/02 21:30:08 perry Exp $
CRUNCH 0.3 README 7/23/94
@ -87,3 +88,4 @@ Jaime
............................................................................
: 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

View File

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.3 1997/08/02 21:30:09 perry Exp $
PROG=crunchgen
SRCS=crunchgen.c crunched_skel.c
CFLAGS+=-g -Wall
#CFLAGS+=-g
CLEANFILES+= crunched_skel.c
crunched_skel.c: crunched_main.c

View File

@ -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
* All Rights Reserved.
@ -31,6 +32,11 @@
* or calls one of them based on argv[1]. This allows the testing of
* 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 <string.h>

View File

@ -1,3 +1,4 @@
.\" $NetBSD: crunchgen.1,v 1.4 1997/08/02 21:30:11 perry Exp $
.\"
.\" Copyright (c) 1994 University of Maryland
.\" All Rights Reserved.

View File

@ -1,3 +1,4 @@
/* $NetBSD: crunchgen.c,v 1.7 1997/08/02 21:30:12 perry Exp $ */
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
@ -30,6 +31,11 @@
* Generates a Makefile and main C file for a crunched executable,
* 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 <unistd.h>
#include <stdio.h>
@ -156,10 +162,6 @@ int main(int argc, char **argv)
sprintf(cachename, "%s.cache", confname);
sprintf(tempfname, ".tmp_%sXXXXXX", confname);
if(mktemp(tempfname) == NULL) {
perror(tempfname);
exit(1);
}
parse_conf_file();
gen_outputs();
@ -541,11 +543,17 @@ void fillin_program_objs(prog_t *p, char *path)
{
char *obj, *cp;
int rc;
int fd;
FILE *f;
/* 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);
goterror = 1;
return;

View File

@ -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
cat <<!EOF

View File

@ -1,3 +1,4 @@
# $NetBSD: Makefile,v 1.4 1997/08/02 21:30:14 perry Exp $
PROG= crunchide
SRCS= crunchide.c exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c

View File

@ -1,3 +1,4 @@
.\" $NetBSD: crunchide.1,v 1.5 1997/08/02 21:30:15 perry Exp $
.\"
.\" Copyright (c) 1994 University of Maryland
.\" All Rights Reserved.

View File

@ -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) 1994 University of Maryland
@ -57,6 +58,11 @@
* that the final crunched binary BSS size is the max of all the
* 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 <stdio.h>
#include <stdlib.h>
@ -80,6 +86,8 @@ int hide_syms(const char *filename);
int verbose;
int main __P((int, char *[]));
int main(argc, argv)
int argc;
char **argv;
@ -161,6 +169,8 @@ int in_keep_list(const char *symbol)
struct keep *curp;
int cmp;
cmp = 0;
for(curp = keep_list; curp; curp = curp->next)
if((cmp = strcmp(symbol, curp->sym)) <= 0) break;

View File

@ -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) 1994 University of Maryland
@ -24,6 +25,10 @@
* Computer Science Department
* 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 <stdio.h>

View File

@ -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.
@ -30,9 +30,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
static char *rcsid = "$NetBSD: exec_ecoff.c,v 1.1 1997/01/22 23:57:19 cgd Exp $";
#endif /* not lint */
__RCSID("$NetBSD: exec_ecoff.c,v 1.2 1997/08/02 21:30:18 perry Exp $");
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -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.
@ -30,9 +30,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
static char *e32rcsid = "$NetBSD: exec_elf32.c,v 1.2 1997/01/23 05:43:29 cgd Exp $";
#endif /* not lint */
__RCSID("$NetBSD: exec_elf32.c,v 1.3 1997/08/02 21:30:19 perry Exp $");
#endif
#ifndef ELFSIZE
#define ELFSIZE 32

View File

@ -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.
@ -30,9 +30,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
static char *e64rcsid = "$NetBSD: exec_elf64.c,v 1.1 1997/01/22 23:57:21 cgd Exp $";
#endif /* not lint */
__IDSTRING(elf64rcsid, "$NetBSD: exec_elf64.c,v 1.2 1997/08/02 21:30:19 perry Exp $");
#endif
#define ELFSIZE 64

View File

@ -1,3 +1,4 @@
# $NetBSD: Makefile,v 1.2 1997/08/02 21:30:21 perry Exp $
CRUNCHED= fixit

View File

@ -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
# first, we list the source dirs that our programs reside in. These are

View File

@ -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

View File

@ -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

View File

@ -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.
# 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