diff options
author | nobody <nobody@localhost> | 2000-02-17 07:51:01 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2000-02-17 07:51:01 +0800 |
commit | 2b80feefead30f2b24a3c51c4b52373c5faacbac (patch) | |
tree | 646d019769a1d66081bd13dc9cab96c4417d8843 /libibex/mkindex.c | |
parent | 5a80143a526ddc84b31e8458c525d40580c06810 (diff) | |
download | gsoc2013-evolution-GNOME_CORE_1_1_4.tar gsoc2013-evolution-GNOME_CORE_1_1_4.tar.gz gsoc2013-evolution-GNOME_CORE_1_1_4.tar.bz2 gsoc2013-evolution-GNOME_CORE_1_1_4.tar.lz gsoc2013-evolution-GNOME_CORE_1_1_4.tar.xz gsoc2013-evolution-GNOME_CORE_1_1_4.tar.zst gsoc2013-evolution-GNOME_CORE_1_1_4.zip |
This commit was manufactured by cvs2svn to create tagGNOME_CORE_1_1_4
'GNOME_CORE_1_1_4'.
svn path=/tags/GNOME_CORE_1_1_4/; revision=1807
Diffstat (limited to 'libibex/mkindex.c')
-rw-r--r-- | libibex/mkindex.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/libibex/mkindex.c b/libibex/mkindex.c deleted file mode 100644 index 8018caef69..0000000000 --- a/libibex/mkindex.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright 2000 Helix Code Inc. -*/ -/* mkindex.c: a simple client, part 1 */ - -#include <errno.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> - -#include "ibex.h" - -extern int optind; -extern char *optarg; - -static void -usage(void) -{ - fprintf(stderr, "Usage: mkindex [-f indexfile] file ...\n"); - exit(1); -} - -int -main(int argc, char **argv) -{ - ibex *ib; - int opt; - char *file = "INDEX"; - - while ((opt = getopt(argc, argv, "f:")) != -1) - { - switch (opt) - { - case 'f': - file = optarg; - break; - - default: - usage(); - break; - } - } - argc -= optind; - argv += optind; - - if (argc == 0) - usage(); - - ib = ibex_open(file, TRUE); - if (!ib) - { - fprintf(stderr, "Couldn't open index file %s: %s\n", - file, strerror(errno)); - exit(1); - } - - while (argc--) - { - if (ibex_index_file(ib, argv[argc]) == -1) - { - fprintf(stderr, "Couldn't index %s: %s\n", argv[argc], - strerror(errno)); - exit(1); - } - } - - - if (ibex_close(ib) != 0) - { - fprintf(stderr, "Failed to write index file %s: %s\n", - file, strerror(errno)); - exit(1); - } - exit(0); -} |