Eric House writes:
> I'm using the 0.5 version (gcc 2.7.2.2-base) and have never used the
> PROLOGUE macro.  I'm not using drawing callbacks, e.g. for lists, but
> I certainly use form handlers.

IIRC, on currently existing OS versions, you certainly need the macros
for list and table draw handlers.

> I'm sure
> as hell referencing globals somewhere in the call chain originating
> from form handlers, so either they're excepted or it's fixed in the
> current stable gcc suite.

Do you use FrmCloseAllForms()?  Again if I recall correctly, on currently
existing versions of the OS, FrmDispatchEvent() happens not to clobber %a4
and so form handlers which omit the macros and yet use globals will work
ok.  However, even on those OS versions, FrmCloseAllForms() *does* clobber
%a4 and so form handlers which omit the macros but use globals in frmClose
event handling WILL CRASH if you use FrmCloseAllForms (as you should).

> And I've shipped several apps to
> thousands of users none of whom's complained about a crash.

You're living on the edge.  It's only pure luck that to date
FrmDispatchEvent() doesn't clobber %a4.  Future OS versions may not be
so generous (there's nothing in their contract that says they should be).
The only sane thing to do is to use the macros in *all* handlers and
callbacks in which you wish to use globals.  Or to use a compiler which
accesses globals via %a5, which Palm OS reserves for this purpose, such
as the new version which Scott and a few others are using.

    John

Reply via email to