Commit 692c7f02 authored by Andrew Hodgkinson's avatar Andrew Hodgkinson
Browse files

Minor update.

Detail:
  !Run files for Phoenix requested TextGadgets 0.29, but this can be 0.28
  now, and has been amended. Signal handling in Main.c revised a bit.
Admin:
  Tested, works.

Version 2.11. Tagged as 'Browse-2_11'
parent 3cc6300c
......@@ -64,8 +64,8 @@ RMEnsure PrintDBox 0.14 RMLoad System:Modules.Toolbox.PrintDBox
RMEnsure PrintDBox 0.14 Error Phoenix requires version 0.14 or later of the PrintDBox module
RMEnsure FontMenu 0.21 RMLoad System:Modules.Toolbox.FontMenu
RMEnsure FontMenu 0.21 Error Phoenix requires version 0.21 or later of the FontMenu module
RMEnsure TextGadgets 0.29 RMLoad System:Modules.Toolbox.TextGadgets
RMEnsure TextGadgets 0.29 Error Phoenix requires version 0.29 or later of the TextGadgets module
RMEnsure TextGadgets 0.28 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.28 Error Phoenix requires version 0.28 or later of the TextGadgets module
| Important networking modules
......
......@@ -71,8 +71,8 @@ RMEnsure PrintDBox 0.14 RMLoad System:Modules.Toolbox.PrintDBox
RMEnsure PrintDBox 0.14 Error Phoenix requires version 0.14 or later of the PrintDBox module
RMEnsure FontMenu 0.21 RMLoad System:Modules.Toolbox.FontMenu
RMEnsure FontMenu 0.21 Error Phoenix requires version 0.21 or later of the FontMenu module
RMEnsure TextGadgets 0.29 RMLoad System:Modules.Toolbox.TextGadgets
RMEnsure TextGadgets 0.29 Error Phoenix requires version 0.29 or later of the TextGadgets module
RMEnsure TextGadgets 0.28 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.28 Error Phoenix requires version 0.28 or later of the TextGadgets module
| Important networking modules
......
......@@ -55,7 +55,7 @@ RMEnsure WindowManager 3.98 Error Phoenix requires version 3.98 or later of the
<Phoenix$Dir>.RMTry -app Phoenix -name ToolAction -version 0.15 -path System:Modules.Toolbox.ToolAction
<Phoenix$Dir>.RMTry -app Phoenix -name PrintDBox -version 0.14 -path System:Modules.Toolbox.PrintDBox
<Phoenix$Dir>.RMTry -app Phoenix -name FontMenu -version 0.21 -path System:Modules.Toolbox.FontMenu
<Phoenix$Dir>.RMTry -app Phoenix -name TextGadgets -version 0.29 -path System:Modules.Toolbox.TextGadgets
<Phoenix$Dir>.RMTry -app Phoenix -name TextGadgets -version 0.28 -path System:Modules.Toolbox.TextGadget
| Fetchers
......
/* (2.10)
/* (2.11)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2.
*
*/
#define Module_MajorVersion_CMHG 2.10
#define Module_MajorVersion_CMHG 2.11
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 26 Apr 2005
#define Module_Date_CMHG 16 Sep 2005
#define Module_MajorVersion "2.10"
#define Module_Version 210
#define Module_MajorVersion "2.11"
#define Module_Version 211
#define Module_MinorVersion ""
#define Module_Date "26 Apr 2005"
#define Module_Date "16 Sep 2005"
#define Module_ApplicationDate "26-Apr-05"
#define Module_ApplicationDate "16-Sep-05"
#define Module_ComponentName "Browse"
#define Module_ComponentPath "RiscOS/Sources/Apps/Browse"
#define Module_FullVersion "2.10"
#define Module_HelpVersion "2.10 (26 Apr 2005)"
#define Module_LibraryVersionInfo "2:10"
#define Module_FullVersion "2.11"
#define Module_HelpVersion "2.11 (16 Sep 2005)"
#define Module_LibraryVersionInfo "2:11"
......@@ -151,6 +151,10 @@
#include "Main.h"
/* A PRM-documented function that isn't exported in header files */
extern const char * _clib_version(void);
/* Static function prototypes */
static void initialise_app (void);
......@@ -164,6 +168,7 @@ static void load_choices (void);
#endif
static void termination (void);
static void tidy_errors (void);
static void catch_errors (int signum);
/* Make sure the stack starts at a reasonable size to prevent frequent */
......@@ -1799,6 +1804,22 @@ static void load_choices(void)
#endif
/**************************************************************/
/* install_signal_handlers() */
/* */
/* Set up signal handlers for the local serious error */
/* handler. */
/**************************************************************/
static void install_signal_handlers(void)
{
signal(SIGOSERROR, catch_errors); /* OS error */
signal(SIGILL, catch_errors); /* Illegal instruction */
signal(SIGSEGV, catch_errors); /* Segment violation */
signal(SIGSTAK, catch_errors); /* Stack overflow */
signal(SIGFPE, catch_errors); /* FPE error */
}
/**************************************************************/
/* termination() */
/* */
......@@ -1955,14 +1976,20 @@ int main(int argc, char * argv[])
#endif
/* NB, don't forget to echo any changes here with the duplicate code */
/* just below the setjmp call later. */
/* Set up a very early stage error handler; this is jumped */
/* to by the signal handler function installed just below. */
signal(SIGOSERROR, catch_errors); /* OS error */
signal(SIGILL, catch_errors); /* Illegal instruction */
signal(SIGSEGV, catch_errors); /* Segment violation */
signal(SIGSTAK, catch_errors); /* Stack overflow */
signal(SIGFPE, catch_errors); /* FPE error */
if (setjmp(env) == Main_FromCatchErrors)
{
tidy_errors();
show_error(&erb);
}
else
{
/* Install serious error handlers */
install_signal_handlers();
}
/* Before initialisation, find out where we ran from - this */
/* software can support different application names, so the */
......@@ -2155,13 +2182,87 @@ int main(int argc, char * argv[])
if (setjmp(env) == Main_FromCatchErrors)
{
char * tok = NULL;
unsigned int * regdump = NULL;
unsigned int * os_regdump = NULL;
char pc[16];
print_abort_print();
tidy_errors();
/* Reset the error number stored by catch_errors() (the */
/* signal handler function we just reinstalled) to give */
/* 'Quit' and 'Continue' options. */
erb.errnum = Utils_Error_Custom_Normal;
show_error_cont(&erb);
}
while (!quit)
{
/* We use flex's deferred compaction, so ensure the */
/* heap is as small as possible. */
flex_compact();
/* What time is it? (For Wimp_PollIdle) */
_swix(OS_ReadMonotonicTime,
_OUT(0),
&time);
/* Use PollIdle, but want drag events to be as responsive as possible */
ChkError(event_poll_idle(&eventcode,
&b,
time + 5*!drag_in_progress,
NULL));
}
dprintf(("Rout", "\nmain: Calling exit()\n\n"));
dprintf(("CMal", "Near exit, malloccount: \0216%d\0217\n", malloccount));
dprintf(("CFle", "Near exit, flexcount : %d\n", flexcount));
/* Save hotlist, histories etc., and logout if a multiuser build */
show_error_ret(multiuser_logout());
/* This will call the termination() function in passing */
exit(EXIT_SUCCESS);
}
/**************************************************************/
/* tidy_errors() */
/* */
/* Tidy up serious errors - aborts etc. - so that a sensible */
/* error message can be given and a register dump has been */
/* saved. On older C libraries, this is very important as the */
/* error handler was pretty bad. */
/* */
/* After calling, local error block "erb" will contain an */
/* updated error either directly from the OS or constructed */
/* locally, with a register dump saved ready for *ShowRegs. */
/* Signal handlers will be reinstalled. */
/**************************************************************/
static void tidy_errors(void)
{
char * tok = NULL;
unsigned int * regdump = NULL;
unsigned int * os_regdump = NULL;
int clib_version;
char pc[16];
/* Is the C library new enough to report errors sensibly */
/* itself, or do we have to do the work for it? */
/* */
/* The 'sscanf' call assumes the version number is the */
/* first number in the string returned by _clib_version() */
/* and is followed by a forwards slash. */
sscanf(_clib_version(), "%*[^0123456789]%d/", &clib_version);
if (clib_version < 535)
{
/* Sort out the register dump */
_swix(OS_ChangeEnvironment,
......@@ -2215,11 +2316,11 @@ int main(int argc, char * argv[])
switch (erb.errnum & 0x00ffffff)
{
case 0x000000: tok = "EZeros0"; break;
case 0x000001: tok = "EZeros1"; break;
case 0x000002: tok = "EZeros2"; break;
case 0x000003: tok = "EZeros3"; break;
case 0x000005: tok = "EZeros5"; break;
case 0x000000: tok = "EZeros0:Internal error: Illegal instruction at %0"; break;
case 0x000001: tok = "EZeros1:Internal error: Prefetch abort at %0"; break;
case 0x000002: tok = "EZeros2:Internal error: Abort on data transfer at %0"; break;
case 0x000003: tok = "EZeros3:Internal error: Address exception at %0"; break;
case 0x000005: tok = "EZeros5:Internal error: Branch through zero"; break;
}
#ifdef WRITE_DUMP_FILE_ON_ERROR
......@@ -2280,57 +2381,13 @@ int main(int argc, char * argv[])
if (strcmp(error, "!")) StrNCpy0(erb.errmess, error);
}
/* Need to reinstall the signal handlers since the run-time */
/* system will have removed them 'For Your Safety And */
/* Convenience'. Don't forget to keep this list up to date */
/* with the code near the top of the function. */
signal(SIGOSERROR, catch_errors); /* OS error */
signal(SIGILL, catch_errors); /* Illegal instruction */
signal(SIGSEGV, catch_errors); /* Segment violation */
signal(SIGSTAK, catch_errors); /* Stack overflow */
signal(SIGFPE, catch_errors); /* FPE error */
erb.errnum = Utils_Error_Custom_Normal; /* For 'Quit' as well as 'Continue' */
show_error_cont(&erb);
}
while (!quit)
{
/* We use flex's deferred compaction, so ensure the */
/* heap is as small as possible. */
flex_compact();
/* What time is it? (For Wimp_PollIdle) */
_swix(OS_ReadMonotonicTime,
_OUT(0),
&time);
/* Use PollIdle, but want drag events to be as responsive as possible */
ChkError(event_poll_idle(&eventcode,
&b,
time + 5*!drag_in_progress,
NULL));
}
dprintf(("Rout", "\nmain: Calling exit()\n\n"));
dprintf(("CMal", "Near exit, malloccount: \0216%d\0217\n", malloccount));
dprintf(("CFle", "Near exit, flexcount : %d\n", flexcount));
/* Save hotlist, histories etc., and logout if a multiuser build */
show_error_ret(multiuser_logout());
/* Need to reinstall the signal handlers since the run-time */
/* system will have removed them 'For Your Safety And */
/* Convenience'. */
/* This will call the termination() function in passing */
exit(EXIT_SUCCESS);
install_signal_handlers();
}
/**************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment