summaryrefslogtreecommitdiff
path: root/usr.bin/sort
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-26 00:12:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-26 00:12:40 +0000
commit2ee6c7a83a8fb667c04b3968929d26bcc0f5f55e (patch)
tree72484dbfbac161e2d8b22906f9d6f56a8ad442e5 /usr.bin/sort
parent9e9afca8e1dfa8c957cf7ef77140a25e15ec2cf0 (diff)
protos
Diffstat (limited to 'usr.bin/sort')
-rw-r--r--usr.bin/sort/extern.h18
-rw-r--r--usr.bin/sort/init.c8
-rw-r--r--usr.bin/sort/msort.c13
-rw-r--r--usr.bin/sort/sort.c6
4 files changed, 26 insertions, 19 deletions
diff --git a/usr.bin/sort/extern.h b/usr.bin/sort/extern.h
index 63d7bb83886..f7c9eddfab1 100644
--- a/usr.bin/sort/extern.h
+++ b/usr.bin/sort/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.6 2003/06/03 02:56:16 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.7 2003/06/26 00:12:39 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -34,14 +34,16 @@
* @(#)extern.h 8.1 (Berkeley) 6/6/93
*/
-void append(u_char **, int, int, FILE *, void (*)(), struct field *);
+void append(u_char **, int, int, FILE *, void (*)(RECHEADER *, FILE *),
+ struct field *);
void concat(FILE *, FILE *);
length_t enterkey(RECHEADER *, DBT *, int, struct field *);
void fixit(int *, char **);
void fldreset(struct field *);
FILE *ftmp(void);
-void fmerge(int, union f_handle,
- int, int (*)(), FILE *, void (*)(), struct field *);
+void fmerge(int, union f_handle, int,
+ int (*)(int, union f_handle, int, RECHEADER *, u_char *, struct field *),
+ FILE *, void (*)(RECHEADER *, FILE *), struct field *);
void fsort(int, int, union f_handle, int, FILE *, struct field *);
int geteasy(int, union f_handle,
int, RECHEADER *, u_char *, struct field *);
@@ -51,11 +53,15 @@ int makekey(int, union f_handle,
int, RECHEADER *, u_char *, struct field *);
int makeline(int, union f_handle,
int, RECHEADER *, u_char *, struct field *);
-void merge(int, int, int (*)(), FILE *, void (*)(), struct field *);
+void merge(int, int,
+ int (*)(int, union f_handle, int, RECHEADER *, u_char *, struct field *),
+ FILE *, void (*)(RECHEADER *, FILE *), struct field *);
void num_init(void);
void onepass(u_char **, int, long, long *, u_char *, FILE *);
int optval(int, int);
-void order(union f_handle, int (*)(), struct field *);
+void order(union f_handle,
+ int (*)(int, union f_handle, int, RECHEADER *, u_char *, struct field *),
+ struct field *);
void putline(RECHEADER *, FILE *);
void putrec(RECHEADER *, FILE *);
void rd_append(int, union f_handle, int, FILE *, u_char *, u_char *);
diff --git a/usr.bin/sort/init.c b/usr.bin/sort/init.c
index 23611f673f8..66aaa40b49a 100644
--- a/usr.bin/sort/init.c
+++ b/usr.bin/sort/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.5 2003/06/03 02:56:16 millert Exp $ */
+/* $OpenBSD: init.c,v 1.6 2003/06/26 00:12:39 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.5 2003/06/03 02:56:16 millert Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.6 2003/06/26 00:12:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -49,6 +49,9 @@ extern struct coldesc *clist;
extern int ncols;
u_char gweights[NBINS];
+static void insertcol(struct field *);
+char *setcolumn(char *, struct field *, int);
+
/*
* clist (list of columns which correspond to one or more icol or tcol)
* is in increasing order of columns.
@@ -150,7 +153,6 @@ setfield(pos, cur_fld, gflag)
int gflag;
{
int tmp;
- char *setcolumn();
cur_fld->weights = ascii;
cur_fld->mask = alltable;
pos = setcolumn(pos, cur_fld, gflag);
diff --git a/usr.bin/sort/msort.c b/usr.bin/sort/msort.c
index 7a38582e03d..2891bc7177a 100644
--- a/usr.bin/sort/msort.c
+++ b/usr.bin/sort/msort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msort.c,v 1.12 2003/06/03 02:56:16 millert Exp $ */
+/* $OpenBSD: msort.c,v 1.13 2003/06/26 00:12:39 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)msort.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: msort.c,v 1.12 2003/06/03 02:56:16 millert Exp $";
+static char rcsid[] = "$OpenBSD: msort.c,v 1.13 2003/06/26 00:12:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -71,15 +71,14 @@ void
fmerge(binno, files, nfiles, get, outfp, fput, ftbl)
union f_handle files;
int binno, nfiles;
- int (*get)();
+ int (*get)(int, union f_handle, int, RECHEADER *, u_char *, struct field *);
FILE *outfp;
- void (*fput)();
+ void (*fput)(RECHEADER *, FILE *);
struct field *ftbl;
{
FILE *tout;
int i, j, last;
void (*put)(RECHEADER *, FILE *);
- extern int geteasy();
struct tempfile *l_fstack;
wts = ftbl->weights;
@@ -145,7 +144,7 @@ fmerge(binno, files, nfiles, get, outfp, fput, ftbl)
void
merge(infl0, nfiles, get, outfp, put, ftbl)
int infl0, nfiles;
- int (*get)();
+ int (*get)(int, union f_handle, int, RECHEADER *, u_char *, struct field *);
void (*put)(RECHEADER *, FILE *);
FILE *outfp;
struct field *ftbl;
@@ -256,7 +255,7 @@ insert(flist, rec, ttop, delete)
void
order(infile, get, ftbl)
union f_handle infile;
- int (*get)();
+ int (*get)(int, union f_handle, int, RECHEADER *, u_char *, struct field *);
struct field *ftbl;
{
u_char *crec_end, *prec_end, *trec_end;
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index b0151b713c9..9a88c070942 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sort.c,v 1.21 2003/06/10 22:20:51 deraadt Exp $ */
+/* $OpenBSD: sort.c,v 1.22 2003/06/26 00:12:39 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -42,7 +42,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)sort.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: sort.c,v 1.21 2003/06/10 22:20:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: sort.c,v 1.22 2003/06/26 00:12:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -105,7 +105,7 @@ static void usage(char *);
int
main(int argc, char *argv[])
{
- int (*get)();
+ int (*get)(int, union f_handle, int, RECHEADER *, u_char *, struct field *);
int ch, i, stdinflag = 0, tmp = 0;
char nfields = 0, cflag = 0, mflag = 0;
char *outfile, *outpath = 0;