glsl/glcpp: Fix off-by-one error in column in first-line error messages
authorCarl Worth <cworth@cworth.org>
Sat, 21 Jun 2014 02:17:28 +0000 (19:17 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 29 Jul 2014 22:11:49 +0000 (15:11 -0700)
commit8e8f8ff1b25a4cfd332d9e7c86d3d56cdff98d6a
tree526c4d0343aadc30dfd9d283b8caabff9c34422d
parent0742e0acd302d90dd7f326cf641da61ac60a8508
glsl/glcpp: Fix off-by-one error in column in first-line error messages

For the first line we were initializing the column to 1, but for all
subsequent lines we were initializing the column to 0. The column number is
advanced for each token read before any error message is printed. So the 0
value is the correct initialization, (so that the first column is reported as
column 1).

With this extremely minor change, many of the .expected files are updated such
that error messages for the first line now have the correct column number in
them.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
17 files changed:
src/glsl/glcpp/glcpp-lex.l
src/glsl/glcpp/tests/077-else-without-if.c.expected
src/glsl/glcpp/tests/078-elif-without-if.c.expected
src/glsl/glcpp/tests/079-endif-without-if.c.expected
src/glsl/glcpp/tests/083-unterminated-if.c.expected
src/glsl/glcpp/tests/086-reserved-macro-names.c.expected
src/glsl/glcpp/tests/090-hash-error.c.expected
src/glsl/glcpp/tests/093-divide-by-zero.c.expected
src/glsl/glcpp/tests/103-garbage-after-else-0.c.expected
src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected
src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected
src/glsl/glcpp/tests/120-undef-builtin.c.expected
src/glsl/glcpp/tests/123-garbage-after-else-1.c.expected
src/glsl/glcpp/tests/126-garbage-after-directive.c.expected
src/glsl/glcpp/tests/129-define-non-identifier.c.expected
src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected
src/glsl/glcpp/tests/133-eof-without-newline-comment.c.expected