diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2017-11-15 08:56:10 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2017-11-15 08:56:10 +0100 |
| commit | 4ef2f40bcddb10c7cea3b6c2a6442f84f103ffd7 (patch) | |
| tree | ab9b47a5bf314ef9d91e24c00c787a5c97e96544 /src | |
| parent | 06b2f944d7844bb898ace8a7973f9182aa2234b1 (diff) | |
| download | PROJ-4ef2f40bcddb10c7cea3b6c2a6442f84f103ffd7.tar.gz PROJ-4ef2f40bcddb10c7cea3b6c2a6442f84f103ffd7.zip | |
Give definition and definition line no. in message about invalid operations
Diffstat (limited to 'src')
| -rw-r--r-- | src/gie.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -150,12 +150,13 @@ typedef struct { int op_ok, op_ko; int total_ok, total_ko; int grand_ok, grand_ko; + size_t operation_lineno; double tolerance; char *curr_file; FILE *fout; } gie_ctx; -gie_ctx T = {{""}, 0, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, PJ_FWD, 1, 0, 0,0,0,0,0,0,0, 0.0005, 0, 0}; +gie_ctx T = {{""}, 0, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, PJ_FWD, 1, 0, 0,0,0,0,0,0,0,0, 0.0005, 0, 0}; OPTARGS *o; @@ -438,6 +439,8 @@ static int operation (char *args) { int i, j, n; T.op_id++; + T.operation_lineno = lineno; + /* compactify the args, so we can fit more info on a line in verbose mode */ n = (int) strlen (args); for (i = j = 0; i < n; ) { @@ -658,7 +661,8 @@ static int expect (char *args) { expect_failure = 1; if (0==T.P && !expect_failure) { - errmsg(3, "Invalid operation definition!\n %s\n", args); + banner (T.operation); + errmsg(3, "%sInvalid operation definition in line no. %d\n", delim, (int) T.operation_lineno); return another_failure (); } |
