--- lx-gdb-1.03.orig/gdbload.c +++ lx-gdb-1.03/gdbload.c @@ -71,11 +71,14 @@ #include #include #include +#include /* This define is needed for HP-UX systems, and probably not anywhere else * I would guess. Comment it in if needed. */ -/*#define stricmp strcasecmp*/ +#if defined(__hpux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +#define stricmp strcasecmp +#endif #define MAXFIELDS 100 /* Max. fields in a database */ @@ -110,14 +113,14 @@ FILE * hfIn; /* Input stream handle */ /* This routine exits the program with an error message. */ -die(char * message) +int die(char * message) { fprintf(stderr, "gdbload(%d): %s\n", lineNum, message); exit(1); } /* This routine exits the program with a usage message. */ -usage() +int usage(void) { fprintf(stderr, "usage: gdbload [-an] []\n"); @@ -157,7 +160,7 @@ } /* Generate the file names we need. */ -void makeFileNames() +void makeFileNames(void) { char * pch; @@ -448,7 +451,7 @@ /* This routine copies the appropriate records of the old database to the * new. */ -void copyDatabase() +void copyDatabase(void) { uchar rechdr[6]; /* Record header buffer */ int reclen; /* Record length */ @@ -509,7 +512,7 @@ } /* This routine reads a line of input and breaks it into fields. */ -void readLine() +void readLine(void) { int field = 0; /* Field number being read */ int matchQuote = FALSE; /* Inside quotation marks */ @@ -655,9 +658,9 @@ namebuf1[20] = namebuf2[20] = '\0'; /* Remove &s from the field names */ - while (pch = strchr(namebuf1, '&')) + while ((pch = strchr(namebuf1, '&')) != NULL) memmove(pch, pch+1, strlen(pch)); - while (pch = strchr(namebuf2, '&')) + while ((pch = strchr(namebuf2, '&')) != NULL) memmove(pch, pch+1, strlen(pch)); /* Return a case-insensitive comparison of the result. */ @@ -667,7 +670,7 @@ /* This routine reads the line of field names and compares it with the * field definitions in the database. */ -void readFields() +void readFields(void) { int i; @@ -919,11 +922,11 @@ } /* This routine adds the input records to the database. */ -void addRecords() +void addRecords(void) { uchar rechdr[6]; /* Record header buffer */ int endrec; /* Offset of first unused by in rec */ - int note; /* Record # of associated note */ + int note = 0; /* Record # of associated note */ int i; do @@ -975,7 +978,7 @@ /* This routine writes out the database header, the categories record, * and the index table. */ -void writeHeader() +void writeHeader(void) { uchar rechdr[6]; /* Record header buffer */ int reclen; /* Record length */ @@ -1013,8 +1016,8 @@ } /* Main program. */ -main(int argc, - char * argv[]) +int main(int argc, + char * argv[]) { parseArgs(argc, argv); makeFileNames(); --- lx-gdb-1.03.orig/Makefile +++ lx-gdb-1.03/Makefile @@ -0,0 +1,34 @@ +# +# makefile for gdbdump/gdbload +# C source by Steve Roth /Arne Christensen +# Makefile by Darren Stalder + +VERSION = 1.03 + +prefix = /usr/local +BINDIR = $(prefix)/bin +MANDIR = $(prefix)/share/man/man1 + +PROGRAMS = gdbload gdbdump +MANPAGES = gdbload.1 gdbdump.1 +SOURCES = gdbload.c gdbdump.c +CFLAGS = -Wall -O2 -Wstrict-prototypes + +all binary: $(PROGRAMS) + +# the following assumes a GNU install. If you don't have one use install-cp + +install: $(PROGRAMS) + install -m 755 $(PROGRAMS) $(BINDIR) + install -m 644 $(MANPAGES) $(MANDIR) + +install-cp: $(PROGRAMS) + cp $(PROGRAMS) $(BINDIR) + (cd $(BINDIR); chmod 755 $(PROGRAMS)) + cp $(MANPAGES) $(MANDIR) + (cd $(MANDIR); chmod 644 $(MANPAGES)) + +clean: + -rm -f $(PROGRAMS) + +.PHONY: all binary install install-cp clean --- lx-gdb-1.03.orig/gdbload.1 +++ lx-gdb-1.03/gdbload.1 @@ -56,18 +56,19 @@ have their text quoted if it contains commas or newlines. The following escape sequences are understood: .RS -. Can't produce a \ on Solaris nroff, need to manually substitute \ for % ! +.\" Can't produce a \ on Solaris nroff, need to manually substitute \ for % ! +.\" We can produce a \ using groff though... .TP -.B "%r" +.B "\er" Carriage return (ASCII 13). .TP -.B "%n" +.B "\en" Line feed (ASCII 10). .TP -.B "%nnn" +.B "\ennn" nnn are octal digits representing a character. .TP -.B "%xnn" +.B "\exnn" nn are hexadecimal digits representing a character. .RE .PP --- lx-gdb-1.03.orig/debian/changelog +++ lx-gdb-1.03/debian/changelog @@ -0,0 +1,117 @@ +lx-gdb (1.03-14) unstable; urgency=low + + * debian/control: version debhelper depends (lintian + package-lacks-versioned-build-depends-on-debhelper.) + * debian/rules: dh-clean-k-is-deprecated, switch to dh_prep. + * gdbload.1: manpage-has-errors-from-man (fix comment syntax.) + + -- Mark W. Eichin Thu, 03 Dec 2009 07:50:18 +0000 + +lx-gdb (1.03-13) unstable; urgency=low + + * debian/rules, debian/control, debian/compat: debhelper V7, standards + version 3.8.0. + * debian/changelog: fix my name to avoid false NMU detection. + + -- Mark W. Eichin Thu, 02 Oct 2008 00:11:48 -0400 + +lx-gdb (1.03-12) unstable; urgency=low + + * debian/postinst: lintian complained about the lack of -e, turns out + that the only reason it was present was the long-accomplished /usr/doc + transition, so deleted it altogether. + + -- Mark Eichin Sat, 27 Sep 2008 22:04:28 -0400 + +lx-gdb (1.03-11) unstable; urgency=low + + * gdbload.c: cleaner test for stricmp, in support of GNU/kFreeBSD + (Closes: #414103). + + -- Mark W. Eichin Fri, 26 Sep 2008 03:10:24 -0400 + +lx-gdb (1.03-10) unstable; urgency=low + + * debian/control: ported to debhelper, but forgot to change build + depends (thanks ia64-buildd...) (Closes: #413375). + + -- Mark W. Eichin Sun, 4 Mar 2007 17:49:41 -0500 + +lx-gdb (1.03-9) unstable; urgency=low + + * debian/postinst: Thanks go to Amaya Rodrigo Sastre + for the NMU (Closes: #359532). + * debian/control: reviewed upgrading-checklist.txt, standards-version + now 3.7.2. Also clarified *which* HP palmtops this works with. + * debian/rules, debian/dirs, Makefile: Switched to debhelper (Closes: #372997). + + -- Mark W. Eichin Sat, 3 Mar 2007 23:10:58 -0500 + +lx-gdb (1.03-8.1) unstable; urgency=low + + * Non-maintainer upload. + * Get rid of the /usr/doc link in postinst (Closes: #359532). + + -- Amaya Rodrigo Sastre Mon, 17 Jul 2006 16:57:47 +0200 + +lx-gdb (1.03-8) unstable; urgency=low + + * debian/control: add build-depends. + + -- Mark W. Eichin Wed, 15 May 2002 14:09:04 -0400 + +lx-gdb (1.03-7) unstable; urgency=low + + * gdbload.c: substitute strcasecmp for stricmp on anything __GNU__ + (like debian Hurd.) (Closes: #122162) + + -- Mark W. Eichin Wed, 30 Jan 2002 01:18:06 -0500 + +lx-gdb (1.03-6) unstable; urgency=low + + * debian/control: fix maintainer gecos info since uploader compares on + it now. + + -- Mark W. Eichin Sun, 18 Mar 2001 16:03:04 -0500 + +lx-gdb (1.03-5) unstable; urgency=low + + * debian/rules: use dpkg-gencontrol -isp. Move MANDIR and DOCDIR. Use + debstd. + * debian/control: update standards-version (Closes: #80914). + + -- Mark W. Eichin Sat, 17 Mar 2001 19:57:44 -0500 + +lx-gdb (1.03-4) unstable; urgency=low + + * debian/control, debian/changelog, "New" maintainer. + * debian/control: Fix depends. [#22785] Also make Priority part of + source, not binary, headers. + + -- Mark W. Eichin Mon, 25 Jan 1999 02:22:29 -0500 + +lx-gdb (1.03-3) frozen unstable; urgency=low + + * This is nothing but packaging changes. It can go into frozen. + * Make binary-arch do the building and have binary just depend on + binary-arch and binary-indep. (Fixes Bug #16605) + * Don't use su to build when we don't have to. (Fixes Bug #15475) + + -- Darren Stalder Fri, 3 Apr 1998 02:19:53 -0800 + +lx-gdb (1.03-2) unstable; urgency=low + + * Recompile for libc6 support. + * Updated to Debian Standards 2.3.0.0. + + -- Darren Stalder Fri, 19 Sep 1997 19:17:47 -0700 + +lx-gdb (1.03-1) unstable; urgency=low + + * Initial debian release + * Added #define to make stricmp look like strcasecmp + * Added Makefile and cleaned up gdbload.c to be gcc -Wall compliant + * Changed %r/%n/%nnn/%xnn in the gdbload(1) man page to \r, etc. since groff *can* produce a '\' + + -- Darren Stalder Sat, 8 Mar 1997 01:14:44 -0800 + --- lx-gdb-1.03.orig/debian/compat +++ lx-gdb-1.03/debian/compat @@ -0,0 +1 @@ +7 --- lx-gdb-1.03.orig/debian/copyright +++ lx-gdb-1.03/debian/copyright @@ -0,0 +1,27 @@ +This is Debian Linux's version of the gdb tools for the hp palmtop. + +This package was put together by Darren Stalder +with source from ftp://ftp.cc.monash.edu.au/pub/palmtop/gdbsc103.zip + +I release the packaging of these tools to the public domain. -- Darren +Stalder + +From the man page: +AUTHOR + gdbload/gdbdump were written by Steven Roth, stever@cup.hp.com, + and are being maintained by Arne Christensen, arc@pine.dk. + Contact the latter for bug reports, enhancement requests, or to + get a copy of the source code. + +DISCLAIMER + This program is released into the public domain and neither the + author nor the maintainer place any restrictions on its use. We + make no warranties or guarantees for this program and you use it + at your own risk. This program is supplied by us personally and + not by Hewlett-Packard Co. or Pine Tree Systems, which incur no + obligations pertain- ing to it. + +ACKNOWLEDGEMENTS + Many thanks to Andy Gryc for publishing the details of the + database file formats! + --- lx-gdb-1.03.orig/debian/control +++ lx-gdb-1.03/debian/control @@ -0,0 +1,18 @@ +Section: otherosfs +Maintainer: Mark W. Eichin +Priority: extra +Source: lx-gdb +Build-Depends: debhelper (>= 7) +Standards-Version: 3.8.0 + +Package: lx-gdb +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Dump and load databases from HP 100LX/200LX palmtops + gdbload/gdbdump converts any standard HP/LX database to and from + CSV (Comma-Separated-Values) format. Many formatting + options are available. World-Time and Appointment + databases as well as application specific fields are not + supported. + . + The HP 100LX was introduced in 1993. --- lx-gdb-1.03.orig/debian/dirs +++ lx-gdb-1.03/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- lx-gdb-1.03.orig/debian/debhelper.log +++ lx-gdb-1.03/debian/debhelper.log @@ -0,0 +1,14 @@ +dh_installdirs +dh_installchangelogs +dh_installdocs +dh_installexamples +dh_installman +dh_link +dh_strip +dh_compress +dh_fixperms +dh_installdeb +dh_shlibdeps +dh_gencontrol +dh_md5sums +dh_builddeb --- lx-gdb-1.03.orig/debian/rules +++ lx-gdb-1.03/debian/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f +# Based on "Sample debian/rules that uses debhelper." +# from /usr/share/doc/debhelper/examples/rules +# This file is public domain software, originally written by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + $(MAKE) prefix=debian/lx-gdb/usr install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installcatalogs +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_undocumented + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- lx-gdb-1.03.orig/debian/substvars +++ lx-gdb-1.03/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.7-1)