Fixed bug #280: make dist must depend on bison. The extra rule
[yaz-moved-to-github.git] / src / ccltoken.c
index 11273b3..c4f0a60 100644 (file)
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  */
+/** 
+ * \file ccltoken.c
+ * \brief Implements CCL lexical analyzer (scanner)
+ */
 /* CCL - lexical analysis
  * Europagate, 1995
  *
- * $Id: ccltoken.c,v 1.4 2004-10-02 13:28:26 adam Exp $
+ * $Id: ccltoken.c,v 1.6 2005-03-15 16:32:52 adam Exp $
  *
  * Old Europagate Log:
  *
@@ -207,6 +211,7 @@ struct ccl_token *ccl_parser_tokenize (CCL_parser cclp, const char *command)
 
     while (1)
     {
+       const unsigned char *cp0 = cp;
        while (*cp && strchr (" \t\r\n", *cp))
        {
            cp++;
@@ -225,6 +230,8 @@ struct ccl_token *ccl_parser_tokenize (CCL_parser cclp, const char *command)
            last->next->prev = last;
            last = last->next;
        }
+       last->ws_prefix_buf = cp0;
+       last->ws_prefix_len = cp - cp0;
        last->next = NULL;
        last->name = (const char *) cp;
        last->len = 1;