projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3500603
)
Fixed several prototypes.. Most changes are f() to f(void).
author
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 29 Oct 2006 17:20:00 +0000
(17:20 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 29 Oct 2006 17:20:00 +0000
(17:20 +0000)
17 files changed:
dfa/agrep.c
patch
|
blob
|
history
include/idzebra/isam-codec.h
patch
|
blob
|
history
include/idzebra/snippet.h
patch
|
blob
|
history
index/extract.c
patch
|
blob
|
history
index/index.h
patch
|
blob
|
history
index/kinput.c
patch
|
blob
|
history
index/recgrs.c
patch
|
blob
|
history
index/reckeys.c
patch
|
blob
|
history
index/reckeys.h
patch
|
blob
|
history
index/zebrash.c
patch
|
blob
|
history
index/zsets.c
patch
|
blob
|
history
test/api/testlib.c
patch
|
blob
|
history
test/api/testlib.h
patch
|
blob
|
history
util/flock.c
patch
|
blob
|
history
util/snippet.c
patch
|
blob
|
history
util/tstcharmap.c
patch
|
blob
|
history
util/tstflock.c
patch
|
blob
|
history
diff --git
a/dfa/agrep.c
b/dfa/agrep.c
index
22894a1
..
c0c6173
100644
(file)
--- a/
dfa/agrep.c
+++ b/
dfa/agrep.c
@@
-1,4
+1,4
@@
-/* $Id: agrep.c,v 1.18 2006-08-14 10:40:08 adam Exp $
+/* $Id: agrep.c,v 1.19 2006-10-29 17:20:00 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-60,9
+60,7
@@
void error (const char *format, ...)
static int show_lines = 0;
static int show_lines = 0;
-int agrep_options (argc, argv)
-int argc;
-char **argv;
+int agrep_options (int argc, char **argv)
{
while (--argc > 0)
if (**++argv == '-')
{
while (--argc > 0)
if (**++argv == '-')
@@
-112,8
+110,7
@@
static char *inf_buf;
static char *inf_ptr, *inf_flsh;
static int inf_eof, line_no;
static char *inf_ptr, *inf_flsh;
static int inf_eof, line_no;
-static int inf_flush (fd)
-int fd;
+static int inf_flush (int fd)
{
char *p;
unsigned b, r;
{
char *p;
unsigned b, r;
@@
-143,8
+140,7
@@
int fd;
return 0;
}
return 0;
}
-static char *prline (p)
-char *p;
+static char *prline (char *p)
{
char *p0;
{
char *p0;
@@
-163,9
+159,7
@@
char *p;
return p;
}
return p;
}
-static int go (fd, dfaar)
-int fd;
-struct DFA_state **dfaar;
+static int go (int fd, struct DFA_state **dfaar)
{
struct DFA_state *s = dfaar[0];
struct DFA_tran *t;
{
struct DFA_state *s = dfaar[0];
struct DFA_tran *t;
@@
-220,9
+214,7
@@
struct DFA_state **dfaar;
return 0;
}
return 0;
}
-int agrep (dfas, fd)
-struct DFA_state **dfas;
-int fd;
+int agrep (struct DFA_state **dfas, int fd)
{
inf_buf = imalloc (sizeof(char)*INF_BUF_SIZE);
inf_eof = 0;
{
inf_buf = imalloc (sizeof(char)*INF_BUF_SIZE);
inf_eof = 0;
@@
-237,9
+229,7
@@
int fd;
}
}
-int main (argc, argv)
-int argc;
-char **argv;
+int main (int argc, char **argv)
{
const char *pattern = NULL;
char outbuf[BUFSIZ];
{
const char *pattern = NULL;
char outbuf[BUFSIZ];
diff --git
a/include/idzebra/isam-codec.h
b/include/idzebra/isam-codec.h
index
5651006
..
88a0853
100644
(file)
--- a/
include/idzebra/isam-codec.h
+++ b/
include/idzebra/isam-codec.h
@@
-1,4
+1,4
@@
-/* $Id: isam-codec.h,v 1.4 2006-08-14 10:40:14 adam Exp $
+/* $Id: isam-codec.h,v 1.5 2006-10-29 17:20:00 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-24,7
+24,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define ISAM_CODEC_H
typedef struct {
#define ISAM_CODEC_H
typedef struct {
- void *(*start)();
+ void *(*start)(void);
void (*stop)(void *p);
void (*decode)(void *p, char **dst, const char **src);
void (*encode)(void *p, char **dst, const char **src);
void (*stop)(void *p);
void (*decode)(void *p, char **dst, const char **src);
void (*encode)(void *p, char **dst, const char **src);
diff --git
a/include/idzebra/snippet.h
b/include/idzebra/snippet.h
index
a512743
..
1bc5a7e
100644
(file)
--- a/
include/idzebra/snippet.h
+++ b/
include/idzebra/snippet.h
@@
-1,4
+1,4
@@
-/* $Id: snippet.h,v 1.6 2006-08-14 10:40:14 adam Exp $
+/* $Id: snippet.h,v 1.7 2006-10-29 17:20:00 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-39,7
+39,7
@@
typedef struct zebra_snippets zebra_snippets;
typedef struct zebra_snippet_word zebra_snippet_word;
YAZ_EXPORT
typedef struct zebra_snippet_word zebra_snippet_word;
YAZ_EXPORT
-zebra_snippets *zebra_snippets_create();
+zebra_snippets *zebra_snippets_create(void);
YAZ_EXPORT
void zebra_snippets_destroy(zebra_snippets *l);
YAZ_EXPORT
void zebra_snippets_destroy(zebra_snippets *l);
diff --git
a/index/extract.c
b/index/extract.c
index
12db319
..
1439538
100644
(file)
--- a/
index/extract.c
+++ b/
index/extract.c
@@
-1,4
+1,4
@@
-/* $Id: extract.c,v 1.230 2006-09-15 10:45:12 adam Exp $
+/* $Id: extract.c,v 1.231 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-46,7
+46,7
@@
struct encode_info {
static int log_level = 0;
static int log_level_initialized = 0;
static int log_level = 0;
static int log_level_initialized = 0;
-static void zebra_init_log_level()
+static void zebra_init_log_level(void)
{
if (!log_level_initialized)
{
{
if (!log_level_initialized)
{
diff --git
a/index/index.h
b/index/index.h
index
4997cfd
..
f04b623
100644
(file)
--- a/
index/index.h
+++ b/
index/index.h
@@
-1,4
+1,4
@@
-/* $Id: index.h,v 1.179 2006-10-12 12:28:42 adam Exp $
+/* $Id: index.h,v 1.180 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-410,7
+410,7
@@
int zebra_file_stat (const char *file_name, struct stat *buf,
void zebra_livcode_transform(ZebraHandle zh, Z_RPNQuery *query);
void zebra_livcode_transform(ZebraHandle zh, Z_RPNQuery *query);
-void *iscz1_start ();
+void *iscz1_start (void);
void iscz1_reset (void *vp);
void iscz1_stop (void *p);
void iscz1_decode (void *vp, char **dst, const char **src);
void iscz1_reset (void *vp);
void iscz1_stop (void *p);
void iscz1_decode (void *vp, char **dst, const char **src);
diff --git
a/index/kinput.c
b/index/kinput.c
index
7a4794f
..
5469b50
100644
(file)
--- a/
index/kinput.c
+++ b/
index/kinput.c
@@
-1,4
+1,4
@@
-/* $Id: kinput.c,v 1.76 2006-08-14 10:40:15 adam Exp $
+/* $Id: kinput.c,v 1.77 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-258,7
+258,7
@@
struct heap_info {
int no_iterations;
};
int no_iterations;
};
-static struct heap_info *key_heap_malloc()
+static struct heap_info *key_heap_malloc(void)
{ /* malloc and clear it */
struct heap_info *hi;
hi = (struct heap_info *) xmalloc (sizeof(*hi));
{ /* malloc and clear it */
struct heap_info *hi;
hi = (struct heap_info *) xmalloc (sizeof(*hi));
diff --git
a/index/recgrs.c
b/index/recgrs.c
index
4062b52
..
6ebf807
100644
(file)
--- a/
index/recgrs.c
+++ b/
index/recgrs.c
@@
-1,4
+1,4
@@
-/* $Id: recgrs.c,v 1.8 2006-10-26 23:45:46 adam Exp $
+/* $Id: recgrs.c,v 1.9 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-245,7
+245,7
@@
static int sp_expr(struct source_parser *sp, data1_node *n, RecWord *wrd)
return 1;
}
return 1;
}
-static struct source_parser *source_parser_create()
+static struct source_parser *source_parser_create(void)
{
struct source_parser *sp = xmalloc(sizeof(*sp));
{
struct source_parser *sp = xmalloc(sizeof(*sp));
diff --git
a/index/reckeys.c
b/index/reckeys.c
index
0ef2e3e
..
01bf317
100644
(file)
--- a/
index/reckeys.c
+++ b/
index/reckeys.c
@@
-1,4
+1,4
@@
-/* $Id: reckeys.c,v 1.7 2006-08-14 10:40:15 adam Exp $
+/* $Id: reckeys.c,v 1.8 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-79,7
+79,7
@@
static void init_hash(zebra_rec_keys_t p)
}
}
}
}
-zebra_rec_keys_t zebra_rec_keys_open()
+zebra_rec_keys_t zebra_rec_keys_open(void)
{
zebra_rec_keys_t p = xmalloc(sizeof(*p));
p->buf_used = 0;
{
zebra_rec_keys_t p = xmalloc(sizeof(*p));
p->buf_used = 0;
diff --git
a/index/reckeys.h
b/index/reckeys.h
index
27b36ab
..
dd8e649
100644
(file)
--- a/
index/reckeys.h
+++ b/
index/reckeys.h
@@
-1,4
+1,4
@@
-/* $Id: reckeys.h,v 1.5 2006-08-14 10:40:15 adam Exp $
+/* $Id: reckeys.h,v 1.6 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-25,7
+25,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
typedef struct zebra_rec_keys_t_ *zebra_rec_keys_t;
typedef struct zebra_rec_keys_t_ *zebra_rec_keys_t;
-zebra_rec_keys_t zebra_rec_keys_open();
+zebra_rec_keys_t zebra_rec_keys_open(void);
void zebra_rec_keys_close(zebra_rec_keys_t p);
void zebra_rec_keys_close(zebra_rec_keys_t p);
diff --git
a/index/zebrash.c
b/index/zebrash.c
index
9ac1399
..
2fd1157
100644
(file)
--- a/
index/zebrash.c
+++ b/
index/zebrash.c
@@
-1,4
+1,4
@@
-/* $Id: zebrash.c,v 1.39 2006-08-14 10:40:15 adam Exp $
+/* $Id: zebrash.c,v 1.40 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-764,7
+764,7
@@
static void Zerrors (WRBUF outbuff)
* The shell
*/
* The shell
*/
-void shell()
+void shell(void)
{
int rc=0;
WRBUF outbuff=wrbuf_alloc();
{
int rc=0;
WRBUF outbuff=wrbuf_alloc();
@@
-827,7
+827,7
@@
void shell()
} /* shell() */
} /* shell() */
-static void usage()
+static void usage(void)
{
printf ("usage:\n");
printf ("zebrash [-c config]\n");
{
printf ("usage:\n");
printf ("zebrash [-c config]\n");
diff --git
a/index/zsets.c
b/index/zsets.c
index
c4ee2ff
..
643ba2c
100644
(file)
--- a/
index/zsets.c
+++ b/
index/zsets.c
@@
-1,4
+1,4
@@
-/* $Id: zsets.c,v 1.111 2006-09-20 10:51:25 adam Exp $
+/* $Id: zsets.c,v 1.112 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-83,7
+83,7
@@
static int log_level_searchhits=0;
static int log_level_searchterms=0;
static int log_level_resultsets=0;
static int log_level_searchterms=0;
static int log_level_resultsets=0;
-static void loglevels()
+static void loglevels(void)
{
if (log_level_set)
return;
{
if (log_level_set)
return;
diff --git
a/test/api/testlib.c
b/test/api/testlib.c
index
5735254
..
18f3cd9
100644
(file)
--- a/
test/api/testlib.c
+++ b/
test/api/testlib.c
@@
-1,4
+1,4
@@
-/* $Id: testlib.c,v 1.38 2006-09-08 09:56:40 adam Exp $
+/* $Id: testlib.c,v 1.39 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-89,7
+89,7
@@
ZebraService tl_start_up(char *cfgname, int argc, char **argv)
/**
* get_srcdir: return env srcdir or . (if does does not exist)
*/
/**
* get_srcdir: return env srcdir or . (if does does not exist)
*/
-const char *tl_get_srcdir()
+const char *tl_get_srcdir(void)
{
const char *srcdir = getenv("srcdir");
if (!srcdir || ! *srcdir)
{
const char *srcdir = getenv("srcdir");
if (!srcdir || ! *srcdir)
diff --git
a/test/api/testlib.h
b/test/api/testlib.h
index
c6ceb79
..
7ea589a
100644
(file)
--- a/
test/api/testlib.h
+++ b/
test/api/testlib.h
@@
-1,4
+1,4
@@
-/* $Id: testlib.h,v 1.22 2006-08-23 07:37:02 adam Exp $
+/* $Id: testlib.h,v 1.23 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-43,7
+43,7
@@
ZebraService tl_start_up(char *cfgname, int argc, char **argv);
* get_srcdir : returns the source dir. Most often ".", but when
* making distcheck, some other dir
*/
* get_srcdir : returns the source dir. Most often ".", but when
* making distcheck, some other dir
*/
-const char *tl_get_srcdir();
+const char *tl_get_srcdir(void);
/**
* start_log: open a log file
/**
* start_log: open a log file
diff --git
a/util/flock.c
b/util/flock.c
index
50b300e
..
704103c
100644
(file)
--- a/
util/flock.c
+++ b/
util/flock.c
@@
-1,4
+1,4
@@
-/* $Id: flock.c,v 1.19 2006-10-27 11:05:14 adam Exp $
+/* $Id: flock.c,v 1.20 2006-10-29 17:20:02 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-368,7
+368,7
@@
int zebra_unlock(ZebraLockHandle h)
* The default posix_locks=1 is assumed.. This function sets posix_locks
* to zero if linuxthreads is in use.
*/
* The default posix_locks=1 is assumed.. This function sets posix_locks
* to zero if linuxthreads is in use.
*/
-static int check_for_linuxthreads()
+static int check_for_linuxthreads(void)
{
#if __linux
#ifdef _CS_GNU_LIBPTHREAD_VERSION
{
#if __linux
#ifdef _CS_GNU_LIBPTHREAD_VERSION
diff --git
a/util/snippet.c
b/util/snippet.c
index
62663cf
..
48d37ef
100644
(file)
--- a/
util/snippet.c
+++ b/
util/snippet.c
@@
-1,4
+1,4
@@
-/* $Id: snippet.c,v 1.10 2006-08-14 10:40:34 adam Exp $
+/* $Id: snippet.c,v 1.11 2006-10-29 17:20:02 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-31,7
+31,7
@@
struct zebra_snippets {
zebra_snippet_word *tail;
};
zebra_snippet_word *tail;
};
-zebra_snippets *zebra_snippets_create()
+zebra_snippets *zebra_snippets_create(void)
{
NMEM nmem = nmem_create();
zebra_snippets *l = nmem_malloc(nmem, sizeof(*l));
{
NMEM nmem = nmem_create();
zebra_snippets *l = nmem_malloc(nmem, sizeof(*l));
diff --git
a/util/tstcharmap.c
b/util/tstcharmap.c
index
da7151a
..
201a900
100644
(file)
--- a/
util/tstcharmap.c
+++ b/
util/tstcharmap.c
@@
-1,4
+1,4
@@
-/* $Id: tstcharmap.c,v 1.5 2006-08-14 10:40:34 adam Exp $
+/* $Id: tstcharmap.c,v 1.6 2006-10-29 17:20:02 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-27,7
+27,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <yaz/log.h>
/* use env srcdir as base directory - or current directory if unset */
#include <yaz/log.h>
/* use env srcdir as base directory - or current directory if unset */
-const char *get_srcdir()
+const char *get_srcdir(void)
{
const char *srcdir = getenv("srcdir");
if (!srcdir || ! *srcdir)
{
const char *srcdir = getenv("srcdir");
if (!srcdir || ! *srcdir)
@@
-36,7
+36,7
@@
const char *get_srcdir()
}
}
-void tst1()
+void tst1(void)
{
/* open existing map chrmaptab.chr */
chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
{
/* open existing map chrmaptab.chr */
chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
@@
-48,7
+48,7
@@
void tst1()
chrmaptab_destroy(tab);
}
chrmaptab_destroy(tab);
}
-void tst2()
+void tst2(void)
{
/* open non-existing nonexist.chr */
chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
{
/* open non-existing nonexist.chr */
chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
diff --git
a/util/tstflock.c
b/util/tstflock.c
index
76166b4
..
d481fc5
100644
(file)
--- a/
util/tstflock.c
+++ b/
util/tstflock.c
@@
-1,4
+1,4
@@
-/* $Id: tstflock.c,v 1.16 2006-08-14 10:40:34 adam Exp $
+/* $Id: tstflock.c,v 1.17 2006-10-29 17:20:02 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-71,7
+71,7
@@
pthread_mutex_t sleep_mutex = PTHREAD_MUTEX_INITIALIZER;
int test_fd = 0;
int test_fd = 0;
-static void small_sleep()
+static void small_sleep(void)
{
#ifdef WIN32
Sleep(2);
{
#ifdef WIN32
Sleep(2);
@@
-194,7
+194,7
@@
static void tst_thread(int num, int write_flag)
num, write_flag, seq);
}
num, write_flag, seq);
}
-static void tst()
+static void tst(void)
{
tst_thread(4, 1); /* write locks */
if (1)
{
tst_thread(4, 1); /* write locks */
if (1)
@@
-213,7
+213,7
@@
static void tst()
tst_thread(20, 2); /* random locks */
}
tst_thread(20, 2); /* random locks */
}
-void fork_tst()
+void fork_tst(void)
{
#if HAVE_SYS_WAIT_H
pid_t pid[2];
{
#if HAVE_SYS_WAIT_H
pid_t pid[2];