Hi,

Attached patch adds support for transparent terminals.
It's against 1.10.27 as gluck was down at the time i wrote it.

Please consider applying.
thank you
        * automake/dpkg.m4 : quote DPKG_ defines.
        * automake/tl_canon.m4 : quote tl_ defines.
        * automake/tools.m4 : quote tl_defines.
                        quote strings for test (1).
        * configure.in : add check for use_default_colors().
                        fix typo in comment "patchs".
        * debian/dselect.cfg : fix typo in comment "specific".
                        add note about leading dashes.
                        add default color definitions as comments.
        * dpkg-deb/extract.c : sparse warnings about 0 vs. NULL.
        * dpkg-deb/main.c : include dpkg-db.h for nffreeall() prototype.
                        sparse warnings about 0 vs. NULL.
        * dselect/baselist.cc (startdisplay) : get the terminal's colours,
                        if available.
        * dselect/main.cc : add "default" color to colourtable.
                        if use_default_colors() is available, default to
                        the currently set terminal color (-1) instead of
                        black (0).
                        make curseson() and cursesoff() function declarations
                        ANSI-C compatible.
        * include/dpkg.h.in (stream_null_copy) : sparse warnings about
                        0 vs. NULL.
        * lib/tarfn.c : make StoC() static.
                        remove keyword "external" from declaration of
                        TarExtractor() as it's declaration in the header
                        already is flagged external.
        * lib/varbuf.c : use a signed variable for the return value of
                        vsnprintf. Fixes warning about "always false because
                        of limited datatype" in varbufprintf() and
                        varbufvprintf().
        * main/main.c, split/join.c, split/main.c, split/queue.c : sparse
                        warnings about 0 vs. NULL.
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/THANKS 
/home/cow/tmp/debian/dpkg-1.10.27/THANKS
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/THANKS      2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/THANKS    2005-04-09 00:48:43.000000000 
+0200
@@ -3,6 +3,7 @@ Alberto Garcia <[EMAIL PROTECTED]>
 Andrew Hobson <[EMAIL PROTECTED]>
 Andrew Suffield <[EMAIL PROTECTED]>
 Ben Collins <[EMAIL PROTECTED]>
+Bernhard Fischer <[EMAIL PROTECTED]>
 Branko Lankester
 Brian M. Carlson <[EMAIL PROTECTED]>
 Bruce Perens <[EMAIL PROTECTED]>
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/dpkg.m4 
/home/cow/tmp/debian/dpkg-1.10.27/automake/dpkg.m4
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/dpkg.m4    2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/automake/dpkg.m4  2005-04-09 
20:29:39.855271224 +0200
@@ -1,5 +1,5 @@
 dnl 
DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
-AC_DEFUN(DPKG_CACHED_TRY_COMPILE,[
+AC_DEFUN([DPKG_CACHED_TRY_COMPILE],[
  AC_MSG_CHECKING($1)
  AC_CACHE_VAL($2,[
   AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
@@ -14,7 +14,7 @@ AC_DEFUN(DPKG_CACHED_TRY_COMPILE,[
 ])
 
 dnl 
DPKG_C_GCC_ATTRIBUTE(<short-label>,<cachevar>,<func-params>,<attribute>,<HAVE>,<desc>,[<true-cmds>],[<false-cmds>])
-AC_DEFUN(DPKG_C_GCC_ATTRIBUTE,[
+AC_DEFUN([DPKG_C_GCC_ATTRIBUTE],[
   DPKG_CACHED_TRY_COMPILE(__attribute__(($1)),dpkg_cv_c_attribute_$2,,
    [extern int testfunction($3) __attribute__(($4))],
    AC_MSG_RESULT(yes)
@@ -25,7 +25,7 @@ AC_DEFUN(DPKG_C_GCC_ATTRIBUTE,[
 ])
 
 dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<cachevar>)
-AC_DEFUN(DPKG_C_GCC_TRY_WARNS,[
+AC_DEFUN([DPKG_C_GCC_TRY_WARNS],[
  AC_MSG_CHECKING([GCC warning flag(s) $1])
  if test "${GCC-no}" = yes
  then
@@ -50,7 +50,7 @@ dnl DPKG_CACHED_TRY_COMPILE(<description
 
 
 dnl Check if a #define is present in an include file
-AC_DEFUN(DPKG_CHECK_DEFINE,
+AC_DEFUN([DPKG_CHECK_DEFINE],
   [AC_CACHE_CHECK(if $1 is defined in $2,
      ac_cv_define_$1,
      [AC_TRY_COMPILE([
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/tl_canon.m4 
/home/cow/tmp/debian/dpkg-1.10.27/automake/tl_canon.m4
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/tl_canon.m4        
2005-02-10 16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/automake/tl_canon.m4      2005-04-09 
20:31:07.686918784 +0200
@@ -12,7 +12,7 @@ undefine([AC_CANONICAL_SYSTEM])
 define([AC_CANONICAL_SYSTEM], [tl_CANONICAL_SYSTEM])
 
 dnl Canonicalize the host, target, and build system types.
-AC_DEFUN(tl_CANONICAL_SYSTEM,
+AC_DEFUN([tl_CANONICAL_SYSTEM],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_PROVIDE([AC_CANONICAL_SYSTEM])dnl
 AC_BEFORE([$0], [AC_ARG_PROGRAM])
@@ -48,7 +48,7 @@ AC_CHECK_TOOL_PREFIX
 
 dnl Subroutines of tl_CANONICAL_SYSTEM.
 
-AC_DEFUN(tl_CANONICAL_HOST,
+AC_DEFUN([tl_CANONICAL_HOST],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_PROVIDE([AC_CANONICAL_HOST])dnl
 
@@ -106,7 +106,7 @@ AC_SUBST(host_os)dnl
 ])
 
 dnl Internal use only.
-AC_DEFUN(tl_CANONICAL_TARGET,
+AC_DEFUN([tl_CANONICAL_TARGET],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
@@ -157,7 +157,7 @@ AC_SUBST(target_vendor)dnl
 AC_SUBST(target_os)dnl
 ])
 
-AC_DEFUN(tl_CANONICAL_BUILD,
+AC_DEFUN([tl_CANONICAL_BUILD],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_PROVIDE([AC_CANONICAL_BUILD])dnl
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/tools.m4 
/home/cow/tmp/debian/dpkg-1.10.27/automake/tools.m4
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/automake/tools.m4   2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/automake/tools.m4 2005-04-09 
22:35:16.276561040 +0200
@@ -12,19 +12,19 @@ dnl Replace AC_CHECK_TOOL_PREFIX
 undefine([AC_CHECK_TOOL_PREFIX])
 define([AC_CHECK_TOOL_PREFIX], [tl_CHECK_TOOL_PREFIX])
 
-AC_DEFUN(tl_CHECK_TOOL_PREFIX,
+AC_DEFUN([tl_CHECK_TOOL_PREFIX],
 [AC_PROVIDE([AC_CHECK_TOOL_PREFIX])
 AC_BEFORE([AC_CANONICAL_HOST])
 AC_BEFORE([AC_CANONICAL_BUILD])
 dnl Quick check
-if test "$host_alias" = ""; then
-  if test $host = NONE && test $build != NONE; then
+if test "x$host_alias" = "x"; then
+  if test "$host" = "NONE" && test "$build" != "NONE"; then
     thost=$nonopt
   else
     thost=$host
   fi
 
-  if test $thost != $build && test $thost != NONE; then
+  if test "$thost" != "$build" && test "$thost" != "NONE"; then
     ac_tool_prefix=${thost}-
     ac_tool_dir=${thost}
   else
@@ -32,7 +32,7 @@ if test "$host_alias" = ""; then
     ac_tool_dir=
   fi
 else
-  if test $host != $build; then
+  if test "$host" != "$build"; then
     ac_tool_prefix=${host_alias}-
     ac_tool_dir=${host_alias}
   else
@@ -49,7 +49,7 @@ define([AC_CHECK_TOOL], [tl_CHECK_TOOL($
 dnl tl_CHECK_TOOL - AC_CHECK_TOOL, with a couple of extra checks
 dnl tl_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH
 dnl [, REJECT]])
-AC_DEFUN(tl_CHECK_TOOL,
+AC_DEFUN([tl_CHECK_TOOL],
 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
 AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
              ifelse([$3], , [$2], ), $4, $5)
@@ -75,7 +75,7 @@ dnl tl_CHECK_TOOLS -
 dnl  do a tl_CHECK_TOOL for multiple tools (like AC_CHECK_PROGS)
 dnl tl_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
 dnl               [, PATH]])
-AC_DEFUN(tl_CHECK_TOOLS,
+AC_DEFUN([tl_CHECK_TOOLS],
 [for ac_tool in $2
 do
 tl_CHECK_TOOL($1, [$]ac_tool, [$]ac_tool, , $4)
@@ -92,7 +92,7 @@ define([AC_PROG_CXX], [tl_PROG_CXX])
 
 dnl tl_PROG_CC, tl_PROG_CXX - same as old AC_PROG_CC and AC_PROG_CXX, but
 dnl use AC_CHECK_TOOL/tl_CHECK_TOOLS instead of AC_CHECK_PROG, etc.
-AC_DEFUN(tl_PROG_CC,
+AC_DEFUN([tl_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_PROVIDE([AC_PROG_CC])dnl
 tl_CHECK_TOOL(CC, gcc, gcc)
@@ -147,7 +147,7 @@ else
 fi
 ])
 
-AC_DEFUN(tl_PROG_CXX,
+AC_DEFUN([tl_PROG_CXX],
 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
 AC_PROVIDE([AC_PROG_CXX])dnl
 tl_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
@@ -200,7 +200,7 @@ dnl normal versions of a library), taste
 fi
 ])
 
-AC_DEFUN(tl_PROG_CC_WORKS,
+AC_DEFUN([tl_PROG_CC_WORKS],
 [AC_PROVIDE(AC_PROG_CC_WORKS)
 AC_CACHE_CHECK([whether the C compiler ($CC $CFLAGS $LDFLAGS) works],
        ac_cv_prog_cc_works, [
@@ -216,7 +216,7 @@ AC_MSG_RESULT($ac_cv_prog_cc_cross)
 cross_compiling=$ac_cv_prog_cc_cross
 ])
 
-AC_DEFUN(tl_PROG_CXX_WORKS,
+AC_DEFUN([tl_PROG_CXX_WORKS],
 [AC_PROVIDE(AC_PROG_CXX_WORKS)
 AC_CACHE_CHECK([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works],
        ac_cv_prog_cxx_works, [
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/configure.in 
/home/cow/tmp/debian/dpkg-1.10.27/configure.in
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/configure.in        2005-02-10 
16:25:43.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/configure.in      2005-04-09 
22:46:04.326042544 +0200
@@ -190,6 +190,10 @@ if test "x$CURSES_LIBS" = "x"; then
 fi
 AC_SUBST(CURSES_LIBS)
 
+# do we have support for transparency?
+AC_CHECK_LIB(ncurses,use_default_colors,AC_DEFINE(HAVE_USE_DEFAULT_COLORS))
+
+
 DPKG_CHECK_DEFINE(TIOCNOTTY,sys/ioctl.h)
 
 ZLIB_CFLAGS=
@@ -295,7 +299,7 @@ DPKG_C_GCC_TRY_WARNS(-Wmissing-noreturn,
 DPKG_C_GCC_TRY_WARNS(-Wsign-compare, dpkg_cv_c_gcc_comp_conv)
 AC_SUBST(CWARNS)
 
-dnl fix up patchs. We can not use variable references paths since 
+dnl fix up paths. We can not use variable references paths since 
 dnl that breaks DocBook
 expandvar() { echo $(eval echo $1) ; }
 
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/debian/dselect.cfg 
/home/cow/tmp/debian/dpkg-1.10.27/debian/dselect.cfg
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/debian/dselect.cfg  2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/debian/dselect.cfg        2005-04-09 
22:47:31.512788144 +0200
@@ -1,7 +1,21 @@
 # dselect configuration file
 #
 # This file can contain default options for dselect. All commandline
-# options are allowed. Values can be specific by putting them after
+# options are allowed. Values can be specified by putting them after
 # the option, seperated by whitespace and/or an `=' sign.
 #
+# comandline-options are specified without the leading dash(es).
+# e.g. the default colors are:
+#color list:white,black
+#color listsel:white,black:reverse
+#color title:white,red
+#color infohead:white,blue
+#color pkgstate:white,black:bold
+#color pkgstatesel:white,black:reverse+bold
+#color listhead:white,blue
+#color query:white,red
+#color info:white,black
+#color infodesc:white,black:bold
+#color infofoot:white,blue
+#color helpscreen:white,black
 
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/dpkg-deb/extract.c 
/home/cow/tmp/debian/dpkg-1.10.27/dpkg-deb/extract.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/dpkg-deb/extract.c  2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/dpkg-deb/extract.c        2005-04-09 
18:54:47.176689912 +0200
@@ -88,7 +88,7 @@ void extracthalf(const char *debar, cons
   size_t ctrllennum, memberlen= 0;
   int dummy, l= 0;
   pid_t c1=0,c2,c3;
-  unsigned char *ctrlarea= 0;
+  unsigned char *ctrlarea= NULL;
   int p1[2], p2[2];
   FILE *ar, *pi;
   struct stat stab;
@@ -331,7 +331,7 @@ void do_fsystarfile(const char *const *a
     badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
   if (*argv)
     badusage(_("--%s takes only one argument (.deb 
filename)"),cipaction->olong);
-  extracthalf(debar,0,0,0);
+  extracthalf(debar,NULL,NULL,0);
 }
    
 void do_control(const char *const *argv) { controlextractvextract(1, "x", 
argv); }
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/dpkg-deb/main.c 
/home/cow/tmp/debian/dpkg-1.10.27/dpkg-deb/main.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/dpkg-deb/main.c     2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/dpkg-deb/main.c   2005-04-09 
19:04:58.091816696 +0200
@@ -39,6 +39,7 @@
 #include <myopt.h>
 
 #include "dpkg-deb.h"
+#include "dpkg-db.h" /* nffreeall */
 
 const char* showformat = "${Package}\t${Version}\n";
 
@@ -103,8 +104,8 @@ const char printforhelp[]=
 int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
 const char* compression=NULL;
 enum compression_type compress_type = GZ;
-const struct cmdinfo *cipaction=0;
-dofunction *action=0;
+const struct cmdinfo *cipaction=NULL;
+dofunction *action=NULL;
 
 static void helponly(const struct cmdinfo *cip, const char *value) 
NONRETURNING;
 static void helponly(const struct cmdinfo *cip, const char *value) {
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/dselect/baselist.cc 
/home/cow/tmp/debian/dpkg-1.10.27/dselect/baselist.cc
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/dselect/baselist.cc 2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/dselect/baselist.cc       2005-04-09 
22:49:45.030490368 +0200
@@ -121,6 +121,10 @@ void baselist::startdisplay() {
   if (has_colors() && start_color()==OK && COLOR_PAIRS >= numscreenparts) {
     int i;
     printf("allocing\n");
+ #ifdef HAVE_USE_DEFAULT_COLORS
+    if (use_default_colors() && debug)
+      fprintf(debug,"Error getting default colors from term.\n", this);
+#endif
     for (i = 1; i < numscreenparts; i++) {
        if (init_pair(i, color[i].fore, color[i].back) != OK)
          ohshite(_("failed to allocate colour pair"));
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/dselect/main.cc 
/home/cow/tmp/debian/dpkg-1.10.27/dselect/main.cc
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/dselect/main.cc     2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/dselect/main.cc   2005-04-09 
22:51:53.436969616 +0200
@@ -76,6 +76,9 @@ static const struct table_t colourtable[
   {"magenta",  COLOR_MAGENTA   },
   {"cyan",     COLOR_CYAN      },
   {"white",    COLOR_WHITE     },
+#ifdef HAVE_USE_DEFAULT_COLORS
+  {"default",  -1      },
+#endif
   {NULL, 0},
 };
 
@@ -109,22 +112,31 @@ static const struct table_t screenpartta
   {NULL, 0},
 };
 
+#ifdef HAVE_USE_DEFAULT_COLORS
+/* When we have support for transparency in the curses lib then
+ * default to use it. The "black" defaults were added to the
+ * config-file.
+ */
+#define _BG_COLOR (-1)
+#else
+#define _BG_COLOR COLOR_BLACK
+#endif
 /* Historical (patriotic?) colours. */
 struct colordata color[]= {
   /* fore      back            attr */
-  {COLOR_WHITE,        COLOR_BLACK,    0                       }, // default, 
not used
-  {COLOR_WHITE,        COLOR_BLACK,    0                       }, // list
-  {COLOR_WHITE,        COLOR_BLACK,    A_REVERSE               }, // listsel
+  {COLOR_WHITE,        _BG_COLOR,      0                       }, // default, 
not used
+  {COLOR_WHITE,        _BG_COLOR,      0                       }, // list
+  {COLOR_WHITE,        _BG_COLOR,      A_REVERSE               }, // listsel
   {COLOR_WHITE,        COLOR_RED,      0                       }, // title
   {COLOR_WHITE,        COLOR_BLUE,     0                       }, // thisstate
-  {COLOR_WHITE,        COLOR_BLACK,    A_BOLD                  }, // selstate
-  {COLOR_WHITE,        COLOR_BLACK,    A_REVERSE | A_BOLD      }, // 
selstatesel
+  {COLOR_WHITE,        _BG_COLOR,      A_BOLD                  }, // selstate
+  {COLOR_WHITE,        _BG_COLOR,      A_REVERSE | A_BOLD      }, // 
selstatesel
   {COLOR_WHITE,        COLOR_BLUE,     0                       }, // colheads
   {COLOR_WHITE,        COLOR_RED,      0                       }, // query
-  {COLOR_WHITE,        COLOR_BLACK,    0                       }, // info
-  {COLOR_WHITE,        COLOR_BLACK,    A_BOLD                  }, // info_head
+  {COLOR_WHITE,        _BG_COLOR,      0                       }, // info
+  {COLOR_WHITE,        _BG_COLOR,      A_BOLD                  }, // info_head
   {COLOR_WHITE,        COLOR_BLUE,     0                       }, // whatinfo
-  {COLOR_WHITE,        COLOR_BLACK,    0                       }, // help
+  {COLOR_WHITE,        _BG_COLOR,      0                       }, // help
 };
 
 struct menuentry {
@@ -289,7 +301,7 @@ static const struct cmdinfo cmdinfos[]= 
 };
 
 static int cursesareon= 0;
-void curseson() {
+void curseson(void) {
   if (!cursesareon) {
     const char *cup, *smso;
     initscr();
@@ -310,7 +322,7 @@ void curseson() {
   cursesareon= 1;
 }
 
-void cursesoff() {
+void cursesoff(void) {
   if (cursesareon) {
     clear();
     refresh();
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/include/dpkg.h.in 
/home/cow/tmp/debian/dpkg-1.10.27/include/dpkg.h.in
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/include/dpkg.h.in   2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/include/dpkg.h.in 2005-04-09 
19:01:56.117481000 +0200
@@ -267,7 +267,7 @@ struct buffer_data {
        if (fseek(file, limit, SEEK_CUR) == -1) { \
            if(errno != EBADF) ohshite(desc); \
            buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, NULL, \
-                                    0, BUFFER_WRITE_NULL, NULL, \
+                                    NULL, BUFFER_WRITE_NULL, NULL, \
                                     limit, desc);\
        }
 #define stream_fd_copy(file, fd, limit, desc...)\
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/lib/tarfn.c 
/home/cow/tmp/debian/dpkg-1.10.27/lib/tarfn.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/lib/tarfn.c 2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/lib/tarfn.c       2005-04-09 
18:51:10.979556872 +0200
@@ -52,7 +52,7 @@ OtoL(const char * s, int size)
 }
 
 /* String block to C null-terminated string */
-char *
+static char *
 StoC(const char *s, int size)
 {
        int     len;
@@ -117,7 +117,7 @@ typedef struct symlinkList {
        struct symlinkList *next;
 } symlinkList;
 
-extern int
+int
 TarExtractor(
  void *                        userData
 ,const TarFunctions *  functions)
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/lib/varbuf.c 
/home/cow/tmp/debian/dpkg-1.10.27/lib/varbuf.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/lib/varbuf.c        2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/lib/varbuf.c      2005-04-09 
19:38:15.175213872 +0200
@@ -44,7 +44,8 @@ void varbufdupc(struct varbuf *v, int c,
 }
 
 int varbufprintf(struct varbuf *v, const char *fmt, ...) {
-  unsigned int ou, r;
+  unsigned int ou;
+  signed int r;
   va_list al;
 
   ou= v->used;
@@ -57,12 +58,13 @@ int varbufprintf(struct varbuf *v, const
     va_end(al);
     if (r < 0) r= (v->size-ou+1) * 2;
     v->used= ou+r;
-  } while (r >= v->size-ou-1);
+  } while ((unsigned int)r >= v->size-ou-1);
   return r;
 }
 
 int varbufvprintf(struct varbuf *v, const char *fmt, va_list va) {
-  unsigned int ou, r;
+  unsigned int ou;
+  signed int r;
   va_list al;
 
   ou= v->used;
@@ -74,7 +76,7 @@ int varbufvprintf(struct varbuf *v, cons
     r= vsnprintf(v->buf+ou,v->size-ou,fmt,al);
     if (r < 0) r= (v->size-ou+1) * 2;
     v->used= ou+r;
-  } while (r >= v->size-ou-1);
+  } while ((unsigned int)r >= v->size-ou-1);
   return r;
 }
 
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/main/main.c 
/home/cow/tmp/debian/dpkg-1.10.27/main/main.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/main/main.c 2005-02-10 
16:24:17.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/main/main.c       2005-04-09 
19:14:24.624690608 +0200
@@ -127,7 +127,7 @@ Type dpkg --licence for copyright licenc
 \n\
 Options marked [*] produce a lot of output - pipe it through `less' or `more' 
!");
 
-const struct cmdinfo *cipaction= 0;
+const struct cmdinfo *cipaction= NULL;
 int f_pending=0, f_recursive=0, f_alsoselect=1, f_skipsame=0, f_noact=0;
 int f_autodeconf=0, f_nodebsig=0;
 unsigned long f_debug=0;
@@ -142,7 +142,7 @@ int fc_badverify = 0;
 int errabort = 50;
 const char *admindir= ADMINDIR;
 const char *instdir= "";
-struct packageinlist *ignoredependss=0;
+struct packageinlist *ignoredependss=NULL;
 
 static const struct forceinfo {
   const char *name;
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/split/join.c 
/home/cow/tmp/debian/dpkg-1.10.27/split/join.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/split/join.c        2005-02-10 
16:24:18.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/split/join.c      2005-04-09 
19:06:11.356678744 +0200
@@ -114,7 +114,7 @@ void do_join(const char *const *argv) {
     if (!refi || pq->info.thispartn < refi->thispartn) refi= &pq->info;
   assert(refi);
   partlist= nfmalloc(sizeof(struct partinfo*)*refi->maxpartn);
-  for (i=0; i<refi->maxpartn; i++) partlist[i]= 0;
+  for (i=0; i<refi->maxpartn; i++) partlist[i]= NULL;
   for (pq= queue; pq; pq= pq->nextinqueue) {
     pi= &pq->info;
     addtopartlist(partlist,pi,refi);
diff -X /usr/src/excl -rup /home/cow/tmp/debian/dpkg-1.10.27.oorig/split/main.c 
/home/cow/tmp/debian/dpkg-1.10.27/split/main.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/split/main.c        2005-02-10 
16:24:18.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/split/main.c      2005-04-09 
19:06:35.616990616 +0200
@@ -155,7 +155,7 @@ int main(int argc, const char *const *ar
   int l;
   char *p;
 
-  standard_startup(&ejbuf, argc, &argv, NULL, 0, cmdinfos);
+  standard_startup(&ejbuf, argc, &argv, NULL, NULL, cmdinfos);
   if (!cipaction) badusage(_("need an action option"));
 
   l= strlen(depotdir);
diff -X /usr/src/excl -rup 
/home/cow/tmp/debian/dpkg-1.10.27.oorig/split/queue.c 
/home/cow/tmp/debian/dpkg-1.10.27/split/queue.c
--- /home/cow/tmp/debian/dpkg-1.10.27.oorig/split/queue.c       2005-02-10 
16:24:18.000000000 +0100
+++ /home/cow/tmp/debian/dpkg-1.10.27/split/queue.c     2005-04-09 
19:05:37.030897056 +0200
@@ -120,7 +120,7 @@ void do_auto(const char *const *argv) {
   fclose(part);
   scandepot();
   partlist= nfmalloc(sizeof(struct partinfo*)*refi->maxpartn);
-  for (i=0; i<refi->maxpartn; i++) partlist[i]= 0;
+  for (i=0; i<refi->maxpartn; i++) partlist[i]= NULL;
   for (pq= queue; pq; pq= pq->nextinqueue) {
     pi= &pq->info;
     if (!partmatches(pi,refi)) continue;

Reply via email to