aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Knudsen <thokn@sdfe.dk>2017-11-15 08:56:10 +0100
committerThomas Knudsen <thokn@sdfe.dk>2017-11-15 08:56:10 +0100
commit4ef2f40bcddb10c7cea3b6c2a6442f84f103ffd7 (patch)
treeab9b47a5bf314ef9d91e24c00c787a5c97e96544 /src
parent06b2f944d7844bb898ace8a7973f9182aa2234b1 (diff)
downloadPROJ-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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gie.c b/src/gie.c
index df4a0b07..4b89fe8f 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -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 ();
}