Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-11

Recompiling FPC to include new messages

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi Guys,

I found the following whilst 'toying' with the compiler code (Linux 2.2.4), in
particular the code dealing with the compiler messages;

I have used msg2inc to generate the new msgtxt.inc and msgidx.inc from my modified errore.msg file.

Within unit verbose.pas, procedure InitVerbose() and procedure LoadMsgFile() include the code: msg^.LoadIntern(@msgtxt,msgtxtsize); According to the compiler, msgtxt is undefined. Where should it be defined? Where does it read the contents of the message constants?

TMessage (TP7 object) is defined within cmsgs.pas, and includes a field msgtxt (PChar) but it' doesn't seem to be part of the msg refered to within the aforementioned procedures.

If I generate the compiler such that it reads the physical errore.msg file at runtime, my modifications work, but I would prefer to have the messages included within the compiler .

Can someone kindly point me in the right direction with regards to the above.

Thanks.
Regards,
Nino

Reply by email

Jonas Maebe
to Unknown author
Show quoted text 6 lines
Within unit verbose.pas, procedure InitVerbose() and procedure LoadMsgFile() include the code: msg^.LoadIntern(@msgtxt,msgtxtsize); According to the compiler, msgtxt is undefined. Where should it be defined? Where does it read the contents of the message constants?

The answer to both questions is msgtxt.inc, which is included in verbose.pas

Jonas

Reply by email

Unknown author
to Jonas Maebe

Hi Jonas,

Thanks for the reply.

I see where I went wrong.

I executed ./msg2inc -S errore.msg msgtxt msgidx instead of ./msg2inc -S errore.msg msg msg

I must say though, the usage of msg2inc is a little misleading.

Regards,
Nino

//*************************************************************
Jonas Maebe wrote 16 lines
On 06 Nov 2009, at 10:55, wrote: > Within unit verbose.pas, procedure InitVerbose() and procedure > LoadMsgFile() > include the code: msg^.LoadIntern(@msgtxt,msgtxtsize); > According to the compiler, msgtxt is undefined. Where should it be > defined? > Where does it read the contents of the message constants? The answer to both questions is msgtxt.inc, which is included in verbose.pas Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Unknown author
I must say though, the usage of msg2inc is a little misleading.

It's just a helper tool that's automatically invoked by the Makefile under normal circumstances, so I don't think anyone ever really paid attention to how user-friendly it is.

Jonas

Reply by email