Source
...
Target
Commits (3)
  • Robert Sprowson's avatar
    Fix for NULL pointer dereference · 42c45c85
    Robert Sprowson authored
    auxilary.c: found by pattern matching
    Not tested.
    
    Version 0.17. Tagged as 'PrintDbox-0_17'
    42c45c85
  • Robert Sprowson's avatar
    Makefile recreated from fragments · 548a2af7
    Robert Sprowson authored
    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).
    
    Version 0.18. Tagged as 'PrintDbox-0_18'
    548a2af7
  • Robert Sprowson's avatar
    Suppress log chatter · 3c053939
    Robert Sprowson authored
    No headers to export (they're in tboxlibs), state this explicitly.
    Retagged.
    3c053939
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean COMPONENT=PrintDbox
stripdepnd Makefile
\ No newline at end of file
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=PrintDbox
amu_machine debug THROWBACK=-throwback
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all COMPONENT=PrintDbox
\ No newline at end of file
amu_machine standalone
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom COMPONENT=PrintDbox
amu_machine rom
......@@ -12,34 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for a Toolbox Object module
# Makefile for PrintDbox module
#
# $Id$
#
# Component specific options:
#
RAMBOTH = o.msgs
COMMON_OBJ = o.Modhdr_NoD o.auxiliary 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 ${RAMBOTH} ${COMMON_OBJ}
#
# Get main rules
#
include C:tboxlibint.TboxMake
#
# Module specific rules:
#
resources: resources-both
@echo ${COMPONENT}: resource files copied to Messages module
COMPONENT = PrintDbox
OBJS = auxiliary create delete events getstate\
hide main miscop show task
CMHGDEPENDS = main
ROMCDEFINES = -DROM
CDFLAGS = -Ddebugging=1
CMHGDFLAGS = -Ddebugging=1
CINCLUDES = -IC:tboxlibint,tbox:,C:
HDRS =
LIBS = ${TBOXINTLIB}
DBG_LIBS = ${TBOXINTDBGLIB}
INSTRES_FILES = Res
clean: toolbox-clean
@echo ${COMPONENT}: cleaned
include CModule
#---------------------------------------------------------------------------
# Dynamic dependencies:
/* (0.16)
/* (0.18)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.16
#define Module_MajorVersion_CMHG 0.18
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 May 2000
#define Module_Date_CMHG 18 Aug 2015
#define Module_MajorVersion "0.16"
#define Module_Version 16
#define Module_MajorVersion "0.18"
#define Module_Version 18
#define Module_MinorVersion ""
#define Module_Date "04 May 2000"
#define Module_Date "18 Aug 2015"
#define Module_FullVersion "0.16"
#define Module_ApplicationDate "18-Aug-15"
#define Module_ComponentName "PrintDbox"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/PrintDbox"
#define Module_FullVersion "0.18"
#define Module_HelpVersion "0.18 (18 Aug 2015)"
#define Module_LibraryVersionInfo "0:18"
......@@ -29,18 +29,16 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "string32.h"
#include "messages.h"
#include "twimp.h"
#include "style.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.PrintDbox.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/printdbox.h"
#include "main.h"
#include "auxiliary.h"
#include "object.h"
#include "task.h"
......@@ -172,7 +170,7 @@ _kernel_oserror *show_actual (void) {
e = _kernel_swi (Toolbox_ShowObject, &regs, &regs);
if (e->errnum == Window_NoGadgetsLeft) {
if (e && (e->errnum == Window_NoGadgetsLeft)) {
/* The default focus is either deleted or faded */
regs.r[0] = 0;
regs.r[1] = (int) global_next->sub_object_id;
......
......@@ -27,14 +27,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objsupport.h"
#include "objects.toolbox.h"
#include "objects.printdbox.h"
#include "objects/toolbox.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.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.printdbox.h"
#include "objects/toolbox.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -28,14 +28,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "twimp.h"
#include "objects.toolbox.h"
#include "objects.printdbox.h"
#include "objects/toolbox.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.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.printdbox.h"
#include "objects/toolbox.h"
#include "objects/printdbox.h"
#include "object.h"
#include "auxiliary.h"
......
......@@ -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.printdbox.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -24,17 +24,17 @@
#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 "rmensure.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.printdbox.h"
#include "objects/toolbox.h"
#include "objects/printdbox.h"
#include "objmodule.h"
#include "auxiliary.h"
......@@ -49,7 +49,7 @@
#include "task.h"
#include "main.h"
#include "PrintDboxHdr.h"
#define MAX_CLASS_SWI_METHODS 7
static _kernel_oserror *(*class_swi_methods [MAX_CLASS_SWI_METHODS])(_kernel_swi_regs *r, TaskDescriptor *t) =
......@@ -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 messages_file(void);
#ifndef ROM
extern int Resources(void);
#endif
......@@ -98,7 +96,7 @@ extern _kernel_oserror *PrintDbox_finalise (int fatal, int podule, void *pw)
/*
* ... and deregister from ResourceFS
*/
objmodule_deregister_resources(messages_file());
objmodule_deregister_resources(Resources());
#endif
......@@ -114,11 +112,6 @@ extern _kernel_oserror *PrintDbox_finalise (int fatal, int podule, void *pw)
mem_free_all ();
#ifdef ROM
if(!__ROM) _swix(0xa2c41, 0);
#endif
return NULL;
}
......@@ -126,7 +119,7 @@ extern _kernel_oserror *PrintDbox_finalise (int fatal, int podule, void *pw)
/* ++++++++++++++++++++++++++++++++ initialisation code +++++++++++++++++++++++++++++++ */
extern _kernel_oserror *PrintDbox_init(char *cmd_tail, int podule_base, void *pw)
extern _kernel_oserror *PrintDbox_init(const char *cmd_tail, int podule_base, void *pw)
{
_kernel_oserror *e;
int buffer_size = 0;
......@@ -135,10 +128,6 @@ extern _kernel_oserror *PrintDbox_init(char *cmd_tail, int podule_base, void *pw
IGNORE(podule_base);
IGNORE(pw);
#ifdef ROM
__ROM = _swix(0xa2c43, _IN(0), pw);
#endif
DEBUG debug_set_var_name("PrintDbox$Debug");
if ((e = rmensure ("Window", "Toolbox.Window", "1.26")) != NULL)
......@@ -148,7 +137,7 @@ extern _kernel_oserror *PrintDbox_init(char *cmd_tail, int podule_base, void *pw
/*
* register our resources with ResourceFS
*/
objmodule_register_resources(messages_file());
objmodule_register_resources(Resources());
#endif
/*
......@@ -247,7 +236,7 @@ extern _kernel_oserror *PrintDbox_SWI_handler(int swi_no, _kernel_swi_regs *r, v
switch (swi_no)
{
case PrintDbox_ClassSWI - PrintDbox_SWIChunkBase:
case PrintDbox_ClassSWI - PrintDbox_00:
if (r->r[0] < 0 || r->r[0] >= MAX_CLASS_SWI_METHODS)
{
return make_error_hex(PrintDbox_NoSuchMethod,1,r->r[0]);
......@@ -266,15 +255,16 @@ extern _kernel_oserror *PrintDbox_SWI_handler(int swi_no, _kernel_swi_regs *r, v
}
break;
case PrintDbox_PostFilter - PrintDbox_SWIChunkBase:
case PrintDbox_PostFilter - PrintDbox_00:
e = events_postfilter (r);
break;
case PrintDbox_PreFilter - PrintDbox_SWIChunkBase:
case PrintDbox_PreFilter - PrintDbox_00:
e = events_prefilter (r);
break;
default:
e = error_BAD_SWI;
break;
}
......@@ -285,7 +275,7 @@ extern _kernel_oserror *PrintDbox_SWI_handler(int swi_no, _kernel_swi_regs *r, v
/* ++++++++++++++++++++++++++++++++++++++ star commands ++++++++++++++++++++++++++++++++++++*/
extern _kernel_oserror *PrintDbox_commands(char *arg_string, int argc, int cmd_no, void *pw)
extern _kernel_oserror *PrintDbox_commands(const char *arg_string, int argc, int cmd_no, void *pw)
{
IGNORE(argc);
IGNORE(pw);
......@@ -293,7 +283,7 @@ extern _kernel_oserror *PrintDbox_commands(char *arg_string, int argc, int cmd_n
switch (cmd_no)
{
case 0:
case CMD_PrintDbox_Memory:
mem_print_list();
break;
......
......@@ -28,15 +28,14 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "os.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.printdbox.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -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.window.h"
#include "objects.PrintDbox.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/printdbox.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -28,13 +28,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 "auxiliary.h"
#include "object.h"
......
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Title: cmhg.toolbox
; Purpose: module header for a PrintDbox Object module
; Author: IDJ
; History: 7-Oct-93: IDJ: version 1.00
; 22-Apr-94: IDJ: version 1.01
; 3-May-94: IDJ: version 1.02
; 6-Feb-95: IDJ; version 0.09
; fixes AQU-01148,1154,1132
; 5-Sep-97: EPW: version 0.10
; adds show centre and show at pointer support
; 23-Oct-97: EPW: version 0.11
; recompiled and incremented version number as
; 0.10 was released badly compiled
; 22-Jan-98: SNB: version 0.12
; fixes global_unknown memory leak
;
#include "VersionNum"
initialisation-code: PrintDbox_init
finalisation-code: PrintDbox_finalise
service-call-handler: PrintDbox_services 0x44ec1, 0x44ec2, 0x44ec3
title-string: PrintDbox
help-string: PrintDbox Module_MajorVersion_CMHG Module_MinorVersion_CMHG
swi-chunk-base-number: 0x82b00
swi-handler-code: PrintDbox_SWI_handler
swi-decoding-table: PrintDbox, ClassSWI, PostFilter, PreFilter
date-string: Module_Date_CMHG
; 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,22 +12,6 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Title: cmhg.toolbox
; Purpose: module header for a PrintDbox Object module
; Author: IDJ
; History: 7-Oct-93: IDJ: version 1.00
; 22-Apr-94: IDJ: version 1.01
; 3-May-94: IDJ: version 1.02
; 6-Feb-95: IDJ; version 0.09
; fixes AQU-01148,1154,1132
; 5-Sep-97: EPW: version 0.10
; adds show centre and show at pointer support
; 23-Oct-97: EPW: version 0.11
; recompiled and incremented version number as
; 0.10 was released badly compiled
; 22-Jan-98: SNB: version 0.12
; fixes global_unknown memory leak
;
#include "VersionNum"
initialisation-code: PrintDbox_init
......@@ -40,8 +24,10 @@ title-string: PrintDbox
help-string: PrintDbox Module_MajorVersion_CMHG Module_MinorVersion_CMHG
#ifdef debugging
command-keyword-table: PrintDbox_commands
PrintDbox_Memory()
#endif
swi-chunk-base-number: 0x82b00
......
......@@ -41,7 +41,6 @@
#include "mem.h"
#endif
#include "main.h"
#include "object.h"
#include "task.h"
......
/* Copyright 1996 Acorn Computers Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Title: main.h
* Purpose: main module of a PrintDbox Object module
* Author: TGR
* History: 26-May-94: TGR: created
*
*/
#ifndef __main_h
#define __main_h
#include "kernel.h"
extern _kernel_oserror *PrintDbox_init(char *cmd_tail, int podule_base, void *pw);
extern _kernel_oserror *PrintDbox_finalise (int fatal, int podule, void *pw);
extern void PrintDbox_services(int service_number, _kernel_swi_regs *r, void *pw);
extern _kernel_oserror *PrintDbox_SWI_handler(int swi_no, _kernel_swi_regs *r, void *pw);
#if debugging
extern _kernel_oserror *PrintDbox_commands(char *arg_string, int argc, int cmd_no, void *pw);
#endif
#endif