|
@@ -336,18 +336,20 @@ let prerr_loc (fname, ystart, yend, xstart, xend) =
|
|
|
let prerr_loc_msg loc msg =
|
|
let prerr_loc_msg loc msg =
|
|
|
if args.verbose >= 1 then (
|
|
if args.verbose >= 1 then (
|
|
|
let (fname, ystart, yend, xstart, xend) = loc in
|
|
let (fname, ystart, yend, xstart, xend) = loc in
|
|
|
- let line_s = if yend != ystart
|
|
|
|
|
- then sprintf "lines %d-%d" ystart yend
|
|
|
|
|
- else sprintf "line %d" ystart
|
|
|
|
|
- in
|
|
|
|
|
- let char_s = if xend != xstart || yend != ystart
|
|
|
|
|
- then sprintf "characters %d-%d" xstart xend
|
|
|
|
|
- else sprintf "character %d" xstart
|
|
|
|
|
- in
|
|
|
|
|
- eprintf "File \"%s\", %s, %s:\n" fname line_s char_s;
|
|
|
|
|
|
|
+ if loc != noloc then (
|
|
|
|
|
+ let line_s = if yend != ystart
|
|
|
|
|
+ then sprintf "lines %d-%d" ystart yend
|
|
|
|
|
+ else sprintf "line %d" ystart
|
|
|
|
|
+ in
|
|
|
|
|
+ let char_s = if xend != xstart || yend != ystart
|
|
|
|
|
+ then sprintf "characters %d-%d" xstart xend
|
|
|
|
|
+ else sprintf "character %d" xstart
|
|
|
|
|
+ in
|
|
|
|
|
+ eprintf "File \"%s\", %s, %s:\n" fname line_s char_s;
|
|
|
|
|
+ );
|
|
|
eprintf "%s\n" msg;
|
|
eprintf "%s\n" msg;
|
|
|
|
|
|
|
|
- if args.verbose >= 2 then prerr_loc loc
|
|
|
|
|
|
|
+ if args.verbose >= 2 && loc != noloc then prerr_loc loc
|
|
|
);
|
|
);
|
|
|
()
|
|
()
|
|
|
|
|
|