Commit 0fe81c47 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Makefile recreated from fragments

Include paths changed to Unix style.
Debug and non debug CMHG definitions replaced by one which is selected by passing predefines to CMHG.
Removed dummy services.h.
Don't bother calling TinyStubs SWI since in ROM it does nothing, and the RAM versions haven't used it since ~1997.
Use module header constants generated from CMHG rather than hand made one.
Reject out of range SWIs (fixes ticket #305).
Relocated DCS resources up a directory where shared makefiles expect them to be.

Version 1.13. Tagged as 'DCS-1_13'
parent b520934d
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean COMPONENT=DCS
stripdepnd Makefile
amu_machine clean
stripdepnd
| Copyright 2000 Pace Micro Technology plc
| Copyright 2015 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine trace COMPONENT=DCS
amu_machine debug THROWBACK=-throwback
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback COMPONENT=DCS
amu_machine standalone
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom COMPONENT=DCS
amu_machine rom
......@@ -12,48 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for a Toolbox Object module
# Makefile for Discard/Cancel/Save/Quit module
#
# $Id$
#
# Component specific options:
#
RAMRESOURCES = o.msgs
COMMON_OBJ = o.Modhdr_NoD o.create o.delete o.events o.getstate\
o.hide o.miscop o.show o.task
ROM_OBJS = o.mainROM ${COMMON_OBJ}
RAM_OBJS = o.main ${RAMRESOURCES} ${COMMON_OBJ}
DBG_OBJS = od.main ${RAMRESOURCES} o.Modhdr od.create od.delete od.events od.getstate\
od.hide od.miscop od.show od.task
#
# Get main rules
#
include C:tboxlibint.TboxMake
DCSRESDIR = <resource$dir>.Resources2
#
# Module specific rules:
#
resources: LocalRes:DCS.Messages LocalRes:DCS.Res LocalRes:Quit.Messages LocalRes:Quit.Res
${MKDIR} ${DCSRESDIR}
${CP} Resources.${LOCALE}.* ${DCSRESDIR}.* ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
${RAMRESOURCES}: LocalRes:DCS.Messages LocalRes:DCS.Res LocalRes:Quit.Messages LocalRes:Quit.Res
resgen res_files $@ \
LocalRes:DCS.Res Resources.DCS.Res \
LocalRes:DCS.Messages Resources.DCS.Messages \
LocalRes:Quit.Res Resources.Quit.Res \
LocalRes:Quit.Messages Resources.Quit.Messages
COMPONENT = DCS
OBJS = create delete events getstate\
hide main miscop show task
SA_OBJS = ${OBJS}
CMHGDEPENDS = main
ROMCDEFINES = -DROM
CDFLAGS = -Ddebugging=1
CMHGDFLAGS = -Ddebugging=1
CINCLUDES = -IC:tboxlibint,tbox:,C:
LIBS = ${TBOXINTLIB}
DBG_LIBS = ${TBOXINTDBGLIB}
INSTRES_FILES = Res Quit.Messages:^.Quit Quit.Res:^.Quit
clean: toolbox-clean
@echo ${COMPONENT}: cleaned
include CModule
#---------------------------------------------------------------------------
# Dynamic dependencies:
File moved
File moved
File moved
/* (1.12)
/* (1.13)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.12
#define Module_MajorVersion_CMHG 1.13
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Apr 2005
#define Module_Date_CMHG 18 Aug 2015
#define Module_MajorVersion "1.12"
#define Module_Version 112
#define Module_MajorVersion "1.13"
#define Module_Version 113
#define Module_MinorVersion ""
#define Module_Date "15 Apr 2005"
#define Module_Date "18 Aug 2015"
#define Module_ApplicationDate "15-Apr-05"
#define Module_ApplicationDate "18-Aug-15"
#define Module_ComponentName "DCS"
#define Module_ComponentPath "RiscOS/Sources/Toolbox/DCS"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/DCS"
#define Module_FullVersion "1.12"
#define Module_HelpVersion "1.12 (15 Apr 2005)"
#define Module_LibraryVersionInfo "1:12"
#define Module_FullVersion "1.13"
#define Module_HelpVersion "1.13 (18 Aug 2015)"
#define Module_LibraryVersionInfo "1:13"
......@@ -28,7 +28,6 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
......@@ -36,10 +35,10 @@
#include "slist.h"
#include "string32.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.dcs.h"
#include "objects.quit.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/dcs.h"
#include "objects/quit.h"
#include "object.h"
#include "task.h"
......
......@@ -27,14 +27,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "slist.h"
#include "objects.toolbox.h"
#include "objects.dcs.h"
#include "objects/toolbox.h"
#include "objects/DCS.h"
#include "object.h"
#include "task.h"
......
......@@ -28,15 +28,14 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "slist.h"
#include "objects.toolbox.h"
#include "objects.dcs.h"
#include "objects.quit.h"
#include "objects/toolbox.h"
#include "objects/DCS.h"
#include "objects/quit.h"
#include "object.h"
#include "events.h"
......@@ -166,6 +165,7 @@ extern _kernel_oserror *events_postfilter (_kernel_swi_regs *r)
extern _kernel_oserror *events_prefilter (_kernel_swi_regs *r)
{
IGNORE(r);
/*
* called from the main Toolbox prefilter, when Wimp_Poll is called.
......
......@@ -27,13 +27,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.generic.h"
#include "objects/toolbox.h"
#include "objects/generic.h"
#include "object.h"
#include "task.h"
......
......@@ -27,13 +27,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.generic.h"
#include "objects/toolbox.h"
#include "objects/generic.h"
#include "object.h"
#include "task.h"
......@@ -42,6 +41,7 @@
extern _kernel_oserror *hide_object (_kernel_swi_regs *r, TaskDescriptor *t, int class)
{
IGNORE(class);
/*
* request to hide an object
......
......@@ -24,19 +24,19 @@
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
#include "Global/Services.h"
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objmodule.h"
#include "rmensure.h"
#include "objects.toolbox.h"
#include "objects.DCS.h"
#include "objects.Quit.h"
#include "objects/toolbox.h"
#include "objects/DCS.h"
#include "objects/quit.h"
#include "object.h"
#include "create.h"
......@@ -49,7 +49,7 @@
#include "task.h"
#include "main.h"
#include "DCSHdr.h"
#define MAX_CLASS_SWI_METHODS 7
static _kernel_oserror *(*class_swi_methods [MAX_CLASS_SWI_METHODS])(_kernel_swi_regs *r, TaskDescriptor *t,int class) =
......@@ -67,10 +67,8 @@ static _kernel_oserror *(*class_swi_methods [MAX_CLASS_SWI_METHODS])(_kernel_swi
/* +++++++++++++++++++++++++++++++++ finalisation code +++++++++++++++++++++++++++++++++ */
#ifdef ROM
static _kernel_oserror *__ROM;
#else
extern int res_files(void);
#ifndef ROM
extern int Resources(void);
#endif
extern _kernel_oserror *DCS_final (int fatal, int podule, void *pw)
......@@ -102,7 +100,7 @@ extern _kernel_oserror *DCS_final (int fatal, int podule, void *pw)
* ... and deregister from ResourceFS
*/
objmodule_deregister_resources(res_files());
objmodule_deregister_resources(Resources());
#endif
......@@ -119,10 +117,6 @@ extern _kernel_oserror *DCS_final (int fatal, int podule, void *pw)
mem_free_all ();
#ifdef ROM
if(!__ROM) _swix(0xa2c41, 0);
#endif
return NULL;
}
......@@ -145,7 +139,7 @@ static _kernel_oserror *register_with_toolbox(void)
return objmodule_register_with_toolbox(0, Quit_ObjectClass, Quit_ClassSWI, "Quit:Res");
}
extern _kernel_oserror *DCS_init(char *cmd_tail, int podule_base, void *pw)
extern _kernel_oserror *DCS_init(const char *cmd_tail, int podule_base, void *pw)
{
_kernel_oserror *e;
......@@ -153,10 +147,6 @@ extern _kernel_oserror *DCS_init(char *cmd_tail, int podule_base, void *pw)
IGNORE(podule_base);
IGNORE(pw);
#ifdef ROM
__ROM = _swix(0xa2c43, _IN(0), pw);
#endif
if ((e=rmensure("Window","Toolbox.Window","1.10")) !=NULL) return e;
DEBUG debug_set_var_name("DCS$Debug");
......@@ -168,7 +158,7 @@ extern _kernel_oserror *DCS_init(char *cmd_tail, int podule_base, void *pw)
DEBUG debug_output ("init", "Registering messages files\n");
objmodule_register_resources(res_files());
objmodule_register_resources(Resources());
#endif
/*
......@@ -241,10 +231,10 @@ extern _kernel_oserror *DCS_SWI_handler(int swi_no, _kernel_swi_regs *r, void *p
IGNORE(pw);
switch (swi_no + DCS_SWIChunkBase)
switch (swi_no)
{
case DCS_ClassSWI:
case Quit_ClassSWI:
case DCS_ClassSWI - DCS_00:
case Quit_ClassSWI - DCS_00:
if (r->r[0] < 0 || r->r[0] >= MAX_CLASS_SWI_METHODS)
{
/* make an error here */
......@@ -262,15 +252,16 @@ extern _kernel_oserror *DCS_SWI_handler(int swi_no, _kernel_swi_regs *r, void *p
}
break;
case DCS_PostFilter:
case DCS_PostFilter - DCS_00:
e = events_postfilter (r);
break;
case DCS_PreFilter:
case DCS_PreFilter - DCS_00:
e = events_prefilter (r);
break;
default:
e = error_BAD_SWI;
break;
}
......@@ -281,7 +272,7 @@ extern _kernel_oserror *DCS_SWI_handler(int swi_no, _kernel_swi_regs *r, void *p
/* ++++++++++++++++++++++++++++++++++++++ star commands ++++++++++++++++++++++++++++++++++++*/
extern _kernel_oserror *DCS_commands(char *arg_string, int argc, int cmd_no, void *pw)
extern _kernel_oserror *DCS_commands(const char *arg_string, int argc, int cmd_no, void *pw)
{
IGNORE(argc);
IGNORE(pw);
......@@ -289,7 +280,7 @@ extern _kernel_oserror *DCS_commands(char *arg_string, int argc, int cmd_no, voi
switch (cmd_no)
{
case 0:
case CMD_DCS_Memory:
mem_print_list();
break;
......
......@@ -27,14 +27,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.dcs.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/DCS.h"
#include "object.h"
#include "task.h"
......@@ -44,6 +43,7 @@
extern _kernel_oserror *miscop_object (_kernel_swi_regs *r, TaskDescriptor *t,int class)
{
IGNORE(t);
/*
* do a "miscellaneous (ie object-specific) operation on an object
......
......@@ -28,14 +28,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.dcs.h"
#include "objects.quit.h"
#include "objects/toolbox.h"
#include "objects/DCS.h"
#include "objects/quit.h"
#include "object.h"
#include "task.h"
......
......@@ -28,16 +28,15 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "slist.h"
#include "objects.toolbox.h"
#include "objects.dcs.h"
#include "objects.quit.h"
#include "objects.window.h"
#include "objects/toolbox.h"
#include "objects/DCS.h"
#include "objects/quit.h"
#include "objects/window.h"
#include "object.h"
......@@ -51,7 +50,7 @@ static EventInterest toolbox_events_of_interest[] =
{ -1, -1}
};
void task_add_filters(TaskDescriptor *t)
static void task_add_filters(TaskDescriptor *t)
{
_kernel_swi_regs regs;
regs.r[0] = 0;
......
; Copyright 1996 Acorn Computers Ltd
; Copyright 2015 Castle Technology Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
......@@ -12,11 +12,6 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Title: cmhg.toolbox
; Purpose: module header for a DCS Object module
; Author: NK
; History: 21-Jun-94: NK : version 1.00
;
#include "VersionNum"
initialisation-code: DCS_init
......@@ -29,8 +24,10 @@ title-string: DCS
help-string: DCS_Object Module_MajorVersion_CMHG Module_MinorVersion_CMHG
#ifdef debugging
command-keyword-table: DCS_commands
DCS_Memory()
#endif
swi-chunk-base-number: 0x82a80
......
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