ppc386 inside path with underscore -> help message is incorrect
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
When I put ppc386 executable inside some path with underscore (e.g. in /home/michal/fpc_test/ppc386) and run ppc386 from there without params, it prints message like
Free Pascal Compiler version 1.9.5 [2004/12/24] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
test/ppc386 [options] <inputfile> [options]
....
i.e. it displays it's own path as "test/ppc386" instead of "/home/michal/fpc_test/ppc386".
I know why this happens -- Toption.WriteHelpPages calls Message1(option_usage, '/home/michal/fpc_test/ppc386') and Message1 calls Msg2Comment('/home/michal/fpc_test/ppc386 [options] &LtPos;inputfile> [options]') and then Msg2Comment interprets 1st underscore in string as the marker that marks the end of special characters in message string. And Msg2Comment removes everything before the 1st underscore.
Simple fix I would suggest is to change in compiler/msg/errore.msg definition of option_usage from
option_usage=11000_$1 [options] <inputfile> [options]
to
option_usage=11000__$1 [options] <inputfile> [options]
(i.e. double the underscore), this way Msg2Comment will be called like Msg2Comment('_/home/michal/fpc_test/ppc386 [options] &LtPos;inputfile> [options]') and it will correctly print
/home/michal/fpc_test/ppc386 [options] <inputfile> [options]
(of course, this change must be repeated for all files in msg/error*.msg)
Additional information:
Reporter: Michalis Kamburelis
EMail: michalis at camelot dot homedns dot org
Mantis conversion info:
- Mantis ID: 5469
- OS: Linux
- Version: 1.9.4
- Fixed in version: 2.0.4
- Monitored by: » @michaliskambi (Michalis Kamburelis)