Source
...
Target
Commits (1)
  • Robert Sprowson's avatar
    Makefile recreated from fragments · 3d2bbc9d
    Robert Sprowson authored
    init.s: Use Push/Pull for fewer warnings
    module.h/module.c: Use central headers or CMHG generated header in preference
    mheader.cmhg: Declare the resource filename here
    registry.c/use.c: Unjumbled double header inclusion
    convert.c/provide.c: Mark many functions as static
    Messages: Remove (now) unused message E06
    
    Version 1.16. Tagged as 'MakePSFont-1_16'
    3d2bbc9d
| 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.
|
Dir <Obey$Dir>
amu_machine export
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine install INSTDIR=<Install$Dir>.Disc.Printing.!Printers.Modules
amu_machine install INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.Modules
| Copyright 1996 Acorn Computers Ltd
| Copyright 2016 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 all
amu_machine standalone THROWBACK=-throwback
......@@ -14,136 +14,16 @@
#
# Makefile for MakePSFont
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 14-Sep-94 AMcC Created.
# 25-Nov-94 MJS s.init added to source
#
#
# Paths
#
EXP_HDR = <export$dir>
#
# Program specific options:
#
COMPONENT = MakePSFont
MODULE = rm.MakePSFont
ROM_MODULE = aof.MakePSFont
EXPORTS = ${EXP_HDR}.MakePSFont
RDIR = Resources
LDIR = ${RDIR}.${LOCALE}
#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources2.${COMPONENT}
#
# Generic options:
#
MKDIR = cdir
AS = objasm
CC = cc
CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = x wipe
AFLAGS = -depend !Depend -Stamp -quit
CFLAGS = -c -depend !Depend ${INCLUDES} ${DFLAGS} -zM
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
#
# Libraries
#
CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib
RSTUBS = RISCOSLIB:o.rstubs
ROMCSTUBS = RISCOSLIB:o.romcstubs
ROMSTUBS = RISCOSLIB:o.romstubs
ABSSYM = RISCOSLIB:o.c_abssym
ASMUTILS = C:AsmUtils.o.AsmUtilsZM
#
# Include files
#
INCLUDES = -IC: -IC:AsmUtils
OBJS =\
o.convert\
o.float\
o.init \
o.mheader\
o.module\
o.provide\
o.registry\
o.swicall\
o.use
#
# Rule patterns
#
.c.o:; ${CC} ${CFLAGS} -o $@ $<
.s.o:; ${AS} ${AFLAGS} $< $@
.cmhg.o:; ${CMHG} -p $< $@
#
# Build rules:
#
all: ${MODULE}
@echo ${COMPONENT}: all built (disc)
rom: ${ROM_MODULE}
@echo ${COMPONENT}: all built (rom)
export: ${EXPORTS}
@echo ${COMPONENT}: export complete
install: ${MODULE}
${CP} ${MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
Access ${INSTDIR}.${COMPONENT} lr/r
@echo ${COMPONENT}: installed (disc)
install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: installed (rom)
resources:
${MKDIR} ${RESDIR}
${CP} ${LDIR}.Messages ${RESDIR}.Messages ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
clean:
${WIPE} o.* ${WFLAGS}
${RM} ${MODULE}
${RM} ${ROM_MODULE}
${RM} linked.${COMPONENT}
@echo ${COMPONENT}: cleaned
${MODULE}: ${OBJS} ${CLIB}
${LD} -o $@ -Module ${OBJS} ${ASMUTILS} ${CLIB}
# Partially linked AOF object file
${ROM_MODULE}: ${OBJS} ${ASMUTILS} ${ROMCSTUBS}
${LD} -o $@ -aof ${OBJS} ${ASMUTILS} ${ROMCSTUBS}
#
# Final link for the ROM Image {using given base address}
#
rom_link:
${LD} -o linked.${COMPONENT} -rmf -base ${ADDRESS} ${ROM_MODULE} ${ABSSYM}
${CP} linked.${COMPONENT} ${LINKDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom_link complete
COMPONENT = MakePSFont
CINCLUDES = -IC:,C:AsmUtils
OBJS = convert float init module provide registry swicall use
CMHGFILE = mheader
CMHGDEPENDS = module
LIBS = ${ASMUTILS}
HDRS =
ASMHDRS = MakePSFont
${EXP_HDR}.MakePSFont: hdr.MakePSFont
${CP} hdr.MakePSFont $@ ${CPFLAGS}
include CModule
# Dynamic dependencies:
......@@ -4,7 +4,7 @@ E02:Error reading font encoding
E03:Error reading font base encoding
E04:Failed to allocate workspace
E05:Could not open null device for output
E06:Unknown MakePSFont SWI
#06
E07:Could not open output file
E08:Could not locate font directory
E09:Error following derived font
/* (1.15)
/* (1.16)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.15
#define Module_MajorVersion_CMHG 1.16
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2012
#define Module_Date_CMHG 09 Apr 2016
#define Module_MajorVersion "1.15"
#define Module_Version 115
#define Module_MajorVersion "1.16"
#define Module_Version 116
#define Module_MinorVersion ""
#define Module_Date "14 Jan 2012"
#define Module_Date "09 Apr 2016"
#define Module_ApplicationDate "14-Jan-12"
#define Module_ApplicationDate "09-Apr-16"
#define Module_ComponentName "MakePSFont"
#define Module_ComponentPath "castle/RiscOS/Sources/Printing/Modules/MakePSFont"
#define Module_FullVersion "1.15"
#define Module_HelpVersion "1.15 (14 Jan 2012)"
#define Module_LibraryVersionInfo "1:15"
#define Module_FullVersion "1.16"
#define Module_HelpVersion "1.16 (09 Apr 2016)"
#define Module_LibraryVersionInfo "1:16"
......@@ -19,9 +19,13 @@
* Need to check for write failure!
*/
#include "Global/FileTypes.h"
#include "module.h"
#include "convert.h"
#include "modulefp.h"
#include "swicall.h"
#include "VersionNum"
#define CHARF_12BITCOORDS (1 << 0)
#define CHARF_OUTLINE (1 << 3)
......@@ -29,8 +33,6 @@
#define CHARF_ACCENT (1 << 5)
#define CHARF_16BITINDICES (1 << 6)
#define FILETYPE_FONT 0xff6
extern int get_angle(int);
static char buildchar[] =
......@@ -167,7 +169,7 @@ static int filetype (char *filename)
/* Scale coord in design units into 1/1000 em */
int scale(int value)
static int scale(int value)
{
return((value * 1000) / designsize);
}
......@@ -218,7 +220,7 @@ static void free_outlines (OutlinePtr out)
static int read_metrics (MetricsPtr met, char *file)
{
int size;
if (filetype(file) != FILETYPE_FONT)
if (filetype(file) != FileType_Font)
return -1;
met->header = (MetricsHeaderPtr) read_whole_file(file, &size);
......@@ -309,7 +311,7 @@ static int read_metrics (MetricsPtr met, char *file)
static int read_outlines (OutlinePtr out, char *file)
{
int size;
if (filetype(file) != FILETYPE_FONT)
if (filetype(file) != FileType_Font)
return -1;
out->header = (OutlinesHeaderPtr) read_whole_file(file, &size);
......@@ -345,7 +347,7 @@ static int read_outlines (OutlinePtr out, char *file)
/* Return pointer to start of chunk data (skipping flags) */
int *chunkdata_addr (OutlinePtr out, int chunkno)
static int *chunkdata_addr (OutlinePtr out, int chunkno)
{
int *chunk;
if (chunkno >= out->nchunks ||
......@@ -361,7 +363,7 @@ int *chunkdata_addr (OutlinePtr out, int chunkno)
/* Return pointer to start of data for char n, or NULL */
unsigned char *chardata_addr (OutlinePtr out, int n)
static unsigned char *chardata_addr (OutlinePtr out, int n)
{
int chunkno = n / 32;
int charno = n % 32;
......@@ -375,7 +377,7 @@ unsigned char *chardata_addr (OutlinePtr out, int n)
* inclusion.
*/
int getindex (unsigned char **pptr)
static int getindex (unsigned char **pptr)
{
unsigned char *ptr = *pptr;
int ind = *ptr++;
......@@ -390,7 +392,7 @@ int getindex (unsigned char **pptr)
* charflags is read from the first byte of the character header
*/
void getcoords (unsigned char **pptr, int *x, int *y)
static void getcoords (unsigned char **pptr, int *x, int *y)
{
register unsigned char *ptr = *pptr;
if (coordsize == 3)
......@@ -408,7 +410,7 @@ void getcoords (unsigned char **pptr, int *x, int *y)
}
void read_char_flags (unsigned char **pptr)
static void read_char_flags (unsigned char **pptr)
{
charflags = *(*pptr)++;
coordsize = (charflags & CHARF_12BITCOORDS) ? 3 : 2;
......@@ -418,7 +420,7 @@ void read_char_flags (unsigned char **pptr)
/* You should have called read_char_flags */
void read_char_bbox(unsigned char **pptr, BBoxPtr bboxp)
static void read_char_bbox(unsigned char **pptr, BBoxPtr bboxp)
{
int x0, y0, x1, y1;
if (*pptr == NULL)
......@@ -459,7 +461,7 @@ static char *encode (int n)
/* Write a PostScript command corresponding to one segment */
void fprintps(FILE *outfile, unsigned char **pptr, int ncoords, char *psproc)
static void fprintps(FILE *outfile, unsigned char **pptr, int ncoords, char *psproc)
{
int i, x, y;
fputs(psproc, outfile);
......@@ -528,7 +530,7 @@ static void get_merged_bbox(BBoxPtr bbox, int charnum, OutlinePtr out, EncodingP
* character known to be in the encoding (base if applicable).
*/
int write_charproc (OutlinePtr out, MetricsPtr met, EncodingPtr enc, int ch, FILE *f)
static int write_charproc (OutlinePtr out, MetricsPtr met, EncodingPtr enc, int ch, FILE *f)
{
unsigned char *addr = chardata_addr(out, ch);
int ind = met->mapsize ? met->map[ch] : ch;
......@@ -728,7 +730,7 @@ static int get_encoding (EncodingPtr enc, char *file)
}
void output_names (FILE *out, char *name)
static void output_names (FILE *out, char *name)
{
char *n;
if (strncmp(name, "RO_", 3) == 0)
......@@ -796,7 +798,7 @@ dstring("It really failed");
* Output initial stuff. Should do the font name better.
*/
fprintf(out, "/%s 11 dict dup begin\n/FontInfo 10 dict dup begin\n", fontname);
fprintf(out, " /Notice (Converted by MakePSFont %s) def\n", VERSION_STRING);
fprintf(out, " /Notice (Converted by MakePSFont " Module_FullVersion ") def\n");
output_names(out, fontname);
fputs(" /Version (001.001) def\n", out);
......
......@@ -18,6 +18,7 @@
#include "module.h"
#include "swicall.h"
#include "mheader.h"
#if DEBUG
......@@ -55,7 +56,7 @@ os_error *make_error (int num)
int msgtrans_desc[4];
os_error *err;
if ((err = swi(MessageTrans_OpenFile, R0, msgtrans_desc, R1, MESSAGES_FILENAME, R2, 0, END)) == NULL)
if ((err = swi(MessageTrans_OpenFile, R0, msgtrans_desc, R1, Module_MessagesFile, R2, 0, END)) == NULL)
{
error.errnum = num + ERROR_BASE;
sprintf(error.errmess, "E%02d", num-1);
......@@ -107,7 +108,7 @@ _kernel_oserror *convert_swi (int swi_no, _kernel_swi_regs *r, void *private)
{
switch (swi_no)
{
case 0:
case MakePSFont_MakeFont - MakePSFont_00:
/*
* R0: file handle, or -1 for no output (but still declare fonts
* and encodings) or -2 for no output and no declarations (just
......@@ -220,8 +221,9 @@ dstring("Back from ensure");
return err;
}
return NULL;
default:
return make_error(EUNKNOWNSWI);
return error_BAD_SWI;
}
}
......@@ -50,6 +50,7 @@
#include "registry.h"
#include "misc.h"
#include "use.h"
#include "swicall.h"
#define NAMELEN 64
#define FILENAMELEN 256
......@@ -78,17 +79,17 @@ typedef struct
* Operations on FontRecs
*/
FontPtr new_font ()
static FontPtr new_font (void)
{
return (FontPtr) calloc(1, sizeof(FontRec));
}
void free_font (FontPtr font)
static void free_font (FontPtr font)
{
(void) free((char *) font);
}
void zero_font (FontPtr font)
static void zero_font (FontPtr font)
{
memset((void *) font, 0, sizeof(FontRec));
}
......@@ -98,7 +99,7 @@ void zero_font (FontPtr font)
* Useful utilities
*/
char *setstring (char *dest, char *source, int size)
static char *setstring (char *dest, char *source, int size)
{
*(dest + size - 1) = 0;
strncpy(dest, source, size - 1);
......@@ -127,12 +128,12 @@ int compare (char *one, char *two)
* Output structured comments to bracket fonts
*/
void beginfont (FILE *f, char *n)
static void beginfont (FILE *f, char *n)
{
fprintf(f, "\n%%%%BeginFont: %s\n", n);
}
void endfont (FILE *f)
static void endfont (FILE *f)
{
fprintf(f, "%%%%EndFont\n\n");
}
......@@ -168,7 +169,7 @@ static char *addmat (char *buf, MatrixPtr mat, char sep)
* XXXX check for overflow!
*/
void make_local_name (FontPtr font)
static void make_local_name (FontPtr font)
{
char *buf = font->local;
buf = add(buf, "\\F");
......@@ -191,7 +192,7 @@ void make_local_name (FontPtr font)
* XXXX check for overflow!
*/
void make_foreign_name (FontPtr font)
static void make_foreign_name (FontPtr font)
{
char *buf = font->foreign;
buf = add(buf, permanent ? FONTTAG_DOWNLOAD : FONTTAG_NORMAL);
......@@ -219,7 +220,7 @@ void make_foreign_name (FontPtr font)
* at the beginning.
*/
void process_fontname (FontPtr font, char *fontstring)
static void process_fontname (FontPtr font, char *fontstring)
{
char *p = fontstring, *q;
int left;
......@@ -280,7 +281,7 @@ static Bool mats_match (FontPtr one, FontPtr two)
#define ANY_ENC_SAME_MAT 2
#define ANY_ENC_NO_MAT 1
int rank_match (FontPtr wanted, FontPtr current)
static int rank_match (FontPtr wanted, FontPtr current)
{
if (compare (wanted->fontname, current->fontname) == 0)
{
......@@ -312,7 +313,7 @@ int rank_match (FontPtr wanted, FontPtr current)
* Return non-zero rank if a match was found, else zero.
*/
int closest_font (FontPtr wanted, FontPtr closest)
static int closest_font (FontPtr wanted, FontPtr closest)
{
int handle = 0;
int rank = 0;
......@@ -347,15 +348,15 @@ finished:
void lose_font (int handle)
static void lose_font (int handle)
{
swi(Font_LoseFont, R0, handle, END);
}
void read_encoding_file (FontPtr font,
int *alpha /* alphabet number (of base if present) */
)
static void read_encoding_file (FontPtr font,
int *alpha /* alphabet number (of base if present) */
)
{
FILE *f = fopen(font->encfile, "r");
char buf[64];
......@@ -383,9 +384,9 @@ void read_encoding_file (FontPtr font,
/* Append alphabet part to font name. There should be space! */
void fontfilename(char *outbuff, /* already filled in */
char *leafname, /* eg Outlines */
int alphabet)
static void fontfilename(char *outbuff, /* already filled in */
char *leafname, /* eg Outlines */
int alphabet)
{
char numbuff[8];
int excess;
......@@ -408,10 +409,10 @@ void fontfilename(char *outbuff, /* already filled in */
/* XXX Should check for overflow */
void make_fontfile_name(char *dest, /* FILENAMELEN bytes */
char *prefix, /* NULL means it's there already */
char *leafname, /* Outlines or IntMetrics */
int alpha) /* -1 for none */
static void make_fontfile_name(char *dest, /* FILENAMELEN bytes */
char *prefix, /* NULL means it's there already */
char *leafname, /* Outlines or IntMetrics */
int alpha) /* -1 for none */
{
char *destp = dest;
*destp = 0;
......@@ -441,7 +442,7 @@ int filesize (char *name)
* Return the font's RISCOS font name, which should be freed.
*/
char *follow_derivation (char *outlines)
static char *follow_derivation (char *outlines)
{
char *file, *p;
int size;
......@@ -482,11 +483,11 @@ char *follow_derivation (char *outlines)
* in *kernret.
*/
os_error * find_font (FontPtr font,
int *alpha, /* alphabet (-1 for none) */
Bool kern, /* return kern info... */
int **kernret /* ...as malloc data */
)
static os_error *find_font (FontPtr font,
int *alpha, /* alphabet (-1 for none) */
Bool kern, /* return kern info... */
int **kernret /* ...as malloc data */
)
{
int handle;
os_error *err;
......@@ -582,7 +583,7 @@ os_error * find_font (FontPtr font,
* Pass output==NULL for no output.
*/
char *ensure_encoding (FILE *output, char *encname, char *encfile)
static char *ensure_encoding (FILE *output, char *encname, char *encfile)
{
if (!encname || !do_declarations)
return NULL;
......@@ -627,7 +628,7 @@ char *ensure_encoding (FILE *output, char *encname, char *encfile)
}
void showFP (FILE * out, int fp)
static void showFP (FILE *out, int fp)
{
if (fp < 0)
{
......@@ -638,7 +639,7 @@ void showFP (FILE * out, int fp)
}
void printmat(FILE *output, MatrixPtr mat)
static void printmat (FILE *output, MatrixPtr mat)
{
if (!mat->used)
return;
......@@ -650,7 +651,7 @@ void printmat(FILE *output, MatrixPtr mat)
fprintf(output, "%d %d ]", mat->mat[4], mat->mat[5]);
}
void declare_font (char *local, char *alien)
static void declare_font (char *local, char *alien)
{
if (do_declarations)
{
......@@ -663,7 +664,7 @@ void declare_font (char *local, char *alien)
}
}
void declare_extra_font (char *alien, int flags, Bool overwrite)
static void declare_extra_font (char *alien, int flags, Bool overwrite)
{
if (do_extra_declarations)
(void) addrecord(alien, "X", flags, overwrite);
......@@ -677,8 +678,8 @@ void declare_extra_font (char *alien, int flags, Bool overwrite)
* making a real copy of the FontInfo dict.
*/
void modify_font(FILE *output, char *from, char *to,
char *encname, MatrixPtr matrix)
static void modify_font(FILE *output, char *from, char *to,
char *encname, MatrixPtr matrix)
{
if (procremap)
{
......@@ -715,7 +716,7 @@ void modify_font(FILE *output, char *from, char *to,
}
void copyresult (char *dest, int *len, char *source)
static void copyresult (char *dest, int *len, char *source)
{
int srclen = strlen(source) + 1;
if (*len >= srclen)
......@@ -731,7 +732,7 @@ void copyresult (char *dest, int *len, char *source)
#define ROTATE(n) ( (((n) >> 4) | ((n) << 4)) & 0xFF )
void kerntable (FILE *output, int *kerndata)
static void kerntable (FILE *output, int *kerndata)
{
unsigned int flags = (unsigned int) kerndata[257];
Bool x_present = !(flags & (1 << 1));
......
......@@ -17,6 +17,8 @@
*/
#include "module.h"
#include "registry.h"
#include "swicall.h"
Bool getnext(int *handle, /* updated with next handle, or 0 */
char **local, /* points to RMA storage */
......
......@@ -18,6 +18,7 @@
*/
#include "module.h"
#include "use.h"
#define LINESIZE 100
#define SLASHFONTNAME "/FontName"
......
......@@ -18,6 +18,7 @@ date-string: Module_Date_CMHG
title-string: MakePSFont
help-string: MakePSFont Module_MajorVersion_CMHG Module_MinorVersion_CMHG
international-help-file: "Resources:Resources." Module_ComponentName ".Messages"
library-initialisation-code: _makepsf_initialisemodule
swi-chunk-base-number: 0x43440
swi-handler-code: convert_swi
......
......@@ -23,13 +23,8 @@
#include <math.h>
#include "kernel.h"
#include "VersionNum"
typedef _kernel_oserror os_error;
/* Keep this in step with version string in cmhg.mheader */
#define VERSION_STRING Module_FullVersion
#define Module_Title MakePSFont
typedef int Bool;
#define TRUE 1
#define FALSE 0
......@@ -37,11 +32,8 @@ typedef int Bool;
#include "swis.h"
#include "misc.h"
#include "swicall.h"
#include "convert.h"
#define MESSAGES_FILENAME "Resources:Resources.MakePSFont.Messages"
os_error *make_error (int num);
extern Bool do_declarations, do_extra_declarations, dont_allow_downloads,
permanent, procremap;
......@@ -54,7 +46,7 @@ extern Bool do_declarations, do_extra_declarations, dont_allow_downloads,
#define EBADBASEENC 4
#define EWORKSPACE 5
#define ENULL 6
#define EUNKNOWNSWI 7
#define EUNKNOWNSWI 7 /* Unused */
#define EOUTPUT 8
#define EPREFIX 9
#define EBADDERIVATION 10
......@@ -67,19 +59,7 @@ extern Bool do_declarations, do_extra_declarations, dont_allow_downloads,
#define FONTTAG_KERNED "RK_"
#define FONTTAG_DOWNLOAD "DL_"
/* These SWIs aren't in the standard headers yet */
#ifndef Font_ReadEncodingFilename
#define Font_ReadEncodingFilename 0x400a5
#endif
#ifndef Font_ReadFontPrefix
#define Font_ReadFontPrefix 0x4009d
#endif
#ifndef PDriver_MiscOp
#define PDriver_MiscOp 0x8015a
#endif
/* PDriver_MiscOp subreasons */
#ifndef MiscOp_AddFont
#define MiscOp_AddFont 0
......@@ -93,10 +73,6 @@ extern Bool do_declarations, do_extra_declarations, dont_allow_downloads,
#define MiscOp_AddFont_Overwrite 0x1 /* bits for R4 in AddFont call */
#endif
#ifndef Font_ReadFontMetrics
#define Font_ReadFontMetrics 0x4009F
#endif
/* Size of return buffers for filenames etc */
#define TEMPMAX 256
#define LEAFMAX 11
......
......@@ -15,16 +15,15 @@
; init for MakePSFont - allows it to be dormant in ROM
GET hdr:ListOpts
GET hdr:Macros
GET hdr:System
GET hdr:ModHand
GET hdr:Services
GET hdr:FSNumbers
GET hdr:HighFSI
GET hdr:NewErrors
GET hdr:MsgTrans
GET hdr:PDriver
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:FSNumbers
GET Hdr:NewErrors
GET Hdr:MsgTrans
GET Hdr:PDriver
IMPORT |_clib_initialisemodule|
......@@ -33,12 +32,12 @@
AREA |C$$Code|, CODE, READONLY
|_makepsf_initialisemodule|
STMDB sp!, {r0,r14}
Push "r0,lr"
SWI XPDriver_CurrentJob ;cheap check that PDriver module is present
LDMIA sp!, {r0,r14}
Pull "r0,lr"
BVC |_clib_initialisemodule|
; PDriver not present
STMFD sp!, {r14}
Push "lr"
ADR r0, no_PDriver_error
MOV r1, #0 ; use global messages
MOV r2, #0 ; use internal buffer
......@@ -47,7 +46,7 @@
MOV r6, #0
MOV r7, #0
SWI XMessageTrans_ErrorLookup
LDMIA sp!, {pc}
Pull "pc"
no_PDriver_error
DCD ErrorNumber_NeedMod
......