Commit 3ded6972 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

RAM builds are now standalone builds.

  CPFLAGS added to header export.
Detail:
  STANDALONE builds no longer exist - they are equivalent to
    non-ROM builds.
  In non-ROM builds, all the resources to be registered in
    ResourceFS are built into a single structure since ResourceFS
    can handle this more efficiently, and it saves initialisation
    time - MessageTrans has a fit when Picker tries to register
    NINE different things in ResourceFS.
Admin:
  Tested as softload.
  ROM build unaffected.

Version 0.44. Tagged as 'Picker-0_44'
parent 6ffb001b
......@@ -153,17 +153,17 @@ icons.h.hsv_i: Resources.HSV.Templates
#
#
all: ${RAM_MODULE} o.dirs
@echo ${COMPONENT}: Module built (RAM)
@echo ${FULL_COMPONENT}: Module built (RAM)
ramtrace: ${DBG_MODULE} o.dirs
@echo ${COMPONENT}: Module built (TRACE)
@echo ${FULL_COMPONENT}: Module built (TRACE)
rom: ${ROM_MODULE} o.dirs
@echo ${COMPONENT}: Module built (ROM)
@echo ${FULL_COMPONENT}: Module built (ROM)
install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
@echo ${FULL_COMPONENT}: Module installed (ROM)
resources: ${RESOURCEFILES}
${MKDIR} ${RESDIR}
......@@ -179,7 +179,7 @@ resources: ${RESOURCEFILES}
${CP} Resources.Messages ${RESDIR}.Messages ${CPFLAGS}
${CP} Resources.Sprites ${RESDIR}.Sprites ${CPFLAGS}
${CP} Resources.Templates ${RESDIR}.Templates ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
@echo ${FULL_COMPONENT}: resource files copied to Messages module
clean:
${WIPE} o ${WFLAGS}
......@@ -190,7 +190,7 @@ clean:
${WIPE} h.header ${WFLAGS}
${WIPE} linked ${WFLAGS}
${WIPE} icons ${WFLAGS}
@echo ${COMPONENT}: cleaned
@echo ${FULL_COMPONENT}: cleaned
o.dirs:
${MKDIR} o
......@@ -201,8 +201,8 @@ o.dirs:
create $@
export:
${CP} hdr.ColourPick ${EXP_HDR}.ColourPick
@echo ${COMPONENT}: export complete
${CP} hdr.ColourPick ${EXP_HDR}.ColourPick ${CPFLAGS}
@echo ${FULL_COMPONENT}: export complete
#
......
/* (0.43)
/* (0.44)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.43
#define Module_MajorVersion_CMHG 0.44
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Nov 1999
#define Module_Date_CMHG 26 Nov 1999
#define Module_MajorVersion "0.43"
#define Module_Version 43
#define Module_MajorVersion "0.44"
#define Module_Version 44
#define Module_MinorVersion ""
#define Module_Date "23 Nov 1999"
#define Module_Date "26 Nov 1999"
#define Module_FullVersion "0.43"
#define Module_FullVersion "0.44"
......@@ -998,9 +998,6 @@ os_error *cmyk_initialise (char *tail, int podule_base,
{ os_error *error = NULL;
bool done_messages = FALSE, done_templates = FALSE;
#ifdef STANDALONE
bool registered_messages = FALSE, registered_templates = FALSE;
#endif
NOT_USED (tail)
NOT_USED (podule_base)
......@@ -1008,26 +1005,8 @@ os_error *cmyk_initialise (char *tail, int podule_base,
tracef ("cmyk_initialise\n");
if (getenv ("ColourPicker$Path") == NULL)
{ Message_File_Name = "Resources:Resources.Picker.CMYK.Messages";
Template_File_Name = "Resources:Resources.Picker.CMYK.Templates";
}
else
{ Message_File_Name = "ColourPicker:CMYK.Messages";
Template_File_Name = "ColourPicker:CMYK.Templates";
}
#ifdef STANDALONE
if ((error = xresourcefs_register_files (files_cmyk_messages ())) !=
NULL)
goto finish;
registered_messages = TRUE;
if ((error = xresourcefs_register_files (files_cmyk_templates ())) !=
NULL)
goto finish;
registered_templates = TRUE;
#endif
Message_File_Name = "ColourPicker:CMYK.Messages";
Template_File_Name = "ColourPicker:CMYK.Templates";
/*Load files.*/
tracef ("cmyk_initialise: loading messages\n");
......@@ -1082,22 +1061,6 @@ finish:
&resource_templates_free);
if (error == NULL) error = error1;
}
#ifdef STANDALONE
if (registered_messages)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_cmyk_messages ());
if (error == NULL) error = error1;
}
if (registered_templates)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_cmyk_templates ());
if (error == NULL) error = error1;
}
#endif
}
return error;
......@@ -1119,14 +1082,6 @@ os_error *cmyk_terminate (bool fatal, int instance, void *workspace)
error1 = main_resource_free (cmyk_templates, &resource_templates_free);
if (error == NULL) error = error1;
#ifdef STANDALONE
error1 = xresourcefs_deregister_files (files_cmyk_messages ());
if (error == NULL) error = error1;
error1 = xresourcefs_deregister_files (files_cmyk_templates ());
if (error == NULL) error = error1;
#endif
if (error != NULL)
tracef ("ERROR: %s (error 0x%X)\n" _ error->errmess _ error->errnum);
return error;
......
......@@ -1295,7 +1295,11 @@ static os_error *Delete (dialogue_list l)
} }
tracef ("deleting main window\n");
#ifdef STANDALONE
#ifndef ROM
/* This is Service_WindowDeleted. Issued for the sole benefit of BorderUtils
* in RISC OS 3.1 to stop the Wimp dying when deleting a window containing
* an icon which is slabbed in.
*/
{
_kernel_swi_regs regs; /* NK 12.1.95 */
regs.r[0] = (int) l->main_w;
......
......@@ -1924,9 +1924,6 @@ os_error *hsv_initialise (char *tail, int podule_base,
{ os_error *error = NULL;
bool done_messages = FALSE, done_templates = FALSE;
bits flags;
#ifdef STANDALONE
bool registered_messages = FALSE, registered_templates = FALSE;
#endif
NOT_USED (tail)
NOT_USED (podule_base)
......@@ -1934,24 +1931,8 @@ os_error *hsv_initialise (char *tail, int podule_base,
tracef ("hsv_initialise\n");
if (getenv ("ColourPicker$Path") == NULL)
{ Message_File_Name = "Resources:Resources.Picker.HSV.Messages";
Template_File_Name = "Resources:Resources.Picker.HSV.Templates";
}
else
{ Message_File_Name = "ColourPicker:HSV.Messages";
Template_File_Name = "ColourPicker:HSV.Templates";
}
#ifdef STANDALONE
if ((error = xresourcefs_register_files (files_hsv_messages ())) != NULL)
goto finish;
registered_messages = TRUE;
if ((error = xresourcefs_register_files (files_hsv_templates ())) != NULL)
goto finish;
registered_templates = TRUE;
#endif
Message_File_Name = "ColourPicker:HSV.Messages";
Template_File_Name = "ColourPicker:HSV.Templates";
/*Load files.*/
tracef ("hsv_initialise: loading messages\n");
......@@ -2018,22 +1999,6 @@ finish:
&resource_templates_free);
if (error == NULL) error = error1;
}
#ifdef STANDALONE
if (registered_messages)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_hsv_messages ());
if (error == NULL) error = error1;
}
if (registered_templates)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_hsv_templates ());
if (error == NULL) error = error1;
}
#endif
}
return error;
......@@ -2055,14 +2020,6 @@ os_error *hsv_terminate (bool fatal, int instance, void *workspace)
error1 = main_resource_free (hsv_templates, &resource_templates_free);
if (error == NULL) error = error1;
#ifdef STANDALONE
error1 = xresourcefs_deregister_files (files_hsv_messages ());
if (error == NULL) error = error1;
error1 = xresourcefs_deregister_files (files_hsv_templates ());
if (error == NULL) error = error1;
#endif
error1 = tables_terminate ();
if (error == NULL) error = error1;
......
......@@ -100,9 +100,8 @@ _kernel_oserror *main_initialise (char *tail, int podule_base,
done_model = FALSE, done [COUNT (Initialise)] = {FALSE /*, ...*/},
done_dialogue = FALSE;
int i;
#ifdef STANDALONE
bool registered_messages = FALSE, registered_sprites = FALSE,
registered_templates = FALSE;
#ifndef ROM
bool registered_messages = FALSE;
#endif
#ifdef NEWTABLE
bool registered_table = FALSE;
......@@ -121,15 +120,11 @@ _kernel_oserror *main_initialise (char *tail, int podule_base,
tracef ("main_initialise: depth %d\n" _ Invocation_Depth);
if (getenv ("ColourPicker$Path") == NULL)
{ Message_File_Name = "Resources:Resources.Picker.Messages";
Sprite_File_Name = "Resources:Resources.Picker.Sprites";
Template_File_Name = "Resources:Resources.Picker.Templates";
}
else
{ Message_File_Name = "ColourPicker:Messages";
Sprite_File_Name = "ColourPicker:Sprites";
Template_File_Name = "ColourPicker:Templates";
}
_kernel_setenv("ColourPicker$Path", "Resources:$.Resources.Picker.");
Message_File_Name = "ColourPicker:Messages";
Sprite_File_Name = "ColourPicker:Sprites";
Template_File_Name = "ColourPicker:Templates";
#ifdef NEWTABLE
Table_File_Name = "Resources:Resources.Colours.Tables.4desktop";
#endif
......@@ -137,18 +132,10 @@ _kernel_oserror *main_initialise (char *tail, int podule_base,
if ((error = riscos_territory (territory_CURRENT)) != NULL)
goto finish;
#ifdef STANDALONE
if ((error = xresourcefs_register_files (files_messages ())) != NULL)
#ifndef ROM
if ((error = xresourcefs_register_files (resourcefs_files ())) != NULL)
goto finish;
registered_messages = TRUE;
if ((error = xresourcefs_register_files (files_sprites ())) != NULL)
goto finish;
registered_sprites = TRUE;
if ((error = xresourcefs_register_files (files_templates ())) != NULL)
goto finish;
registered_templates = TRUE;
#endif
#ifdef NEWTABLE
......@@ -276,25 +263,11 @@ finish:
}
#endif
#ifdef STANDALONE
#ifndef ROM
if (registered_messages)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_messages ());
if (error == NULL) error = error1;
}
if (registered_sprites)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_sprites ());
if (error == NULL) error = error1;
}
if (registered_templates)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_templates ());
error1 = xresourcefs_deregister_files (resourcefs_files ());
if (error == NULL) error = error1;
}
#endif
......@@ -352,14 +325,8 @@ _kernel_oserror *main_terminate (bool fatal, int instance, void *workspace)
goto finish;
#endif
#ifdef STANDALONE
if ((error = xresourcefs_deregister_files (files_messages ())) != NULL)
goto finish;
if ((error = xresourcefs_deregister_files (files_sprites ())) != NULL)
goto finish;
if ((error = xresourcefs_deregister_files (files_templates ())) != NULL)
#ifndef ROM
if ((error = xresourcefs_deregister_files (resourcefs_files ())) != NULL)
goto finish;
#endif
......
......@@ -1837,9 +1837,6 @@ os_error *rgb_initialise (char *tail, int podule_base,
{ os_error *error = NULL;
bool done_messages = FALSE, done_templates = FALSE;
bits flags;
#ifdef STANDALONE
bool registered_messages = FALSE, registered_templates = FALSE;
#endif
NOT_USED (tail)
NOT_USED (podule_base)
......@@ -1847,24 +1844,8 @@ os_error *rgb_initialise (char *tail, int podule_base,
tracef ("rgb_initialise\n");
if (getenv ("ColourPicker$Path") == NULL)
{ Message_File_Name = "Resources:Resources.Picker.RGB.Messages";
Template_File_Name = "Resources:Resources.Picker.RGB.Templates";
}
else
{ Message_File_Name = "ColourPicker:RGB.Messages";
Template_File_Name = "ColourPicker:RGB.Templates";
}
#ifdef STANDALONE
if ((error = xresourcefs_register_files (files_rgb_messages ())) != NULL)
goto finish;
registered_messages = TRUE;
if ((error = xresourcefs_register_files (files_rgb_templates ())) != NULL)
goto finish;
registered_templates = TRUE;
#endif
Message_File_Name = "ColourPicker:RGB.Messages";
Template_File_Name = "ColourPicker:RGB.Templates";
/*Load files.*/
tracef ("rgb_initialise: registering messages \n");
......@@ -1934,22 +1915,6 @@ finish:
&resource_templates_free);
if (error == NULL) error = error1;
}
#ifdef STANDALONE
if (registered_messages)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_rgb_messages ());
if (error == NULL) error = error1;
}
if (registered_templates)
{ os_error *error1;
error1 = xresourcefs_deregister_files (files_rgb_templates ());
if (error == NULL) error = error1;
}
#endif
}
return error;
......@@ -1971,14 +1936,6 @@ os_error *rgb_terminate (bool fatal, int instance, void *workspace)
error1 = main_resource_free (rgb_templates, &resource_templates_free);
if (error == NULL) error = error1;
#ifdef STANDALONE
error1 = xresourcefs_deregister_files (files_rgb_messages ());
if (error == NULL) error = error1;
error1 = xresourcefs_deregister_files (files_rgb_templates ());
if (error == NULL) error = error1;
#endif
error1 = tables_terminate ();
if (error == NULL) error = error1;
......
......@@ -21,16 +21,6 @@
#include "resourcefs.h"
#endif
extern resourcefs_file_list
*files_messages (void),
*files_sprites (void),
*files_templates (void),
*files_table (void),
*files_rgb_messages (void),
*files_rgb_templates (void),
*files_hsv_messages (void),
*files_hsv_templates (void),
*files_cmyk_messages (void),
*files_cmyk_templates (void);
extern resourcefs_file_list *resourcefs_files (void);
#endif
......@@ -83,7 +83,7 @@ veneer_post_filter
SUB SL, SL, #540 ; C magic
STMIA SL, {V1, V2, V3} ; restore reloc modifiers
LDMFD SP!, {A2, A3, A4, V1, V2, V3, SL, FP, IP, PC}^
LDMFD SP!, {A2, A3, A4, V1, V2, V3, SL, FP, IP, PC}
;---------------------------------------------------------------------------
EXPORT veneer_pre_filter
......@@ -136,6 +136,6 @@ veneer_pre_filter
SUB SL, SL, #540 ; C magic
STMIA SL, {V1, V2, V3} ; restore reloc modifiers
LDMFD SP!, {A2, A3, A4, V1, V2, V3, SL, FP, IP, PC}^
LDMFD SP!, {A2, A3, A4, V1, V2, V3, SL, FP, IP, PC}
END
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