Fix missing prototypes. Declare some functions as void matching the implementation.diff -r1.9 -r1.10 pkgsrc/misc/brs/Makefile
(joerg)
@@ -1,19 +1,19 @@ | @@ -1,19 +1,19 @@ | |||
1 | # $NetBSD: Makefile,v 1.9 2008/06/20 01:09:25 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.10 2012/07/03 17:39:53 joerg Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= brs.4.00.l1 | 4 | DISTNAME= brs.4.00.l1 | |
5 | PKGNAME= brs-4.0 | 5 | PKGNAME= brs-4.0 | |
6 | PKGREVISION= 1 | 6 | PKGREVISION= 2 | |
7 | CATEGORIES= misc | 7 | CATEGORIES= misc | |
8 | MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/religion/} | 8 | MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/religion/} | |
9 | 9 | |||
10 | MAINTAINER= bcv@hub3.net | 10 | MAINTAINER= bcv@hub3.net | |
11 | HOMEPAGE= http://bible.theverge.com/brs.html | 11 | HOMEPAGE= http://bible.theverge.com/brs.html | |
12 | COMMENT= Interactive King James Version Bible | 12 | COMMENT= Interactive King James Version Bible | |
13 | 13 | |||
14 | PKG_DESTDIR_SUPPORT= user-destdir | 14 | PKG_DESTDIR_SUPPORT= user-destdir | |
15 | 15 | |||
16 | WRKSRC= ${WRKDIR}/bible | 16 | WRKSRC= ${WRKDIR}/bible | |
17 | BUILD_TARGET= bible | 17 | BUILD_TARGET= bible | |
18 | 18 | |||
19 | SUBST_CLASSES+= man | 19 | SUBST_CLASSES+= man |
@@ -1,9 +1,11 @@ | @@ -1,9 +1,11 @@ | |||
1 | $NetBSD: distinfo,v 1.5 2008/06/20 01:09:25 joerg Exp $ | 1 | $NetBSD: distinfo,v 1.6 2012/07/03 17:39:53 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (brs.4.00.l1.tar.gz) = 12406ad5738caeb828e0773a45290ed5e098940a | 3 | SHA1 (brs.4.00.l1.tar.gz) = 12406ad5738caeb828e0773a45290ed5e098940a | |
4 | RMD160 (brs.4.00.l1.tar.gz) = 1445c754ffd16cbb00cb27003b748a46c7aadbe0 | 4 | RMD160 (brs.4.00.l1.tar.gz) = 1445c754ffd16cbb00cb27003b748a46c7aadbe0 | |
5 | Size (brs.4.00.l1.tar.gz) = 2651253 bytes | 5 | Size (brs.4.00.l1.tar.gz) = 2651253 bytes | |
6 | SHA1 (patch-aa) = 054c845a340e5e28e627a02d589ff66c0ba2349d | 6 | SHA1 (patch-aa) = 8d224d526a5b8a8712b03fc2b06e1882cff9d321 | |
7 | SHA1 (patch-ab) = 392a451cea87ba91f9a4316dc07c278dc86635b9 | 7 | SHA1 (patch-ab) = fa5cfa52605b7b3f6b50f30c5405cb2106b2bd11 | |
8 | SHA1 (patch-ac) = d00c82994c076dd7fc2eadbaf144fdd79a65152a | 8 | SHA1 (patch-ac) = 1b6aca04c879d5e5011f36d8cfd0f59379c339f5 | |
9 | SHA1 (patch-ad) = 40cafb5c0d4a20a83dfc88821bfe97aaefff7507 | 9 | SHA1 (patch-ad) = 33cac111acad1f727aee01bf50ec5893f21fe60e | |
10 | SHA1 (patch-bible.c) = 631c58cb6bcf5be81de7f601b3decbb374842c4c | |||
11 | SHA1 (patch-brl.c) = 04a185efd0675a105a9d7c8602af8477d5d69eb2 |
@@ -1,47 +1,47 @@ | @@ -1,47 +1,47 @@ | |||
1 | $NetBSD: patch-aa,v 1.3 2008/06/20 01:09:25 joerg Exp $ | 1 | $NetBSD: patch-aa,v 1.4 2012/07/03 17:39:53 joerg Exp $ | |
2 | 2 | |||
3 | --- Makefile.orig 1994-12-15 02:53:00.000000000 +0100 | 3 | --- Makefile.orig 1994-12-15 01:53:00.000000000 +0000 | |
4 | +++ Makefile 2004-08-16 11:08:11.000000000 +0200 | 4 | +++ Makefile | |
5 | @@ -46,16 +46,16 @@ | 5 | @@ -46,16 +46,16 @@ DATA = $(PROGRAM).data | |
6 | NINSTPKG = $(PROGRAM).pkg | 6 | NINSTPKG = $(PROGRAM).pkg | |
7 | 7 | |||
8 | # where to install this stuff | 8 | # where to install this stuff | |
9 | -DEST = /usr | 9 | -DEST = /usr | |
10 | +DEST = ${DESTDIR}$(PREFIX) | 10 | +DEST = ${DESTDIR}$(PREFIX) | |
11 | #DEST = $(HOME)/local | 11 | #DEST = $(HOME)/local | |
12 | DESTBIN = $(DEST)/bin | 12 | DESTBIN = $(DEST)/bin | |
13 | -DESTLIB = $(DEST)/lib | 13 | -DESTLIB = $(DEST)/lib | |
14 | +DESTLIB = $(DEST)/libdata/brs | 14 | +DESTLIB = $(DEST)/libdata/brs | |
15 | DESTMAN = $(DEST)/man | 15 | DESTMAN = $(DEST)/man | |
16 | DESTMAN1 = $(DESTMAN)/man1 | 16 | DESTMAN1 = $(DESTMAN)/man1 | |
17 | 17 | |||
18 | # I use environment variables for these... | 18 | # I use environment variables for these... | |
19 | #CFLAGS = -g | 19 | #CFLAGS = -g | |
20 | -CFLAGS = -O2 -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" | 20 | -CFLAGS = -O2 -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" | |
21 | +CFLAGS += -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" | 21 | +CFLAGS += -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" | |
22 | 22 | |||
23 | # release directories. Nobody should care about this but me | 23 | # release directories. Nobody should care about this but me | |
24 | FTPHOME = /mnt/ftp | 24 | FTPHOME = /mnt/ftp | |
25 | @@ -66,7 +66,7 @@ | 25 | @@ -66,7 +66,7 @@ NINSTPKGDIR = $(NINSTDIR)/packages | |
26 | # This is only used by the author when making a new release ftp-able. | 26 | # This is only used by the author when making a new release ftp-able. | |
27 | INSTALL = .do cp | 27 | INSTALL = .do cp | |
28 | 28 | |||
29 | -LD = cc | 29 | -LD = cc | |
30 | +LD = $(CC) | 30 | +LD = $(CC) | |
31 | 31 | |||
32 | MAKEFILE = Makefile | 32 | MAKEFILE = Makefile | |
33 | 33 | |||
34 | @@ -398,31 +398,12 @@ | 34 | @@ -398,31 +398,12 @@ ninstall: $(NINSTPKG) | |
35 | # The "install" target could be of general use. That's why there are | 35 | # The "install" target could be of general use. That's why there are | |
36 | # no explicit dependencies here. They just confuse things... | 36 | # no explicit dependencies here. They just confuse things... | |
37 | install: | 37 | install: | |
38 | - @if [ ! -r $(DEST) ]; then mkdir $(DEST); fi | 38 | - @if [ ! -r $(DEST) ]; then mkdir $(DEST); fi | |
39 | - @echo Installing $(PROGRAM) in $(DESTBIN) | 39 | - @echo Installing $(PROGRAM) in $(DESTBIN) | |
40 | - @-strip $(PROGRAM) | 40 | - @-strip $(PROGRAM) | |
41 | - @if [ ! -r $(DESTBIN) ]; then mkdir $(DESTBIN); fi | 41 | - @if [ ! -r $(DESTBIN) ]; then mkdir $(DESTBIN); fi | |
42 | - @if [ $(DESTBIN) != . ]; then \ | 42 | - @if [ $(DESTBIN) != . ]; then \ | |
43 | - ((cd $(DESTBIN);rm -f $(PROGRAM)); \ | 43 | - ((cd $(DESTBIN);rm -f $(PROGRAM)); \ | |
44 | - cp $(PROGRAM) $(DESTBIN)); \ | 44 | - cp $(PROGRAM) $(DESTBIN)); \ | |
45 | - chown bin $(DESTBIN)/$(PROGRAM); \ | 45 | - chown bin $(DESTBIN)/$(PROGRAM); \ | |
46 | - chgrp bin $(DESTBIN)/$(PROGRAM); \ | 46 | - chgrp bin $(DESTBIN)/$(PROGRAM); \ | |
47 | - chmod 755 $(DESTBIN)/$(PROGRAM); fi | 47 | - chmod 755 $(DESTBIN)/$(PROGRAM); fi |
@@ -1,26 +1,47 @@ | @@ -1,26 +1,47 @@ | |||
1 | $NetBSD: patch-ab,v 1.1.1.1 2003/07/08 08:53:19 wiz Exp $ | 1 | $NetBSD: patch-ab,v 1.2 2012/07/03 17:39:53 joerg Exp $ | |
2 | 2 | |||
3 | --- bible.1.orig Mon Dec 12 20:05:28 1994 | 3 | --- bible.1.orig 1994-12-12 19:05:28.000000000 +0000 | |
4 | +++ bible.1 | 4 | +++ bible.1 | |
5 | @@ -96,7 +96,7 @@ kilobytes. | |||
6 | .I Bible\^ | |||
7 | normally searches for the text data file first in the current directory, | |||
8 | and then in | |||
9 | -.BR /usr/local/lib . | |||
10 | +.BR /usr/pkg/libdata/brs . | |||
11 | The | |||
12 | .B \-p | |||
13 | option may be used to change the search path. | |||
5 | @@ -314,17 +314,17 @@ and | 14 | @@ -314,17 +314,17 @@ and | |
6 | Miscellaneous program control commands: | 15 | Miscellaneous program control commands: | |
7 | 16 | |||
8 | .TP 15 "\w'\-t\ prefix\ \ 'u" | 17 | .TP 15 "\w'\-t\ prefix\ \ 'u" | |
9 | -.B \?, ?h, ?help | 18 | -.B \?, ?h, ?help | |
10 | +.B ?, ?h, ?help | 19 | +.B ?, ?h, ?help | |
11 | Prints help text. | 20 | Prints help text. | |
12 | .TP | 21 | .TP | |
13 | -.B \?f | 22 | -.B \?f | |
14 | +.B ?f | 23 | +.B ?f | |
15 | Toggles output formatting modes. | 24 | Toggles output formatting modes. | |
16 | .TP | 25 | .TP | |
17 | -.BI \?w file | 26 | -.BI \?w file | |
18 | +.BI ?w file | 27 | +.BI ?w file | |
19 | Begin writing program output to a file. If file exists, output is | 28 | Begin writing program output to a file. If file exists, output is | |
20 | appended to what's there already. | 29 | appended to what's there already. | |
21 | .TP | 30 | .TP | |
22 | -.B \?w | 31 | -.B \?w | |
23 | +.B ?w | 32 | +.B ?w | |
24 | Stop writing to a file. | 33 | Stop writing to a file. | |
25 | .TP | 34 | .TP | |
26 | .B \>, \< | 35 | .B \>, \< | |
36 | @@ -369,9 +369,9 @@ whole book as one might hope. Similarly | |||
37 | results in a range of Matthew 1:1 to Revelation 1:1, instead of extending | |||
38 | all the way to Revelation 22:21. | |||
39 | .SH FILES | |||
40 | -/usr/local/lib/bible.data | |||
41 | +/usr/pkg/libdata/brs/bible.data | |||
42 | .br | |||
43 | -/usr/local/lib/bible.data.conc | |||
44 | +/usr/pkg/libdata/brs/bible.data.conc | |||
45 | .SH SEE ALSO | |||
46 | Rev3:20 | |||
47 | .SH AUTHOR |
@@ -1,60 +1,87 @@ | @@ -1,60 +1,87 @@ | |||
1 | $NetBSD: patch-ac,v 1.1 2004/07/10 21:13:31 wiz Exp $ | 1 | $NetBSD: patch-ac,v 1.2 2012/07/03 17:39:53 joerg Exp $ | |
2 | 2 | |||
3 | --- tsl.c.orig 1994-12-12 04:55:31.000000000 +0100 | 3 | --- tsl.c.orig 1994-12-12 03:55:31.000000000 +0000 | |
4 | +++ tsl.c | 4 | +++ tsl.c | |
5 | @@ -95,7 +95,7 @@ | 5 | @@ -97,3 +97,5 @@ | |
6 | \*----------------------------------------------------------------------*/ | |||
7 | ||||
8 | #include <stdio.h> | 6 | #include <stdio.h> | |
9 | -#include <varargs.h> | 7 | -#include <varargs.h> | |
10 | +#include <stdarg.h> | 8 | +#include <stdarg.h> | |
9 | +#include <stdlib.h> | |||
10 | +#include <string.h> | |||
11 | /* #include <search.h> */ | 11 | /* #include <search.h> */ | |
12 | #include "tsl.h" | 12 | @@ -111,4 +113,2 @@ static char rcs_ident[]="@(#)$Header: ts | |
13 | 13 | |||
14 | @@ -145,7 +145,8 @@ int tsl_maxbuffusage=0x100000; /* Max bu | 14 | -char *malloc(); | |
15 | -char *strtok(); | |||
15 | 16 | |||
17 | @@ -123,2 +123,5 @@ file_ptr_t *tsl_wtable=NULL; /* Table of | |||
16 | 18 | |||
19 | +tsl_textread( long start, long vsize, char *vb ); | |||
20 | +cmp_decompress( char *inb, char *outb, int insize ); | |||
21 | + | |||
22 | /* buffer structures. | |||
23 | @@ -147,3 +150,4 @@ int tsl_maxbuffusage=0x100000; /* Max bu | |||
17 | 24 | |||
18 | -tsl_error( fatal, va_alist ) | 25 | -tsl_error( fatal, va_alist ) | |
19 | +void | 26 | +void | |
20 | +tsl_error(int fatal, ...) | 27 | +tsl_error(int fatal, ...) | |
21 | /*---------------------------------------------------------------------- | 28 | /*---------------------------------------------------------------------- | |
22 | | NAME: | 29 | @@ -156,4 +160,2 @@ tsl_error( fatal, va_alist ) | |
23 | | tsl_error | |||
24 | @@ -154,21 +155,16 @@ tsl_error( fatal, va_alist ) | |||
25 | | Report an error specific to the TSL library. | |||
26 | | | |||
27 | | fatal TRUE if the error should cause an exit. | 30 | | fatal TRUE if the error should cause an exit. | |
28 | -| va_alist Variable argument list for printing the error | 31 | -| va_alist Variable argument list for printing the error | |
29 | -| report. | 32 | -| report. | |
30 | | | 33 | | | |
31 | | HISTORY: | 34 | @@ -163,5 +165,2 @@ tsl_error( fatal, va_alist ) | |
32 | | 890904 cc Created. | |||
33 | | | |||
34 | \*----------------------------------------------------------------------*/ | 35 | \*----------------------------------------------------------------------*/ | |
35 | - | 36 | - | |
36 | -int fatal; | 37 | -int fatal; | |
37 | -va_dcl | 38 | -va_dcl | |
38 | { | 39 | { | |
39 | va_list ap; | 40 | @@ -170,3 +169,3 @@ va_dcl | |
40 | char *format; | |||
41 | 41 | |||
42 | - va_start(ap); | 42 | - va_start(ap); | |
43 | + va_start(ap, fatal); | 43 | + va_start(ap, fatal); | |
44 | 44 | |||
45 | format = va_arg(ap, char *); | 45 | @@ -182,3 +181,3 @@ va_dcl | |
46 | vfprintf(stderr, format, ap); | 46 | ||
47 | @@ -626,11 +622,11 @@ int memlimit; | 47 | -tsl_scan_concordance( target, sbuf, range_start, range_end ) | |
48 | if (tsl_maxbuffs < 1) tsl_maxbuffs = 1; | 48 | +tsl_scan_concordance( char *target, ref_t *sbuf, ref_t range_start, ref_t range_end ) | |
49 | tsl_firstbuffer.next = &tsl_lastbuffer; | 49 | /*---------------------------------------------------------------------- | |
50 | @@ -205,6 +204,2 @@ tsl_scan_concordance( target, sbuf, rang | |||
51 | ||||
52 | -char *target; | |||
53 | -ref_t *sbuf; | |||
54 | -ref_t range_start; | |||
55 | -ref_t range_end; | |||
56 | { | |||
57 | @@ -322,3 +317,3 @@ ref_t range_end; | |||
58 | ||||
59 | -int tsl_gettext( vn, vc, vb, vbsize ) | |||
60 | +int tsl_gettext( int vn, int vc, char *vb, int vbsize ) | |||
61 | /*---------------------------------------------------------------------- | |||
62 | @@ -341,5 +336,2 @@ int tsl_gettext( vn, vc, vb, vbsize ) | |||
63 | ||||
64 | -int vn, vc; | |||
65 | -char *vb; | |||
66 | -int vbsize; | |||
67 | { | |||
68 | @@ -384,3 +376,3 @@ int vn, vc; | |||
69 | ||||
70 | -tsl_textread( start, vsize, vb ) | |||
71 | +tsl_textread( long start, long vsize, char *vb ) | |||
72 | /*---------------------------------------------------------------------- | |||
73 | @@ -407,4 +399,2 @@ tsl_textread( start, vsize, vb ) | |||
74 | ||||
75 | -long start, vsize; | |||
76 | -char *vb; | |||
77 | { | |||
78 | @@ -628,3 +618,3 @@ int memlimit; | |||
50 | tsl_firstbuffer.prev = NULL; | 79 | tsl_firstbuffer.prev = NULL; | |
51 | - tsl_firstbuffer.win = NULL; | 80 | - tsl_firstbuffer.win = NULL; | |
52 | + tsl_firstbuffer.win = 0; | 81 | + tsl_firstbuffer.win = 0; | |
53 | tsl_firstbuffer.bufferp = NULL; | 82 | tsl_firstbuffer.bufferp = NULL; | |
54 | tsl_lastbuffer.prev = &tsl_firstbuffer; | 83 | @@ -632,3 +622,3 @@ int memlimit; | |
55 | tsl_lastbuffer.next = NULL; | 84 | tsl_lastbuffer.next = NULL; | |
56 | - tsl_lastbuffer.win = NULL; | 85 | - tsl_lastbuffer.win = NULL; | |
57 | + tsl_lastbuffer.win = 0; | 86 | + tsl_lastbuffer.win = 0; | |
58 | tsl_lastbuffer.bufferp = NULL; | 87 | tsl_lastbuffer.bufferp = NULL; | |
59 | ||||
60 | /* Global buffer for compressed text. Much bigger than needed. :-) */ |
@@ -1,13 +1,42 @@ | @@ -1,13 +1,42 @@ | |||
1 | $NetBSD: patch-ad,v 1.1 2004/08/16 11:54:20 salo Exp $ | 1 | $NetBSD: patch-ad,v 1.2 2012/07/03 17:39:53 joerg Exp $ | |
2 | 2 | |||
3 | --- compresslib.c.orig 1989-09-15 05:34:02.000000000 +0200 | 3 | --- compresslib.c.orig 1989-09-15 03:34:02.000000000 +0000 | |
4 | +++ compresslib.c 2004-08-16 10:01:20.000000000 +0200 | 4 | +++ compresslib.c | |
5 | @@ -43,7 +43,7 @@ | |||
6 | | | |||
7 | \*----------------------------------------------------------------------*/ | |||
8 | ||||
9 | - | |||
10 | +#include <string.h> | |||
11 | ||||
12 | #define min(a,b) ((a>b) ? b : a) | |||
13 | ||||
5 | @@ -112,7 +112,7 @@ | 14 | @@ -112,7 +112,7 @@ | |
6 | #ifdef PBITS /* Preferred BITS for this memory size */ | 15 | #ifdef PBITS /* Preferred BITS for this memory size */ | |
7 | # ifndef BITS | 16 | # ifndef BITS | |
8 | # define BITS PBITS | 17 | # define BITS PBITS | |
9 | -# endif BITS | 18 | -# endif BITS | |
10 | +# endif /* BITS */ | 19 | +# endif /* BITS */ | |
11 | #endif /* PBITS */ | 20 | #endif /* PBITS */ | |
12 | 21 | |||
13 | #if BITS == 16 | 22 | #if BITS == 16 | |
23 | @@ -360,7 +360,7 @@ char_type *inb; | |||
24 | ||||
25 | ||||
26 | ||||
27 | -cmp_decompress( inb, outb, insize ) | |||
28 | +cmp_decompress( char_type *inb, char_type *outb, int insize ) | |||
29 | /*---------------------------------------------------------------------- | |||
30 | | NAME: | |||
31 | | cmp_decompress | |||
32 | @@ -392,10 +392,6 @@ cmp_decompress( inb, outb, insize ) | |||
33 | | worked from stdin to stdout. | |||
34 | | | |||
35 | \*----------------------------------------------------------------------*/ | |||
36 | - | |||
37 | -char_type *inb; | |||
38 | -char_type *outb; | |||
39 | -int insize; | |||
40 | { | |||
41 | register char_type *stackp; | |||
42 | register int finchar; |
$NetBSD: patch-bible.c,v 1.1 2012/07/03 17:39:53 joerg Exp $
--- bible.c.orig 1994-12-12 19:30:47.000000000 +0000
+++ bible.c
@@ -136,2 +136,3 @@
+#include <string.h>
#include <ctype.h>
@@ -153,2 +154,3 @@ static char rcs_ident[]="@(#)$Header: bi
+void cmd_list(void);
@@ -195,3 +197,4 @@ char help_text[]="\n\
-
+tsl_scan_concordance( char *target, ref_t *sbuf, ref_t range_start, ref_t range_end );
+brl_init( char *dfname, char *dfpath, int memlimit );
@@ -248,3 +251,3 @@ ref_t *buf;
-
+void
cmd_ANDconcordance( word )
@@ -305,3 +308,3 @@ char *word;
-
+void
cmd_ORconcordance( word )
@@ -369,3 +372,3 @@ char *word;
-
+void
cmd_concordance( word )
@@ -424,3 +427,3 @@ cmd_help()
-
+void
cmd_inrange( range )
@@ -493,3 +496,3 @@ char *range;
-
+void
cmd_list()
@@ -594,3 +597,3 @@ int verbose;
-
+void
cmd_view()
$NetBSD: patch-brl.c,v 1.1 2012/07/03 17:39:53 joerg Exp $
--- brl.c.orig 1994-12-12 19:15:01.000000000 +0000
+++ brl.c
@@ -140,7 +140,7 @@
|
\*----------------------------------------------------------------------*/
-
+#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "tsl.h"
@@ -289,6 +289,10 @@ char *bookabbrvstr[] = { "Gen",
"BAD"
};
+tsl_init(char *dfname, char *path, int memlimit);
+int tsl_printtext( int vn, int vc );
+void tsl_error(int fatal, ...);
+int tsl_gettext( int vn, int vc, char *vb, int vbsize );
ref_t brl_cur_vnum; /* Current context. */
@@ -1118,7 +1122,7 @@ ref_t *absversep;
-brl_init( dfname, dfpath, memlimit )
+brl_init( char *dfname, char *dfpath, int memlimit )
/*----------------------------------------------------------------------
| NAME:
| brl_init
@@ -1137,8 +1141,6 @@ brl_init( dfname, dfpath, memlimit )
|
\*----------------------------------------------------------------------*/
-int memlimit;
-char *dfname, *dfpath;
{
if (dfname == NULL)
dfname = "bible.data";