The following commit has been merged in the master branch:
commit 6e5d5c1f05edbe0ce2213a6658b438668fe48cba
Author: Guillem Jover <guil...@debian.org>
Date:   Wed Oct 6 11:53:36 2010 +0200

    libdpkg: Move ehandle declarations to its own header file

diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
index 3e39ccb..97950e9 100644
--- a/lib/dpkg/dpkg.h
+++ b/lib/dpkg/dpkg.h
@@ -24,9 +24,7 @@
 
 #include <sys/types.h>
 
-#include <setjmp.h>
 #include <stddef.h>
-#include <stdarg.h>
 #include <stdio.h>
 
 #include <dpkg/macros.h>
@@ -104,7 +102,7 @@ DPKG_BEGIN_DECLS
 
 #define FIND_EXPRSTARTCHARS "-(),!"
 
-extern const char thisname[]; /* defined separately in each program */
+#include <dpkg/ehandle.h>
 
 /*** from startup.c ***/
 
@@ -121,35 +119,6 @@ extern const char thisname[]; /* defined separately in 
each program */
   error_unwind(ehflag_normaltidy);\
 } while (0)
 
-/*** from ehandle.c ***/
-
-extern volatile int onerr_abort;
-
-typedef void error_printer(const char *emsg, const char *contextstring);
-
-void push_error_handler(jmp_buf *jbufp, error_printer *printerror,
-                        const char *contextstring);
-void set_error_display(error_printer *printerror, const char *contextstring);
-void print_error_fatal(const char *emsg, const char *contextstring);
-void error_unwind(int flagset);
-void push_cleanup(void (*f1)(int argc, void **argv), int flagmask1,
-                  void (*f2)(int argc, void **argv), int flagmask2,
-                  unsigned int nargs, ...);
-void push_checkpoint(int mask, int value);
-void pop_cleanup(int flagset);
-enum { ehflag_normaltidy=01, ehflag_bombout=02, ehflag_recursiveerror=04 };
-
-void do_internerr(const char *file, int line, const char *fmt, ...)
-       DPKG_ATTR_NORET DPKG_ATTR_PRINTF(3);
-#define internerr(...) do_internerr(__FILE__, __LINE__, __VA_ARGS__)
-
-void ohshit(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
-void ohshitv(const char *fmt, va_list args)
-       DPKG_ATTR_NORET DPKG_ATTR_VPRINTF(1);
-void ohshite(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
-void werr(const char *what) DPKG_ATTR_NORET;
-void warning(const char *fmt, ...) DPKG_ATTR_PRINTF(1);
-
 /*** log.c ***/
 
 extern const char *log_file;
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 84838b7..7345b27 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -31,7 +31,7 @@
 
 #include <dpkg/macros.h>
 #include <dpkg/i18n.h>
-#include <dpkg/dpkg.h>
+#include <dpkg/ehandle.h>
 
 static const char *errmsg; /* points to errmsgbuf or malloc'd */
 static char errmsgbuf[4096];
diff --git a/lib/dpkg/ehandle.h b/lib/dpkg/ehandle.h
new file mode 100644
index 0000000..856cd19
--- /dev/null
+++ b/lib/dpkg/ehandle.h
@@ -0,0 +1,73 @@
+/*
+ * libdpkg - Debian packaging suite library routines
+ * ehandle.h - error handling
+ *
+ * Copyright © 1994,1995 Ian Jackson <i...@chiark.greenend.org.uk>
+ * Copyright © 2000,2001 Wichert Akkerman <wich...@debian.org>
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBDPKG_EHANDLE_H
+#define LIBDPKG_EHANDLE_H
+
+#include <setjmp.h>
+#include <stddef.h>
+#include <stdarg.h>
+
+#include <dpkg/macros.h>
+
+DPKG_BEGIN_DECLS
+
+extern const char thisname[]; /* defined separately in each program */
+
+extern volatile int onerr_abort;
+
+enum {
+       ehflag_normaltidy = 01,
+       ehflag_bombout = 02,
+       ehflag_recursiveerror = 04
+};
+
+typedef void error_printer(const char *emsg, const char *contextstring);
+
+void print_error_fatal(const char *emsg, const char *contextstring);
+
+void push_error_handler(jmp_buf *jbufp, error_printer *printerror,
+                        const char *contextstring);
+void error_unwind(int flagset);
+void set_error_display(error_printer *printerror, const char *contextstring);
+
+void push_cleanup(void (*f1)(int argc, void **argv), int flagmask1,
+                  void (*f2)(int argc, void **argv), int flagmask2,
+                  unsigned int nargs, ...);
+void push_checkpoint(int mask, int value);
+void pop_cleanup(int flagset);
+
+void warning(const char *fmt, ...) DPKG_ATTR_PRINTF(1);
+
+void ohshitv(const char *fmt, va_list args)
+       DPKG_ATTR_NORET DPKG_ATTR_VPRINTF(1);
+void ohshit(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
+void ohshite(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
+
+void werr(const char *what) DPKG_ATTR_NORET;
+
+void do_internerr(const char *file, int line, const char *fmt, ...)
+       DPKG_ATTR_NORET DPKG_ATTR_PRINTF(3);
+#define internerr(...) do_internerr(__FILE__, __LINE__, __VA_ARGS__)
+
+DPKG_END_DECLS
+
+#endif /* LIBDPKG_EHANDLE_H */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to