Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 13:31:16 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r240394 - in user/des: bsddom bsddom/idl bsddom/idl/REC-DOM-Level-2-Core-20001113 bsddom/m4 election election/db evilhttpd fetch fetch/include fetch/include/Fetch fetch/lib fmerge grok ...
Message-ID:  <201209121331.q8CDVGIV076835@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Wed Sep 12 13:31:16 2012
New Revision: 240394
URL: http://svn.freebsd.org/changeset/base/240394

Log:
  Move the src tinderbox code from projcvs.

Added:
  user/des/bsddom/
  user/des/bsddom/Makefile.am   (contents, props changed)
  user/des/bsddom/autogen.sh   (contents, props changed)
  user/des/bsddom/configure.ac   (contents, props changed)
  user/des/bsddom/idl/
  user/des/bsddom/idl/REC-DOM-Level-2-Core-20001113/
  user/des/bsddom/m4/
  user/des/election/
  user/des/election/db/
  user/des/evilhttpd/
  user/des/fetch/Makefile.am   (contents, props changed)
  user/des/fetch/autogen.sh   (contents, props changed)
  user/des/fetch/configure.ac   (contents, props changed)
  user/des/fetch/include/Fetch/
  user/des/fetch/include/Fetch.hh   (contents, props changed)
  user/des/fetch/include/Fetch/Client.hh   (contents, props changed)
  user/des/fetch/include/Fetch/Document.hh   (contents, props changed)
  user/des/fetch/include/Fetch/URL.hh   (contents, props changed)
  user/des/fetch/include/Fetch/UserAgent.hh   (contents, props changed)
  user/des/fetch/include/Makefile.am   (contents, props changed)
  user/des/fetch/lib/Makefile.am   (contents, props changed)
  user/des/fetch/lib/URL.cc   (contents, props changed)
  user/des/grok/
  user/des/refetch/Makefile.am   (contents, props changed)
  user/des/refetch/autogen.sh   (contents, props changed)
  user/des/refetch/configure.ac   (contents, props changed)
  user/des/refetch/include/
  user/des/refetch/include/Fetch/
  user/des/refetch/include/Fetch/Client.hh   (contents, props changed)
  user/des/refetch/include/Fetch/Document.hh   (contents, props changed)
  user/des/refetch/include/Fetch/URL.hh   (contents, props changed)
  user/des/refetch/include/Fetch/UserAgent.hh   (contents, props changed)
  user/des/refetch/include/refetch/
  user/des/refetch/lib/refetch/pURL.cc   (contents, props changed)
  user/des/refetch/lib/refetch/pURL.hh   (contents, props changed)
  user/des/struct/
  user/des/struct/struct.cfg
  user/des/struct/struct.pl   (contents, props changed)
  user/des/tinderbox/Makefile   (contents, props changed)
  user/des/tinderbox/etc/
  user/des/tinderbox/etc/Makefile   (contents, props changed)
  user/des/tinderbox/etc/default.rc
  user/des/tinderbox/etc/head.rc
  user/des/tinderbox/etc/releng_4.rc
  user/des/tinderbox/etc/releng_5.rc
  user/des/tinderbox/etc/releng_6.rc
  user/des/tinderbox/etc/releng_7.rc
  user/des/tinderbox/etc/releng_8.rc
  user/des/tinderbox/etc/releng_9.rc
  user/des/tinderbox/etc/update_head.rc
  user/des/tinderbox/etc/update_releng_4.rc
  user/des/tinderbox/etc/update_releng_5.rc
  user/des/tinderbox/etc/update_releng_6.rc
  user/des/tinderbox/etc/update_releng_7.rc
  user/des/tinderbox/etc/update_releng_8.rc
  user/des/tinderbox/etc/update_releng_9.rc
  user/des/tinderbox/tbmaster.1   (contents, props changed)
  user/des/tinderbox/tbmaster.pl   (contents, props changed)
  user/des/tinderbox/tinderbox.1   (contents, props changed)
  user/des/tinderbox/tinderbox.pl   (contents, props changed)
  user/des/tinderbox/www/
  user/des/tinderbox/www/Makefile   (contents, props changed)
  user/des/tinderbox/www/favicon.ico   (contents, props changed)
  user/des/tinderbox/www/index.cgi
  user/des/tinderbox/www/tb.css
  user/des/tinderbox/www/valid-css.png   (contents, props changed)
  user/des/tinderbox/www/valid-xhtml10.png   (contents, props changed)
Directory Properties:
  user/des/fetch/   (props changed)
  user/des/fetch/bin/   (props changed)
  user/des/fetch/include/   (props changed)
  user/des/fetch/lib/   (props changed)
  user/des/refetch/   (props changed)
  user/des/refetch/bin/   (props changed)
  user/des/refetch/lib/   (props changed)
  user/des/refetch/lib/fetch/   (props changed)
  user/des/refetch/lib/refetch/   (props changed)
  user/des/tinderbox/   (props changed)
Modified:
  user/des/fmerge/Makefile
  user/des/sizes/sizes.c

Added: user/des/bsddom/Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/bsddom/Makefile.am	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,5 @@
+# $Id$
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = include lib

Added: user/des/bsddom/autogen.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/bsddom/autogen.sh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+aclocal -I m4
+libtoolize --copy --force
+autoheader
+automake --add-missing --copy --foreign
+autoconf

Added: user/des/bsddom/configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/bsddom/configure.ac	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,26 @@
+dnl $Id$
+
+AC_PREREQ([2.62])
+AC_REVISION([$Id$])
+AC_INIT([refetch], [trunk], [des@des.no])
+AC_CONFIG_SRCDIR([include/refetch.hh])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+AM_CONFIG_HEADER([config.h])
+
+AC_LANG(C)
+AC_LANG(C++)
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+
+AC_CONFIG_FILES([
+    Makefile
+    include/Makefile
+    lib/Makefile
+    lib/fetch/Makefile
+    lib/refetch/Makefile
+])
+AC_OUTPUT

Added: user/des/fetch/Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/Makefile.am	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,5 @@
+# $Id$
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = include lib

Added: user/des/fetch/autogen.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/autogen.sh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+aclocal -I m4
+libtoolize --copy --force
+autoheader
+automake --add-missing --copy --foreign
+autoconf

Added: user/des/fetch/configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/configure.ac	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,22 @@
+dnl $Id$
+
+AC_PREREQ([2.62])
+AC_REVISION([$Id$])
+AC_INIT([Fetch], [trunk], [des@des.no])
+AC_CONFIG_SRCDIR([include/Fetch.hh])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+AM_CONFIG_HEADER([config.h])
+
+AC_LANG(C++)
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+
+AC_CONFIG_FILES([
+    Makefile
+    include/Makefile
+    lib/Makefile
+])
+AC_OUTPUT

Added: user/des/fetch/include/Fetch.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Fetch.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef FETCH_HH_INCLUDED
+#define FETCH_HH_INCLUDED
+
+#include <Fetch/UserAgent.hh>
+#include <Fetch/URL.hh>
+#include <Fetch/Client.hh>
+
+#endif

Added: user/des/fetch/include/Fetch/Client.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Fetch/Client.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef CLIENT_HH_INCLUDED
+#define CLIENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class Document;
+	class URL;
+
+	class Client {
+	public:
+		virtual ~Client() = 0;
+
+		virtual Document *getDocument(URL *);
+	};
+
+}
+
+#endif

Added: user/des/fetch/include/Fetch/Document.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Fetch/Document.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef DOCUMENT_HH_INCLUDED
+#define DOCUMENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class Document {
+	public:
+		virtual ~Document() = 0;
+	};
+}
+
+#endif

Added: user/des/fetch/include/Fetch/URL.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Fetch/URL.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef URL_HH_INCLUDED
+#define URL_HH_INCLUDED
+
+namespace Fetch {
+
+	class URL {
+	public:
+		virtual ~URL() = 0;
+
+		virtual bool isValid();
+		virtual const char *toString();
+		virtual const char *getMethod();
+		virtual const char *getUser();
+		virtual const char *getPassword();
+		virtual const char *getHost();
+		virtual unsigned int getPort();
+		virtual const char *getPath();
+		virtual const char *getQuery();
+	};
+
+}
+
+#endif

Added: user/des/fetch/include/Fetch/UserAgent.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Fetch/UserAgent.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef USERAGENT_HH_INCLUDED
+#define USERAGENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class URL;
+
+	class UserAgent {
+	public:
+		virtual ~UserAgent() = 0;
+
+		virtual URL *parseURL(const char *);
+	};
+
+	extern "C" newUserAgent();
+
+}
+
+#endif

Added: user/des/fetch/include/Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/include/Makefile.am	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,8 @@
+# $Id$
+
+include_HEADERS = \
+	Fetch.hh \
+	Fetch/Client.hh \
+	Fetch/Document.hh \
+	Fetch/URL.hh \
+	Fetch/UserAgent.hh

Added: user/des/fetch/lib/Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/lib/Makefile.am	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,7 @@
+# $Id$
+
+INCLUDES = $(top_srcdir)/include
+
+lib_LTLIBRARIES = libFetch.la
+
+libFetch_la_SOURCES =

Added: user/des/fetch/lib/URL.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/fetch/lib/URL.cc	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,100 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fetchxx.hh"
+
+using namespace fetchxx;
+
+class pURL {
+	friend class URL;
+private:
+	pURL();
+	pURL(const pURL &);
+	~pURL();
+
+	bool valid;
+	std::string method;
+	std::string user;
+	std::string password;
+	std::string host;
+	unsigned int port;
+	std::string path;
+	std::string query;
+};
+
+pURL::pURL():
+	valid(0),
+	port(0)
+{
+}
+
+pURL::pURL(const pURL &other):
+	valid(other.valid),
+	method(other.method),
+	user(other.user),
+	password(other.password),
+	host(other.host),
+	port(other.port),
+	path(other.path),
+	query(other.query)
+{
+}
+
+/*
+ *
+ */
+URL::URL():
+	p(new pURL())
+{
+}
+
+URL::URL(const std::string &str):
+	p(new pURL())
+{
+	parse(str);
+}
+
+URL::URL(const URL &url):
+	p(new pURL(url.p));
+{
+}
+
+URL::~URL()
+{
+	delete p;
+}
+
+bool
+URL::parse(const std::string &str)
+{
+}

Modified: user/des/fmerge/Makefile
==============================================================================
--- user/des/fmerge/Makefile	Wed Sep 12 13:06:57 2012	(r240393)
+++ user/des/fmerge/Makefile	Wed Sep 12 13:31:16 2012	(r240394)
@@ -2,5 +2,4 @@
 
 SCRIPTS = fmerge.pl
 
-.include "${.CURDIR}/../Makefile.inc"
 .include <bsd.prog.mk>

Added: user/des/refetch/Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/Makefile.am	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,5 @@
+# $Id$
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = include lib

Added: user/des/refetch/autogen.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/autogen.sh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+aclocal -I m4
+libtoolize --copy --force
+autoheader
+automake --add-missing --copy --foreign
+autoconf

Added: user/des/refetch/configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/configure.ac	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,26 @@
+dnl $Id$
+
+AC_PREREQ([2.62])
+AC_REVISION([$Id$])
+AC_INIT([refetch], [trunk], [des@des.no])
+AC_CONFIG_SRCDIR([include/refetch.hh])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+AM_CONFIG_HEADER([config.h])
+
+AC_LANG(C)
+AC_LANG(C++)
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+
+AC_CONFIG_FILES([
+    Makefile
+    include/Makefile
+    lib/Makefile
+    lib/fetch/Makefile
+    lib/refetch/Makefile
+])
+AC_OUTPUT

Added: user/des/refetch/include/Fetch/Client.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/include/Fetch/Client.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef CLIENT_HH_INCLUDED
+#define CLIENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class Document;
+	class URL;
+
+	class Client {
+	public:
+		virtual ~Client() = 0;
+
+		virtual Document *getDocument(URL *);
+	};
+
+}
+
+#endif

Added: user/des/refetch/include/Fetch/Document.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/include/Fetch/Document.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef DOCUMENT_HH_INCLUDED
+#define DOCUMENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class Document {
+	public:
+		virtual ~Document() = 0;
+	};
+}
+
+#endif

Added: user/des/refetch/include/Fetch/URL.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/include/Fetch/URL.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef FETCH_URL_HH_INCLUDED
+#define FETCH_URL_HH_INCLUDED
+
+namespace Fetch {
+
+	class URL {
+	public:
+		virtual ~URL() = 0;
+
+		virtual bool isValid() = 0;
+		virtual const char *toString() = 0;
+		virtual const char *getMethod() = 0;
+		virtual const char *getUser() = 0;
+		virtual const char *getPassword() = 0;
+		virtual const char *getHost() = 0;
+		virtual unsigned int getPort() = 0;
+		virtual const char *getPath() = 0;
+		virtual const char *getQuery() = 0;
+	};
+
+}
+
+#endif

Added: user/des/refetch/include/Fetch/UserAgent.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/include/Fetch/UserAgent.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef USERAGENT_HH_INCLUDED
+#define USERAGENT_HH_INCLUDED
+
+namespace Fetch {
+
+	class URL;
+
+	class UserAgent {
+	public:
+		virtual ~UserAgent() = 0;
+
+		virtual URL *parseURL(const char *);
+	};
+
+	extern "C" newUserAgent();
+
+}
+
+#endif

Added: user/des/refetch/lib/refetch/pURL.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/lib/refetch/pURL.cc	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,33 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#include "pURL.hh"
+
+using namespace Fetch;
+

Added: user/des/refetch/lib/refetch/pURL.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/refetch/lib/refetch/pURL.hh	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * 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
+ *    in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+
+#ifndef PURL_HH_INCLUDED
+#define PURL_HH_INCLUDED
+
+#include <Fetch/URL.hh>
+
+namespace Fetch {
+	class pURL: public URL {
+	public:
+		virtual ~pURL();
+
+		virtual bool isValid();
+		virtual const char *toString();
+		virtual const char *getMethod();
+		virtual const char *getUser();
+		virtual const char *getPassword();
+		virtual const char *getHost();
+		virtual unsigned int getPort();
+		virtual const char *getPath();
+		virtual const char *getQuery();
+	};
+};
+
+#endif

Modified: user/des/sizes/sizes.c
==============================================================================
--- user/des/sizes/sizes.c	Wed Sep 12 13:06:57 2012	(r240393)
+++ user/des/sizes/sizes.c	Wed Sep 12 13:31:16 2012	(r240394)
@@ -27,6 +27,11 @@
  * $FreeBSD$
  */
 
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+
 #include <assert.h>
 #include <limits.h>
 #include <stddef.h>
@@ -76,7 +81,7 @@ typedef void (*func_ptr)(void);
 #define describe(type)							\
 	do {								\
 		struct s_##t { char bump; type t; };			\
-		printf("%-12s %12zd %12zd\n", #type,			\
+		printf("%-20s %12zd %12zd\n", #type,			\
 		    sizeof(type) * 8,					\
 		    offsetof(struct s_##t, t) * 8);			\
 	} while (0)					
@@ -84,8 +89,8 @@ typedef void (*func_ptr)(void);
 static void
 sizes(void)
 {
-	printf("type                 size    alignment\n");
-	printf("--------------------------------------\n");
+	printf("type                         size    alignment\n");
+	printf("----------------------------------------------\n");
 	describe(char);
 	describe(short);
 	describe(int);
@@ -102,6 +107,11 @@ sizes(void)
 	describe(func_ptr);
 	describe(wchar_t);
 	describe(sig_atomic_t);
+	describe(socklen_t);
+	describe(struct sockaddr);
+	describe(struct sockaddr_un);
+	describe(struct sockaddr_in);
+	describe(struct sockaddr_in6);
 }
 
 int

Added: user/des/struct/struct.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/struct/struct.cfg	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,14 @@
+/*-*- c -*-*/
+/*
+ * $FreeBSD$
+ */
+
+#include <dirent.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+
+struct passwd;
+struct group;
+struct dirent;
+struct sigaction;

Added: user/des/struct/struct.pl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/struct/struct.pl	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,114 @@
+#!/usr/bin/perl -w
+#-
+# Copyright (c) 2009 Dag-Erling Coïdan Smørgrav
+# All rights reserved.
+#
+# 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
+#    in this position and unchanged.
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+# $FreeBSD$
+#
+
+use strict;
+use warnings;
+use FileHandle;
+use IPC::Open2;
+
+my %struct;
+
+# sub read_machdep($)
+# {
+#     my ($fn) = @_;
+
+#     open(my $fh, "<", $fn)
+# 	or die("$fn: $!\n");
+    
+#     close($fh);
+# }
+
+sub read_config($)
+{
+    my ($fn) = @_;
+
+    open(my $fh, "<", $fn)
+	or die("$fn: $!\n");
+    local $/;
+    my $config = <$fh>;
+    close($fh);
+
+    $config =~ s/\/\*.*?\*\// /gs;
+    $config =~ s/\/\/.*$//gm;
+    my @cpp;
+    foreach (split("\n", $config)) {
+	s/\s+$//;
+	s/\s+/ /g;
+	next unless m/./;
+	if (m/^#/) {
+	    push(@cpp, $_);
+	} elsif (m/^struct ([A-Za-z_][0-9A-Za-z_]*);$/) {
+	    die("struct $1 specified more than once\n")
+		if (exists($struct{$1}));
+	    $struct{$1} = [ @cpp ];
+	} else {
+	    die("syntax error in $fn: $_\n");
+	}
+    }
+}
+
+sub parse_struct($@)
+{
+    my ($struct, @cpp) = @_;
+
+    $SIG{'PIPE'} = sub { die("SIGPIPE from cpp\n"); };
+    my $pid = open2(my $out, my $in, "cpp");
+    foreach (@cpp) {
+	print($in "$_\n");
+    }
+    close($in);
+    local $/;
+    my $c = <$out>;
+    close($out);
+    waitpid($pid, 0);
+    my $status = $? >> 8;
+    die("exit code $status from cpp\n")
+	if ($status != 0);
+    $c =~ s/^#.*$//gm;
+    $c =~ s/\s+/ /gs;
+    while ($c =~ m/\G.*?\btypedef\s+((?:(?:struct|union)(?:\s+[A-Za-z_][0-9A-Za-z_]*|\s*{.*?})|[A-Za-z_][0-9A-Za-z_]*)(?:\s*\*)?)\s*([A-Za-z_][0-9A-Za-z_]*);/g) {
+	print("typedef $1 $2;\n");
+    }
+    $c =~ m/\bstruct $struct ?({.*?}) ?;/
+	or die("struct $struct not found in cpp output\n");
+    my $struct_def = $1;
+    print("struct $struct $struct_def;\n");
+}
+
+MAIN:{
+    foreach my $arg (@ARGV) {
+	read_config($arg);
+	foreach (sort(keys(%struct))) {
+	    parse_struct($_, @{$struct{$_}});
+	}
+    }
+}
+
+1;

Added: user/des/tinderbox/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/des/tinderbox/Makefile	Wed Sep 12 13:31:16 2012	(r240394)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+BINDIR		?= ${HOME}/bin
+BINOWN		?= ${USER}
+BINGRP		?= ${USER}
+SCRIPTS		 = tbmaster.pl tinderbox.pl
+
+MANDIR		?= ${HOME}/man/man

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209121331.q8CDVGIV076835>