Commit 456fe285 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL
Browse files

Makefile recreated from fragments

* Swap amu for amu_machine alias, use stripdepnd
* Get rmensure from tboxlibint (rather than local copy)
* Add VersionNum, use it in the CMHG header (rather than version.h)
* Update header files to central copies/that which CMHG generates
* Converge glib/glib3 a bit from the copy in TextGadgets

Version 0.23. Tagged as 'TreeView-0_23'
parent ddfe3b2a
......@@ -22,6 +22,6 @@
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
| POSSIBILITY OF SUCH DAMAGE.
|
rmensure DDEUtils 0.0 RmLoad System:Modules.DDEUtils
Prefix <Obey$Dir>
amu all
\ No newline at end of file
Dir <Obey$Dir>
amu_machine clean
stripdepnd
......@@ -22,6 +22,5 @@
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
| POSSIBILITY OF SUCH DAMAGE.
|
rmensure DDEUtils 0.0 RmLoad System:Modules.DDEUtils
Prefix <Obey$Dir>
amu Clean
\ No newline at end of file
Dir <Obey$Dir>
amu_machine standalone
#
# Copyright (c) 2000, Rik Griffin
# Copyright (c) 2022, RISC OS Open Ltd
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -22,70 +22,20 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
ccFlags = -c -depend !Depend -IC: -throwback -fafh -apcs 3/32/fpe2/swst/fp/nofpr
Linkflags = -rmf
AsmFlags = -throwback -depend !Depend
Squeezeflags = -v
LibFileflags = -c -o
cc = cc
asm = objasm
rm = BASIC -quit Run:rm
Binary = TreeView
Library = TreeViewLib.o
SVCccFlags = -fz -zM
LibraryFiles = o.veneers
CommonObjFiles = o.Header o.Sprites
NormalObjFiles = o.Main o.Filters o.M_Move o.M_Add o.M_Plot o.M_Remove o.SetState o.M_Method o.Tree o.Debug o.Redraw o.RedrawTree o.RedrawFlat o.Select o.Events o.Rename o.Drag o.DragBox o.TreeFind o.Utils o.glib o.glib3 o.rmensure
NormalLibFiles = C:o.Stubs C:o.toolboxlib C:o.wimplib
# Final targets:
.SUFFIXES: .o .c .s .m .p
$(Binary): $(NormalLibFiles) $(NormalObjFiles) $(CommonObjFiles)
Link $(LinkFlags) -o $(Binary) \
$(NormalLibFiles) $(CommonObjFiles) $(NormalObjFiles)
$(Library): $(LibraryFiles)
libfile $(LibFileflags) $(Library) $(LibraryFiles)
all: $(Binary) $(Library)
Clean: Run:rm
rm $(CommonObjFiles)
rm $(NormalObjFiles)
rm $(MCObjFiles)
rm $(HPObjFiles)
rm $(Binary)
rm $(Library)
rm $(LibraryFiles)
rm h.Header
rm c.Sprites
rm Debug
trim -file MakeFile -line "<35> Dynamic dependencies:"
# Static dependencies:
h.Header: o.Header
| nothing
o.Header: cmhg.Header h.Version
cmhg -d h.Header -p cmhg.Header o.Header
o.veneers: c.Veneers
$(cc) $(ccflags) -o o.Veneers c.Veneers
o.Sprites: c.Sprites
$(cc) -c -depend !Depend -faf $(SVCccFlags) -o o.Sprites c.Sprites
c.Sprites: Sprites
size -format "const unsigned int Sprites_c[] = { 0x%x," Sprites > c.Sprites
bin2c -in Sprites -footer "};" -width 70 -indent 2 -word >> c.Sprites
# Makefile for TreeView module
#
.c.o:; $(cc) $(ccflags) $(SVCccFlags) -o $@ $<
.s.o:; $(asm) $(AsmFlags) -from $< -to $@
COMPONENT = TreeView
OBJS = Debug Drag DragBox Events Filters glib glib3 Main\
M_Add M_Method M_Move M_Plot M_Remove\
Redraw RedrawFlat RedrawTree Rename Select SetState\
Sprites Tree TreeFind Utils
CMHGDEPENDS = M_Add Main
CINCLUDES = ${TBOXINC}
HDRS =
LIBS = ${TBOXINTLIB} ${TBOXLIBS}
CUSTOMRES = no
include CModule
# Dynamic dependencies:
23 (201908221300)
/* (0.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Aug 2019
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MinorVersion ""
#define Module_Date "22 Aug 2019"
#define Module_ApplicationDate "22-Aug-19"
#define Module_ComponentName "TreeView"
#define Module_FullVersion "0.23"
#define Module_HelpVersion "0.23 (22 Aug 2019)"
#define Module_LibraryVersionInfo "0:23"
......@@ -25,6 +25,7 @@
/* TreeView:M_Add.c */
/* Rik Griffin Oct 2003 */
#include "TreeViewHdr.h"
#include "Main.h"
#include "Tree.h"
......
......@@ -30,10 +30,12 @@
#include <stdio.h>
#include <string.h>
#include "Global/Services.h"
#define _main_c
#include "TreeViewHdr.h"
#include "Main.h"
#include "Version.h"
#include "RMEnsure.h"
#include "tboxlibint/rmensure.h"
#define DEBUGLEVEL 0
......@@ -159,7 +161,7 @@ _kernel_oserror *initialise(const char *cmd_tail, int podule, void *pw) {
}
#endif
ER(rmcheck("WindowManager", "3.98"), e);
ER(_swix(OS_CLI, _IN(0), "RMEnsure WindowManager 3.98"), e);
/*
if (ensure_toolbox_mod("Toolbox", "1.63") != NULL) {
......
......@@ -13,47 +13,24 @@
* limitations under the License.
*/
/*
* I've changed a few things just to get the Tabs module to compile - Rik G
*/
#include <stdio.h>
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
#include "window.h"
#include "tboxlibint/twimp.h"
#include "tboxlibint/macros.h"
#include "tboxlibint/objects/toolbox.h"
#include "tboxlibint/objects/window.h"
#if 0
/*
* These are from the header files exported from the ROOL builder
* Namely RISCOS.Export.APCS-32.Lib.tboxlibint.objects.h.window
*/
#define Window_RegisterExternal (Window_SWIChunkBase + 5)
#define Window_DeregisterExternal (Window_SWIChunkBase + 6)
#define Window_SupportExternal (Window_SWIChunkBase + 7)
#define Window_RegisterFilter (Window_SWIChunkBase + 8)
#define Window_DeregisterFilter (Window_SWIChunkBase + 9)
#define Window_EnumerateGadgets (Window_SWIChunkBase +10)
#define Window_GadgetGetIconList (Window_SWIChunkBase +11)
typedef struct
{
int xmin, ymin, xmax, ymax;
} wimp_Bbox;
* I've changed a few things just to get the Tabs module to compile - Rik G
*/
#include "Sizes.h"
#include "riscos_uti.h"
#endif
/*
* Dependencies on header files that are in the RISCOS source tree,
* but not exported by the builder. So I've just copied in the
* relevant stuff, above.
*/
//#include "twimp.h"
//#include "macros.h"
//#include "objects/toolbox.h"
//#include "objects/window.h"
//#include "Sizes.h"
//#include "riscos_uti.h"
#include "glib.h"
extern _kernel_oserror *register_gadget_types(unsigned int flags, GadgetExtensionRecord *rec,int SWIno)
......@@ -79,6 +56,10 @@ extern _kernel_oserror *deregister_gadget_type(unsigned int flags, int type,int
return _swix(Window_DeregisterExternal, _INR(0,2), flags, type, SWIno);
}
#if 0
/*
* I've changed a few things just to get the Tabs module to compile - Rik G
*/
void *mem_allocate(int amount)
{
_kernel_swi_regs regs;
......@@ -95,21 +76,6 @@ void mem_free(void *tag)
_swix(Window_SupportExternal, _INR(0,2), 0, 5, tag);
}
/* added by rik - note the size increase is relative not absolute */
/* ie - you say how much more memory you need not how much in total */
void *mem_extend(void *tag, int change) {
_kernel_swi_regs regs;
regs.r[0] = 0;
regs.r[1] = 6;
regs.r[2] = (int) tag;
regs.r[3] = change;
_kernel_swi(Window_SupportExternal,&regs,&regs);
return (void *)regs.r[0];
}
/*
void graphics_window(wimp_Bbox *area)
{
_swix(OS_WriteI+5,0);
......@@ -124,15 +90,9 @@ void graphics_window(wimp_Bbox *area)
_swix(OS_WriteI+(((area->ymax -1) >> 8) & 255),0);
}
*/
/* convert work area coords to screen coords */
/*
* Commented this out because Tabs doesn't need it, and there
* are dependencies on other things in the RISCOS source tree.
*/
#if 0
void work_to_screen(wimp_Bbox *wa, wimp_GetWindowState *state)
{
wa->xmin += state->open.visible_area.xmin - state->open.scx;
......@@ -154,6 +114,7 @@ void screen_to_work(wimp_Bbox *wa, wimp_GetWindowState *state)
}
/* modify a box and then colour it in */
static void plot_2d_rect(const wimp_Bbox *bound, wimp_Bbox *rect, int fillcol, int adjx, int adjy)
{
int scalex, scaley;
......
......@@ -13,24 +13,16 @@
* limitations under the License.
*/
/*
* I've modified this file a bit so that it will compile stand-along
* as part of the Tabs module - Rik G
*/
#include <stdio.h>
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
//#include "macros.h"
//#include "twimp.h"
//#include "objects/toolbox.h"
//#include "objects/window.h"
#include "tboxlibint/macros.h"
#include "tboxlibint/twimp.h"
#include "tboxlibint/objects/toolbox.h"
#include "tboxlibint/objects/window.h"
#include "wimplib.h"
#include "toolbox.h"
#include "glib.h"
typedef struct _tasks {
......@@ -42,7 +34,6 @@ typedef struct _tasks {
static TaskRec *all_tasks[8]=NULL;
static TaskRec *find_current_task(int *th,int type)
{
TaskRec *list = all_tasks[type];
......@@ -59,10 +50,9 @@ static TaskRec *find_current_task(int *th,int type)
return list;
}
static int FILTERS[] = {Toolbox_RegisterPostFilter_ToolboxEvent,
Toolbox_RegisterPostFilter_WimpEvent,
Toolbox_RegisterPostFilter_WimpMessage};
Toolbox_RegisterPostFilter_WimpEvent,
Toolbox_RegisterPostFilter_WimpMessage};
_kernel_oserror *add_task_interest(FilterTypes type, int *list, int SWI)
{
......@@ -125,4 +115,3 @@ _kernel_oserror *remove_task_interest(FilterTypes type,int *inter)
}
return NULL;
}
/* 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.
*/
/* File: rmensure.c
* Purpose: ensuring a module is loaded
* Author: IDJ
* History: 24-Jun-94: IDJ: created
* 02-Dec-96: KJB: modified ROM conditional - RAM modules still need
* to use rmensure in TinyStubs
*/
#include <stdio.h>
#include "kernel.h"
#include "swis.h"
#include "rmensure.h"
//#include "macros.h"
_kernel_oserror *rmensure (char *module_name, char *file_name, char *module_version)
{
#if defined(ROM) && !defined(BUILDING_TINYSTUBS)
IGNORE(module_area);
IGNORE(file_name);
IGNORE(module_version);
return NULL;
#else
_kernel_oserror *e;
char command[256];
/*
* see if the module is there at all!
*/
sprintf (command, "RMEnsure %s %s RMLoad System:Modules.%s", module_name,
module_version, file_name);
if ((e = _swix (OS_CLI, _IN(0), command)) != NULL)
return e;
sprintf (command, "RMEnsure %s %s", module_name, module_version);
return _swix (OS_CLI, _IN(0), command);
#endif
}
_kernel_oserror *rmcheck (char *module_name, char *module_version) {
#ifndef ROM
_kernel_swi_regs regs;
_kernel_oserror *e;
char command[256];
sprintf (command, "*RMEnsure %s %s", module_name, module_version);
regs.r[0] = (int)command;
if ((e = _kernel_swi (OS_CLI, &regs, &regs)) != NULL)
return e;
#else
IGNORE(module_name);
IGNORE(file_name);
IGNORE(module_version);
#endif
return NULL;
}
......@@ -22,12 +22,12 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "Version.h"
#include "Consts.h"
#include "VersionNum"
#include "Global/Services.h"
help-string: TreeView Module_MajorVersion_CMHG Module_MinorVersion_CMHG
help-string: Module_ComponentName Module_MajorVersion_CMHG © Rik Griffin 2000
title-string: TreeView
title-string: Module_ComponentName
date-string: Module_Date_CMHG
......@@ -46,4 +46,3 @@ swi-decoding-table: TreeView,TreeView,Filter
service-call-handler: service_handler Service_WindowModuleStarting,
Service_RedrawingWindow,
Service_ModeChange
......@@ -59,10 +59,6 @@ extern void *mem_extend_wrapper(void *x, int y, char *file, int line);
#define _mem_extend(x,y) mem_extend(x,y)
#endif
#define Service_WindowModuleStarting (0x82881)
#define Service_ModeChange (0x46)
#define Service_RedrawingWindow (0x44EC6)
typedef struct {
int size;
......
......@@ -33,7 +33,6 @@
#include "wimplib.h"
#include "Consts.h"
#include "Header.h"
#include "TreeView.h"
#include "Private.h"
#include "Utils.h"
......
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG © Rik Griffin 2003-19
#define Module_Date_CMHG 22 Aug 2019
#define MODULE_VERSION 23
......@@ -18,17 +18,11 @@
*
*/
/*
* I've commented out a few things just to get the Tabs module to compile - Rik G
*/
#ifndef __glib_h
#define __glib_h
#include "kernel.h"
//#include "twimp.h"
//#include "macros.h"
/* filter types */
......@@ -52,45 +46,44 @@ typedef enum {GLib_ToolboxEvents = 0, GLib_WimpEvents = 1, GLib_WimpMessages =2}
#define DEFAULT_HANDLER 1
#define PRIVATE_HANDLER 2
/*
* There's a new set of feature bits,
* presumably added with a new version of the Toolbox.
*/
#if 0
typedef struct {
unsigned int add:2,
int add:2,
remove:2,
postadd:2,
method:2,
tbevent:2, // new
reserved:2,
mclick:2,
kpress:2, // new
message:2, // new
reserved2:4,
plot:2,
setfocus:2,
move:2,
fade:2,
windowappearing:2, // new
mscroll:2, // new
lostfocus:2, // new
unused:2;
fade:2;
} FT;
#else
/*
* There's a new set of feature bits,
* presumably added with a new version of the Toolbox.
*/
typedef struct {
int add:2,
unsigned int add:2,
remove:2,
postadd:2,
method:2,
reserved:2,
tbevent:2, /* new */
mclick:2,
reserved2:4,
kpress:2, /* new */
message:2, /* new */
plot:2,
setfocus:2,
move:2,
fade:2;
fade:2,
windowappearing:2, /* new */
mscroll:2, /* new */
lostfocus:2, /* new */
unused:2;
} FT;
*/
#endif
typedef union {
unsigned int mask;
......@@ -115,19 +108,27 @@ void *mem_allocate(int amount);
void mem_free(void *tag);
/* added by rik - note the size increase is relative not absolute */
/* ie - you say how much more memory you need not how much in total */
extern void *mem_extend(void *tag, int change);
//void graphics_window(wimp_Bbox *area);
#if 0
/*
* I've commented out a few things just to get the Tabs module to compile - Rik G
*/
void graphics_window(wimp_Bbox *area);
_kernel_oserror *add_task_interest(FilterTypes type, int *list, int SWI);
_kernel_oserror *remove_task_interest(FilterTypes type,int *list);
//extern void work_to_screen(wimp_Bbox *box, wimp_GetWindowState *state);
//extern void screen_to_work(wimp_Bbox *box, wimp_GetWindowState *state);
extern void work_to_screen(wimp_Bbox *box, wimp_GetWindowState *state);
extern void screen_to_work(wimp_Bbox *box, wimp_GetWindowState *state);
//extern void plot_2d_scrollbar(const wimp_Bbox *, int, BOOL);
extern void plot_2d_scrollbar(const wimp_Bbox *, int, BOOL);
#else
_kernel_oserror *add_task_interest(FilterTypes type, int *list, int SWI);
_kernel_oserror *remove_task_interest(FilterTypes type,int *list);
/* Added by rik - note the size increase is relative not absolute */
/* ie - you say how much more memory you need not how much in total */
extern void *mem_extend(void *tag, int change);
#endif
#endif
/* 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.
*/
/* File: rmensure.h
* Purpose: ensuring a module is loaded
* Author: IDJ
* History: 24-Jun-94: IDJ: created
*/
extern _kernel_oserror *rmensure (char *module_name, char *file_name, char *module_version);
extern _kernel_oserror *rmcheck(char *module_name, char *module_version);
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