X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=dfa%2Fagrep.c;h=9f8f217360649504d230839deaaf1b6eb089a5a6;hp=71e7b37c7eb7cfe10ad75f8602767d5f26d49e11;hb=89d3a004b7c651fd5673abfc192e1472dc4d4197;hpb=47eeb5384a8fae8bcac8afb8a84782ca094683f9 diff --git a/dfa/agrep.c b/dfa/agrep.c index 71e7b37..9f8f217 100644 --- a/dfa/agrep.c +++ b/dfa/agrep.c @@ -1,5 +1,5 @@ -/* $Id: agrep.c,v 1.16 2005-06-14 20:28:53 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: agrep.c,v 1.20 2007-01-15 15:10:15 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,9 @@ 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 Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ @@ -60,9 +60,7 @@ void error (const char *format, ...) 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 == '-') @@ -112,8 +110,7 @@ static char *inf_buf; 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; @@ -143,8 +140,7 @@ int fd; return 0; } -static char *prline (p) -char *p; +static char *prline (char *p) { char *p0; @@ -163,9 +159,7 @@ char *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; @@ -220,9 +214,7 @@ struct DFA_state **dfaar; 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; @@ -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]; @@ -299,3 +289,11 @@ char **argv; dfa_delete (&dfa); return 0; } +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +