per platform (currently only enabled for win32 and win64). Enabling it forces
code page conversion from the codepage of the .msg file to CP_ACP, before
writing the message to the console. Not enabling it keeps the previous
behaviour of not doing any kind of code page conversion for messages. This
feature should be tested and enabled per platform, because it requires code
page conversion support in the rtl (so it may require adding the appropriate
extra units, such as fpwidestring). When this feature is enabled for all
platforms, we can start keeping only one .msg file per language, because
having extra .msg files for different encodings for the same language becomes
redundant, since the compiler can do code page conversion to whatever code
page the console uses.
git-svn-id: trunk@36450 -
- allow turning some messages off by default by prefixing verbosity type with '-' sign (in error.msg)
- interpret -vm- as a switch which changes message verbosity to *on* by default
* appropriate error.msg file changes will come later
git-svn-id: trunk@19570 -
to by value to avoid passing an unaligned pointer.
* Adapt code calling FreeLocalVerbosity to reset
currrent_settings.pmessage to nil afterwards.
git-svn-id: trunk@18978 -
* globtype.pas:
tmsgstate updated (ms_on/off/error_global variants added).
ms_local_mask, ms_global_mask : new constants.
tmessagestaterecord: new record, use to list chains
of local changes to warnings by $WARN directive.
pmessagestaterecord: new pointer to tmessagestaterecord.
* globals.pas:
tsettings record:
new field: pmessage of type pmessagestaterecord;
* cmsgs.pas:
TMessage class:
New method: ResetStates; Called on unit parsing changes
New Method: SetVerbosity(nr:longint;newstate:tmsgstate):boolean;
Remember global state in
replacing ClearVerbosity method.
New boolean field: has_local_changes
set if a call to SetVerbosity makes a local change that must be
reset when changing unit.
* verbose.pas:
New functions/procedures:
function SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
for changes caused by $WARN or option
procedure RestoreLocalVerbosity(pstate : pmessagestaterecord);
procedure FreeLocalVerbosity(var fstate : pmessagestaterecord);
function ChangeMessageVerbosity(s: string; var i: integer;state:tmsgstate): boolean;
* switches.pas:
Implement recordpendingmessagestate
flushpendingswitchesstate: Handle new pmessage field of
current_settings record.
* parser.pas:
Handle pmessage field of current_settings.
* scandir.pas:
Handle also integer constants in $WARN.
git-svn-id: trunk@17852 -
* TCmdStr changed into an ansistring
* command line parameter handling uses now ansistrings
* message handling parameters are now ansistrings
git-svn-id: trunk@17469 -
- complete $WARN switch parsing and add a stab to change message state
- reimplement way of message hiding by -vm switch (by Dmitry Boyarintsev)
(note: $WARN switch does not work at the moment since state handling is not yet implemented)
git-svn-id: trunk@14809 -
* store a node's verbosity in the node so that e.g. disabling warnings
also disables warnings for this node in pass_1
(the above together fix mantis #12076)
* save/restore verbosity with {$push}/{$pop} (mantis #12075)
* if warnings/notes/hints are turned off, also do not count encountered
ones for the totals (otherwise -Sew cannot be used properly in
combination with {$warnings off}, because disabled warnings will still
trigger a compiler error) -- this required adding -vw/-vn/-vh to all
tests using -Sew/-Sen/-Seh
- removed some superfluous state saving/restoring from firstpass()
git-svn-id: trunk@12025 -
+ -vm<x>,<y> parameter to mask messages <x> and <y>
(both based on a patch submitted by Petr Kristan)
* alphabetically ordered -v<x> option processing code so it's easier
to see which characters are still free (not many anymore)
+ some tests for the -vm functionality
git-svn-id: trunk@11888 -
* new set_current_module function that sets the current_module and
all related variables. Also closes scanner files if required, but
that might still need some optimization to prevent closing/opening
files too often
git-svn-id: trunk@7428 -