diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-04-28 15:33:05 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-04-28 15:33:05 +0000 |
commit | dad2812867c20e6a7cfcbd4bf92fd5347b9364d0 (patch) | |
tree | 17e74723d5acf4ce67272c5416f458d84d012880 /pbx/ael/ael.flex | |
parent | c1366df3d577ff9e936d02a3e106b9577925a45a (diff) |
fix last known bug in computing columb numbers in error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r-- | pbx/ael/ael.flex | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex index ffd9cdef0..d4c963b62 100644 --- a/pbx/ael/ael.flex +++ b/pbx/ael/ael.flex @@ -130,11 +130,13 @@ static void pbcwhere(const char *text, int *line, int *col ) int loc_col = *col; char c; while ( (c = *text++) ) { - if ( c == '\n' ) { + if ( c == '\t' ) { + loc_col += 8 - (loc_col % 8); + } else if ( c == '\n' ) { loc_line++; - loc_col = 0; - } - loc_col++; + loc_col = 1; + } else + loc_col++; } *line = loc_line; *col = loc_col; @@ -157,10 +159,12 @@ static void pbcwhere(const char *text, int *line, int *col ) yylloc->last_line = my_lineno; \ yylloc->last_column = my_col - 1; \ } while (0) +#define STORE_LOC do { STORE_START; STORE_END } while (0) #else #define STORE_POS #define STORE_START #define STORE_END +#define STORE_LOC #endif %} |