OSSP CVS Repository

ossp - Difference in ossp-pkg/str/str_token.c versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/str/str_token.c 1.8 -> 1.9

--- str_token.c  2002/04/01 08:32:55     1.8
+++ str_token.c  2003/01/06 19:13:48     1.9
@@ -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
@@ -24,7 +24,7 @@
 **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 **  SUCH DAMAGE.
 **
-**  str_token.c: tokenizing functions 
+**  str_token.c: tokenizing functions
 */
 
 #include "str_p.h"
@@ -44,11 +44,11 @@
  */
 
 /*
- * isoneof -- check whether c is one of the chars in c 
+ * isoneof -- check whether c is one of the chars in c
  */
-static int 
+static int
 isoneof(
-    register char c, 
+    register char c,
     register const char *s)
 {
     for (; *s != NUL; s++)
@@ -58,7 +58,7 @@
 }
 
 /*
- * nextchar -- get next character from a string  
+ * nextchar -- get next character from a string
  */
 static char *
 nextchar(
@@ -177,15 +177,15 @@
         cs_comment = "";
 
     /* skip leading delimiters */
-    p = *s; 
+    p = *s;
     while (*p != NUL && isoneof(*p, cs_delim))
         p++;
 
     /* end of string, so stop parsing */
-    if (*p == NUL) 
+    if (*p == NUL)
         return NULL;
 
-    /* 
+    /*
      * start of comment reached, so stop parsing but update the parsing
      * cursor just in case the user wants to recover the comment
      */
@@ -195,7 +195,7 @@
         return NULL;
     }
 
-    /* 
+    /*
      * Set `cpToken' to point to returned string.
      * Then use p and q to walk through the string:
      *  - p will follow the input characters;
@@ -210,7 +210,7 @@
     cLeftQuote = NUL;
 
     if ((mode & STR_BACKSLASHESC) || (mode & STR_TRIGRAPHS)) {
-        /* 
+        /*
          * parse while recognizing backslash escapes
          */
         while (bInToken && (p = nextchar(p, &c, bWithTrigraphs, &bBackslashed)) != NULL) {
@@ -220,7 +220,7 @@
             }
             else if (!bInQuote && *cs_delim != NUL && isoneof(c, cs_delim)) {
                 /* reached end of token */
-                *q = NUL;      
+                *q = NUL;
                 bInToken = FALSE;
             }
             else if (!bInQuote && *cs_comment != NUL && isoneof(c, cs_comment)) {
@@ -231,7 +231,7 @@
             }
             else if (!bInQuote && *cs_quote != NUL && isoneof(c, cs_quote)) {
                 /* beginning a quoted segment */
-                bInQuote = TRUE; 
+                bInQuote = TRUE;
                 cLeftQuote = c;
                 if (!(mode & STR_STRIPQUOTES))
                     *q++ = c;
@@ -249,7 +249,7 @@
         }
     }
     else {
-        /* 
+        /*
          * parse while ignoring backslash escapes
          */
         while (bInToken && *p != NUL) {
@@ -274,7 +274,7 @@
             }
             else if (bInQuote && cLeftQuote == *p) {
                 /* ending a quoted segment */
-                bInQuote = FALSE; 
+                bInQuote = FALSE;
                 p++;
                 if (!(mode & STR_STRIPQUOTES))
                     *q++ = cLeftQuote;
@@ -288,9 +288,9 @@
 
     /* terminate token and update parsing cursor */
     *q = NUL;
-    *s = p; 
+    *s = p;
 
-    /* skip trailing delimiters 
+    /* skip trailing delimiters
        (if requested only, else we do it on next round) */
     if ((mode & STR_SKIPDELIMS) && *s != NULL) {
         while (*(*s) != NUL && isoneof(*(*s), cs_delim))

CVSTrac 2.0.1