debian/0000755000000000000000000000000011541667715007203 5ustar debian/README.Debian0000644000000000000000000000072311541667200011233 0ustar cookietool for Debian --------------------- This is a debianized version of an AmigaOS 'cookietool' package. It provides tools for maintaining plain text cookies databases in many formats, including the fortune(6) one (this is the default format for the Debian version). For more information read the cookietool(6) and cdbsplit(6) manpages or the detailed description from the README file. -- Miros/law L. Baran Wed, 9 May 2001 14:03:57 +0200 debian/TODO0000644000000000000000000000021011541667200007651 0ustar cookietool for Debian, TODO list: * More exact manpages. -- Miros/law L. Baran , Thu, 17 Feb 2000 13:30:53 +0100 debian/changelog0000644000000000000000000001435111541667666011066 0ustar cookietool (2.5-5) unstable; urgency=low [ Peter Pentchev ] * Switch to the 3.0 (quilt) source format: - drop the quilt build dependency - drop the use of the quilt debhelper plugin in the rules file - remove the README.source file * Bump Standards-Version to 3.9.1 with no changes. * Update the copyright file to the latest DEP 5 candidate format and bump the year on my packaging copyright notice. * Use dpkg-buildflags from dpkg-dev 1.15.7 to obtain the default values for CFLAGS, CPPFLAGS, and LDFLAGS. * Use hardening-includes instead of hardening-wrapper so that the hardened flags (if requested) are visible in CFLAGS and LDFLAGS. * Move the packaging to Git and update the Vcs-* control fields. * Enable build hardening by default unless the "nohardening" build option is specified. * Bump the debhelper compatibility level to 8 with no changes. [ Ansgar Burchardt ] * debian/control: Add DM-Upload-Allowed: yes. -- Peter Pentchev Fri, 11 Feb 2011 16:54:53 +0200 cookietool (2.5-4) unstable; urgency=low * Using override targets calls for debhelper >= 7.0.50; among other things, this fixes the build on Lenny. * Simplify the rules file even further by using the quilt plugin for debhelper; specify a >= 0.46-7 version to the quilt dependency. * Extract the history section of the README file into a changelog. * Bump Standards-Version to 3.8.3 with no changes. * Add the Vcs-Svn and Vcs-Browser control fields. * Switch the copyright file to the rev. 59 of DEP 5 and shorten it by breaking out the repeated GPL-2+ license text into a separate section. * Only enable the hardening wrapper if "hardening" is specified in DEB_BUILD_OPTIONS. * Fix a couple of minor grammatical errors and typos in the control, rules, and README.Debian files. * Convert the patch headers to the DEP 3 format. * Reword the short description to make it a noun phrase and avoid the second person singular. -- Peter Pentchev Mon, 07 Sep 2009 02:03:15 +0300 cookietool (2.5-3) unstable; urgency=low * New maintainer. Closes: #503560 * Use quilt for patch management. * Add a placeholder watchfile explaining why we can't use uscan. * Fix a hyphen used as a minus sign in cookietool.6. * Update the copyright file: - convert it to the machine-parseable format - add my copyright notice - change the common-licenses reference to GPL-2, not the GPL symlink - unfortunately, the original source files do not have a defensible copyright statement - they all have only a "(c)" string in the comments - but there's nothing we can do about it for the present * Add misc:Depends to the binary package. * Bump the debhelper compatibility level to 7: - minimize the rules file using override targets * Bump Standards-Version to 3.8.1: - allow the compiler program and flags to be overridden so that the "noopt" build option may be honored - add a README.source file mentioning the use of quilt - add a Homepage field pointing to cookietool.readme on the FTP site * Build with -Werror if the "werror" build option is specified. * Add the 04-compiler-warnings patch to fix some compiler warnings. * Use the build hardening wrapper unless "nohardening" is specified in DEB_BUILD_OPTIONS. -- Peter Pentchev Sat, 04 Apr 2009 16:35:25 +0300 cookietool (2.5-2) unstable; urgency=low * Acknowledged NMU. (Closes: #327472). * The Description field is now more clear (changed 'cookies' to 'fortunes'). (Closes: #186888). * Updated policy version. * Minor corrections in manpages. -- Miros/law L. Baran Sun, 18 Sep 2005 14:11:33 +0200 cookietool (2.5-1.1) unstable; urgency=low * BSP NMU * Fix FTBFS with gcc-4.0 due to label at end of case statement (compress.c). (Closes: #258582). Thanks to Andreas Jochens for the patch. * Fix missing copyright statement and reference to GPL in /usr/share in debian/copyright (closes: #302954) -- Hamish Moffatt Sat, 10 Sep 2005 11:32:04 +0000 cookietool (2.5-1) unstable; urgency=low * New upstream version. * New utility 'cdbdiff' added. * Manpage for 'cdbdiff' added. * Cleaned manpages. * Revised packaging. -- Miros/law L. Baran Sat, 19 May 2001 17:14:38 +0200 cookietool (2.4-2) unstable; urgency=low * Uploaded to Debian (Closes: #92139). * Changed maintainer field (from to ). -- Miros/law L. Baran Wed, 9 May 2001 13:51:18 +0200 cookietool (2.4-1) unstable; urgency=low * New upstream release. * Updated manpages. -- Miros/law L. Baran Fri, 23 Mar 2001 13:15:53 +0100 cookietool (2.3-2) unstable; urgency=low * changed priority from 'extra' to 'optional'. * new policy version in debian/control, this should make the package lintian-clean. * minor corrections of manpages. -- Miros/law L. Baran Fri, 23 Mar 2001 00:22:38 +0100 cookietool (2.3-1) unstable; urgency=low * new upstream release (Debian changes merged with upstream). * new GPG key. -- Miros/law L. Baran Wed, 6 Dec 2000 19:57:54 +0100 cookietool (2.2-5) unstable; urgency=low * tweaks in Makefile, some notes in README. -- Miros/law L. Baran Sat, 17 Jun 2000 08:48:38 +0200 cookietool (2.2-4) unstable; urgency=low * cdbsplit(6) manpage added, minor tweaks in cookietool(6) manpage. * resolved copyright questions, cookietool is now GPLed. -- Miros/law L. Baran Sun, 11 Jun 2000 20:44:00 +0200 cookietool (2.2-3) unstable; urgency=low * Switch to cvs-buildpackage. * README.Debian added. * Minor changes in cookietool(6) * Tweaks in debian/* -- Miros/law L. Baran Thu, 17 Feb 2000 13:54:18 +0100 cookietool (2.2-2) unstable; urgency=low * Renamed `makefile' to Makefile, many changes in it * Renamed `cookietool.doc' to README (as it is) * Cookie-delimiter changed from `%%' to `%' -- Miros/law L. Baran Sun, 30 Jan 2000 15:58:30 +0100 cookietool (2.2-1) unstable; urgency=low * Initial Release. -- Miros/law L. Baran Sun, 30 Jan 2000 15:24:45 +0100 debian/clean0000644000000000000000000000001011541667200010164 0ustar Changes debian/compat0000644000000000000000000000000211541667200010366 0ustar 8 debian/cookietool.manpages0000644000000000000000000000005611541667200013055 0ustar doc/cdbsplit.6 doc/cookietool.6 doc/cdbdiff.6 debian/copyright0000644000000000000000000000242211541667200011123 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166 Upstream-Name: cookietool Upstream-Contact: Wilhelm Noeker Source: ftp://ftp.aminet.net/util/misc/ Files: * Copyright: (c) 1995-2001 by Wilhelm Noeker (wnoeker@t-online.de) License: GPL-2+ Files: cdbdiff.c Copyright: (c) 2001 by Wilhelm Noeker (wnoeker@t-online.de) License: GPL-2+ Files: debian/* Author: Miros/law L. Baran , Hamish Moffatt , Peter Pentchev Copyright: Copyright (c) 2000-2005 Miros/law L. Baran Copyright (c) 2009-2011 Peter Pentchev License: GPL-2+ License: GPL-2+ This program 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 program 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. . On Debian systems, the complete text of the GNU General Public License can be found in file "/usr/share/common-licenses/GPL-2". debian/dirs0000644000000000000000000000001211541667200010045 0ustar usr/games debian/docs0000644000000000000000000000002311541667200010036 0ustar README README.unix debian/patches/0000755000000000000000000000000011541667200010617 5ustar debian/patches/01-manpage-typos.patch0000644000000000000000000000620411541667200014644 0ustar Description: A couple of typo fixes for the manual pages. Original changes by Miros/law L. Baran : - spell "fussy" correctly - un-UTF-8 the Amiga contributor's name . Changes by Peter Pentchev : - fix a hyphen used as a minus sign Forwarded: no Author: Miros/law L. Baran , Peter Pentchev Last-Update: 2009-09-07 --- a/doc/cdbdiff.6 +++ b/doc/cdbdiff.6 @@ -1,5 +1,3 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" $Jubal::Debian::Packages$ .TH COOKIETOOL 6 "May 19, 2001" .SH NAME cdbdiff \- program to operate cookie (fortune) database @@ -27,7 +25,7 @@ case sensitive comparisons. .TP .B \-d[0-3] -how fuzzy about word delimiters? (default: 2) +how fussy about word delimiters? (default: 2) .TP .B \-f[0-3] input file format \- \-f3: cookies are separated by '%%' lines; \-f2: @@ -42,7 +40,7 @@ None known. .SH AUTHOR Upstream author and Aminet cookietool.lha package with AmigaOS binaries -uploader is Wilhelm Nöker, . Unix manpages +uploader is Wilhelm Noeker, . Unix manpages (including this one) and makefile are maintained by Miros/law L. Baran . This manual page uses many excerpts from the original README file. --- a/doc/cdbsplit.6 +++ b/doc/cdbsplit.6 @@ -1,5 +1,3 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" $Jubal::Debian::Packages$ .TH COOKIETOOL 6 "May 19, 2001" .SH NAME cdbsplit \- program to operate cookie (fortune) database @@ -32,7 +30,7 @@ case-sensitive comparisons (for both keywords and groups) .TP .B \-d[0-3] -how fuzzy about word delimiters? (default: 2) +how fussy about word delimiters? (default: 2) .TP .B \-k optional keyword @@ -78,7 +76,7 @@ None known. .SH AUTHOR Upstream author and Aminet cookietool.lha package with AmigaOS binaries -uploader is Wilhelm Nöker, . Unix manpages +uploader is Wilhelm Noeker, . Unix manpages (including this one) and makefile are maintained by Miros/law L. Baran . This manual page uses many excerpts from the original README file. --- a/doc/cookietool.6 +++ b/doc/cookietool.6 @@ -30,7 +30,7 @@ case sensitive comparisons. .TP .B \-d[0-3] -how fuzzy about word delimiters? (default: 2) +how fussy about word delimiters? (default: 2) .TP .B \-b delete cookies that are 'abbreviations' of another, too. @@ -40,7 +40,7 @@ .TP .B \-s[l|w||s] sort cookies; looking after last line only; looking after last word -only; starting after the last , e.g. '-s--'; by size. +only; starting after the last , e.g. '\-s\-\-'; by size. .TP .B \-a treat 'abbreviations' as doubles (i.e. delete them from the database, @@ -62,7 +62,7 @@ None known. .SH AUTHOR Upstream author and Aminet cookietool.lha package with AmigaOS binaries -uploader is Wilhelm Nöker, . Unix manpages +uploader is Wilhelm Noeker, . Unix manpages (including this one) and makefile are maintained by Miros/law L. Baran . This manual page uses many excerpts from the original README file. debian/patches/02-gcc-4-ftbfs.patch0000644000000000000000000000052711541667200014062 0ustar Description: Fix FTBFS with gcc-4.0. Author: Hamish Moffatt Forwarded: no Last-Update: 2009-09-07 --- a/compress.c +++ b/compress.c @@ -263,7 +263,6 @@ s = strstr( s, hooktarget ); } break; - default: } } printf( " done.\n" ); debian/patches/03-compiler-flags.patch0000644000000000000000000000100411541667200014757 0ustar Description: Honor the compiler program and flags passed in the environment. Allow the compiler program and flags to be overridden so that the "noopt" build option may be honored. Forwarded: no Author: Peter Pentchev Last-Update: 2009-09-07 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ prefix = usr binprefix = $(prefix)/games manprefix = $(prefix)/share/man/man6 -CC = gcc +CC ?= gcc RM = rm -v INSTALL = install -CFLAGS = -O2 -Wall +CFLAGS ?= -O2 -Wall build : $(targets) debian/patches/04-compiler-warnings.patch0000644000000000000000000002077511541667200015534 0ustar Description: Fix some compiler warnings. - include for the exit(3) prototype - redefine the UBYTE type to just "char", not "unsigned char"; well, okay, so it's a bit misleadingly named now, so what? :) - now that UBYTE is "char", cast it to unsigned when using it as an array index in strstuff.c - a buffer size ought to be unsigned - use \033 instead of the non-standard \e - declare some static functions as, well, static - add "void" to the declaration of a couple of no-argument functions - add "const" to a couple of char *'s Forwarded: no Author: Peter Pentchev Last-Update: 2009-09-07 --- a/cookio.c +++ b/cookio.c @@ -27,6 +27,7 @@ #include #include +#include #include #include "cookio.h" @@ -46,9 +47,10 @@ */ char *read_cookie( FILE *fp, int fmt, long *psize, long *plines, long *pmaxline ) { - long cbuflen, lines, w, width; + size_t cbuflen; + long lines, w, width; int delimlen; - char *delim = "%%"; + const char *delim = "%%"; switch( fmt ) { @@ -83,7 +85,7 @@ w = strlen( line ); if( (cbuflen += w) >= sizeof( cbuf ) ) { - printf( "\ncookie too big (>%ld chars) \n", (long) sizeof( cbuf ) ); + printf( "\ncookie too big (>%lu chars) \n", (unsigned long) sizeof( cbuf ) ); exit( 20 ); } strcat( cbuf, line ); @@ -113,7 +115,7 @@ */ int write_cookie( char *cookie, FILE *fp, int fmt ) { - char *fmts = "%s\n%%%%\n"; + const char *fmts = "%s\n%%%%\n"; int len; static int linew = 0; --- a/strstuff.h +++ b/strstuff.h @@ -30,7 +30,8 @@ #ifndef _STRSTUFF_H_ #define _STRSTUFF_H_ -typedef unsigned char UBYTE; +/* Argh. No, it's not unsigned. Deal with it :) -- Peter Pentchev */ +typedef char UBYTE; /* special return values for str_cmp() and strn_cmp() */ #define STR_LONGER 256 --- a/strstuff.c +++ b/strstuff.c @@ -32,6 +32,9 @@ #include #include "strstuff.h" +#define is_space(c) is_space[(unsigned char)(c)] +#define to_upper(c) to_upper[(unsigned char)(c)] + UBYTE to_upper[ 256 ]; /* conversion table */ int is_space[ 256 ]; /* lookup table */ int bordermode, case_sense; @@ -107,29 +110,29 @@ { if( bordermode < 3 ) { /* modes where number of 'spaces' doesn't count */ - while( is_space[ *s ] ) + while( is_space( *s ) ) s++; /* advance to first word */ - while( is_space[ *t ] ) + while( is_space( *t ) ) t++; - while( to_upper[ *s ] == to_upper[ *t ] ) + while( to_upper( *s ) == to_upper( *t ) ) { if( *s == '\0' ) return 0; s++; t++; - if( !bordermode || (is_space[ *s ] && is_space[ *t ]) ) + if( !bordermode || (is_space( *s ) && is_space( *t )) ) { /* both at the end of a word OR in sloppy bordermode */ - while( is_space[ *s ] ) + while( is_space( *s ) ) s++; /* skip the spaces */ - while( is_space[ *t ] ) + while( is_space( *t ) ) t++; } } } else { - while( to_upper[ *s ] == to_upper[ *t ] ) + while( to_upper( *s ) == to_upper( *t ) ) { if( *s == '\0' ) return 0; @@ -142,7 +145,7 @@ else if( *t == '\0' ) return STR_LONGER; else - return( to_upper[ *s ] - to_upper[ *t ] ); + return( to_upper( *s ) - to_upper( *t ) ); } @@ -155,28 +158,28 @@ { if( bordermode < 3 ) { - while( is_space[ *s ] ) + while( is_space( *s ) ) s++; - while( is_space[ *t ] ) + while( is_space( *t ) ) t++; - while( to_upper[ *s ] == to_upper[ *t ] ) + while( to_upper( *s ) == to_upper( *t ) ) { if( --n == 0 || *s == '\0' ) return 0; /* that's the difference */ s++; t++; - if( !bordermode || (is_space[ *s ] && is_space[ *t ]) ) + if( !bordermode || (is_space( *s ) && is_space( *t )) ) { - while( is_space[ *s ] ) + while( is_space( *s ) ) s++; - while( is_space[ *t ] ) + while( is_space( *t ) ) t++; } } } else { - while( to_upper[ *s ] == to_upper[ *t ] ) + while( to_upper( *s ) == to_upper( *t ) ) { if( --n == 0 || *s == '\0' ) return 0; /* and here once more */ @@ -189,7 +192,7 @@ else if( *t == '\0' ) return STR_LONGER; else - return( to_upper[ *s ] - to_upper[ *t ] ); + return( to_upper( *s ) - to_upper( *t ) ); } --- a/cookietool.c +++ b/cookietool.c @@ -47,7 +47,7 @@ /* * Print a help text and nag about illegal parameter */ -void help( UBYTE *s ) +static void help( UBYTE *s ) { if( s ) printf( "illegal option '%s'\n", s ); @@ -177,8 +177,8 @@ { strcpy( name2, name1 ); printf( "Warning! You have enabled direct writeback mode!\n" ); - printf( "\e[2mDon't break (or crash) cookietool now, " ); - printf( "or you will inevitably lose data!\e[0m\n" ); + printf( "\033[2mDon't break (or crash) cookietool now, " ); + printf( "or you will inevitably lose data!\033[0m\n" ); } else strcpy( name2, "ct_temp_crunchfile" ); --- a/compress.c +++ b/compress.c @@ -53,7 +53,7 @@ * Assign ascending numbers to all cookies in the list and reset each sort * hook to the start of its body text. */ -void rebuild_listinfo() +static void rebuild_listinfo(void) { long l; @@ -137,7 +137,7 @@ /* * Cookie comparison, for sorting. */ -int cookie_cmp( struct cookie *a, struct cookie *b, int mode ) +static int cookie_cmp( struct cookie *a, struct cookie *b, int mode ) { int c = 0; @@ -163,7 +163,7 @@ /* * sift(): does the main work for my_heapsort() */ -void sift( struct cookie v[], long i, long m, int mode ) +static void sift( struct cookie v[], long i, long m, int mode ) { long j; struct cookie temp; @@ -189,7 +189,7 @@ * Note the side effect: Will print three "."s to stdout: one on entry, * one when the sort is halfway through, and another one when it's all done. */ -void my_heapsort( struct cookie v[], long n, int mode ) +static void my_heapsort( struct cookie v[], long n, int mode ) { long i; struct cookie temp; @@ -215,7 +215,7 @@ /* * Adjust sorthooks for the final sort, according to the desired mode. */ -void set_hooks( int mode, UBYTE *hooktarget ) +static void set_hooks( int mode, UBYTE *hooktarget ) { long l; int hot; --- a/cdbdiff.c +++ b/cdbdiff.c @@ -46,7 +46,7 @@ /* * Print a help text and nag about illegal parameter */ -void help( UBYTE *s ) +static void help( UBYTE *s ) { if( s ) printf( "illegal option '%s'\n", s ); --- a/cdbsplit.c +++ b/cdbsplit.c @@ -55,7 +55,7 @@ /* * print a help text and nag about illegal parameter */ -void help( char *s ) +static void help( char *s ) { if( s ) printf( "illegal option '%s'\n", s ); @@ -79,7 +79,7 @@ * Write a cookie to one of two files. Returns the number of cookies * written to the hit-file (which of course is either 1 or 0). */ -int dispatch( char *cookie, int good, FILE *fp2, FILE *fp3 ) +static int dispatch( char *cookie, int good, FILE *fp2, FILE *fp3 ) { int success = 1; @@ -100,7 +100,7 @@ * Scatter contents of across (hitfile) and (dumpfile), * return value is the number of cookies in the dumpfile */ -long filter_cookies( FILE *fp1, FILE *fp2, FILE *fp3 ) +static long filter_cookies( FILE *fp1, FILE *fp2, FILE *fp3 ) { static char cbak[ CBUFSIZE ]; /* backup of the last cookie, to find groups */ char *cptr; @@ -157,7 +157,7 @@ -void confirm_options() +static void confirm_options(void) /* tell the user what his options will do */ { int flags, i; @@ -220,7 +220,7 @@ int main( int argc, char *argv[] ) { char *s; - char *name1 = NULL, *name2 = NULL, *name3 = "cdb_temp_kickme"; + const char *name1 = NULL, *name2 = NULL, *name3 = "cdb_temp_kickme"; int append = 0, move = 1; int case_sense = 0, bordermode = 2; long dumped; debian/patches/series0000644000000000000000000000013711541667200012035 0ustar 01-manpage-typos.patch 02-gcc-4-ftbfs.patch 03-compiler-flags.patch 04-compiler-warnings.patch debian/rules0000755000000000000000000000166711541667200010262 0ustar #!/usr/bin/make -f # debhelper config file for cookietool, the fortune database maintenance suite CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS= $(shell dpkg-buildflags --get CFLAGS) LDFLAGS= $(shell dpkg-buildflags --get LDFLAGS) CFLAGS+= -Wall -W -ansi -pedantic -Wbad-function-cast \ -Wcast-align -Wcast-qual -Wchar-subscripts -Winline \ -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS))) CFLAGS+= -Werror endif include /usr/share/hardening-includes/hardening.make ifeq (,$(filter nohardening,$(DEB_BUILD_OPTIONS))) CFLAGS+= $(HARDENING_CFLAGS) LDFLAGS+= $(HARDENING_LDFLAGS) endif export CFLAGS CPPFLAGS LDFLAGS override_dh_auto_build: dh_auto_build awk '/^[0-9]+\..*History/ { disp = 1 } \ /^[0-9]/ && !/^[0-9]+\..*History/ { disp = 0 } \ { if (disp) { print } }' README > Changes %: dh $@ debian/source/0000755000000000000000000000000011541667200010470 5ustar debian/source/format0000644000000000000000000000001411541667200011676 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000036311541667200010223 0ustar # Unfortunately, the cookietool upstream is not kept in a versioned archive. # The version number could be extracted from the header of the # ftp://ftp.aminet.net/util/misc/cookietool.readme file, but uscan # is not quite *that* smart (yet ;) debian/control0000644000000000000000000000155511541667623010612 0ustar Source: cookietool Section: games Priority: optional Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.15.7~), hardening-includes Maintainer: Debian Games Team Uploaders: Peter Pentchev Standards-Version: 3.9.1 Homepage: ftp://ftp.aminet.net/util/misc/cookietool.readme Vcs-Git: git://git.debian.org/git/pkg-games/cookietool.git Vcs-Browser: http://git.debian.org/?p=pkg-games/cookietool.git DM-Upload-Allowed: yes Package: cookietool Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: suite of programs to help maintain a fortune database The ''cookietool'' itself eliminates duplicate entries, sorts cookies alphabetically or by size if you wish. The ''cdbsplit'' tool extracts parts of the database to a separate file, by keyword, by size, by number, or as groups of 'similar' cookies.