/[global]/global/htags/lexcommon.h
ViewVC logotype

Diff of /global/htags/lexcommon.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by shigio, Tue May 10 05:17:52 2005 UTC revision 1.15 by h-iwamoto, Thu Aug 25 13:04:28 2005 UTC
# Line 56  static int begin_line; Line 56  static int begin_line;
56   */   */
57  static int newline_terminate_string = 0;  static int newline_terminate_string = 0;
58    
59    /*
60     * Convert tabs to spaces.
61     */
62    static int dest_column;
63    static int left_spaces;
64    
65    #define YY_INPUT(buf, result, max_size) do {                            \
66            int n = 0;                                                      \
67            while (n < max_size) {                                          \
68                    int c;                                                  \
69                    if (left_spaces > 0) {                                  \
70                            left_spaces--;                                  \
71                            c = ' ';                                        \
72                    } else {                                                \
73                            c = getc(LEXIN);                                \
74                            if (c == EOF) {                                 \
75                                    if (ferror(LEXIN))                      \
76                                            die("read error.");             \
77                                    break;                                  \
78                            }                                               \
79                            if (c == '\t') {                                \
80                                    left_spaces = tabs - dest_column % tabs;\
81                                    continue;                               \
82                            }                                               \
83                    }                                                       \
84                    buf[n++] = c;                                           \
85                    dest_column++;                                          \
86                    if (c == '\n')                                          \
87                            dest_column = 0;                                \
88            }                                                               \
89            result = n;                                                     \
90    } while (0)
91    
92  #define LINENO lexcommon_lineno  #define LINENO lexcommon_lineno
93    
94  #define DEFAULT_BEGIN_OF_FILE_ACTION {                                  \  #define DEFAULT_BEGIN_OF_FILE_ACTION {                                  \
# Line 63  static int newline_terminate_string = 0; Line 96  static int newline_terminate_string = 0;
96          LEXRESTART(LEXIN);                                              \          LEXRESTART(LEXIN);                                              \
97          LINENO = 1;                                                     \          LINENO = 1;                                                     \
98          begin_line = 1;                                                 \          begin_line = 1;                                                 \
99            dest_column = 0;                                                \
100            left_spaces = 0;                                                \
101  }  }
102    
103  #define DEFAULT_YY_USER_ACTION {                                        \  #define DEFAULT_YY_USER_ACTION {                                        \

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26