Changeset 86530e7


Ignore:
Timestamp:
Jan 13, 2022, 9:50:41 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
enum, forall-pointer-decay, master
Children:
9ee3f54
Parents:
75965a6
Message:

simplify IO statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    r75965a6 r86530e7  
     1
     2
     3#pragma GCC diagnostic push
     4//#pragma GCC diagnostic ignored "-Wunused-parameter"
     5//#pragma GCC diagnostic ignored "-Wunused-function"
     6//#pragma GCC diagnostic ignored "-Wuninitialized"
     7//#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
     8
    19#include <fstream.hfa>
    210#include <parseargs.hfa>
     
    1927// TODO: use string interface when it's ready (and implement exception msg protocol)
    2028[ void ] msg( * Missing_Config_Entries ex ) {
    21         serr | nlOff;
    22         serr | "The config file is missing " | ex->num_missing;
    23         serr | nlOn;
    24         if ( ex->num_missing == 1 ) {
    25                 serr | " entry.";
    26         } else {
    27                 serr | " entries.";
    28         }
     29        serr | "The config file is missing " | ex->num_missing | "entr" | sepOff | (ex->num_missing == 1 ? "y." : "ies.");
    2930} // msg
    3031
     
    223224        return value < zero_val;
    224225}
     226#pragma GCC diagnostic pop
    225227
    226228
Note: See TracChangeset for help on using the changeset viewer.