pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/rcorder Initial import of rcorder from NetBSD...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a81e25b92a56
branches: trunk
changeset: 479947:a81e25b92a56
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Fri Aug 27 01:49:15 2004 +0000
description:
Initial import of rcorder from NetBSD-current, using libnbcompat.
rcorder is designed to print out a dependency ordering of a set of
interdependent files. Typically it is used to find an execution
sequence for a set of shell scripts in which certain files must be
executed before others.
diffstat:
pkgtools/rcorder/DESCR | 4 +
pkgtools/rcorder/Makefile | 22 +
pkgtools/rcorder/PLIST | 4 +
pkgtools/rcorder/files/Makefile | 11 +
pkgtools/rcorder/files/ealloc.c | 161 +++++++
pkgtools/rcorder/files/ealloc.h | 6 +
pkgtools/rcorder/files/hash.c | 479 ++++++++++++++++++++++
pkgtools/rcorder/files/hash.h | 161 +++++++
pkgtools/rcorder/files/rcorder.8 | 168 +++++++
pkgtools/rcorder/files/rcorder.c | 779 ++++++++++++++++++++++++++++++++++++
pkgtools/rcorder/files/rcorder.cat8 | 86 +++
11 files changed, 1881 insertions(+), 0 deletions(-)
diffs (truncated from 1925 to 300 lines):
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/DESCR Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,4 @@
+rcorder is designed to print out a dependency ordering of a set of
+interdependent files. Typically it is used to find an execution
+sequence for a set of shell scripts in which certain files must be
+executed before others.
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/Makefile Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/08/27 01:49:15 schmonz Exp $
+#
+
+DISTNAME= rcorder-20040826
+CATEGORIES= pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+HOMEPAGE= http://www.NetBSD.org/
+COMMENT= Print a dependency ordering of interdependent files
+
+USE_BUILDLINK3= # defined
+
+NO_CHECKSUM= # defined
+MANCOMPRESSED_IF_MANZ= yes
+
+do-extract:
+ @${CP} -Rp ${FILESDIR} ${WRKSRC}
+
+.include "../../pkgtools/libnbcompat/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/PLIST Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/08/27 01:49:15 schmonz Exp $
+sbin/rcorder
+man/cat8/rcorder.0
+man/man8/rcorder.8
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/files/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/files/Makefile Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $
+
+PROG= rcorder
+LDADD= -lnbcompat
+SRCS= ealloc.c hash.c rcorder.c
+MAN= rcorder.8
+
+BINDIR= ${PREFIX}/sbin
+MANDIR= ${PREFIX}/man
+
+.include <bsd.prog.mk>
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/files/ealloc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/files/ealloc.c Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,161 @@
+/* $NetBSD: ealloc.c,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $ */
+
+/*
+ * Copyright (c) 1988, 1989, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam de Boor.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY 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.
+ */
+
+/*
+ * Copyright (c) 1989 by Berkeley Softworks
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam de Boor.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY 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 <nbcompat.h>
+
+#if HAVE_SYS_CDEFS_H
+#include <sys/cdefs.h>
+#endif
+#ifndef lint
+__RCSID("$NetBSD: ealloc.c,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $");
+#endif /* not lint */
+
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_ERR_H
+#include <err.h>
+#endif
+
+#include "ealloc.h"
+
+static void enomem(void);
+
+/*
+ * enomem --
+ * die when out of memory.
+ */
+static void
+enomem(void)
+{
+
+ errx(2, "Cannot allocate memory.");
+}
+
+/*
+ * emalloc --
+ * malloc, but die on error.
+ */
+void *
+emalloc(size_t len)
+{
+ void *p;
+
+ if ((p = malloc(len)) == NULL)
+ enomem();
+ return(p);
+}
+
+/*
+ * estrdup --
+ * strdup, but die on error.
+ */
+char *
+estrdup(const char *str)
+{
+ char *p;
+
+ if ((p = strdup(str)) == NULL)
+ enomem();
+ return(p);
+}
+
+/*
+ * erealloc --
+ * realloc, but die on error.
+ */
+void *
+erealloc(void *ptr, size_t size)
+{
+
+ if ((ptr = realloc(ptr, size)) == NULL)
+ enomem();
+ return(ptr);
+}
+
+/*
+ * ecalloc --
+ * calloc, but die on error.
+ */
+void *
+ecalloc(size_t nmemb, size_t size)
+{
+ void *ptr;
+
+ if ((ptr = calloc(nmemb, size)) == NULL)
+ enomem();
+ return(ptr);
+}
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/files/ealloc.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/files/ealloc.h Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,6 @@
+/* $NetBSD: ealloc.h,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $ */
+
+void *emalloc(size_t);
+char *estrdup(const char *);
+void *erealloc(void *, size_t);
+void *ecalloc(size_t, size_t);
diff -r 251857527d3d -r a81e25b92a56 pkgtools/rcorder/files/hash.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/rcorder/files/hash.c Fri Aug 27 01:49:15 2004 +0000
@@ -0,0 +1,479 @@
+/* $NetBSD: hash.c,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $ */
+
+/*
+ * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam de Boor.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY 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.
+ */
+
+/*
+ * Copyright (c) 1988, 1989 by Adam de Boor
+ * Copyright (c) 1989 by Berkeley Softworks
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam de Boor.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Home |
Main Index |
Thread Index |
Old Index