--- str_search.c 2002/04/01 08:32:54 1.18
+++ str_search.c 2003/01/06 19:13:48 1.19
@@ -1,9 +1,9 @@
/*
** OSSP str - String Handling
-** Copyright (c) 1999-2002 Ralf S. Engelschall <rse@engelschall.com>
-** Copyright (c) 1999-2002 The OSSP Project <http://www.ossp.org/>
+** Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
+** Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
**
-** This file is part of OSSP str, a string handling and manipulation
+** This file is part of OSSP str, a string handling and manipulation
** library which can be found at http://www.ossp.org/pkg/lib/str/.
**
** Permission to use, copy, modify, and distribute this software for
@@ -28,7 +28,7 @@
*/
#include "str_p.h"
-
+
/*
* str_span -- span over a set of character in a string.
* This is a spanning function inspired by POSIX strchr(3) and
@@ -53,7 +53,7 @@
rv = NULL;
if (!(mode & STR_RIGHT) && !(mode & STR_COMPLEMENT)) {
/* span from left to right while chars are in charset */
- sp = s;
+ sp = s;
l1:
sc = *sp++; n--;
if (sc != NUL && n >= 0) {
@@ -81,7 +81,7 @@
}
else if (!(mode & STR_RIGHT) && (mode & STR_COMPLEMENT)) {
/* span from left to right while chars are NOT in charset */
- sp = s;
+ sp = s;
l3a:
sc = *sp++; n--;
if (sc != NUL && n >= 0) {
@@ -147,24 +147,24 @@
if (*x == NUL)
return (char *)y;
- /*
+ /*
* Preprocessing
*/
/* determine length of strings */
str_ilen(m, x);
- if (n == 0)
+ if (n == 0)
str_ilen(n, y);
/* fill whole bad char skip array */
- for (i = 0; i < (sizeof(qs_bc)/sizeof(int)); i++)
+ for (i = 0; i < (sizeof(qs_bc)/sizeof(int)); i++)
qs_bc[(int)i] = m+1;
/* override positions related to pattern */
- for (i = 0; i < m; i++)
+ for (i = 0; i < m; i++)
qs_bc[(int)*(x+i)] = m-i;
-
- /*
+
+ /*
* Searching
*/
|