From 7b2773fa3169bf0a8567c8bbc9910c1972e6e846 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 17 Jan 2000 20:21:40 +0000 Subject: [PATCH] Use "strchr()" rather than "index()" - the ANSI C standard specifies "strchr()", and it, unlike "index()", is declared in . svn path=/trunk/; revision=1502 --- editcap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editcap.c b/editcap.c index 9ac915a845..5efff45f75 100644 --- a/editcap.c +++ b/editcap.c @@ -1,10 +1,11 @@ /* Edit capture files. We can delete records, or simply convert from one * format to another format. * - * $Id: editcap.c,v 1.5 2000/01/17 08:06:03 sharpe Exp $ + * $Id: editcap.c,v 1.6 2000/01/17 20:21:40 guy Exp $ * * Originally written by Richard Sharpe. * Improved by Guy Harris. + * Further improved by Richard Sharpe. */ #include @@ -46,7 +47,7 @@ void add_selection(char *sel) printf("Add_Selected: %s\n", sel); - if ((locn = index(sel, '-')) == NULL) { /* No dash, so a single number? */ + if ((locn = strchr(sel, '-')) == NULL) { /* No dash, so a single number? */ printf("Not inclusive ...");