aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael.flex
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-28 15:33:05 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-28 15:33:05 +0000
commite00ea05ceab5a5e4531ba84bafbe3804dbcd520b (patch)
tree17e74723d5acf4ce67272c5416f458d84d012880 /pbx/ael/ael.flex
parent859a7936e18aa9299f8446f92249b2d0197146fa (diff)
fix last known bug in computing columb numbers in error messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23152 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r--pbx/ael/ael.flex12
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
%}