/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright (C) 2000 Helix Code Inc. * * 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* lookup.c: a simple client, part 2 */ #include #include #include #include #include "ibex.h" extern int optind; extern char *optarg; static void usage (void) { fprintf (stderr, "Usage: lookup [-f indexfile] word ...\n"); exit (1); } int main (int argc, char **argv) { ibex *ib; GPtrArray *ans, *words; int opt, i; 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, O_RDWR|O_CREAT, 0600); if (!ib) { printf ("Couldn't open %s: %s\n", file, strerror (errno)); exit (1); } words = g_ptr_array_new (); while (argc--) g_ptr_array_add (words, argv[argc]); ans = ibex_find_all (ib, words); if (ans) { for (i = 0; i < ans->len; i++) printf ("%s\n", (char *)g_ptr_array_index (ans, i)); exit (0); } else { printf ("Nope.\n"); exit (1); } } evel/electron4/files/ini-1.3.7 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/news
Commit message (Expand)AuthorAgeFilesLines
* news/sabnzbdplus: Update to 3.3.0James French2021-06-012-4/+4
* news/pan: remove manual linking with -lgnuregexDmitry Marakasov2021-05-151-1/+1
* Deorbit RESTRICTED && NO_CDROM, part two.Mathieu Arnold2021-05-061-2/+6
* news/sabnzbdplus: Update to 3.2.1James French2021-05-054-12/+21
* *: reset lifanov's ports after safekeeping their ports bit.Rene Ladan2021-05-051-1/+1
* news/sabnzbdplus: use archivers/par2cmdlineRene Ladan2021-04-301-13/+14
* Remove expired ports:Rene Ladan2021-04-248-91/+0
* devel/icu: update to 69.1Jan Beich2021-04-091-0/+1
* One more small cleanup, forgotten yesterday.Mathieu Arnold2021-04-0719-19/+0
* all: Remove all other $FreeBSD keywords.Mathieu Arnold2021-04-066-13/+3
* Remove # $FreeBSD$ from Makefiles.Mathieu Arnold2021-04-0668-70/+0
* news/leafnode: update to 1.11.12.Matthias Andree2021-03-282-19/+20
* news/nzbhydra2: Update to 3.13.1Tobias C. Berner2021-03-202-4/+4
* Mark BROKEN in 13/14 (via latest llvm update).Mark Linimon2021-02-191-0/+2
* Mark BROKEN in 13/14 (via latest llvm update).Mark Linimon2021-02-182-0/+6
* Mark BROKEN in 13/14 (via latest llvm update).Mark Linimon2021-02-181-0/+5
* Update a few GNUstep ports:Neel Chauhan2021-02-151-1/+1
* news/tin: Update to 2.4.5Kevin Bowling2021-02-083-11/+10
* news/trn4: fix build with -fno-commonChristian Weisgerber2021-02-071-0/+71
* - fix build on FreeBSD-13Dirk Meyer2021-02-031-1/+1
* news/inn: Update to 2.6.4Kevin Bowling2021-01-303-27/+6
* news/fidogate: Update to 5.10-3Rainer Hurling2021-01-282-32/+34
* news/nzbhydra2: enable on powerpc64lePiotr Kubaj2021-01-171-1/+1
* news/nzbhydra2: enable on powerpc64Piotr Kubaj2021-01-161-1/+1
* - use libgnuregex from portsDirk Meyer2021-01-072-2/+6
* news/rntrack: fix build on GCC architecturesPiotr Kubaj2021-01-041-1/+1
* Mark ports that are BROKEN due to sbrk on aarch64, also BROKEN on riscv64Mark Linimon2021-01-022-0/+2
* Drop python 2.7 support from a few portsAntoine Brodin2020-12-291-1/+1
* Relax hardcoded paths to fix build with Python 3.8.7Kai Knoblich2020-12-241-1/+1
* Remove expired port:Rene Ladan2020-12-12