Source
...
Target
Commits (2)
  • Robert Sprowson's avatar
    Makefile recreated from fragments · f6b7ac15
    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.20. Tagged as 'FileInfo-0_20'
    f6b7ac15
  • Robert Sprowson's avatar
    Suppress log chatter · 1b39d0c1
    Robert Sprowson authored
    No headers to export (they're in tboxlibs), state this explicitly.
    Retagged.
    1b39d0c1
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean COMPONENT=FileInfo
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=FileInfo
amu_machine debug THROWBACK=-throwback
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all COMPONENT=FileInfo
amu_machine standalone
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom COMPONENT=FileInfo
amu_machine rom
......@@ -12,37 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for a Toolbox Object module
# Makefile for FileInfo 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}
DBG_OBJS = od.main ${RAMBOTH} o.Modhdr od.auxiliary od.create od.delete od.events od.getstate\
od.hide od.miscop od.show od.task
#
# Get main rules
#
include C:tboxlibint.TboxMake
#
# Module specific rules:
#
resources: resources-both
@echo ${COMPONENT}: resource files copied to Messages module
COMPONENT = FileInfo
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.19)
/* (0.20)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.19
#define Module_MajorVersion_CMHG 0.20
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2010
#define Module_Date_CMHG 18 Aug 2015
#define Module_MajorVersion "0.19"
#define Module_Version 19
#define Module_MajorVersion "0.20"
#define Module_Version 20
#define Module_MinorVersion ""
#define Module_Date "19 Jan 2010"
#define Module_Date "18 Aug 2015"
#define Module_ApplicationDate "19-Jan-10"
#define Module_ApplicationDate "18-Aug-15"
#define Module_ComponentName "FileInfo"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/FileInfo"
#define Module_FullVersion "0.19"
#define Module_HelpVersion "0.19 (19 Jan 2010)"
#define Module_LibraryVersionInfo "0:19"
#define Module_FullVersion "0.20"
#define Module_HelpVersion "0.20 (18 Aug 2015)"
#define Module_LibraryVersionInfo "0:20"
......@@ -24,22 +24,21 @@
#include <stdlib.h>
#include <string.h>
#include "kernel.h"
#include "Global/Sprite.h"
#include "swis.h"
#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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "main.h"
#include "auxiliary.h"
#include "object.h"
#include "task.h"
......@@ -172,7 +171,7 @@ extern _kernel_oserror *aux_set_file_type (FileInfoInternal *internal, int filet
} else if (filetype == 0x2000) {
strcpy (buffer, "application");
}
regs.r[0] = os_SpriteOp_SelectSprite;
regs.r[0] = SpriteReason_SelectSprite;
regs.r[2] = (int) buffer;
if (_kernel_swi (Wimp_SpriteOp, &regs, &regs))
......
......@@ -28,15 +28,14 @@
#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.fileinfo.h"
#include "objects.window.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "objects/window.h"
#include "auxiliary.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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.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.generic.h"
#include "objects/toolbox.h"
#include "objects/generic.h"
#include "object.h"
#include "auxiliary.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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -24,18 +24,18 @@
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
#include "Global/Services.h"
#include "const.h"
#include "macros.h"
#include "services.h"
#include "rmensure.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objmodule.h"
#include "objects.toolbox.h"
#include "objects.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "auxiliary.h"
#include "object.h"
......@@ -49,7 +49,7 @@
#include "task.h"
#include "main.h"
#include "FileInfoHdr.h"
#define MAX_CLASS_SWI_METHODS 7
......@@ -68,10 +68,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
extern _kernel_oserror *FileInfo_finalise (int fatal, int podule, void *pw)
......@@ -98,7 +96,7 @@ extern _kernel_oserror *FileInfo_finalise (int fatal, int podule, void *pw)
/*
* ... and deregister from ResourceFS
*/
objmodule_deregister_resources(messages_file());
objmodule_deregister_resources(Resources());
#endif
/* deregister object module */
......@@ -113,10 +111,6 @@ extern _kernel_oserror *FileInfo_finalise (int fatal, int podule, void *pw)
mem_free_all ();
#ifdef ROM
if(!__ROM) _swix(0x82c41, 0);
#endif
return NULL;
}
......@@ -124,7 +118,7 @@ extern _kernel_oserror *FileInfo_finalise (int fatal, int podule, void *pw)
/* ++++++++++++++++++++++++++++++++ initialisation code +++++++++++++++++++++++++++++++ */
extern _kernel_oserror *FileInfo_init(char *cmd_tail, int podule_base, void *pw)
extern _kernel_oserror *FileInfo_init(const char *cmd_tail, int podule_base, void *pw)
{
_kernel_oserror *e;
int buffer_size;
......@@ -133,10 +127,6 @@ extern _kernel_oserror *FileInfo_init(char *cmd_tail, int podule_base, void *pw)
IGNORE(podule_base);
IGNORE(pw);
#ifdef ROM
__ROM = _swix(0x82c43, _IN(0), pw);
#endif
DEBUG debug_set_var_name("FileInfo$Debug");
if ((e = rmensure ("Window", "Toolbox.Window", "1.26")) != NULL) return e;
......@@ -147,7 +137,7 @@ extern _kernel_oserror *FileInfo_init(char *cmd_tail, int podule_base, void *pw)
#ifndef ROM
DEBUG debug_output ("M","FileInfo: registering messages file\n");
if ((e = objmodule_register_resources(messages_file())) != NULL)
if ((e = objmodule_register_resources(Resources())) != NULL)
return e;
#endif
......@@ -262,7 +252,7 @@ extern _kernel_oserror *FileInfo_SWI_handler(int swi_no, _kernel_swi_regs *r, vo
switch (swi_no)
{
case FileInfo_ClassSWI - FileInfo_SWIChunkBase:
case FileInfo_ClassSWI - FileInfo_00:
if (r->r[0] < 0 || r->r[0] >= MAX_CLASS_SWI_METHODS)
{
return make_error_hex(FileInfo_NoSuchMethod,1,r->r[0]);
......@@ -280,15 +270,16 @@ extern _kernel_oserror *FileInfo_SWI_handler(int swi_no, _kernel_swi_regs *r, vo
}
break;
case FileInfo_PostFilter - FileInfo_SWIChunkBase:
case FileInfo_PostFilter - FileInfo_00:
return events_postfilter (r);
break;
case FileInfo_PreFilter - FileInfo_SWIChunkBase:
case FileInfo_PreFilter - FileInfo_00:
return events_prefilter (r);
break;
default:
e = error_BAD_SWI;
break;
}
......@@ -299,7 +290,7 @@ extern _kernel_oserror *FileInfo_SWI_handler(int swi_no, _kernel_swi_regs *r, vo
/* ++++++++++++++++++++++++++++++++++++++ star commands ++++++++++++++++++++++++++++++++++++*/
extern _kernel_oserror *FileInfo_commands(char *arg_string, int argc, int cmd_no, void *pw)
extern _kernel_oserror *FileInfo_commands(const char *arg_string, int argc, int cmd_no, void *pw)
{
IGNORE(argc);
IGNORE(pw);
......@@ -307,7 +298,7 @@ extern _kernel_oserror *FileInfo_commands(char *arg_string, int argc, int cmd_no
switch (cmd_no)
{
case 0:
case CMD_FileInfo_Memory:
mem_print_list();
break;
......
......@@ -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.fileinfo.h"
#include "objects.window.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "objects/window.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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/fileinfo.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.fileinfo.h"
#include "objects/toolbox.h"
#include "objects/fileinfo.h"
#include "auxiliary.h"
#include "object.h"
......
; 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,14 +12,6 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Title: cmhg.toolbox
; Purpose: module header for a FileInfo Object module
; Author: TGR
; History: 7-Feb-94: TGR: created from IDJ template
; PRODUCT RELEASE
; 6-Feb-95: IDJ: version 0.14 fixes AQU-01197
;
#include "VersionNum"
initialisation-code: FileInfo_init
......@@ -32,8 +24,10 @@ title-string: FileInfo
help-string: FileInfo Module_MajorVersion_CMHG
#ifdef debugging
command-keyword-table: FileInfo_commands
FileInfo_Memory()
#endif
swi-chunk-base-number: 0x82ac0
......@@ -41,4 +35,4 @@ swi-handler-code: FileInfo_SWI_handler
swi-decoding-table: FileInfo, ClassSWI, PostFilter, PreFilter
date-string: Module_Date_CMHG
date-string: Module_Date_CMHG
; 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 FileInfo Object module
; Author: TGR
; History: 7-Feb-94: TGR: created from IDJ template
; PRODUCT RELEASE
; 6-Feb-95: IDJ: version 0.14 fixes AQU-01197
;
#include "VersionNum"
initialisation-code: FileInfo_init
finalisation-code: FileInfo_finalise
service-call-handler: FileInfo_services 0x44ec1, 0x44ec2, 0x44ec3
title-string: FileInfo
help-string: FileInfo Module_MajorVersion_CMHG
swi-chunk-base-number: 0x82ac0
swi-handler-code: FileInfo_SWI_handler
swi-decoding-table: FileInfo, ClassSWI, PostFilter, PreFilter
date-string: Module_Date_CMHG
......@@ -41,7 +41,6 @@
#include "mem.h"
#endif
#include "main.h"
#include "auxiliary.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 FileInfo Object module
* Author: TGR
* History: 9-Feb-94: TGR: created
*
*/
#ifndef __main_h
#define __main_h
#include "kernel.h"
extern os_UTC utc;
extern _kernel_oserror *FileInfo_init(char *cmd_tail, int podule_base, void *pw);
extern _kernel_oserror *FileInfo_finalise (int fatal, int podule, void *pw);
extern void FileInfo_services(int service_number, _kernel_swi_regs *r, void *pw);
extern _kernel_oserror *FileInfo_SWI_handler(int swi_no, _kernel_swi_regs *r, void *pw);
#if debugging
extern _kernel_oserror *FileInfo_commands(char *arg_string, int argc, int cmd_no, void *pw);
#endif
#endif