src/inc/tokenizer.h 1.4

1.4 2009/11/20 08:08:53 kent
Adding leadingSpaces field to tokenizer
Index: src/inc/tokenizer.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/tokenizer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/inc/tokenizer.h	14 Jul 2004 05:47:14 -0000	1.3
+++ src/inc/tokenizer.h	20 Nov 2009 08:08:53 -0000	1.4
@@ -10,8 +10,9 @@
 /* This handles reading in tokens. */
     {
     bool reuse;	         /* True if want to reuse this token. */
     bool eof;            /* True at end of file. */
+    int leadingSpaces;	 /* Number of leading spaces before token. */
     struct lineFile *lf; /* Underlying file. */
     char *curLine;       /* Current line of text. */
     char *linePt;        /* Start position within current line. */
     char *string;        /* String value of token */
@@ -43,18 +44,19 @@
 /* Return name of file. */
 
 char *tokenizerNext(struct tokenizer *tkz);
 /* Return token's next string (also available as tkz->string) or
- * NULL at EOF. */
+ * NULL at EOF. This string will be overwritten with the next call
+ * to tokenizerNext, so cloneString if you need to save it. */
 
 void tokenizerErrAbort(struct tokenizer *tkz, char *format, ...);
 /* Print error message followed by file and line number and
  * abort. */
 
 void tokenizerNotEnd(struct tokenizer *tkz);
 /* Squawk if at end. */
 
-void tokenizerMustHaveNext(struct tokenizer *tkz);
+char *tokenizerMustHaveNext(struct tokenizer *tkz);
 /* Get next token, which must be there. */
 
 void tokenizerMustMatch(struct tokenizer *tkz, char *string);
 /* Require next token to match string.  Return next token