Changeset 5a45706 in git


Ignore:
Timestamp:
03/03/15 12:15:49 (5 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
48787a9
Parents:
9b658f2
Message:

lib/survex.pot,src/message.c,tests/: Show 'error' in front of error
messages, like we show 'warning' in front of warnings. Fixes #48,
reported by Wookey.

Files:
26 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r9b658f2 r5a45706  
     1Tue Mar 03 12:14:22 GMT 2015  Olly Betts <olly@survex.com>
     2
     3        * lib/survex.pot,src/message.c,tests/: Show 'error' in front of error
     4          messages, like we show 'warning' in front of warnings.  Fixes #48,
     5          reported by Wookey.
     6
    17Tue Mar 03 11:05:17 GMT 2015  Olly Betts <olly@survex.com>
    28
  • lib/survex.pot

    r9b658f2 r5a45706  
    4343#: n:4
    4444msgid "warning"
     45msgstr ""
     46
     47#. TRANSLATORS: Indicates an error message e.g.:
     48#. "spoon.svx:13:4: error: Field may not be omitted"
     49#: ../src/message.c:1254
     50#: n:93
     51msgid "error"
    4552msgstr ""
    4653
  • src/message.c

    r9b658f2 r5a45706  
    12401240   aven_v_report(severity, fnm, line, en, ap);
    12411241#else
     1242   const char * level;
    12421243   if (fnm) {
    12431244      fputs(fnm, STDERR);
     
    12521253      /* TRANSLATORS: Indicates a warning message e.g.:
    12531254       * "spoon.svx:12: warning: *prefix is deprecated" */
    1254       fputs(msg(/*warning*/4), STDERR);
    1255       fputs(": ", STDERR);
    1256    }
     1255      level = msg(/*warning*/4);
     1256   } else {
     1257      /* TRANSLATORS: Indicates an error message e.g.:
     1258       * "spoon.svx:13:4: error: Field may not be omitted" */
     1259      level = msg(/*error*/93);
     1260   }
     1261   fputs(level, STDERR);
     1262   fputs(": ", STDERR);
    12571263
    12581264   vfprintf(STDERR, msg(en), ap);
  • tests/anonstnbad.out

    r9b658f2 r5a45706  
    1 ./anonstnbad.svx:2:6: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
    2 ./anonstnbad.svx:3:6: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
    3 ./anonstnbad.svx:4:6: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
    4 ./anonstnbad.svx:6:6: Can't have a leg between two anonymous stations
    5 ./anonstnbad.svx:7:7: Can't have a leg between two anonymous stations
    6 ./anonstnbad.svx:8:5: Can't have a leg between two anonymous stations
     1./anonstnbad.svx:2:6: error: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
     2./anonstnbad.svx:3:6: error: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
     3./anonstnbad.svx:4:6: error: Character "." not allowed in station name (use *SET NAMES to set allowed characters)
     4./anonstnbad.svx:6:6: error: Can't have a leg between two anonymous stations
     5./anonstnbad.svx:7:7: error: Can't have a leg between two anonymous stations
     6./anonstnbad.svx:8:5: error: Can't have a leg between two anonymous stations
    77
    88Removing trailing traverses...
  • tests/bad_units_factor.out

    r9b658f2 r5a45706  
    1 ./bad_units_factor.svx:3:14: *UNITS factor must be non-zero
    2 ./bad_units_factor.svx:4:17: *UNITS factor must be non-zero
    3 ./bad_units_factor.svx:5:15: *UNITS factor must be non-zero
    4 ./bad_units_factor.svx:6:15: *UNITS factor must be non-zero
    5 ./bad_units_factor.svx:7:18: *UNITS factor must be non-zero
    6 ./bad_units_factor.svx:8:19: *UNITS factor must be non-zero
     1./bad_units_factor.svx:3:14: error: *UNITS factor must be non-zero
     2./bad_units_factor.svx:4:17: error: *UNITS factor must be non-zero
     3./bad_units_factor.svx:5:15: error: *UNITS factor must be non-zero
     4./bad_units_factor.svx:6:15: error: *UNITS factor must be non-zero
     5./bad_units_factor.svx:7:18: error: *UNITS factor must be non-zero
     6./bad_units_factor.svx:8:19: error: *UNITS factor must be non-zero
    77
    88Removing trailing traverses...
  • tests/bad_units_qlist.out

    r9b658f2 r5a45706  
    1 ./bad_units_qlist.svx:3:8: Unknown instrument "position"
    2 ./bad_units_qlist.svx:4:8: Unknown instrument "plumb"
    3 ./bad_units_qlist.svx:5:8: Unknown instrument "level"
     1./bad_units_qlist.svx:3:8: error: Unknown instrument "position"
     2./bad_units_qlist.svx:4:8: error: Unknown instrument "plumb"
     3./bad_units_qlist.svx:5:8: error: Unknown instrument "level"
    44
    55Removing trailing traverses...
  • tests/badbegin.out

    r9b658f2 r5a45706  
    1 ./badbegin.svx:3:10: Matching BEGIN command has no survey name
    2 ./badbegin.svx:6:11: Survey name doesn't match BEGIN
     1./badbegin.svx:3:10: error: Matching BEGIN command has no survey name
     2./badbegin.svx:6:11: error: Survey name doesn't match BEGIN
    33./badbegin.svx:8:5: warning: Survey name omitted from END
    44
  • tests/badcalibrate.out

    r9b658f2 r5a45706  
    1 ./badcalibrate.svx:4:25: Scale factor must be non-zero
    2 ./badcalibrate.svx:5:34: Scale factor must be non-zero
    3 ./badcalibrate.svx:6:20: Scale factor must be non-zero
    4 ./badcalibrate.svx:8: Can't calibrate angular and length quantities together
     1./badcalibrate.svx:4:25: error: Scale factor must be non-zero
     2./badcalibrate.svx:5:34: error: Scale factor must be non-zero
     3./badcalibrate.svx:6:20: error: Scale factor must be non-zero
     4./badcalibrate.svx:8: error: Can't calibrate angular and length quantities together
    55
    66Removing trailing traverses...
  • tests/badinc.out

    r9b658f2 r5a45706  
    1 ./badinc.svx:3: Couldn't open file "nonexistent_file"
    2 cavern: No survey data
     1./badinc.svx:3: error: Couldn't open file "nonexistent_file"
     2cavern: error: No survey data
  • tests/badinc2.out

    r9b658f2 r5a45706  
    11In file included from ./badinc2.svx:3:
    2 ./badinc.svx:3: Couldn't open file "nonexistent_file"
    3 cavern: No survey data
     2./badinc.svx:3: error: Couldn't open file "nonexistent_file"
     3cavern: error: No survey data
  • tests/badinc3.out

    r9b658f2 r5a45706  
    11In file included from ./badinc3.svx:3:
    22In file included from ./badinc2.svx:3:
    3 ./badinc.svx:3: Couldn't open file "nonexistent_file"
    4 cavern: No survey data
     3./badinc.svx:3: error: Couldn't open file "nonexistent_file"
     4cavern: error: No survey data
  • tests/badinc4.out

    r9b658f2 r5a45706  
    1 ./badinc4.svx:3:10: Expecting string field
    2 ./badinc4.svx:4:9: Expecting string field
    3 ./badinc4.svx:5:25: Missing "
     1./badinc4.svx:3:10: error: Expecting string field
     2./badinc4.svx:4:9: error: Expecting string field
     3./badinc4.svx:5:25: error: Missing "
    44
    55Removing trailing traverses...
  • tests/badreadingdotplus.out

    r9b658f2 r5a45706  
    1 ./badreadingdotplus.svx:3:12: Expecting numeric field, found ".hello."
    2 ./badreadingdotplus.svx:4:12: Expecting numeric field, found "+hello+"
    3 ./badreadingdotplus.svx:6:11: Expecting numeric field, found "-hello"
     1./badreadingdotplus.svx:3:12: error: Expecting numeric field, found ".hello."
     2./badreadingdotplus.svx:4:12: error: Expecting numeric field, found "+hello+"
     3./badreadingdotplus.svx:6:11: error: Expecting numeric field, found "-hello"
    44
    55Removing trailing traverses...
  • tests/badunits.out

    r9b658f2 r5a45706  
    1 ./badunits.svx:3:15: Unknown units "FURLONGS"
    2 ./badunits.svx:4:29: Unknown units "Radians"
    3 ./badunits.svx:5:16: Invalid units "METRES" for quantity
    4 ./badunits.svx:6:19: Invalid units "Degrees" for quantity
    5 ./badunits.svx:7:23: Invalid units "Metres" for quantity
    6 ./badunits.svx:8:8: Unknown quantity "Anemometer"
    7 ./badunits.svx:10:16: End of line not blank
    8 ./badunits.svx:11:16: End of line not blank
    9 ./badunits.svx:12:13: Unknown units "DEFault"
    10 ./badunits.svx:13:13: Unknown units "DEFault"
    11 ./badunits.svx:14:16: End of line not blank
    12 ./badunits.svx:15:16: End of line not blank
     1./badunits.svx:3:15: error: Unknown units "FURLONGS"
     2./badunits.svx:4:29: error: Unknown units "Radians"
     3./badunits.svx:5:16: error: Invalid units "METRES" for quantity
     4./badunits.svx:6:19: error: Invalid units "Degrees" for quantity
     5./badunits.svx:7:23: error: Invalid units "Metres" for quantity
     6./badunits.svx:8:8: error: Unknown quantity "Anemometer"
     7./badunits.svx:10:16: error: End of line not blank
     8./badunits.svx:11:16: error: End of line not blank
     9./badunits.svx:12:13: error: Unknown units "DEFault"
     10./badunits.svx:13:13: error: Unknown units "DEFault"
     11./badunits.svx:14:16: error: End of line not blank
     12./badunits.svx:15:16: error: End of line not blank
    1313
    1414Removing trailing traverses...
  • tests/cmd_datebad2.out

    r9b658f2 r5a45706  
    1414./cmd_datebad2.svx:17: warning: Invalid month
    1515./cmd_datebad2.svx:18: warning: Invalid month
    16 ./cmd_datebad2.svx:19:28: End of date range is before the start
    17 ./cmd_datebad2.svx:20:14: End of date range is before the start
     16./cmd_datebad2.svx:19:28: error: End of date range is before the start
     17./cmd_datebad2.svx:20:14: error: End of date range is before the start
    1818./cmd_datebad2.svx:21: warning: Invalid year (< 1900 or > 2078)
    1919./cmd_datebad2.svx:22: warning: Invalid year (< 1900 or > 2078)
  • tests/cmd_entrance_bad.out

    r9b658f2 r5a45706  
    1 ./cmd_entrance_bad.svx:3:10: Expecting station name
     1./cmd_entrance_bad.svx:3:10: error: Expecting station name
    22
    33Removing trailing traverses...
  • tests/cmd_fix_bad.out

    r9b658f2 r5a45706  
    1 ./cmd_fix_bad.svx:2:9: Expecting numeric field, found ""
    2 ./cmd_fix_bad.svx:3:11: Expecting numeric field, found ""
    3 ./cmd_fix_bad.svx:4:30: Expecting numeric field, found ""
    4 ./cmd_fix_bad.svx:5:35: Expecting numeric field, found ""
    5 ./cmd_fix_bad.svx:6:12: Expecting numeric field, found "test"
    6 ./cmd_fix_bad.svx:8:20: Expecting numeric field, found ""
    7 ./cmd_fix_bad.svx:9:22: Expecting numeric field, found ""
    8 ./cmd_fix_bad.svx:10:41: Expecting numeric field, found ""
    9 ./cmd_fix_bad.svx:11:46: Expecting numeric field, found ""
    10 ./cmd_fix_bad.svx:12:23: Expecting numeric field, found "test"
     1./cmd_fix_bad.svx:2:9: error: Expecting numeric field, found ""
     2./cmd_fix_bad.svx:3:11: error: Expecting numeric field, found ""
     3./cmd_fix_bad.svx:4:30: error: Expecting numeric field, found ""
     4./cmd_fix_bad.svx:5:35: error: Expecting numeric field, found ""
     5./cmd_fix_bad.svx:6:12: error: Expecting numeric field, found "test"
     6./cmd_fix_bad.svx:8:20: error: Expecting numeric field, found ""
     7./cmd_fix_bad.svx:9:22: error: Expecting numeric field, found ""
     8./cmd_fix_bad.svx:10:41: error: Expecting numeric field, found ""
     9./cmd_fix_bad.svx:11:46: error: Expecting numeric field, found ""
     10./cmd_fix_bad.svx:12:23: error: Expecting numeric field, found "test"
    1111
    1212Removing trailing traverses...
  • tests/cmd_prefix_bad.out

    r9b658f2 r5a45706  
    11./cmd_prefix_bad.svx:3:8: warning: *prefix is deprecated - use *begin and *end instead
    2 ./cmd_prefix_bad.svx:3:8: Expecting survey name
     2./cmd_prefix_bad.svx:3:8: error: Expecting survey name
    33
    44Removing trailing traverses...
  • tests/cmd_sd_bad.out

    r9b658f2 r5a45706  
    1 ./cmd_sd_bad.svx:4:16: Expecting numeric field, found "metres"
    2 ./cmd_sd_bad.svx:5:15: Unknown units "furlongs"
    3 ./cmd_sd_bad.svx:6:15: Unknown units "furlongs"
    4 ./cmd_sd_bad.svx:7:5: Unknown quantity "tripe"
    5 ./cmd_sd_bad.svx:8:15: Expecting numeric field, found "tripe"
    6 ./cmd_sd_bad.svx:9:22: Invalid units "meters" for quantity
    7 ./cmd_sd_bad.svx:10:5: Unknown quantity ""
     1./cmd_sd_bad.svx:4:16: error: Expecting numeric field, found "metres"
     2./cmd_sd_bad.svx:5:15: error: Unknown units "furlongs"
     3./cmd_sd_bad.svx:6:15: error: Unknown units "furlongs"
     4./cmd_sd_bad.svx:7:5: error: Unknown quantity "tripe"
     5./cmd_sd_bad.svx:8:15: error: Expecting numeric field, found "tripe"
     6./cmd_sd_bad.svx:9:22: error: Invalid units "meters" for quantity
     7./cmd_sd_bad.svx:10:5: error: Unknown quantity ""
    88
    99Removing trailing traverses...
  • tests/cmd_set_bad.out

    r9b658f2 r5a45706  
    1 ./cmd_set_bad.svx:5:17: Expecting numeric field, found " reference"
    2 ./cmd_set_bad.svx:11:1: End of line not blank
    3 ./cmd_set_bad.svx:13:1: End of line not blank
    4 ./cmd_set_bad.svx:20:23: Expecting numeric field, found ".0"
    5 ./cmd_set_bad.svx:22:22: Expecting numeric field, found "+1.0"
    6 ./cmd_set_bad.svx:28:12: Only one station in EQUATE command
    7 ./cmd_set_bad.svx:31:10: Expecting numeric field, found "-"
    8 ./cmd_set_bad.svx:34:6: Unknown character class "FormFeed"
     1./cmd_set_bad.svx:5:17: error: Expecting numeric field, found " reference"
     2./cmd_set_bad.svx:11:1: error: End of line not blank
     3./cmd_set_bad.svx:13:1: error: End of line not blank
     4./cmd_set_bad.svx:20:23: error: Expecting numeric field, found ".0"
     5./cmd_set_bad.svx:22:22: error: Expecting numeric field, found "+1.0"
     6./cmd_set_bad.svx:28:12: error: Only one station in EQUATE command
     7./cmd_set_bad.svx:31:10: error: Expecting numeric field, found "-"
     8./cmd_set_bad.svx:34:6: error: Unknown character class "FormFeed"
    99./cmd_set_bad.svx:35:6: warning: ROOT is deprecated
    1010
  • tests/csbad.out

    r9b658f2 r5a45706  
    1 ./csbad.svx:2: Station "1" fixed before CS command first used
    2 ./csbad.svx:3:4: Unknown coordinate system
    3 ./csbad.svx:4:4: Unknown coordinate system
    4 ./csbad.svx:5:4: Unknown coordinate system
    5 ./csbad.svx:6:11: End of line not blank
    6 ./csbad.svx:7:4: Unknown coordinate system
    7 ./csbad.svx:8:4: Unknown coordinate system
    8 ./csbad.svx:9:4: Unknown coordinate system
    9 ./csbad.svx:10:4: Unknown coordinate system
    10 ./csbad.svx:11:4: Unknown coordinate system
    11 ./csbad.svx:12:4: Unknown coordinate system
    12 ./csbad.svx:13:4: Unknown coordinate system
    13 ./csbad.svx:14:4: Unknown coordinate system
    14 ./csbad.svx:15:4: Unknown coordinate system
    15 ./csbad.svx:16:4: Unknown coordinate system
    16 ./csbad.svx:17:4: Unknown coordinate system
    17 ./csbad.svx:18:4: Unknown coordinate system
    18 ./csbad.svx:19:4: Unknown coordinate system
    19 ./csbad.svx:20:4: Invalid coordinate system: unknown projection id
    20 ./csbad.svx:21:4: Unknown coordinate system
    21 ./csbad.svx:22:4: Coordinate system unsuitable for output
    22 ./csbad.svx:23:4: Coordinate system unsuitable for output
    23 ./csbad.svx:24:4: Coordinate system unsuitable for output
     1./csbad.svx:2: error: Station "1" fixed before CS command first used
     2./csbad.svx:3:4: error: Unknown coordinate system
     3./csbad.svx:4:4: error: Unknown coordinate system
     4./csbad.svx:5:4: error: Unknown coordinate system
     5./csbad.svx:6:11: error: End of line not blank
     6./csbad.svx:7:4: error: Unknown coordinate system
     7./csbad.svx:8:4: error: Unknown coordinate system
     8./csbad.svx:9:4: error: Unknown coordinate system
     9./csbad.svx:10:4: error: Unknown coordinate system
     10./csbad.svx:11:4: error: Unknown coordinate system
     11./csbad.svx:12:4: error: Unknown coordinate system
     12./csbad.svx:13:4: error: Unknown coordinate system
     13./csbad.svx:14:4: error: Unknown coordinate system
     14./csbad.svx:15:4: error: Unknown coordinate system
     15./csbad.svx:16:4: error: Unknown coordinate system
     16./csbad.svx:17:4: error: Unknown coordinate system
     17./csbad.svx:18:4: error: Unknown coordinate system
     18./csbad.svx:19:4: error: Unknown coordinate system
     19./csbad.svx:20:4: error: Invalid coordinate system: unknown projection id
     20./csbad.svx:21:4: error: Unknown coordinate system
     21./csbad.svx:22:4: error: Coordinate system unsuitable for output
     22./csbad.svx:23:4: error: Coordinate system unsuitable for output
     23./csbad.svx:24:4: error: Coordinate system unsuitable for output
    2424
    2525Removing trailing traverses...
  • tests/equatenosuchstn.out

    r9b658f2 r5a45706  
    2222North-South range = 1.71m (from entrance.1 at 0.00m to entrance.2 at -1.71m)
    2323East-West range = 9.70m (from entrance.2 at 9.70m to entrance.1 at 0.00m)
    24 ./equatenosuchstn.svx:8: Reference to station "nosuchsurvey.1" from non-existent survey "nosuchsurvey"
     24./equatenosuchstn.svx:8: error: Reference to station "nosuchsurvey.1" from non-existent survey "nosuchsurvey"
    2525./equatenosuchstn.svx:8: warning: Station "nosuchsurvey.1" referred to just once, with an explicit survey name - typo?
    2626   2 1-nodes.
  • tests/normal_bad.out

    r9b658f2 r5a45706  
    1 ./normal_bad.svx:4:5: Field may not be omitted
    2 ./normal_bad.svx:5: Compass reading may not be omitted except on plumbed legs
    3 ./normal_bad.svx:6:3: Character "*" not allowed in station name (use *SET NAMES to set allowed characters)
     1./normal_bad.svx:4:5: error: Field may not be omitted
     2./normal_bad.svx:5: error: Compass reading may not be omitted except on plumbed legs
     3./normal_bad.svx:6:3: error: Character "*" not allowed in station name (use *SET NAMES to set allowed characters)
    44
    55Removing trailing traverses...
  • tests/nosurveyhanging.out

    r9b658f2 r5a45706  
    66
    77Simplifying network...
    8 cavern: Survey not all connected to fixed stations
     8cavern: error: Survey not all connected to fixed stations
    99The following survey stations are not attached to a fixed point:
    1010test.1
  • tests/omitfixaroundsolve.out

    r9b658f2 r5a45706  
    1313Calculating trailing traverses...
    1414./omitfixaroundsolve.svx:6: warning: FIX command with no coordinates - fixing at (0,0,0)
    15 ./omitfixaroundsolve.svx:4: Already had FIX command with no coordinates for station "a"
     15./omitfixaroundsolve.svx:4: error: Already had FIX command with no coordinates for station "a"
    1616
    1717Removing trailing traverses...
  • tests/surveytypo.out

    r9b658f2 r5a45706  
    55
    66Simplifying network...
    7 ./surveytypo.svx:15: Reference to station "gos.1" from non-existent survey "gos"
     7./surveytypo.svx:15: error: Reference to station "gos.1" from non-existent survey "gos"
    88./surveytypo.svx:15: warning: Station "gos.1" referred to just once, with an explicit survey name - typo?
    9 cavern: Survey not all connected to fixed stations
     9cavern: error: Survey not all connected to fixed stations
    1010The following survey stations are not attached to a fixed point:
    1111cave.001
Note: See TracChangeset for help on using the changeset viewer.