You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(39) |
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(4) |
Feb
(8) |
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
|
Nov
(2) |
Dec
(21) |
2004 |
Jan
(57) |
Feb
|
Mar
|
Apr
|
May
(49) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
|
2005 |
Jan
(2) |
Feb
|
Mar
(12) |
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(17) |
2006 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(3) |
Feb
|
Mar
|
Apr
(18) |
May
(13) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
From: <jt...@us...> - 2007-05-06 15:59:18
|
Revision: 263 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=263&view=rev Author: jtytgat Date: 2007-05-06 08:58:04 -0700 (Sun, 06 May 2007) Log Message: ----------- Renamed Bool/Int to ConvToBool/ConvToInt as they were not valid gas macro names. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr Modified: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-05-06 15:56:23 UTC (rev 262) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-05-06 15:58:04 UTC (rev 263) @@ -94,13 +94,17 @@ .endm @ r1 = BOOL (r2) - .macro Bool r1, r2 + @ 'Bool' is not a valid macro name for gas so there we renamed it to + @ 'ConvToBool'. + .macro ConvToBool r1, r2 MOVS \r1, \r2 @ Assuming False == 0 MOVNE \r1, #True .endm @ r1 = INT (r2) - .macro Int r1, r2 + @ 'Int' is not a valid macro name for gas so there we renamed it to + @ 'ConvToBool'. + .macro ConvToInt r1, r2 SUB \r1, \r2, #"0" CMP \r1, #9 SUBHI \r1, \r2, #"a" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-05-06 15:56:34
|
Revision: 262 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=262&view=rev Author: jtytgat Date: 2007-05-06 08:56:23 -0700 (Sun, 06 May 2007) Log Message: ----------- Adding 'test' target. Making CROSSGCC_ELF as default BUILDTYPE. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Makefile Modified: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile 2007-05-06 15:55:08 UTC (rev 261) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-05-06 15:56:23 UTC (rev 262) @@ -1,7 +1,7 @@ # ... -# Build type: CROSSGCC_AOF (default), CROSSGCC_ELF [NORCROFT_AOF: not supported yet] -BUILDTYPE ?= CROSSGCC_AOF +# Build type: CROSSGCC_AOF, CROSSGCC_ELF (default), [NORCROFT_AOF: not supported yet] +export BUILDTYPE ?= CROSSGCC_ELF ifeq ($(BUILDTYPE),CROSSGCC_ELF) else ifeq ($(BUILDTYPE),CROSSGCC_AOF) @@ -13,6 +13,9 @@ .PHONY: all install release-oslib release-cstrong clean oslib cstrong BuildRequirements all: oslib cstrong +test: oslib + $(MAKE) -C Test + # Only for GCCSDK cross-compilation install purposes: install: oslib cd $(BUILDDIR) && $(INSTALL) OSLib32.o $(GCCSDK_INSTALL_ENV)/lib/libOSLib32.o @@ -43,6 +46,7 @@ $(MAKE) -C Toolbox/oslib $@ $(MAKE) -C User/oslib $@ -$(RM) $(BUILDDIR) + $(MAKE) -C Test $@ oslib: $(OSLIBLIB) $(OSLIBLIB): BuildRequirements This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-05-06 15:55:11
|
Revision: 261 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=261&view=rev Author: jtytgat Date: 2007-05-06 08:55:08 -0700 (Sun, 06 May 2007) Log Message: ----------- Bringing the Test directory up-to-date. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Test/Test/test.c branches/simplified-build/!OsLib/Source/Test/Test/test.cc Added Paths: ----------- branches/simplified-build/!OsLib/Source/Test/Makefile branches/simplified-build/!OsLib/Source/Test/Test/Makefile branches/simplified-build/!OsLib/Source/Test/Test/small_test.s branches/simplified-build/!OsLib/Source/Test/Test/test.asm branches/simplified-build/!OsLib/Source/Test/Test/test.gas branches/simplified-build/!OsLib/Source/Test/Test1/Makefile branches/simplified-build/!OsLib/Source/Test/Test1/test.asm branches/simplified-build/!OsLib/Source/Test/Test1/test.gas branches/simplified-build/!OsLib/Source/Test/readvarval/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Source/Test/AMUmakefile branches/simplified-build/!OsLib/Source/Test/GNUmakefile branches/simplified-build/!OsLib/Source/Test/Make,fd7 branches/simplified-build/!OsLib/Source/Test/Makefile,fe1 branches/simplified-build/!OsLib/Source/Test/Test/AMUmakefile branches/simplified-build/!OsLib/Source/Test/Test/GNUmakefile branches/simplified-build/!OsLib/Source/Test/Test/Make,fd7 branches/simplified-build/!OsLib/Source/Test/Test/Run_cc,fd7 branches/simplified-build/!OsLib/Source/Test/Test/Run_cpp,fd7 branches/simplified-build/!OsLib/Source/Test/Test/test.s branches/simplified-build/!OsLib/Source/Test/Test1/GNUmakefile branches/simplified-build/!OsLib/Source/Test/Test1/test.s branches/simplified-build/!OsLib/Source/Test/readvarval/!Run,fd7 branches/simplified-build/!OsLib/Source/Test/readvarval/AMUmakefile branches/simplified-build/!OsLib/Source/Test/readvarval/GNUmakefile branches/simplified-build/!OsLib/Source/Test/readvarval/Make,fd7 Deleted: branches/simplified-build/!OsLib/Source/Test/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/AMUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/AMUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,38 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/Test/AMUmakefile 20040106 -# -#------------------------------------------------------------------------ -# paths & directories -DIR = ${MAKEFILEDIR} - -#------------------------------------------------------------------------ -#tools -MAKE = amu -desktop -RM = rm -nq - -CP = copy -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -#------------------------------------------------------------------------ -#targets -.PHONY: all test readvarval TestFW - -all: readvarval test - -test: - ${MAKE} -f ${DIR}.Test.AMUmakefile all APCS=${APCS} - -readvarval: - ${MAKE} -f ${DIR}.readvarval.AMUmakefile all APCS=${APCS} - -TestFW: - ${MAKE} -f ${DIR}.TestFW.AMUmakefile all APCS=${APCS} - -clean: - ${MAKE} -f ${DIR}.readvarval.AMUmakefile clean - ${MAKE} -f ${DIR}.Test.AMUmakefile clean - ${MAKE} -f ${DIR}.TestFW.AMUmakefile clean - -distclean: - ${MAKE} -f ${DIR}.readvarval.AMUmakefile distclean - ${MAKE} -f ${DIR}.Test.AMUmakefile distclean - ${MAKE} -f ${DIR}.TestFW.AMUmakefile distclean Deleted: branches/simplified-build/!OsLib/Source/Test/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/GNUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/GNUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,16 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/GNUmakefile 20040128 -#=================================================================== - -.PHONY: all Test clean - -TESTS = Test Test1 readvarval - -all: ;$(foreach dir, ${TESTS}, set -e; ${MAKE} -C ${dir}; ) - -Test: ;${MAKE} -C $@ -Test1: ;${MAKE} -C $@ - -readvarval: ;${MAKE} -C $@ - -clean: ;$(foreach dir, ${TESTS}, ${MAKE} -C ${dir} clean; ) - Deleted: branches/simplified-build/!OsLib/Source/Test/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Make,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Make,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1,6 +0,0 @@ -| !OSLib.Source.Test.Make 20040308 -Echo <sys$time> !OSLib.Source.Test.Make %0 -WimpSlot -min 4096k -if "<C$Mode>"= 32 then Do AMU -f <Obey$Dir>.AMUmakeFile -desktop %0 APCS=32 -if "<C$Mode>"<>32 then Do AMU -f <Obey$Dir>.AMUmakeFile -desktop %0 APCS=26 -Echo <sys$time> Done Copied: branches/simplified-build/!OsLib/Source/Test/Makefile (from rev 246, branches/simplified-build/!OsLib/Source/Test/GNUmakefile) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Makefile 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,9 @@ +# ... + +.PHONY: all clean + +TESTS = Test1 Test readvarval + +all: ;$(foreach dir, ${TESTS}, set -e; ${MAKE} -C ${dir}; ) + +clean: ;$(foreach dir, ${TESTS}, ${MAKE} -C ${dir} clean; ) Deleted: branches/simplified-build/!OsLib/Source/Test/Makefile,fe1 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Makefile,fe1 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Makefile,fe1 2007-05-06 15:55:08 UTC (rev 261) @@ -1,50 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/Test/Makefile,fe1 20040106 -# -RM = OSLibBin:rm - -DIR = <OSLib$SourceDir>.Test -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V -AMU = amu -desktop - -all: readvarval test TestHDR - -stripdepends: - ${AMU} -f ${DIR}.readvarval.Makefile stripdepends - ${AMU} -f ${DIR}.Test.Makefile stripdepends - ${AMU} -f ${DIR}.TestFW.Makefile stripdepends - ${AMU} -f ${DIR}.TestHDR.Makefile stripdepends - -tree: - ${AMU} -f ${DIR}.readvarval.Makefile tree - ${AMU} -f ${DIR}.Test.Makefile tree - ${AMU} -f ${DIR}.TestFW.Makefile tree - ${AMU} -f ${DIR}.TestHDR.Makefile tree - ifthere ${DIR}.tree then stamp ${DIR}.tree else create ${DIR}.tree - -test: - ${AMU} -f ${DIR}.Test.Makefile all DIR=${DIR}.Test APCS=${APCS} OSLIB=${OSLIB} - -readvarval: - ${AMU} -f ${DIR}.readvarval.Makefile all DIR=${DIR}.readvarval APCS=${APCS} OSLIB=${OSLIB} - -TestFW: - ${AMU} -f ${DIR}.TestFW.Makefile all DIR=${DIR}.TestFW APCS=${APCS} OSLIB=${OSLIB} - -TestHDR: - ${AMU} -f ${DIR}.TestHDR.Makefile all DIR=${DIR}.TestHDR APCS=${APCS} OSLIB=${OSLIB} - -testlib: readvarval test TestHDR - -archive_source: - cdir ${ARCHIVE} - copy * ${ARCHIVE}.* ${COPYFLAGS} - ${AMU} -f ${DIR}.readvarval.makefile archive_source ARCHIVE=${ARCHIVE}.readvarval - ${AMU} -f ${DIR}.Test.makefile archive_source ARCHIVE=${ARCHIVE}.Test - ${AMU} -f ${DIR}.TestFW.makefile archive_source ARCHIVE=${ARCHIVE}.TestFW - ${AMU} -f ${DIR}.TestHDR.makefile archive_source ARCHIVE=${ARCHIVE}.TestHDR - -clean: - ${AMU} -f ${DIR}.readvarval.Makefile clean - ${AMU} -f ${DIR}.Test.Makefile clean - ${AMU} -f ${DIR}.TestFW.Makefile clean - ${AMU} -f ${DIR}.TestHDR.Makefile clean Deleted: branches/simplified-build/!OsLib/Source/Test/Test/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/AMUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/AMUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,122 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/Test/AMUmakefile 20031230 -#=================================================================== - -#------------------------------------------------------------------------ -# paths & directories -SOURCEDIR = <OSLib$SourceDir> -#BINDIR = ${SOURCEDIR}/../Bin - -#------------------------------------------------------------------------ -# Macros -#------------------------------------------------------------------------ -#target-specific macros -SOURCES_0 = Computer Core Toolbox User -SOURCES = ${SOURCES_0} Types Macros -CONTENTS = $(addsuffix .oslib.Modules, $(addprefix ${SOURCEDIR}., ${SOURCES_0}) ) -OSLIB = ${SOURCEDIR}.o.OSLib -OSLIB32 = ${SOURCEDIR}.o.OSLib32 -OSLIB_H = h.oslib -OSLIB_HDR = Hdr.OSLib - -#LIBS_S = OSLibSupport:OSLibSupport.o -#LIBS_OS = OSLib:o.OSLib -#LIBS_GPP = -liostream -#LIBS_C = C:o.stubs -#LIBS_CPP = C:o.C++Lib C:o.Stubs - -ifeq (APCS,32) -OS_LIB = ${OSLIB32} -else -OS_LIB = ${OSLIB} -endif - -.include ${CONTENTS} - -#------------------------------------------------------------------------ -# tools -MAKE = amu -desktop APCS=${APCS} - -FLAGS_CC = fah -#DEP = -depend !depend -CC = cc -apcs 3/${APCS} ${DEP} -f${FLAGS_CC} -throwback - -CPP = c++ -apcs 3/${APCS} -c -throwback -GCC = gcc -mthrowback -GPP = gcc -xc++ -mthrowback -AS = do objasm -LD = Link -RM = rm -nq -MD = cdir -STRIP = StripDepends - -CP = copy -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -#------------------------------------------------------------------------ -# Targets: -.PHONY: all clean - -TEST_C = test_c -TEST_CPP = test_cpp -TEST_S = test_s - -BIN_C = ${TEST_C} -BIN_CPP = ${TEST_CPP} -BIN_S = ${TEST_S} - -all: ${BIN_CPP} ${BIN_C} ${BIN_S} - -${OSLIB_H}: ${CONTENTS} mkhdr - ${MD} h - @/${MAKEFILEDIR}.mkhdr -c $@ $(sort ${MODULES} ${SWIMODULES} Types Macros) - -${OSLIB_HDR}: ${CONTENTS} mkhdr - ${MD} Hdr - @/${MAKEFILEDIR}.mkhdr -s $@ $(sort ${MODULES} ${SWIMODULES} Types Macros) - -mkhdr: mkhdr.c - ${MD} o - ${CC} -o $@ mkhdr.c - -${TEST_S}.o: test.s ${OSLIB_HDR} - ${MD} o - ${AS} -c test.s -o $@ -I <OSLib$Path> - -${BIN_S}: ${TEST_S}.o ${OS_LIB} - ${LD} ${TEST_S}.o -o $@ - /${MAKEFILEDIR}.$@ - -${TEST_C}.o: test.c ${OSLIB_H} - ${MD} o - ${CC} -c test.c -IC:,OSLib: -o $@ - -${BIN_C}: ${TEST_C}.o ${OS_LIB} - ${LD} ${TEST_C}.o C:stubs.o ${OS_LIB} -o $@ - /${MAKEFILEDIR}.$@ - -${TEST_CPP}.o: cc.test ${OSLIB_H} - ${MD} o - ${CPP} -c cc.test -IC:,OSLib: -o $@ - -${BIN_CPP}: ${TEST_CPP}.o ${OS_LIB} - ${LD} -C++ $? C:C++Lib.o C:stubs.o -o $@ - /${MAKEFILEDIR}.$@ - -clean: ;-${RM} \ -${BIN_C} \ -o.${TEST_C} \ -${BIN_CPP} \ -o.${TEST_CPP} \ -${BIN_S} \ -o.${TEST_S} \ -${OSLIB_H} \ -${OSLIB_Hdr} \ -mkhdr \ -o.mkhdr - -distclean: clean - ${RM} o Hdr h - - -#------------------------------------------------------------------------ -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/Test/Test/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/GNUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/GNUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,88 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/Test/GNUmakefile 20040121 -#=================================================================== - -#------------------------------------------------------------------------ -# paths & directories -SOURCEDIR = ../.. -include ${SOURCEDIR}/GNUmakefile.settings -include ${SOURCEDIR}/../GNUmakefile.settings - -#------------------------------------------------------------------------ -#target-specific macros -SOURCES_0 = Computer Core Toolbox User -SOURCES = ${SOURCES_0} Types Macros -CONTENTS = $(addsuffix /oslib/Modules, $(addprefix ${SOURCEDIR}/, ${SOURCES_0}) ) -OSLIB = ${SOURCEDIR}/OSLib.o -OSLIB32 = ${SOURCEDIR}/OSLib32.o -OSLIB_H = oslib.h -OSLIB_HH = OSLib.Hdr - -INCLUDES = $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) - -ASOPTIONS = $(shell echo -objasm -apcs32 $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) | \ - sed 's/ /,/g' ) - -#------------------------------------------------------------------------ -# tools -AS = ${GCCSDK_INSTALL_CROSSBIN}/gcc -xassembler -Wa,${ASOPTIONS} -GCC = ${GCCSDK_INSTALL_CROSSBIN}/gcc -GPP = ${GCCSDK_INSTALL_CROSSBIN}/g++ -LD = ${GCCSDK_INSTALL_CROSSBIN}/gcc -RM = rm -f - -include ${CONTENTS} - -#------------------------------------------------------------------------ -# Targets: -.PHONY: all clean - -TEST_C = test_c -TEST_CPP = test_cpp -TEST_S = test_s - -BIN_C = ${TEST_C},ff8 -BIN_CPP = ${TEST_CPP},ff8 -BIN_S = ${TEST_S},ff8 - -all: ${BIN_C} ${BIN_CPP} ${BIN_S} - -${OSLIB_H}: ${CONTENTS} - @echo ${MODULES} ${SWIMODULES} | \ - tr '[A-Z] ' '[a-z]\n' | \ - sed 's/.*/#include \"oslib\/&.h\"/g' \ - > $@ - -${OSLIB_HH}: ${CONTENTS} - @echo $(sort ${MODULES} ${SWIMODULES} Types Macros) | \ - tr ' ' '\n' | \ - sed 's/.*/@GET@oslib\/&.Hdr/g' | \ - tr '@' '\t' \ - > $@ - -${TEST_S}.o: test.s ${OSLIB_HH} - ${AS} -c $< -o $@ - -${BIN_S}: ${TEST_S}.o ${OSLIB} - ${LD} $^ -o $@ - -${TEST_C}.o: test.c ${OSLIB_H} - ${GCC} -c $< ${INCLUDES} -o $@ - -${BIN_C}: ${TEST_C}.o ${OSLIB} - ${LD} $^ -o $@ - -${TEST_CPP}.o: test.cc ${OSLIB_H} - ${GPP} -c $< ${INCLUDES} -o $@ - -${BIN_CPP}: ${TEST_CPP}.o ${OSLIB} - ${GPP} $^ -o $@ - -clean: ;-${RM} \ -${BIN_C} \ -${TEST_C}.o \ -${BIN_CPP} \ -${TEST_CPP}.o \ -${BIN_S} \ -${TEST_S}.o \ -${OSLIB_H} \ -${OSLIB_HH} Deleted: branches/simplified-build/!OsLib/Source/Test/Test/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/Make,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/Make,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1,7 +0,0 @@ -| Test the Development Library Build -| -Echo <sys$time> Building <Obey$Dir> -Wimpslot 4000k -if "<C$Mode>"= 32 then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 -if "<C$Mode>"<>32 then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 -echo <sys$time> done \ No newline at end of file Added: branches/simplified-build/!OsLib/Source/Test/Test/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test/Makefile 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,31 @@ +# ... + +ALL_CHEADERS := $(wildcard $(HEADERDIR)/*.h) +ALL_ASMHEADERS := $(wildcard $(HEADERDIR)/*.Hdr) + +.PHONY: all clean + +all: test_c test_cpp test_s + +clean: + -$(RM) test_c test_cpp test_s all_oslib.h all_oslib.Hdr + +test_c: test.c small_test.o all_oslib.h + $(CC) -o $@ -I$(TOPHEADERDIR) test.c small_test.o $(OSLIBLIB) + +test_cpp: test.cc all_oslib.h + $(CXX) -o $@ -I$(TOPHEADERDIR) $< $(OSLIBLIB) + +test_s: test$(ASMEXT) all_oslib.Hdr + $(AS) -o $@ -I$(TOPHEADERDIR) $< + +small_test.o: small_test.s all_oslib.Hdr + $(AS) -o $@ -I$(TOPHEADERDIR) $< + +all_oslib.h: $(ALL_CHEADERS) + -$(RM) $@ + cat $(ALL_CHEADERS) > all_oslib.h + +all_oslib.Hdr: $(ALL_ASMHEADERS) + -$(RM) $@ + cat $(ALL_ASMHEADERS) > all_oslib.Hdr Deleted: branches/simplified-build/!OsLib/Source/Test/Test/Run_cc,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/Run_cc,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/Run_cc,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1,3 +0,0 @@ -echo Test_c -run <Obey$Dir>.test_c - Deleted: branches/simplified-build/!OsLib/Source/Test/Test/Run_cpp,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/Run_cpp,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/Run_cpp,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1,4 +0,0 @@ -echo Test_cpp -run <Obey$Dir>.test_cpp - - Added: branches/simplified-build/!OsLib/Source/Test/Test/small_test.s =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/small_test.s (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test/small_test.s 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,69 @@ +#include "oslib/OSGBPB.Hdr" +#include "oslib/Macros.Hdr" + + .text + + @ void EnumCSD (void); + .global EnumCSD +EnumCSD: + STMFD R13!, {R4-R11, R14} + MOV R4, #0 +loop: + MOV R0, #OSGBPB_DirEntriesInfoStamped + LDR R1, =dirname + LDR R2, =buffer + MOV R3, #10 + MOV R5, #endbuffer - buffer + LDR R6, =wildcard + SWI OS_GBPB + CMP R4, #-1 + LDMEQ R13!, {R4-R11, PC} + + TEQ R3, #0 +printloop: + BEQ loop + + LDR R0, [R2, #OSGBPB_InfoStampedBase_size] + BL PrintHex + + ADD R2, R2, #OSGBPB_InfoStampedBase + MOV R0, R2 + SWI OS_Write0 + SWI OS_NewLine + @ Skip object name: +skipname: + LDRB R14, [R2], #1 + TEQ R14, #0 + BNE skipname + Align , R2, R2 + + SUBS R3, R3, #1 + B printloop + +dirname: + .asciz "@" +wildcard: + .asciz "*" + .align + + @ R0 = hex address to be printed +PrintHex: + STMFD R13!, {R0-R7, R14} + ADR R1, PrintHexBuffer + MOV R2, #PrintHexBufferEnd - PrintHexBuffer + SWI OS_ConvertHex8 + ADR R0, PrintHexBuffer + SWI OS_Write0 + SWI OS_NewLine + LDMFD R13!, {R0-R7, PC} +PrintHexBuffer: + .space 16 +PrintHexBufferEnd: + .align + + .bss +buffer: + .space 256 +endbuffer: + + .end Copied: branches/simplified-build/!OsLib/Source/Test/Test/test.asm (from rev 246, branches/simplified-build/!OsLib/Source/Test/Test/test.s) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/test.asm (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test/test.asm 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,28 @@ +;test assembler headers + ; faffing about with directory name to get ObjAsm to behave properly + GET ../Test/OSLib.Hdr ; gets all OSLib headers +; GET Hdr.OSLib ; alternative format for OBJASM + + EXPORT |entry| + EXPORT |exit| + + AREA code, CODE + ENTRY + +|entry| SWI XOS_GetEnv ; get the environment + MOVVS pc, lr ; exit on error + + MOV sp, r1 ; set up a stack + + STMFD sp!, {lr} ; save the return address + + ADR R0, message ; write the message std out + SWI OS_Write0 + + SWI OS_NewLine + +|exit| ldmfd sp!, {pc} ; return + +message = "Hello World from ObjAsm",0 + + END Modified: branches/simplified-build/!OsLib/Source/Test/Test/test.c =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/test.c 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/test.c 2007-05-06 15:55:08 UTC (rev 261) @@ -16,14 +16,13 @@ typedef unsigned char bool; /* should be allowed */ #endif -#if 1 - #include "oslib.h" -#else - #include "OSLib:os.h" -#endif +/* Load all OSLib C headers as one big header to catch potentional clashes. */ +#include "all_oslib.h" #define BUF_SIZ 64 +extern void EnumCSD(void); + int main (void) { #if defined TEST_BOOL @@ -34,23 +33,23 @@ #if defined __CC_NORCROFT os_write0( "Hello World from Norcroft\n\r" ); -#endif - -#if defined __GNUC__ +#elif defined __GNUC__ os_write0( "Hello World from GCC\n\r" ); +#else + os_write0( "Hello world from Unidentifiecd Compiler\n\r" ); #endif #if defined TEST_BOOL os_writec( '\n' ); os_write0( "BOOL_DEFINED is " ); -#if !defined BOOL_DEFINED +# if !defined BOOL_DEFINED os_write0( "not " ); -#endif +# endif os_write0( "defined\r\n" ); -#if defined BOOL_IS_OSBOOL +# if defined BOOL_IS_OSBOOL os_write0( "bool is osbool\r\n" ); -#endif +# endif os_binary_to_decimal( sizeof( kirk ), buf, BUF_SIZ-1 ); os_write0( "size of bool is " ); @@ -65,5 +64,7 @@ os_writec( '\r' ); #endif + EnumCSD(); + return 0; } Modified: branches/simplified-build/!OsLib/Source/Test/Test/test.cc =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/test.cc 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/test.cc 2007-05-06 15:55:08 UTC (rev 261) @@ -10,17 +10,22 @@ typedef unsigned char bool; // accepted under CFront; faulted under g++ #endif -#include "oslib.h" - #ifdef __CC_NORCROFT -#include <iostream.h> +# include <stdlib.h> +# include <iostream.h> +# define STDNAMESPACE #else -#include <iostream> +# include <cstdlib> +# include <iostream> +# define STDNAMESPACE std:: #endif +/* Load all OSLib C headers as one big header to catch potentional clashes. */ +#include "all_oslib.h" + #if defined NAMESPACE_OSLIB // using namespaces - #define TEST Test:: +# define TEST Test:: namespace Test { /* a function in our local namespace */ @@ -31,53 +36,52 @@ } } - #if 1 +# if 1 // use the |using| directive - #define OSLIB - using namespace OSLib; - #else +# define OSLIB + using namespace OSLib; +# else // use qualifiers - #define OSLIB OSLib:: - #endif +# define OSLIB OSLib:: +# endif #else // no namespaces - #define OSLIB +# define OSLIB #endif int main() { - #if defined __CC_NORCROFT const char* text = "Hello world from Norcroft via CFront"; #elif defined __GNUC__ - const char* text = "Hello world from GPP"; + const char* text = "Hello world from G++"; #else const char* text = "Hello world from Unidentifiecd Compiler"; #endif #if defined TEST_BOOL OSLIB os_write0( "__cplusplus is " ); - #if !defined __cplusplus +# if !defined __cplusplus OSLIB os_write0( "not " ); - #endif +# endif OSLIB os_write0( "defined\r\n" ); OSLIB os_write0( "\nBOOL_DEFINED is " ); - #if !defined BOOL_DEFINED +# if !defined BOOL_DEFINED OSLIB os_write0( "not " ); - #endif +# endif OSLIB os_write0( "defined\r\n" ); OSLIB os_write0( "bool is " ); -#if !defined BOOL_IS_OSBOOL +# if !defined BOOL_IS_OSBOOL OSLIB os_write0( "not " ); -#endif +# endif OSLIB os_write0( "osbool\r\n" ); OSLIB os_write0( "NAMESPACE_OSLIB is " ); - #if !defined NAMESPACE_OSLIB +# if !defined NAMESPACE_OSLIB OSLIB os_write0( "not " ); - #endif +# endif OSLIB os_write0( "defined\r\n" ); bool spock = TRUE; @@ -88,14 +92,14 @@ int used; used = OSLIB os_binary_to_decimal( sizeof( spock ), buf, BUF_SIZ-1 ); - *(buf+used) = '\0'; + buf[used] = '\0'; OSLIB os_write0( "size of bool is " ); OSLIB os_write0( buf ); OSLIB os_writec( '\n' ); OSLIB os_writec( '\r' ); used = OSLIB os_binary_to_decimal( sizeof( kirk ), buf, BUF_SIZ-1 ); - *(buf+used) = '\0'; + buf[used] = '\0'; OSLIB os_write0( "size of osbool is " ); OSLIB os_write0( buf ); OSLIB os_writec( '\n' ); @@ -103,11 +107,7 @@ #endif // just to prove it's C++ -#ifndef __CC_NORCROFT - std:: -#endif - cout << text << "\n"; + STDNAMESPACE cout << text << STDNAMESPACE endl; - return 0; - } - + return EXIT_SUCCESS; +} Copied: branches/simplified-build/!OsLib/Source/Test/Test/test.gas (from rev 246, branches/simplified-build/!OsLib/Source/Test/Test/test.s) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/test.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test/test.gas 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,27 @@ +@ Test assembler headers + +@ Gets all OSLib headers: +#include "all_oslib.Hdr" + + .text + .global entry + +entry: SWI XOS_GetEnv @ get the environment + sWIVS OS_GenerateError @ exit on error + + MOV sp, r1 @ set up a stack + + STMFD sp!, {lr} @ save the return address + + ADR R0, message @ write the message std out + SWI OS_Write0 + SWI OS_NewLine + + ldmfd sp!, {lr} @ return +exit: + SWI OS_Exit + +message: + .asciz "Hello World from GNU assembler" + + .end Deleted: branches/simplified-build/!OsLib/Source/Test/Test/test.s =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test/test.s 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test/test.s 2007-05-06 15:55:08 UTC (rev 261) @@ -1,29 +0,0 @@ -;test assembler headers - ; faffing about with directory name to get ObjAsm to behave properly - GET ../Test/OSLib.Hdr ; gets all OSLib headers -; GET Hdr.OSLib ; alternative format for OBJASM - - EXPORT |entry| - EXPORT |exit| - - AREA code, CODE - ENTRY - -|entry| SWI XOS_GetEnv ; get the environment - MOVVS pc, lr ; exit on error - - MOV sp, r1 ; set up a stack - - STMFD sp!, {lr} ; save the return address - - ADR R0, message ; write the message std out - SWI OS_Write0 - - SWI OS_NewLine - -|exit| ldmfd sp!, {pc} ; return - -message = "Hello World from ObjAsm",0 - - END - Deleted: branches/simplified-build/!OsLib/Source/Test/Test1/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test1/GNUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test1/GNUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,69 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/Test1/GNUmakefile 20040504 -#=================================================================== -# $Header$ - -#------------------------------------------------------------------------ -# paths & directories -SOURCEDIR = ../.. -include ${SOURCEDIR}/GNUmakefile.settings -include ${SOURCEDIR}/../GNUmakefile.settings - -#------------------------------------------------------------------------ -#target-specific macros -SOURCES_0 := Computer Core Toolbox User -SOURCES := ${SOURCES_0} Types Macros -CONTENTS := $(addsuffix /oslib/Modules, $(addprefix ${SOURCEDIR}/, ${SOURCES_0}) ) -OSLIB := ${SOURCEDIR}/OSLib.o -OSLIB32 := ${SOURCEDIR}/OSLib32.o -OSLIB_H := oslib.h -OSLIB_HH := OSLib.Hdr - -INCLUDES := $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) - -ASOPTIONS := $(shell echo -objasm -apcs32 $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) | \ - sed 's/ /,/g' ) - -#------------------------------------------------------------------------ -# tools -AS = ${GCCSDK_INSTALL_CROSSBIN}/gcc -xassembler -Wa,${ASOPTIONS} -GCC = ${GCCSDK_INSTALL_CROSSBIN}/gcc -GPP = ${GCCSDK_INSTALL_CROSSBIN}/g++ -LD = ${GCCSDK_INSTALL_CROSSBIN}/gcc -RM = rm -f - -tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) - -#------------------------------------------------------------------------ -include ${CONTENTS} - -VPATH := $(addsuffix /oslib/, $(addprefix ${SOURCEDIR}/, ${SOURCES_0}) ) - -#------------------------------------------------------------------------ -# Targets: -.PHONY: all clean - -TEST_C = test.c -TEST_CPP = test.cpp -TEST_S = test.s - -OBJS := $(addsuffix .o, ${SWIMODULES} ${MODULES}) -OBJ_C := $(addprefix c_, $(call tolower, ${OBJS})) -OBJ_S := $(addprefix s_, ${OBJS}) - -all: ${OBJ_C} ${OBJ_S} -test_c: ${OBJ_C} -test_s: ${OBJ_S} - -c_%.o: %.h - @echo "Testing $(subst .o,.h,$(subst c_,,$@))" - @echo "#include \"oslib/$(subst .o,.h,$(subst c_,,$@))\"" >> include.h - @${GCC} -c ${TEST_C} ${INCLUDES} -o /dev/null - @touch $@ - -s_%.o: %.Hdr - @echo "Testing $(subst .o,.Hdr,$(subst s_,,$@))" - @echo " GET oslib/$(subst .o,.Hdr,$(subst s_,,$@))" >> include.Hdr - @${AS} -c ${TEST_S} -o /dev/null - @touch $@ - -clean: ;-${RM} include.h include.Hdr c_*.o s_*.o Copied: branches/simplified-build/!OsLib/Source/Test/Test1/Makefile (from rev 246, branches/simplified-build/!OsLib/Source/Test/Test1/GNUmakefile) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test1/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test1/Makefile 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,39 @@ +# ... + +ALL_CHEADERS := $(wildcard $(HEADERDIR)/*.h) +ALL_ASMHEADERS := $(wildcard $(HEADERDIR)/*.Hdr) + +.PHONY: all clean + +TEST_C = test.c +TEST_S = test$(ASMEXT) + +OBJ_C := $(addprefix c_, $(addsuffix .o, $(basename $(notdir $(ALL_CHEADERS))))) +OBJ_S := $(addprefix s_, $(addsuffix .o, $(basename $(notdir $(ALL_ASMHEADERS))))) + +all: $(OBJ_C) $(OBJ_S) + +.SUFFIXES: +.SUFFIXES: .o .h .Hdr + +c_%.o: $(HEADERDIR)/%.h + @echo "Testing $(subst .o,.h,$(subst c_,,$@))" + @echo "#include \"oslib/$(subst .o,.h,$(subst c_,,$@))\"" > include.h + @$(CC) -c $(TEST_C) -I$(TOPHEADERDIR) -o /dev/null + @touch $@ + +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +s_%.o: $(HEADERDIR)/%.Hdr + @echo "Testing $(subst .o,.Hdr,$(subst s_,,$@))" + @echo "#include \"oslib/$(subst .o,.Hdr,$(subst s_,,$@))\"" > include.Hdr + @$(AS) $(TEST_S) -I$(TOPHEADERDIR) -o /dev/null + @touch $@ +else +s_%.o: $(HEADERDIR)/%.Hdr + @echo "Testing $(subst .o,.Hdr,$(subst s_,,$@))" + @echo " GET oslib/$(subst .o,.Hdr,$(subst s_,,$@))" > include.Hdr + @$(AS) $(TEST_S) -I$(TOPHEADERDIR) -o /dev/null + @touch $@ +endif + +clean: ;-$(RM) include.h include.Hdr c_*.o s_*.o Copied: branches/simplified-build/!OsLib/Source/Test/Test1/test.asm (from rev 246, branches/simplified-build/!OsLib/Source/Test/Test1/test.s) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test1/test.asm (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test1/test.asm 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,13 @@ +;test each assembler header + ; faffing about with directory name to get ObjAsm to behave properly + GET ../Test1/include.Hdr ; gets all OSLib headers + + EXPORT |entry| + + AREA code, CODE + ENTRY + +|entry| MOV pc, lr ; exit on error + + END + Copied: branches/simplified-build/!OsLib/Source/Test/Test1/test.gas (from rev 246, branches/simplified-build/!OsLib/Source/Test/Test1/test.s) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test1/test.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/Test1/test.gas 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,10 @@ +@ Test each assembler header individually + +#include "include.Hdr" + + .text + + .global entry +entry: MOV pc, lr + + .end Deleted: branches/simplified-build/!OsLib/Source/Test/Test1/test.s =================================================================== --- branches/simplified-build/!OsLib/Source/Test/Test1/test.s 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/Test1/test.s 2007-05-06 15:55:08 UTC (rev 261) @@ -1,13 +0,0 @@ -;test each assembler header - ; faffing about with directory name to get ObjAsm to behave properly - GET ../Test1/include.Hdr ; gets all OSLib headers - - EXPORT |entry| - - AREA code, CODE - ENTRY - -|entry| MOV pc, lr ; exit on error - - END - Deleted: branches/simplified-build/!OsLib/Source/Test/readvarval/!Run,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/readvarval/!Run,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/readvarval/!Run,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1 +0,0 @@ -/<obey$Dir>.readvarval \ No newline at end of file Deleted: branches/simplified-build/!OsLib/Source/Test/readvarval/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/readvarval/AMUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/readvarval/AMUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,73 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/readvarval/AMUmakefile,fe1 -#=================================================================== - -TARGET = readvarval -OBJS = o.${TARGET} -TRACEOBJS = -DIR = ${MAKEFILEDIR} -TRACE ?= 0 -LIBS_C = C:o.stubs - -ifeq (${APCS},32) -OS_LIB = OSLib:OSLib32.o -else -OS_Lib = OSLib:OSLib.o -endif - -ifneq (${TRACE},0) -OBJS += ${TRACEOBJS} -endif - -ifndef APCS -$(error APCS mode is undefined) -endif - -#------------------------------------------------------------------------ -#Tools -LINK = Link -CC = cc -apcs 3/${APCS} ${DEPEND} -c -f${FLAGS_CC} \ - -throwback ${INC} $(addprefix -D, ${DEFINE}) -ASM = objasm -throwback -RM = rm -nq -STRIP = stripdepends -MD = cdir -MAKE = AMU -desktop - -#------------------------------------------------------------------------ -#Toolflags -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V -INC = -IC:,OSLib: -FLAGS_CC = fah -DEFINE = -#DEPEND = - -ifdef OUTPUT -DEFINE += OUTPUT=${OUTPUT} -endif - -#------------------------------------------------------------------------ -.PHONY: all run clean distclean - -all: ${TARGET} - -${TARGET}: ${OBJS} ${LIBS_C} ${OS_LIB} - ${LINK} -output $@ ${OBJS} ${LIBS_C} ${OS_LIB} - ${MAKE} -f ${MAKEFILEDIR}.AMUmakefile run - -run: ${TARGET} - /${MAKEFILEDIR}.${TARGET} - -clean: ;${RM} ${OBJS} ${TARGET} - -distclean: clean - -${STRIP} AMUmakefile - ${RM} o - -#------------------------------------------------------------------------ -#General rules -.SUFFIXES: .o .c - -.c.o: ;${MD} o - ${CC} $< -o $@ - -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/Test/readvarval/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Test/readvarval/GNUmakefile 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/readvarval/GNUmakefile 2007-05-06 15:55:08 UTC (rev 261) @@ -1,49 +0,0 @@ -# Index: OSLib/!OsLib/Source/Test/readvarval/GNUmakefile -#=================================================================== - -#------------------------------------------------------------------------ -# paths & directories -SOURCEDIR = ../.. -include ${SOURCEDIR}/GNUmakefile.settings -include ${SOURCEDIR}/../GNUmakefile.settings - -#------------------------------------------------------------------------ -#target-specific macros -TARGET = readvarval -OBJS = ${TARGET}.o -BIN = ${TARGET},ff8 -OSLIB = ${SOURCEDIR}/OSLib.o -OSLIB32 = ${SOURCEDIR}/OSLib32.o - -SOURCES = Computer Core Toolbox User Types Macros -INCLUDES = $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) - - -#------------------------------------------------------------------------ -#Tools -GCC = ${GCCSDK_INSTALL_CROSSBIN}/gcc -LD = ${GCCSDK_INSTALL_CROSSBIN}/gcc -RM = rm -f - -#------------------------------------------------------------------------ -#Toolflags - -#------------------------------------------------------------------------ -# Targets -.PHONY: all clean - -all: ${BIN} - -${BIN}: ${OBJS} ${OSLIB32} - ${LD} -o $@ $^ - -clean: - -${RM} ${OBJS} ${BIN} - -#------------------------------------------------------------------------ -#General rules -.SUFFIXES: .o .c - -.c.o: - ${GCC} -c ${INCLUDES} $< -o $@ - Deleted: branches/simplified-build/!OsLib/Source/Test/readvarval/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Test/readvarval/Make,fd7 2007-05-05 21:29:20 UTC (rev 260) +++ branches/simplified-build/!OsLib/Source/Test/readvarval/Make,fd7 2007-05-06 15:55:08 UTC (rev 261) @@ -1,5 +0,0 @@ -Echo <Sys$Time> Building <Obey$Dir> -Wimpslot 4096k -if "<C$Mode>"="32" then do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 OUTPUT=1 -if "<C$Mode>"<>"32" then do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 OUTPUT=1 -echo <sys$time> done \ No newline at end of file Copied: branches/simplified-build/!OsLib/Source/Test/readvarval/Makefile (from rev 246, branches/simplified-build/!OsLib/Source/Test/readvarval/GNUmakefile) =================================================================== --- branches/simplified-build/!OsLib/Source/Test/readvarval/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Test/readvarval/Makefile 2007-05-06 15:55:08 UTC (rev 261) @@ -0,0 +1,16 @@ +# ... + +.PHONY: all clean + +all: readvarval + +clean: + -$(RM) readvarval readvarval.o + +readvarval: readvarval.o $(OSLIBLIB) + $(CC) -o $@ $^ + +.SUFFIXES: .o .c + +.c.o: + $(CC) -I$(TOPHEADERDIR) -c $< -o $@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-05-05 21:29:24
|
Revision: 260 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=260&view=rev Author: jtytgat Date: 2007-05-05 14:29:20 -0700 (Sat, 05 May 2007) Log Message: ----------- - Macro.h/Macro.Hdr: the macro Bool didn't write its result to first parameter but modified the 2nd one. (20070505-1, John Tytgat) Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr branches/simplified-build/!OsLib/docs/ChangeLog Modified: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr 2007-05-01 19:33:15 UTC (rev 259) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr 2007-05-05 21:29:20 UTC (rev 260) @@ -3,7 +3,7 @@ ;OSLib---efficient, type-safe, transparent, extensible, ; register-safe A P I coverage of RISC O S -;Copyright \xA9 1994 Jonathan Coxhead +;Copyright � 1994 Jonathan Coxhead ; OSLib is free software; you can redistribute it and/or modify ;it under the terms of the GNU General Public License as published by @@ -103,9 +103,8 @@ MACRO $label Bool $r1, $r2 ;r1 = BOOL (r2) -$label TEQ $r2, #0 - MOVNE $r2, #True - MOVEQ $r2, #False +$label MOVS $r1, $r2 ; Assuming False == 0 + MOVNE $r1, #True MEND MACRO Modified: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-05-01 19:33:15 UTC (rev 259) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-05-05 21:29:20 UTC (rev 260) @@ -95,9 +95,8 @@ @ r1 = BOOL (r2) .macro Bool r1, r2 - TEQ \r2, #0 - MOVNE \r2, #True - MOVEQ \r2, #False + MOVS \r1, \r2 @ Assuming False == 0 + MOVNE \r1, #True .endm @ r1 = INT (r2) Modified: branches/simplified-build/!OsLib/docs/ChangeLog =================================================================== --- branches/simplified-build/!OsLib/docs/ChangeLog 2007-05-01 19:33:15 UTC (rev 259) +++ branches/simplified-build/!OsLib/docs/ChangeLog 2007-05-05 21:29:20 UTC (rev 260) @@ -5,6 +5,9 @@ OSLib 7.00 - In development ---------- +* Bug Fixes: + - Macro.h/Macro.Hdr: the macro Bool didn't write its result to first + parameter but modified the 2nd one. (20070505-1, John Tytgat) * Build Environment - OSLib sources are now on sourceforge.net SVN managed i.s.o. CVS. (20070414-1, John Tytgat) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-05-01 19:33:34
|
Revision: 259 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=259&view=rev Author: jtytgat Date: 2007-05-01 12:33:15 -0700 (Tue, 01 May 2007) Log Message: ----------- Added option -asmtype and support for GAS assembler (ELF iso AOF) Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/DefMod2/Manual.htm,faf branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/DefMod2/unix_eg/ Modified: branches/simplified-build/!OsLib/Tools/DefMod2/Manual.htm,faf =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Manual.htm,faf 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Manual.htm,faf 2007-05-01 19:33:15 UTC (rev 259) @@ -2,6 +2,7 @@ <html> <head> <title>DefMod</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > </head> <body> @@ -17,7 +18,7 @@ <tr><td><a href = "#semantics">Semantics</a></td></tr> <tr><td><a href = "#bytewide">The <tt>ByteWide</tt> file</a></td></tr> - <tr><td><a href = "#apcstoswi"><small>A P C S</small> + <tr><td><a href = "#apcstoswi"><small>APCS</small> to <small>SWI</small></a></td></tr> <tr><td><a href = "#implementation">Implementation notes</a></td></tr> @@ -31,35 +32,43 @@ <p><tt>DefMod</tt> is the tool for generating all sorts of different files from module interface files. A module interface file (with the -conventional file extension <tt>.SWI</tt>) contains enough information +conventional file extension <tt>.swi</tt>) contains enough information to specify, in a language-independent form, the interface to a -<small>RISC O S</small> module. This can be used to generate +<small>RISC OS</small> module. This can be used to generate suitable files to enable the module to be called from any high-level language. The whole of <tt>OSLib</tt> (apart from <tt>"types.h"</tt> and <tt>"macros.h"</tt>) is derived from a set of modules interface files and these <tt>DefMod</tt> options:</p> <dl> + <dt><tt>-asmtype</tt> <asmtype></dt> + <dd>selects the type of assembler program to be used. Possible values for <asmtype> are +<small>objasm</small> (<tt>ObjAsm</tt> running on <small>RISC OS</small>) which is the +default value, +<small>gccaof</small> (<tt>GCCSDK 3.4 AOF</tt>), <small>armasm</small> (<tt>ArmAsm</tt>) +and <small>gccelf</small> (<tt>GCCSDK 4 ELF</tt>). + </dd> + + <dt><tt>-o</tt></dt> + <dd>produces a directory containing <tt>ObjAsm</tt> or <tt>GAS</tt> source files defining +the <small>SWI</small> veneers as separate files; object files corresponding +to them; and a text file <tt>ViaFile</tt> which may be ued as input to +<tt>LibFile</tt> to combine them into a library</dd> + <dt><tt>-h</tt></dt> <dd>produces a commented C header file defining all the constants as -macros, all the types as <tt>typedef</tt>\xB4s and all the -<small>SWI</small>\xB4s as function prototypes</dd> +macros, all the types as <tt>typedef</tt>'s and all the +<small>SWI</small>'s as function prototypes</dd> <dt><tt>-hdr</tt></dt> <dd>produces a commented assembler header file defining all the constants as symbols, all the types and structure offsets as symbols, -and all the <small>SWI</small>\xB4s as symbols</dd> +and all the <small>SWI</small>'s as symbols</dd> <dt><tt>-chelp</tt></dt> <dd>produces a <tt>SrcEdit</tt>-compatible help file for the C interface</dd> - <dt><tt>-o</tt></dt> - <dd>produces: a directory containing <tt>ObjAsm</tt> source files defining -the <small>SWI</small> veneers as separate files; object files corresponding -to them; and a text file <tt>ViaFile</tt> which may be ued as input to -<tt>LibFile</tt> to combine them into a library</dd> - <dt><tt>-cstrong</tt></dt> <dd>produces a <tt>StrongHelp</tt>-compatible help file for the C interface</dd> @@ -111,7 +120,7 @@ <li>a <i>notion</i><tt>_series</tt> is a sequence of <i>notion</i>s separated (but not terminated) by semi-colon tokens;</li> - <li>if `<i>notion</i>\xB4 is the name of a punctuation mark, it is + <li>if <i>notion</i> is the name of a punctuation mark, it is defined as that mark followed by optional white space (a category which includes comments);</li> @@ -152,8 +161,8 @@ <p>This will all be familiar to users of Pascal or <small>ALGOL</small>.</p> - <p>A <tt>type_defn</tt> with no type defines an ``abstract type\xB4\xB4. A -structure type may end with `...,\xB4 in which case various extra macros + <p>A <tt>type_defn</tt> with no type defines an "abstract type". A +structure type may end with <tt>...,</tt> in which case various extra macros will be generated. An abstract type name is often a single letter (as in <tt>wimp_w</tt>, <tt>os_f</tt>).</p> @@ -198,14 +207,14 @@ <p>Defines types. Types are built-in types (<tt>Int</tt>, <tt>Short</tt>, <tt>Byte</tt>, <tt>Char</tt>, <tt>Bits</tt>, <tt>Bytes</tt>, <tt>Bool</tt>, <tt>String</tt>, <tt>Asm</tt>, -<tt>Data</tt>) or derived types. They are classified into ``register,\xB4\xB4 -``non-register fixed-length\xB4\xB4 and ``non-register variable-length\xB4\xB4 +<tt>Data</tt>) or derived types. They are classified into "register", +"non-register fixed-length" and "non-register variable-length" types. The register types are: <tt>Int</tt>, <tt>Short</tt>, <tt>Byte</tt>, <tt>Char</tt>, <tt>Bits</tt>, <tt>Bool</tt>, <tt>Ref</tt> <i>anything</i>, and unions of these; non-register fixed-length types -are: arrays, structures containing no `...\xB4, and unions of anything so +are: arrays, structures containing no <tt>...</tt>, and unions of anything so far; and non-register variable-length types are: <tt>String</tt>, -<tt>Asm</tt>, <tt>Data</tt>, <tt>Struct</tt> with `...\xB4, and unions not +<tt>Asm</tt>, <tt>Data</tt>, <tt>Struct</tt> with <tt>...</tt>, and unions not so far mentioned.</p> <p>In fact, not all the checking that would be desirable can be done, @@ -221,15 +230,15 @@ they are in the file <tt>"types.h"</tt>, included by all headers.</p> <p>Within unions only, the type <tt>Void</tt> is allowed, signifying -that the union may be ``empty\xB4\xB4.</p> +that the union may be "empty".</p> <h3>The <tt>SWI</tt> section</h3> <p>Contains the registers needed on input, and produced on output, by each <small>SWI</small> the module defines. For details of how the -algorithm for producing the <small>A P C S</small> +algorithm for producing the <small>APCS</small> veneers works, see the section <a href = -"#apcstoswi"><small>A P C S</small> to +"#apcstoswi"><small>APCS</small> to <small>SWI</small></a>. Registers may be specified as</p> <ul> @@ -247,26 +256,26 @@ Rx = .Ref Thing: thing </pre> - <p>(``<tt>R</tt><i>x</i> contains a pointer to a <tt>Thing</tt> -called <tt>thing</tt>\xB4\xB4) and</p> + <p>(<tt>R</tt><i>x</i> contains a pointer to a <tt>Thing</tt> +called <tt>thing</tt>) and</p> <pre> Rx -> Thing: thing </pre> - <p>(``<tt>R</tt><i>x</i> points to a <tt>Thing</tt> called -<tt>thing</tt>\xB4\xB4) are closely related: the difference is one of intent + <p>(<tt>R</tt><i>x</i> points to a <tt>Thing</tt> called +<tt>thing</tt>) are closely related: the difference is one of intent only. The second form is used when the argument must be valid on input; so the <small>SWI</small> is accepting a value of type <tt>Thing</tt> as -an argument, represented by a pointer to it (``input\xB4\xB4 arguments); the +an argument, represented by a pointer to it ("input" arguments); the first form is used when the value is not present, but the -<small>SWI</small> will fill it in (``output\xB4\xB4 arguments). (A third form -of syntax could be provided for ``update\xB4\xB4 arguments, but this has not +<small>SWI</small> will fill it in ("output" arguments). (A third form +of syntax could be provided for "update" arguments, but this has not been done.) In C, the first form generates an ordinary pointer, the second a pointer-to-constant.</p> - <p>The <tt>.SWI</tt> file contains the whole of the module interface. -This includes modules <small>SWI</small>\xB4s, structures and constants, as + <p>The <tt>.swi</tt> file contains the whole of the module interface. +This includes modules <small>SWI</small>'s, structures and constants, as expected; but also other resources defined by the module: service calls, vectors, error numbers, upcalls, <tt>Wimp</tt> messages (numbers and structures), events, etc. The vector, upcall and service entries are @@ -281,21 +290,21 @@ <p>The output arguments are not written if a <small>SWI</small> fails.</p> - <p>The case of <small>P S R</small> flags being required on + <p>The case of <small>PSR</small> flags being required on input is not supported. The only two calls where this is necessary are <tt>RemV</tt> and <tt>CnpV</tt>, which are obsolescent anyway.</p> <p>If a call has no output arguments, and exactly one input argument -which is a pointer to an unnamed structure with no `...\xB4 part, then the +which is a pointer to an unnamed structure with no <tt>...</tt> part, then the structure elements are passed in in separate registers. See <tt>Wimp_SetIconState</tt> for an example.</p> <p>If a <small>SWI</small> call happens also to be -<small>A P C S</small>-compliant, this information can +<small>APCS</small>-compliant, this information can be passed to the compiler, which can then generate an inline <small>SWI</small> instruction, by using the <tt>__swi()</tt> directive provided with <small>ARM</small> C release 5. To disable this feature -for use with earlier or non-<small>ARM</small> compilers (e g, +for use with earlier or non-<small>ARM</small> compilers (e.g., <tt>CFront</tt>) requires a header file containing the lines</p> <pre> @@ -328,18 +337,18 @@ <p>There is no support for 2-byte quantities on output.</p> - <h2><a name = apcstoswi><small>A P C S</small> to + <h2><a name = apcstoswi><small>APCS</small> to <small>SWI</small></a></h2> - <p>``<small>A P C S</small> to <small>SWI</small>\xB4\xB4 is + <p>"<small>APCS</small> to <small>SWI</small>" is what <tt>DefMod</tt> does when generating library files: it generates a veneer that assumes the C function has been called via -<small>A P C S</small> (in other words, the first 4 +<small>APCS</small> (in other words, the first 4 arguments are in <tt>R0</tt>, ..., <tt>R3</tt>, and the rest are on the stack), and sets the registers up as they should be for calling the <small>SWI</small>; that calls the <small>SWI</small>; and that then puts all the registers back where they should be for the -<small>A P C S</small>-conformant exit conditions (result +<small>APCS</small>-conformant exit conditions (result in <tt>R0</tt>, other output values written to the addresses supplied on input).</p> @@ -349,11 +358,11 @@ <p>To simplify the discussion, we refer to the registers by 2 sets of names. Considered as input to and output from the <small>SWI</small>, we -call them <tt>R0</tt>, ..., <tt>R9</tt>; considered as -<small>A P C S</small> entry registers, we call them -<tt>A1</tt>, ..., <tt>A4</tt> (the ``argument registers\xB4\xB4) and -<tt>V1</tt>, ..., <tt>V6</tt> (the ``variable registers\xB4\xB4); also, -when considered as the <small>A P C S</small> result register, +call them <tt>R0</tt>, ..., <tt>R9</tt>; considered as +<small>APCS</small> entry registers, we call them +<tt>A1</tt>, ..., <tt>A4</tt> (the "argument registers") and +<tt>V1</tt>, ..., <tt>V6</tt> (the "variable registers"); also, +when considered as the <small>APCS</small> result register, we call <tt>R0</tt> just <tt>R</tt>. The remaining 6 registers are always called <tt>SL</tt>, <tt>FP</tt>, <tt>IP</tt>, <tt>SP</tt>, <tt>LR</tt>, <tt>PC</tt>.</p> @@ -411,7 +420,7 @@ <p>Consider those variable registers <i>V</i> which will have to be preserved by this whole function: these are the ones that -<small>A P C S</small> requires to be preserved which we +<small>APCS</small> requires to be preserved which we will be using ourselves, or which the <small>SWI</small> corrupts:</p> <p><i>V</i> = {4 <u><</u> <i>r</i> < 10: @@ -469,7 +478,7 @@ contains </td> <td> - saved arguments (as set up by <small>A P C S</small>) + saved arguments (as set up by <small>APCS</small>) <td> </tr> <tr> @@ -492,7 +501,7 @@ </td> <td> saved output addresses (also saved by us where not already saved by -<small>A P C S</small>) +<small>APCS</small>) <td> </tr> </table> @@ -696,7 +705,7 @@ </dt> <dd> If it works at all, it will produce the right answer. If it -doesn\xB4t, it shows the error message to the user. +doesn't, it shows the error message to the user. </dd> <dt> @@ -723,7 +732,7 @@ </li> </ol> - These don\xB4t seem to be a problem in practice. + These don't seem to be a problem in practice. </dd> </dl> @@ -1236,7 +1245,7 @@ the pointer to the filled-in buffer, so you could nest calls as with C string functions.</p> - <p>It would be good to have support for <tt>enum</tt>\xB4s, so you could + <p>It would be good to have support for <tt>enum</tt>'s, so you could have cross-references generated in the help files from the type name to allowable values of that type. We could also have support for sets of enumerated types.</p> @@ -1271,7 +1280,7 @@ <td>5<sup>th</sup> Jul 1992</td> <td>J R C</td> <td>Added Handling of <tt>FLAGS</tt> arguments, handling of constant -arguments, handling of <small>SWI</small>\xB4s that corrupt random +arguments, handling of <small>SWI</small>'s that corrupt random registers.</td> </tr> <tr> @@ -1323,7 +1332,7 @@ </table> <!-- - Notes. Remind me never to use H T M L for mathematics again ... + Notes. Remind me never to use HTML for mathematics again ... In proportional text, extra spaces round '+' '-' '×' '÷' and before '(' in function calls seem superfluous, but spaces around relations '=' '>' '<' and ellipses '...' look good. Modified: branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-05-01 19:33:15 UTC (rev 259) @@ -1108,6 +1108,9 @@ } #endif + /* Set AsmType default. */ + AsmType = AsmType_eGCCAOF; + if ( (error = lookup_new (&needses, 16)) != NULL || (error = lookup_new (&needsatends, 16)) != NULL || (error = lookup_new (&consts, 16)) != NULL || Modified: branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c 2007-05-01 19:33:15 UTC (rev 259) @@ -38,6 +38,7 @@ #include "def.h" #include "hdr.h" +#include "objasm.h" #undef NEEDSATEND @@ -48,20 +49,27 @@ #define UNLABELLED_INST_COL 1 #define UNLABELLED_ARG_COL 2 -static char *Op [] = {":OR:", ":AND:", "+", ":EOR:"}; +static const char *Op [] = {":OR:", ":AND:", "+", ":EOR:"}; +/* This gives the condition when to use the ':' for marking the end of an + ELF label. */ +#define NeedELFLabel (label != NULL && DoELF) +/* Comment start character. */ +#define COMMENTCHAR ((DoELF) ? '@' : ';') /* emit an instruction - optionally with label */ static int Emit ( FILE *file, - char *label, - char *inst + const char *label, + const char *inst ) { - return label != NULL? - fprintf (file, "%-*s %s\n", LABELLED_INST_COL*TAB - 1, label, inst): - fprintf (file, "%-*s %s\n", UNLABELLED_INST_COL*TAB - 1, "", inst); + return fprintf (file, + NeedELFLabel ? "%-*s: %s\n" : "%-*s %s\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + inst); } @@ -69,17 +77,17 @@ static int EmitS ( FILE *file, - char *label, - char *inst, - char *s + const char *label, + const char *inst, + const char *s ) { - return label != NULL? - fprintf (file, "%-*s %-*s %s\n", LABELLED_INST_COL*TAB - 1, label, - (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1, inst, s): - fprintf (file, "%-*s %-*s %s\n", UNLABELLED_INST_COL*TAB - 1, - "", (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, - inst, s); + return fprintf (file, + NeedELFLabel ? "%-*s: %-*s %s\n" : "%-*s %-*s %s\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + (label != NULL) ? (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1 : (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, + inst, s); } @@ -87,19 +95,18 @@ static int EmitSS ( FILE *file, - char *label, - char *inst, - char *s1, - char *s2 + const char *label, + const char *inst, + const char *s1, + const char *s2 ) { - return label != NULL? - fprintf (file, "%-*s %-*s %s%s\n", LABELLED_INST_COL*TAB - 1, - label, (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1, inst, - s1, s2): - fprintf (file, "%-*s %-*s %s%s\n", UNLABELLED_INST_COL*TAB - 1, - "", (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, - inst, s1, s2); + return fprintf (file, + NeedELFLabel ? "%-*s: %-*s %s%s\n" : "%-*s %-*s %s%s\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + (label != NULL) ? (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1 : (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, + inst, s1, s2); } @@ -107,20 +114,19 @@ static int EmitSSS ( FILE *file, - char *label, - char *inst, - char *s1, - char *s2, - char *s3 + const char *label, + const char *inst, + const char *s1, + const char *s2, + const char *s3 ) { - return label != NULL? - fprintf (file, "%-*s %-*s %s%s%s\n", LABELLED_INST_COL*TAB - 1, - label, (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1, inst, - s1, s2, s3): - fprintf (file, "%-*s %-*s %s%s%s\n", UNLABELLED_INST_COL*TAB - 1, - "", (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, - inst, s1, s2, s3); + return fprintf (file, + NeedELFLabel ? "%-*s: %-*s %s%s%s\n" : "%-*s %-*s %s%s%s\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + (label != NULL) ? (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1 : (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, + inst, s1, s2, s3); } @@ -128,17 +134,17 @@ static int EmitD ( FILE *file, - char *label, - char *inst, + const char *label, + const char *inst, int d ) { - return label != NULL? - fprintf (file, "%-*s %-*s %d\n", LABELLED_INST_COL*TAB - 1, label, - (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1, inst, d): - fprintf (file, "%-*s %-*s %d\n", UNLABELLED_INST_COL*TAB - 1, - "", (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, - inst, d); + return fprintf (file, + NeedELFLabel ? "%-*s: %-*s %d\n" : "%-*s %-*s %d\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + (label != NULL) ? (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1 : (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, + inst, d); } @@ -146,17 +152,17 @@ static int EmitX ( FILE *file, - char *label, - char *inst, + const char *label, + const char *inst, int x ) { - return label != NULL? - fprintf (file, "%-*s %-*s &%X\n", LABELLED_INST_COL*TAB - 1, label, - (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1, inst, x): - fprintf (file, "%-*s %-*s &%X\n", UNLABELLED_INST_COL*TAB - 1, - "", (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, - inst, x); + return fprintf (file, + (DoELF) ? ((label != NULL && label[0]) ? "%-*s: %-*s 0x%X\n" : "%-*s %-*s 0x%X\n") : "%-*s %-*s &%X\n", + (label != NULL) ? LABELLED_INST_COL*TAB - 1 : UNLABELLED_INST_COL*TAB - 1, + (label != NULL) ? label : "", + (label != NULL) ? (LABELLED_ARG_COL - LABELLED_INST_COL)*TAB - 1 : (UNLABELLED_ARG_COL - UNLABELLED_INST_COL)*TAB - 1, + inst, x); } /* Prints a declaration of |v| as an object of type |t|. @@ -165,28 +171,28 @@ static int Emit_Decl1 ( FILE *file, // output file - char *type, // object type - char *v, // object name + const char *type, // object type + const char *v, // object name osbool top_level, // if true then equate, else assign storage - char *cs // number of elements in array + const char *cs // number of elements in array ) { int rc = 0; tracef( "Emit_Decl1: %s; %s; %s\n" _ v _ type _ top_level?"TRUE":"FALSE" ); - if ( top_level ) + if (top_level) { - if ((rc = EmitD (file, "", "^", 0)) < 0) + if ((rc = EmitD (file, NULL, (DoELF) ? ".struct" : "^", 0)) < 0) goto finish; - if ((rc = EmitSS (file, "", "#", cs, type)) < 0) + if ((rc = EmitSS (file, NULL, (DoELF) ? ".skip" : "#", cs, type)) < 0) goto finish; - if ((rc = EmitS (file, v, "*", "@")) < 0) + if ((rc = (DoELF) ? Emit (file, v, "") : EmitS (file, v, "*", "@")) < 0) goto finish; } else { - if ((rc = EmitSS (file, v, "#", cs, type)) < 0) + if ((rc = EmitSS (file, v, (DoELF) ? ".skip" : "#", cs, type)) < 0) goto finish; } @@ -199,7 +205,7 @@ ( FILE *file, // output file def_t t, // object type - char *v, // object name + const char *v, // object name osbool top_level, // if true then equate, else assign storage int count // number of elements in array ) @@ -216,50 +222,42 @@ switch (t->tag) { case def_TYPE_INT: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Int")) < 0) - if (( rc = Emit_Decl1 ( file, "Int", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Int", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_SHORT: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Short")) < 0) - if (( rc = Emit_Decl1 ( file, "Short", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Short", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_BYTE: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Byte")) < 0) - if (( rc = Emit_Decl1 ( file, "Byte", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Byte", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_CHAR: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Char")) < 0) - if (( rc = Emit_Decl1 ( file, "Char", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Char", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_BITS: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bits")) < 0) - if (( rc = Emit_Decl1 ( file, "Bits", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Bits", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_BYTES: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bytes")) < 0) - if (( rc = Emit_Decl1 ( file, "Bytes", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Bytes", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_BOOL: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bool")) < 0) - if (( rc = Emit_Decl1 ( file, "Bool", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Bool", v, top_level, cs)) < 0) goto finish; break; case def_TYPE_REF: -// if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Ptr")) < 0) - if (( rc = Emit_Decl1 ( file, "Ptr", v, top_level, cs )) < 0 ) + if ((rc = Emit_Decl1 (file, "Ptr", v, top_level, cs)) < 0) goto finish; break; @@ -267,7 +265,11 @@ case def_TYPE_ASM: case def_TYPE_DATA: case def_TYPE_VOID: - if ((rc = EmitS (file, v, top_level? "*": "#", "Skip")) < 0) + if ((rc = + (DoELF) ? + EmitS (file, v, top_level ? "" : ".skip", "Skip") + : + EmitS (file, v, top_level ? "*" : "#", "Skip")) < 0) goto finish; break; @@ -277,15 +279,26 @@ int i; if (top_level) - if ((rc = EmitD (file, "", "^", 0)) < 0) + if ((rc = EmitD (file, NULL, (DoELF) ? ".struct" : "^", 0)) < 0) goto finish; if (t->data AS list.base) { // the struct is based upon another - char v1 [def_ID_LIMIT + 8]; - sprintf( v1, "%s_MEMBERS", t->data AS list.base->data AS id ); - Emit (file, v, v1 ); + if (DoELF) + { + char v1 [def_ID_LIMIT + sizeof("_MEMBERS")-1 + def_ID_LIMIT + sizeof(" Base")-1]; + sprintf (v1, "%s_MEMBERS %s", t->data AS list.base->data AS id, v); + if ((rc = Emit (file, NULL, v1)) < 0) + goto finish; + } + else + { + char v1 [def_ID_LIMIT + sizeof("_MEMBERS")-1]; + sprintf (v1, "%s_MEMBERS", t->data AS list.base->data AS id); + if ((rc = Emit (file, v, v1)) < 0) + goto finish; + } } for (i = 0; i < t->data AS list.count; i++) @@ -304,15 +317,15 @@ } if (top_level) - if ((rc = EmitS (file, v, "*", "@")) < 0) + if ((rc = (DoELF) ? Emit (file, v, "") : EmitS (file, v, "*", "@")) < 0) goto finish; // emit a variable-sized structure as a macro if (t->data AS list.ellipsis && t->data AS list.count > 1) { - char v1 [def_ID_LIMIT + 5]; - char v2 [def_ID_LIMIT + 8]; + char v1 [def_ID_LIMIT + sizeof("_MEMBERS")-1]; + char v2 [def_ID_LIMIT + sizeof("_MEMBERS")-1 + def_ID_LIMIT + sizeof(" Base")-1]; // define a macro describing the members if (top_level) @@ -320,20 +333,38 @@ if ((rc = Emit (file, 0, "")) < 0) goto finish; - if ((rc = Emit (file, 0, "MACRO")) < 0) - goto finish; + if (DoELF) + { + sprintf (v1, "%s_MEMBERS label", v); + if ((rc = Emit (file, NULL, ".altmacro")) < 0 + || (rc = EmitS (file, NULL, ".macro", v1)) < 0) + goto finish; + } + else + { + if ((rc = Emit (file, NULL, "MACRO")) < 0) + goto finish; - sprintf( v1, "%s_MEMBERS", v ); - if ((rc = Emit (file, "$label", v1 )) < 0) - goto finish; + sprintf (v1, "%s_MEMBERS", v); + if ((rc = Emit (file, "$label", v1)) < 0) + goto finish; + } } if (t->data AS list.base) { // the struct is based upon another - sprintf( v1, "%s_MEMBERS", t->data AS list.base->data AS id ); -// Emit (file, v, v1 ); // TV 20021128 - Emit (file, "$label", v1 ); + if (DoELF) + { + sprintf (v1, "%s_MEMBERS \\label", t->data AS list.base->data AS id); + Emit (file, "\\label", v1); + } + else + { + sprintf (v1, "%s_MEMBERS", t->data AS list.base->data AS id); +// Emit (file, v, v1); // TV 20021128 + Emit (file, "$label", v1); + } } if (top_level) @@ -341,7 +372,7 @@ for (i = 0; i < t->data AS list.count - 1; i++) { if ((rc = sprintf (v1, - "$label._%s", + (DoELF) ? "\\label&_%s" : "$label._%s", t->data AS list.members [i]->name ) ) < 0) @@ -354,25 +385,31 @@ } // close the macro definition - if ((rc = Emit (file, 0, "MEND")) < 0) + if ((rc = Emit (file, NULL, (DoELF) ? ".endm" : "MEND")) < 0) goto finish; } // define the base structure in terms of the macro if (top_level) { - if (( rc = sprintf( v1, "%sBase", v ) ) < 0 ) + if ((rc = sprintf (v1, "%sBase", v)) < 0) goto finish; - if (( rc = sprintf( v2, "%s_MEMBERS", v ) ) < 0 ) + if ((rc = (DoELF) ? + sprintf (v2, "%s_MEMBERS %sBase", v, v) + : + sprintf (v2, "%s_MEMBERS", v)) < 0) goto finish; - if ((rc = Emit (file, 0, "")) < 0) + if ((rc = Emit (file, NULL, "")) < 0) goto finish; - if ((rc = EmitD (file, "", "^", 0)) < 0) + if ((rc = EmitD (file, NULL, (DoELF) ? ".struct" : "^", 0)) < 0) goto finish; - if ((rc = Emit (file, v1, v2)) < 0) + if ((rc = Emit (file, (DoELF) ? NULL : v1, v2)) < 0) goto finish; - if ((rc = EmitS (file, v1, "*", "@")) < 0) + if ((rc = (DoELF) ? + Emit (file, v1, "") + : + EmitS (file, v1, "*", "@")) < 0) goto finish; } } @@ -384,13 +421,16 @@ int i; if (top_level) - if ((rc = EmitD (file, "", "^", 0)) < 0) + if ((rc = EmitD (file, NULL, (DoELF) ? ".struct" : "^", 0)) < 0) goto finish; /*Use the union name itself to hold the offset of the start of the union.*/ if (!top_level) - if ((rc = EmitS (file, v, "*", "@")) < 0) + if ((rc = (DoELF) ? + Emit (file, v, "") + : + EmitS (file, v, "*", "@")) < 0) goto finish; for (i = 0; i < t->data AS list.count; i++) @@ -402,12 +442,12 @@ /*Set {VAR} back to the origin of the union.*/ if (!top_level) { - if ((rc = EmitS (file, "", "^", v)) < 0) + if ((rc = EmitS (file, NULL, (DoELF) ? ".struct" : "^", v)) < 0) goto finish; } else { - if ((rc = EmitD (file, "", "^", 0)) < 0) + if ((rc = EmitD (file, NULL, (DoELF) ? ".struct" : "^", 0)) < 0) goto finish; } } @@ -423,7 +463,10 @@ } if (top_level) - if ((rc = EmitS (file, v, "*", "@")) < 0) + if ((rc = (DoELF) ? + Emit (file, v, "") + : + EmitS (file, v, "*", "@")) < 0) goto finish; } break; @@ -443,8 +486,16 @@ break; case def_TYPE_ID: - if ((rc = EmitS (file, v, top_level? "*": "#", t->data AS id)) < 0) - goto finish; + if (DoELF) + { + if ((rc = Emit_Decl1 (file, t->data AS id, v, top_level, "")) < 0) + goto finish; + } + else + { + if ((rc = EmitS (file, v, top_level ? "*" : "#", t->data AS id)) < 0) + goto finish; + } break; default: @@ -579,46 +630,65 @@ return rc; } -static int Emit_Get (FILE *file, char *name) - +static int Emit_Get (FILE *file, const char *name) { int rc; - char s [FILENAME_MAX + 1], get [FILENAME_MAX + 1], - hdr [FILENAME_MAX + 1]; - if ((rc = sprintf (get, "%s%s", "Get_", name)) < 0) - goto finish; - if ((rc = sprintf (hdr, "%s%s", name, "_Hdr")) < 0) - goto finish; + if (DoELF) + { + if ((rc = fprintf (file, "# ifndef Get_%s\n" + "# define Get_%s\n" +#ifdef EXECUTE_ON_UNIX + // FIXME: this is strange, different assembler header output depending on which host + // these were created ?! + "# include \"oslib/%s.Hdr\"\n" +#else + "# include \"oslib.Hdr.%s\"\n" +#endif + "# endif\n", name, name, name)) < 0) + goto finish; + } + else + { + char s [FILENAME_MAX + 1], get [FILENAME_MAX + 1]; + char hdr [FILENAME_MAX + 1]; - if ((rc = EmitSS (file, NULL, "[", ":LNOT: :DEF: ", get)) < 0) - goto finish; - if ((rc = EmitS (file, NULL, "GBLS", get)) < 0) - goto finish; - if ((rc = Emit (file, NULL, "]")) < 0) - goto finish; + if ((rc = sprintf (get, "%s%s", "Get_", name)) < 0) + goto finish; + if ((rc = sprintf (hdr, "%s%s", name, "_Hdr")) < 0) + goto finish; + if ((rc = EmitSS (file, NULL, "[", ":LNOT: :DEF: ", get)) < 0) + goto finish; + if ((rc = EmitS (file, NULL, "GBLS", get)) < 0) + goto finish; + if ((rc = Emit (file, NULL, "]")) < 0) + goto finish; + #ifdef EXECUTE_ON_UNIX - if ((rc = sprintf (s, "\"GET oslib/%s.Hdr\"", name)) < 0) + // FIXME: this is strange, different assembler header output depending on which host + // these were created ?! + if ((rc = sprintf (s, "\"GET oslib/%s.Hdr\"", name)) < 0) #else - if ((rc = sprintf (s, "\"GET oslib.Hdr.%s\"", name)) < 0) + if ((rc = sprintf (s, "\"GET oslib.Hdr.%s\"", name)) < 0) #endif - goto finish; + goto finish; - if ((rc = EmitSS (file, NULL, "[", ":LNOT: :DEF: ", hdr)) < 0) - goto finish; - if ((rc = EmitS (file, get, "SETS", s)) < 0) - goto finish; - if ((rc = Emit (file, NULL, "|")) < 0) - goto finish; - if ((rc = EmitS (file, get, "SETS", "\"\"")) < 0) - goto finish; - if ((rc = Emit (file, NULL, "]")) < 0) - goto finish; + if ((rc = EmitSS (file, NULL, "[", ":LNOT: :DEF: ", hdr)) < 0) + goto finish; + if ((rc = EmitS (file, get, "SETS", s)) < 0) + goto finish; + if ((rc = Emit (file, NULL, "|")) < 0) + goto finish; + if ((rc = EmitS (file, get, "SETS", "\"\"")) < 0) + goto finish; + if ((rc = Emit (file, NULL, "]")) < 0) + goto finish; - if ((rc = sprintf (s, "$Get_%s", name)) < 0) - return rc; - if ((rc = Emit (file, NULL, s)) < 0) - goto finish; + if ((rc = sprintf (s, "$Get_%s", name)) < 0) + goto finish; + if ((rc = Emit (file, NULL, s)) < 0) + goto finish; + } if ((rc = fprintf (file, "\n")) < 0) goto finish; @@ -630,8 +700,8 @@ os_error *hdr_output ( FILE *file, - char *title, - char *author, + const char *title, + const char *author, lookup_t needses, lookup_t needsatends, lookup_t consts, @@ -656,19 +726,33 @@ #endif /*Emit the TITLE declaration.*/ + time (&now); if ((rc = fprintf (file, + (DoELF) ? + "@ GNU AS assembler header file for %s\n" + "@ Written by DefMod (" __DATE__ ") on %s" + "@ %s\n\n" + : ";Assembler header file for %s\n" - ";written by DefMod (%s) on %s" - ";%s\n" - "\n", - title, __DATE__, (time (&now), ctime (&now)), author)) < 0) + ";written by DefMod (" __DATE__ ") on %s" + ";%s\n\n", + title, ctime (&now), author)) < 0) goto finish; /* guard against multiple inclusion */ - if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) - goto finish; - if ((rc = EmitSS (file, NULL, "GBLS", title, "_Hdr")) < 0) - goto finish; + if (DoELF) + { + if ((rc = fprintf (file, "#ifndef %s_Hdr\n" + "# define %s_Hdr\n", title, title)) < 0) + goto finish; + } + else + { + if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) + goto finish; + if ((rc = EmitSS (file, NULL, "GBLS", title, "_Hdr")) < 0) + goto finish; + } if ((rc = fprintf (file, "\n")) < 0) goto finish; @@ -676,12 +760,6 @@ if ((rc = Emit_Get (file, "Types")) < 0) goto finish; -#if 0 /* not everything needs OS.Hdr */ - /*Make sure we have Hdr.OS.*/ - if ((rc = Emit_Get (file, "OS")) < 0) - goto finish; -#endif - /*Emit the NEEDS declarations.*/ context = 0; while (TRUE) @@ -695,15 +773,6 @@ goto finish; } -#if 0 // moved forward to ensure OS.Hdr is not included recursively - if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) - goto finish; - if ((rc = EmitSS (file, NULL, "GBLS", title, "_Hdr")) < 0) - goto finish; - if ((rc = fprintf (file, "\n")) < 0) - goto finish; -#endif - /*Emit the CONST declarations.*/ start = TRUE; context = 0; @@ -716,14 +785,22 @@ if (start) { - if ((rc = fprintf (file, ";Symbols for constants\n")) < 0) + if ((rc = fprintf (file, "%cSymbols for constants\n", COMMENTCHAR)) < 0) goto finish; start = FALSE; } + if (DoELF) + { + if ((rc = fprintf (file, "# define %s 0x%x\n", cnst, c->value)) < 0) + goto finish; + } + else switch (c->type->tag) { - case def_TYPE_INT: case def_TYPE_SHORT: case def_TYPE_BYTE: + case def_TYPE_INT: + case def_TYPE_SHORT: + case def_TYPE_BYTE: if ((rc = EmitD (file, cnst, "*", c->value)) < 0) goto finish; break; @@ -787,8 +864,7 @@ /* emit header if first entry */ if (start) { - if ((rc = fprintf (file, - ";Symbols for structure offsets and sizes\n")) < 0) + if ((rc = fprintf (file, "%cSymbols for structure offsets and sizes\n", COMMENTCHAR)) < 0) goto finish; start = FALSE; } @@ -803,8 +879,17 @@ else { /* for abstract type, equate symbol to its size */ - if ((rc = EmitS (file, type, "*", "4 ;abstract type")) < 0) - goto finish; + if (DoELF) + { + if ((rc = fprintf (file, "@ abstract type\n" + "# define %s 4\n\n", type)) < 0) + goto finish; + } + else + { + if ((rc = EmitS (file, type, "*", "4 ;abstract type")) < 0) + goto finish; + } } } @@ -829,8 +914,7 @@ if (start) { - if ((rc = fprintf (file, - ";Symbols for SWI's and SWI reason codes\n")) < 0) + if ((rc = fprintf (file, "%cSymbols for SWI's and SWI reason codes\n", COMMENTCHAR)) < 0) goto finish; start = FALSE; } @@ -840,20 +924,42 @@ titled = FALSE; if (s->starred_swi) { - if ((rc = EmitX (file, title, "*", s->swi | 1 << 17)) < 0) - goto finish; - if ((rc = EmitX (file, title + 1, "*", s->swi)) < 0) - goto finish; + if (DoELF) + { + if ((rc = fprintf (file, ".set %s,0x%x\n" + ".set %s,0x%x\n", + title, s->swi | (1 << 17), title + 1, s->swi)) < 0) + goto finish; + } + else + { + if ((rc = EmitX (file, title, "*", s->swi | 1 << 17)) < 0 + || (rc = EmitX (file, title + 1, "*", s->swi)) < 0) + goto finish; + } titled = TRUE; } else + { for (i = 0; i < 10; i++) + { if (s->starred_constants [i]) - { if ((rc = EmitX (file, title + 1, "*", s->constants [i])) < 0) - goto finish; + { + if (DoELF) + { + if ((rc = fprintf (file, "# define %s 0x%x\n", title + 1, s->constants [i])) < 0) + goto finish; + } + else + { + if ((rc = EmitX (file, title + 1, "*", s->constants [i])) < 0) + goto finish; + } titled = TRUE; break; } + } + } if (titled) { @@ -865,7 +971,7 @@ { if (first) { - if ((rc = fprintf (file, " ;Entry\n")) < 0) + if ((rc = fprintf (file, " %cEntry\n", COMMENTCHAR)) < 0) goto finish; first = FALSE; } @@ -874,7 +980,8 @@ { /*there is an operation to involve*/ if ((rc = fprintf (file, - " ; R%d = &%X %s %s (", + " %c R%d = &%X %s %s (", + COMMENTCHAR, i, s->constants [i], Op [s->op [i]], s->inputs [i]->name)) < 0) goto finish; @@ -888,7 +995,8 @@ else { if ((rc = fprintf (file, - " ; R%d = &%X\n", + " %c R%d = &%X\n", + COMMENTCHAR, i, s->constants [i])) < 0) goto finish; } @@ -897,12 +1005,13 @@ { if (first) { - if ((rc = fprintf (file, " ;Entry\n")) < 0) + if ((rc = fprintf (file, " %cEntry\n", COMMENTCHAR)) < 0) goto finish; first = FALSE; } - if ((rc = fprintf (file, " ; R%d %s %s (", + if ((rc = fprintf (file, " %c R%d %s %s (", + COMMENTCHAR, i, (s->ri & 1 << i) == 0? "=": "->", s->inputs [i]->name)) < 0) @@ -921,13 +1030,14 @@ { if (first) { - if ((rc = fprintf (file, " ;Exit\n")) < 0) + if ((rc = fprintf (file, " %cExit\n", COMMENTCHAR)) < 0) goto finish; first = FALSE; } if ((rc = fprintf (file, - " ; R%d %s %s (", + " %c R%d %s %s (", + COMMENTCHAR, i, (s->ro & 1 << i) == 0? "=": "->", s->outputs [i]->name)) < 0) @@ -943,13 +1053,13 @@ { if (first) { - if ((rc = fprintf (file, " ;Exit\n")) < 0) + if ((rc = fprintf (file, " %cExit\n", COMMENTCHAR)) < 0) goto finish; first = FALSE; } if ((rc = fprintf (file, - " ; R%d corrupted\n", i)) < 0) + " %c R%d corrupted\n", COMMENTCHAR, i)) < 0) goto finish; } } @@ -974,10 +1084,18 @@ } #endif - if ((rc = Emit (file, NULL, "]")) < 0) - goto finish; - if ((rc = Emit (file, NULL, "END")) < 0) - goto finish; + if (DoELF) + { + if ((rc = fprintf (file, "#endif\n")) < 0) + goto finish; + } + else + { + if ((rc = Emit (file, NULL, "]")) < 0) + goto finish; + if ((rc = Emit (file, NULL, "END")) < 0) + goto finish; + } finish: if (rc < 0) error = (os_error *)_kernel_last_oserror (); /* TV 980115 */ Modified: branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h 2007-05-01 19:33:15 UTC (rev 259) @@ -13,7 +13,7 @@ #include "lookup.h" #endif -extern os_error *hdr_output (FILE *, char *, char *, lookup_t, lookup_t, +extern os_error *hdr_output (FILE *, const char *, const char *, lookup_t, lookup_t, lookup_t, lookup_t, lookup_t); #endif Modified: branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c 2007-05-01 19:33:15 UTC (rev 259) @@ -176,6 +176,14 @@ fprintf ( file, + (DoELF) ? + "@GNU AS file for %s\n" + "@written by DefMod (" __DATE__ ") on %s" + "@%s\n" + "\n" + "R\t.req\tr0\n" + "\n" + : ";ObjAsm file for %s\n" ";written by DefMod (" __DATE__ ") on %s" ";%s\n" @@ -289,7 +297,7 @@ const char *s0 ) { - return fprintf (file, "%s ROUT\n", s0); + return fprintf (file, (DoELF) ? "%s:\n" : "%s ROUT\n", s0); } /*-----------------------------------------------------------------------*/ @@ -321,7 +329,7 @@ const char *comment ) { - return fprintf (file, ";%s\n", comment); + return fprintf (file, (DoELF) ? "@%s\n" : ";%s\n", comment); } /*-----------------------------------------------------------------------*/ @@ -385,9 +393,11 @@ lookup_t types ) { - char c_name [def_ID_LIMIT + 1], - c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1], s1 [127 + 1], - s2 [127 + 1]; + char c_name [def_ID_LIMIT + 1], s1 [127 + 1], s2 [127 + 1]; +#if 0 + char c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1], +#endif + bits o, v, a, p, w; /*sets*/ int ni, no, nc, nk, nv, na, np, nw, /*set counts*/ n, m, /*menials*/ @@ -400,8 +410,10 @@ def_as_extern (c_name + (!nonx? 1: 0), swi); #if 0 def_as_c_plus_plus (c_plus_plus_name + (!nonx? 1: 0), swi, s); + if (!nonx) c_name [0] = c_plus_plus_name [0] = 'x'; +#else + if (!nonx) c_name [0] = 'x'; #endif - if (!nonx) c_name [0] = c_plus_plus_name [0] = 'x'; /*Count the various set sizes*/ ni = Set_Count (s->i); @@ -577,7 +589,7 @@ if (m == 0) break; /*no more bits*/ - if ((rc = sprintf (s2, "#&%X", m)) < 0) + if ((rc = sprintf (s2, (DoELF) ? "#0x%X" : "#&%X", m)) < 0) goto finish; if ((rc = Emit3 (file, Op (s->op [n]), SWI_Names [n], @@ -607,7 +619,7 @@ if (m == 0) break; /*no more bits*/ - if ((rc = sprintf (s2, "#&%X", m)) < 0) + if ((rc = sprintf (s2, (DoELF) ? "#0x%X" : "#&%X", m)) < 0) goto finish; if (first) @@ -639,12 +651,12 @@ for (n = 0; n < 4; n++) if (Set_Elem (n, w)) /*Trash register |n| now, just to show we can do it.*/ - if ((rc = Emit2 (file, "MOV", SWI_Names [n], "#&FF0")) < 0) + if ((rc = Emit2 (file, "MOV", SWI_Names [n], (DoELF) ? "#0xFF0" : "#&FF0")) < 0) goto finish; #endif /*Registers now set up properly - do the business part.*/ - if ((rc = sprintf (s1, "&%X", s->swi | (!nonx? 1 << 17: 0))) < 0) + if ((rc = sprintf (s1, (DoELF) ? "0x%X" : "&%X", s->swi | (!nonx? 1 << 17: 0))) < 0) goto finish; if ((rc = Emit1 (file, "SWI", s1)) < 0) @@ -655,7 +667,7 @@ for (n = 0; n < 4; n++) if (Set_Elem (n, w)) { /*Check that register |n| still has its contents.*/ - if ((rc = Emit2 (file, "TEQ", SWI_Names [n], "#&FF0")) < 0) + if ((rc = Emit2 (file, "TEQ", SWI_Names [n], (DoELF) ? "#0xFF0" : "#&FF0")) < 0) goto finish; if ((rc = Emit2 (file, "MOVNE", "PC", "#0")) < 0) goto finish; @@ -666,7 +678,7 @@ if (no + f > 0) { if (!nonx) - if ((rc = Emit1 (file, "BVS", "%a99")) < 0) + if ((rc = Emit1 (file, "BVS", (DoELF) ? "99f" : "%a99")) < 0) goto finish; for (n = 0; n < no + f; n++) @@ -755,7 +767,7 @@ { if ((rc = Emit2 (file, "MOV", "R", "#0")) < 0) goto finish; - if ((rc = Emit_Local (file, "99")) < 0) + if ((rc = Emit_Local (file, (DoELF) ? "99:" : "99")) < 0) goto finish; } else @@ -861,6 +873,14 @@ goto finish; } + if (DoELF) + { + /* Define size of function body. */ + sprintf (s2, ". - %s", c_name + (!nonx? 1: 0)); + if ((rc = Emit2 (file, ".size", c_name + (!nonx? 1: 0), s2)) < 0) + goto finish; + } + if (nw > 0) { if ((rc = Format_SWI_List (s1, w, FALSE)) < 0) @@ -896,7 +916,6 @@ def_s s; void *context; int rc = 0; - osbool done_fopen_via_file = FALSE, done_fopen_object = FALSE; FILE *via_file = NULL, *object = NULL /*for Norcroft*/; /* Make sure the assembler type has been set. */ @@ -915,8 +934,10 @@ context = 0; while (TRUE) { - char c_name [def_ID_LIMIT + 1], - c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1]; + char c_name [def_ID_LIMIT + 1]; +#if 0 + char c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1]; +#endif if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) != NULL) @@ -930,26 +951,50 @@ c_name [0] = 'x'; #if 0 def_as_c_plus_plus (c_plus_plus_name + 1, swi, s); + c_plus_plus_name [0] = 'x'; #endif - c_plus_plus_name [0] = 'x'; - if ((rc = Emit1 (file, "EXPORT", c_name)) < 0) - goto finish; - if ((rc = Emit1 (file, "EXPORT", c_name + 1)) < 0) - goto finish; + if (DoELF) + { + if ((rc = Emit1 (file, ".global", c_name)) < 0 + || (rc = Emit2 (file, ".type", c_name, "%function")) < 0 + || (rc = Emit1 (file, ".global", c_name + 1)) < 0 + || (rc = Emit2 (file, ".type", c_name + 1, "%function")) < 0) + goto finish; #if 0 - if ((rc = Emit1 (file, "EXPORT", c_plus_plus_name)) < 0) - goto finish; - if ((rc = Emit1 (file, "EXPORT", c_plus_plus_name + 1)) < 0) - goto finish; + if ((rc = Emit1 (file, ".global", c_plus_plus_name)) < 0 + || (rc = Emit2 (file, ".type", c_plus_plus_name, "%function")) < 0 + || (rc = Emit1 (file, ".global", c_plus_plus_name + 1)) < 0 + || (rc = Emit2 (file, ".type", c_plus_plus_name + 1, "%function")) < 0) + goto finish; #endif + } + else + { + if ((rc = Emit1 (file, "EXPORT", c_name)) < 0 + || (rc = Emit1 (file, "EXPORT", c_name + 1)) < 0) + goto finish; +#if 0 + if ((rc = Emit1 (file, "EXPORT", c_plus_plus_name)) < 0 + || (rc = Emit1 (file, "EXPORT", c_plus_plus_name + 1)) < 0) + goto finish; +#endif + } } } if ((rc = Emit_Line (file)) < 0) goto finish; - if ((rc = Emit2 (file, "AREA", "|SWI$$Code|", "CODE, READONLY, PIC")) < 0) - goto finish; + if (DoELF) + { + if ((rc = Emit0 (file, ".text")) < 0) + goto finish; + } + else + { + if ((rc = Emit2 (file, "AREA", "|SWI$$Code|", "CODE, READONLY, PIC")) < 0) + goto finish; + } if ((rc = Emit_Line (file)) < 0) goto finish; @@ -977,7 +1022,7 @@ goto finish; } - if ((rc = Emit0 (file, "END")) < 0) + if ((rc = Emit0 (file, (DoELF) ? ".end" : "END")) < 0) goto finish; } else @@ -990,21 +1035,19 @@ if ((error = xosfile_create_dir (output, 0)) != NULL) goto finish; -//#ifndef EXECUTE_ON_UNIX if ((via_file = fopen ("ViaFile", "w+")) == NULL) { error = (os_error*)_kernel_last_oserror (); goto finish; } - done_fopen_via_file = TRUE; -//#endif context = 0; while (TRUE) { - char c_name [def_ID_LIMIT + 1], - c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1], - dir_name [FILENAME_MAX + 1]; + char c_name [def_ID_LIMIT + 1], dir_name [FILENAME_MAX + 1]; +#if 0 + char c_plus_plus_name [def_C_PLUS_PLUS_LIMIT + 1], +#endif osbool nonx; if ((error = lookup_enumerate (swis, &swi, (void **) &s, @@ -1020,8 +1063,10 @@ #if 0 def_as_c_plus_plus (c_plus_plus_name + (!nonx? 1: 0), swi, s); + if (!nonx) c_name [0] = c_plus_plus_name [0] = 'x'; +#else + if (!nonx) c_name [0] = 'x'; #endif - if (!nonx) c_name [0] = c_plus_plus_name [0] = 'x'; /*Get the SWI number truncated to 4 bits.*/ if ((rc = sprintf (dir_name, "0x%.5X%s", s->swi & 0xDFFF0, @@ -1061,31 +1106,51 @@ error = (os_error*)_kernel_last_oserror (); goto finish; } - done_fopen_object = TRUE; if ((rc = Emit_Header (object, swi, author)) < 0) goto finish; + if (DoELF) + { + if ((rc = Emit1 (object, ".global", c_name)) < 0 + || (rc = Emit2 (object, ".type", c_name, "%function")) < 0) + goto finish; +#if 0 + if ((rc = Emit1 (object, ".global", c_plus_plus_name)) < 0 + || (rc = Emit2 (object, ".type", c_plus_plus_name, "%function")) < 0) + goto finish; +#endif + } + else + { if ((rc = Emit1 (object, "EXPORT", c_name)) < 0) goto finish; #if 0 if ((rc = Emit1 (object, "EXPORT", c_plus_plus_name)) < 0) goto finish; #endif + } if ((rc = Emit_Line (object)) < 0) goto finish; - if ((rc = Emit2 (object, "AREA", - "|SWI$$Code|", "CODE, READONLY, PIC")) < 0) - goto finish; + if (DoELF) + { + if ((rc = Emit0 (object, ".text")) < 0) + goto finish; + } + else + { + if ((rc = Emit2 (object, "AREA", "|SWI$$Code|", "CODE, READONLY, PIC")) < 0) + goto finish; + } if ((rc = Emit_Line (object)) < 0) goto finish; if ((rc = Emit_Code (object, swi, s, nonx, apcs32, types)) < 0) goto finish; - if ((rc = Emit0 (object, "END")) < 0) + if ((rc = Emit0 (object, (DoELF) ? ".end" : "END")) < 0) goto finish; if (fclose (object) == EOF) @@ -1093,7 +1158,7 @@ error = (os_error*)_kernel_last_oserror (); goto finish; } - done_fopen_object = FALSE; + object = NULL; switch (AsmType) { @@ -1125,7 +1190,7 @@ break; case AsmType_eGCCELF: if ((rc = sprintf (cmd, - "arm-unknown-riscos-gcc -c -xassembler -Wa,%s -o %s %s", + "arm-unknown-riscos-gcc -c -xassembler %s -o %s %s", apcs32 ? "-mapcs-32" : "-mapcs-26", name2, name1)) < 0) goto finish; @@ -1159,9 +1224,9 @@ goto finish; } - if (done_fopen_via_file) - if ((rc = fprintf (via_file, "%s\n", name2)) < 0) - goto finish; + if (via_file != NULL + && (rc = fprintf (via_file, "%s\n", name2)) < 0) + goto finish; } } @@ -1172,10 +1237,10 @@ finish: if (rc < 0) error = (os_error*)_kernel_last_oserror (); - if (done_fopen_object && fclose (object) == EOF && error == NULL) + if (object != NULL && fclose (object) == EOF && error == NULL) error = (os_error*)_kernel_last_oserror (); - if (done_fopen_via_file && fclose (via_file) == EOF && error == NULL) + if (via_file != NULL && fclose (via_file) == EOF && error == NULL) error = (os_error*)_kernel_last_oserror (); return error; Modified: branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h 2007-05-01 12:40:24 UTC (rev 258) +++ branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h 2007-05-01 19:33:15 UTC (rev 259) @@ -23,6 +23,8 @@ extern AsmType_e AsmType; +#define DoELF (AsmType == AsmType_eGCCELF) + /*if |separate|, output is to the directory |output|; otherwise, to the file |file|.*/ extern os_error *objasm_output (FILE *file, const char *title, const char *author, lookup_t types, lookup_t swis, osbool separate, osbool apcs32, char *output); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-05-01 12:40:27
|
Revision: 258 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=258&view=rev Author: jtytgat Date: 2007-05-01 05:40:24 -0700 (Tue, 01 May 2007) Log Message: ----------- Tools target should install the binaries Modified Paths: -------------- branches/simplified-build/!OsLib/Makefile Modified: branches/simplified-build/!OsLib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Makefile 2007-04-29 22:50:19 UTC (rev 257) +++ branches/simplified-build/!OsLib/Makefile 2007-05-01 12:40:24 UTC (rev 258) @@ -36,5 +36,6 @@ cstrong-n-release: cstrong $(MAKE) -C Source release-cstrong +# Build the tools and install them. Tools: - $(MAKE) -C $@ + $(MAKE) -C $@ install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-29 22:50:21
|
Revision: 257 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=257&view=rev Author: jtytgat Date: 2007-04-29 15:50:19 -0700 (Sun, 29 Apr 2007) Log Message: ----------- RISC OS 'o' directory wasn't correctly created Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Makefile Modified: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile 2007-04-29 22:03:34 UTC (rev 256) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-29 22:50:19 UTC (rev 257) @@ -27,7 +27,7 @@ -$(RM) $(RELEASEDIR)/$(BUILDTYPE)/OSLib-wide.zip -$(MKDIR) $(HEADERDIR)/h $(HEADERDIR)/Hdr $(HEADERDIR)/../o cd $(HEADERDIR) && find . -type f -exec rename 's/(.+)\.(.+)/$$2\/$$1/' {} \; - $(CP) $(OSLIBLIB) $(HEADERDIR)/o/OSLib32 + $(CP) $(OSLIBLIB) $(HEADERDIR)/../o/OSLib32 cd $(HEADERDIR)/.. && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLib-wide.zip . # Zips the StrongHelp file: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-29 22:03:35
|
Revision: 256 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=256&view=rev Author: jtytgat Date: 2007-04-29 15:03:34 -0700 (Sun, 29 Apr 2007) Log Message: ----------- Tools Makefile cleanup including working 'clean' target. Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile branches/simplified-build/!OsLib/Tools/DefMod2/Makefile branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile Added Paths: ----------- branches/simplified-build/!OsLib/Tools/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/AMUmakefile branches/simplified-build/!OsLib/Tools/AMUmakefile.source branches/simplified-build/!OsLib/Tools/GNUmakefile branches/simplified-build/!OsLib/Tools/GNUmakefile.source branches/simplified-build/!OsLib/Tools/Make,fd7 branches/simplified-build/!OsLib/Tools/Makefile,fe1 Deleted: branches/simplified-build/!OsLib/Tools/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/AMUmakefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/AMUmakefile 2007-04-29 22:03:34 UTC (rev 256) @@ -1,53 +0,0 @@ -# Index: OSLib/!OsLib/Tools/AMUmakefile 20040225 -#=================================================================== -# -DIR = ${MAKEFILEDIR} -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -RM = rm -nq -MAKE = amu -desktop - -# build all tools -all: stage2 stage1 - @echo - - -# build tools which don't depend on OSLib -stage1: -ifndef APCS - $(error APCS mode is undefined) -endif - ${MAKE} -f ${DIR}.bison.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.Rm.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.ToLower.AMUmakefile all APCS=${APCS} - -# build tools which depend on OSLib -stage2: -ifndef APCS - $(error APCS mode is undefined) -endif - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile all APCS=${APCS} - -clean: - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile clean - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile clean - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile clean - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile clean - ${MAKE} -f ${DIR}.Rm.AMUmakefile clean - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile clean - ${MAKE} -f ${DIR}.bison.AMUmakefile clean - ${MAKE} -f ${DIR}.ToLower.AMUmakefile clean - -distclean: - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile distclean - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile distclean - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile distclean - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile distclean - ${MAKE} -f ${DIR}.Rm.AMUmakefile distclean - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile distclean - ${MAKE} -f ${DIR}.bison.AMUmakefile distclean - ${MAKE} -f ${DIR}.ToLower.AMUmakefile distclean Deleted: branches/simplified-build/!OsLib/Tools/AMUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Tools/AMUmakefile.source 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/AMUmakefile.source 2007-04-29 22:03:34 UTC (rev 256) @@ -1,113 +0,0 @@ -# -# Include Makefile for Tools under RISC OS. -# -# caller must define TARGET, MODULES, INCLUDES -# caller may define DEFINES, VPATH - -#TARGET = -#MODULES = -#INCLUDES = -#DEFINES = -#VPATH = -#LIBS = -#CLIST ?= -list - -DEBUG ?= 0 -TRACE ?= 0 - -ALL ?= ${TARGET} -BINDIR ?= <OSLib$BinDir> -#------------------------------------------------------------------------ -#tools - -MAKE = amu -desktop -D -CC = \ -cc -c ${THROWBACK} \ -$(addprefix -f, ${CFLAGS}) \ -$(addprefix -W, ${CWARN} ) \ -$(addprefix -I, ${INCLUDES}) \ -$(addprefix -D, ${DEFINES} ) \ -${DEPEND} \ -${CLIST} \ --apcs 3/${APCS} - -CFLAGS = af -CWARN = cp -#DEPEND = -depend !Depend -THROWBACK = -throwback - -ifeq (${APCS},32) -OSLIB =OSLib32 -SUPPORT = OSLibSupport32 -else -OSLIB =OSLib -SUPPORT = OSLibSupport -endif - -ifneq (${DEBUG},0) -DEFINES += DEBUG=${DEBUG} -endif - -ifneq (${TRACE},0) -DEFINES += TRACE=${TRACE} -endif - -ASM = \ -OBJASM $(addprefix -I, ${ASMINCLUDES}) \ -${ASMOPTIONS} ${DEPEND} -stamp -quit -throwback - -LD = link -LDFLAGS = - -CP = copy -copyflags = A~C~DFLN~P~QR~S~T~V - -MD = cdir -RM = rm -nq -STRIP = StripDepends - -#------------------------------------------------------------------------ -#macros -OBJS = $(addprefix o.,${MODULES}) -TRACEOBJS = $(addprefix o.,${TRACEMODULES}) - -ifneq (${TRACE},0) -OBJS += ${TRACEOBJS} -endif - -#------------------------------------------------------------------------ -#rules - -.PHONY: all clean distclean strip - -#all: ${ALL} -# ${MAKE} -f ${MAKEFILEDIR}.AMUmakefile ${BINDIR}.${TARGET} - -all: ${BINDIR}.${TARGET} ${ALL} - -${TARGET}: ${OBJS} - ${LD} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} - SetType $@ Absolute - Access $@ WR/R - -${BINDIR}.${TARGET}: ${TARGET} - ${MD} ${BINDIR} - ${CP} ${TARGET} $@ ${COPYFLAGS} - -clean: ;-${RM} ${OBJS} ${TRACEOBJS} ${TARGET} ${EXTRAOBJS} - -distclean: clean strip - ${RM} o l - -strip: ;${STRIP} AMUmakefile - -#------------------------------------------------------------------------ -.SUFFIXES: .o .c .s .y - -.c.o: ;${MD} o - ${CC} -o $@ -c $< - -.s.o: ;${MD} o - ${ASM} -apcs 3/${APCS}bit $< $@ - -#------------------------------------------------------------------------ Modified: branches/simplified-build/!OsLib/Tools/BindHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -28,7 +28,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Modified: branches/simplified-build/!OsLib/Tools/DefMod2/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -37,7 +37,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o defmod.c + -$(RM) $(TARGET) *.o defmod.c $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Deleted: branches/simplified-build/!OsLib/Tools/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/GNUmakefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/GNUmakefile 2007-04-29 22:03:34 UTC (rev 256) @@ -1,27 +0,0 @@ -# -# Makefile for OSLib Tools for UNIX. -# - -#------------------------------------------------------------------------ -#targets -ALL = BindHelp DefMod2 IndexHelp ReduceAOF - -.PHONY: ${ALL} clean - -all: ${ALL} - -BindHelp: - ${MAKE} -C BindHelp - -DefMod2: - ${MAKE} -C DefMod2 - -IndexHelp: - ${MAKE} -C IndexHelp - -ReduceAOF: - ${MAKE} -C ReduceAOF - -clean: ;$(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Tools/GNUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Tools/GNUmakefile.source 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/GNUmakefile.source 2007-04-29 22:03:34 UTC (rev 256) @@ -1,56 +0,0 @@ -# -# Include Makefile for Tools under UNIX. -# -# caller must define TARGET, MODULES, INCLUDES -# caller may define DEFINES, VPATH - -#TARGET = reduceaof -#OBJS = ${TARGET}.o -#INCLUDES = -#VPATH = - -BINDIR ?= ../../Bin -TRACE ?= 0 -DEBUG ?= 0 - -#------------------------------------------------------------------------ -#tools - -CC = /usr/bin/gcc -LD = /usr/bin/gcc -CP = cp -f -RM = rm -f - -#------------------------------------------------------------------------ -#macros -DEFINES ?= -DUNIX -DEXECUTE_ON_UNIX -D__swi -CFLAGS = -Wall -funsigned-char -OBJS = $(patsubst %,%.o,${MODULES}) -TRACEOBJS = $(patsubst %,%.o,${TRACEMODULES}) - -ifneq (${TRACE},0) - OBJS += ${TRACEOBJS} -endif - -#------------------------------------------------------------------------ -#rules - -.PHONY: all clean install - -all: ${TARGET} - -${TARGET}: ${OBJS} - ${LD} ${LDFLAGS} -o $@ ${OBJS} - if [ ! -d ${BINDIR} ]; then mkdir ${BINDIR}; fi - ${CP} $@ ${BINDIR}/ - -clean: ;-${RM} ${OBJS} ${TRACEOBJS} ${TARGET} - - -#------------------------------------------------------------------------ -.SUFFIXES: .o .c - -.c.o: ;${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -DTRACE=${TRACE} \ - -DDEBUG=${DEBUG} -o $@ -c $< - -#------------------------------------------------------------------------ Modified: branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -27,7 +27,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Deleted: branches/simplified-build/!OsLib/Tools/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Tools/Make,fd7 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/Make,fd7 2007-04-29 22:03:34 UTC (rev 256) @@ -1,5 +0,0 @@ -| Tools.Make 20040306 -set Make$Dir <Obey$Dir> -if "<C$MODE>" = "32" then Do AMU -f <Make$Dir>.AMUmakefile -desktop %0 APCS=32 -if "<C$MODE>" <>"32" then Do AMU -f <Make$Dir>.AMUmakefile -desktop %0 APCS=26 -Echo <Sys$Time> Done... \ No newline at end of file Copied: branches/simplified-build/!OsLib/Tools/Makefile (from rev 246, branches/simplified-build/!OsLib/Tools/GNUmakefile) =================================================================== --- branches/simplified-build/!OsLib/Tools/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -0,0 +1,25 @@ +# ... + +ALL = BindHelp DefMod2 IndexHelp ReduceAOF + +.PHONY: ${ALL} install clean + +all: ${ALL} + +BindHelp: + ${MAKE} -C BindHelp + +DefMod2: + ${MAKE} -C DefMod2 + +IndexHelp: + ${MAKE} -C IndexHelp + +ReduceAOF: + ${MAKE} -C ReduceAOF + +install: + $(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} install; ) + +clean: + $(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) Deleted: branches/simplified-build/!OsLib/Tools/Makefile,fe1 =================================================================== --- branches/simplified-build/!OsLib/Tools/Makefile,fe1 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/Makefile,fe1 2007-04-29 22:03:34 UTC (rev 256) @@ -1,69 +0,0 @@ -# Index: OSLib/!OsLib/Tools/Makefile,fe1 20031230 -#=================================================================== -# -DIR = <OSLib$ToolsDir> -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -RM = OSLibBin:rm -MAKE = amu -desktop - -# build all tools -all: stage2 stage1 - @echo - -# build tools which don't depend on OSLib -stage1: - ${MAKE} -f ${DIR}.bison.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.ReduceAOF.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.Rm.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.ToLower.Makefile all APCS=${APCS} OSLIB=${OSLIB} - -# build tools which depend on OSLib -stage2: - ${MAKE} -f ${DIR}.BindHelp.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.IndexHelp.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.StripDepends.Makefile all APCS=${APCS} OSLIB=${OSLIB} - -# build the directory tree -tree: - ${MAKE} -f ${DIR}.BindHelp.Makefile tree - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile tree - ${MAKE} -f ${DIR}.IndexHelp.Makefile tree - ${MAKE} -f ${DIR}.ReduceAOF.Makefile tree - ${MAKE} -f ${DIR}.Rm.Makefile tree - ${MAKE} -f ${DIR}.StripDepends.Makefile tree - ${MAKE} -f ${DIR}.bison.Makefile tree - ${MAKE} -f ${DIR}.ToLower.Makefile tree - @ifthere ${DIR}.tree then stamp ${DIR}.tree else create ${DIR}.tree - -clean: - ${MAKE} -f ${DIR}.BindHelp.Makefile clean - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile clean - ${MAKE} -f ${DIR}.IndexHelp.Makefile clean - ${MAKE} -f ${DIR}.ReduceAOF.Makefile clean - ${MAKE} -f ${DIR}.Rm.Makefile clean - ${MAKE} -f ${DIR}.StripDepends.Makefile clean - ${MAKE} -f ${DIR}.bison.Makefile clean - ${MAKE} -f ${DIR}.ToLower.Makefile clean - -stripdepends: - ${MAKE} -f ${DIR}.BindHelp.Makefile stripdepends - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile stripdepends - ${MAKE} -f ${DIR}.IndexHelp.Makefile stripdepends - ${MAKE} -f ${DIR}.ReduceAOF.Makefile stripdepends - ${MAKE} -f ${DIR}.Rm.Makefile stripdepends - ${MAKE} -f ${DIR}.StripDepends.Makefile stripdepends - ${MAKE} -f ${DIR}.bison.Makefile stripdepends - ${MAKE} -f ${DIR}.ToLower.Makefile stripdepends - -archive_source: - cdir ${ARCHIVE} - copy * ${ARCHIVE}.* ${COPYFLAGS} - ${MAKE} -f ${DIR}.BindHelp.Makefile archive_source ARCHIVE=${ARCHIVE}.BindHelp - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile archive_source ARCHIVE=${ARCHIVE}.DefMod2 - ${MAKE} -f ${DIR}.IndexHelp.Makefile archive_source ARCHIVE=${ARCHIVE}.IndexHelp - ${MAKE} -f ${DIR}.ReduceAOF.Makefile archive_source ARCHIVE=${ARCHIVE}.ReduceAOF - ${MAKE} -f ${DIR}.Rm.Makefile archive_source ARCHIVE=${ARCHIVE}.Rm - ${MAKE} -f ${DIR}.StripDepends.Makefile archive_source ARCHIVE=${ARCHIVE}.StripDepends - ${MAKE} -f ${DIR}.bison.Makefile archive_source ARCHIVE=${ARCHIVE}.bison Modified: branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -27,7 +27,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-29 21:55:40
|
Revision: 255 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=255&view=rev Author: jtytgat Date: 2007-04-29 14:55:38 -0700 (Sun, 29 Apr 2007) Log Message: ----------- Build changes to get clean AOF vs ELF builds done. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Computer/oslib/Modules branches/simplified-build/!OsLib/Source/Core/oslib/Modules branches/simplified-build/!OsLib/Source/Macros/oslib/Modules branches/simplified-build/!OsLib/Source/Makefile branches/simplified-build/!OsLib/Source/Makefile.inc branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules branches/simplified-build/!OsLib/Source/Types/oslib/Modules branches/simplified-build/!OsLib/Source/User/oslib/Modules Added Paths: ----------- branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.ELFHdr Removed Paths: ------------- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.help branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.help branches/simplified-build/!OsLib/Source/Types/oslib/Types.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.help branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.help Modified: branches/simplified-build/!OsLib/Source/Computer/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,8 +2,8 @@ # List of modules comprising Computer # for inclusion in Make files independant of platform -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ ADFS \ CD \ CDFS \ @@ -36,12 +36,12 @@ SCSIFS \ ShareFS \ Socket \ -SysLog +SysLog -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ CDFSFiler \ -NetFiler +NetFiler -# modules defined other than by SWI definition -CMODULES += +# Modules defined other than by SWI definition +ASMMODULES = Modified: branches/simplified-build/!OsLib/Source/Core/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -1,8 +1,8 @@ #Source/Core/oslib/Modules # -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ BlendTable \ Buffer \ Cache \ @@ -31,18 +31,17 @@ SharedCLibrary \ Sound \ Squash \ -Territory +Territory -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ Shell -# modules defined other than by SWI definition -CMODULES += \ +# Modules defined other than by SWI definition +ASMMODULES = \ OSChangeDynamicAreaNoFail \ OSHeapResizeNoFail \ OSReadVarValSize \ XOSChangeDynamicAreaNoFail \ XOSHeapResizeNoFail \ -XOSReadVarValSize - +XOSReadVarValSize Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,72 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm 20031228 +@ os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if +@ the change was only partially performed + +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OS.Hdr" + +R .req r0 + + .global os_change_dynamic_area_no_fail + .type os_change_dynamic_area_no_fail, %function + + .text + +@ os_change_dynamic_area_no_fail +@ APCS Compliant +@Entry A1 = area type +@ A2 = required size change in bytes (signed integer) +@Exit R = actual size change in bytes (unsigned integer) +@ +@ C Prototype: +@extern int os_change_dynamic_area_no_fail( os_dynamic_area_no area, +@ os_dynamic_area_no size_increase +@ ); +@ +@ This code works around the problem that OS_ChangeDynamicArea throws an error if the move is only +@ partially performed. OSLib is then unable to return the amount by which the area has changed. +@ +@ The object code is patched into the library at build time by the MakeFile. + + +os_change_dynamic_area_no_fail: + SWI 0x2002a @ XOS_ChangeDynamicArea (PRM 1-377) + BVC 99f @ no error - normal return + + @Test for Error_ChDynamNotAllMoved - report any other error + LDR R3, =0x1c1 @ Error_ChDynamNotAllMoved + LDR R2, [R0] @ get error number in R2 [TV 011221] + CMP R2, R3 + SWINE 0x2B @ OS_GenerateError - no return + + @ ignore Error_ChDynamNotAllMoved + + @ exit +99: MOV R, R1 @ APCS return value + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,73 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.asm 20031228 +@ osheap_resize_no_fail - Extend or shrink heap without throwing error if shrink fails +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software@ you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global osheap_resize_no_fail + .type osheap_resize_no_fail, %function + + .text + +@ osheap_resize_no_fail +@ APCS Compliant +@Entry A1 = pointer to heap +@ A2 = required size change in bytes (signed integer) +@Exit R = actual size change in bytes +@ +@ C Prototype: +@extern int osheap_resize_no_fail( byte* heap, +@ int size_increase +@ ); +@ +@ This code works around the problem that OSHeap_Resize throws an error if shrink fails. +@ OSLib is then unable to return the amount by which the heap shrunk. +@ It also negates R3 if the error occurs, to give a consistent sign regardless of error condition. +@ The object code is patched into the library at build time by the MakeFile + +osheap_resize_no_fail: + MOV R3, A2 @ required change + MOV R1, A1 @ pointer to heap + MOV R0, #5 @ OSHeap_Resize - reason code + SWI 0x2001d @ XOS_Heap (PRM 1-375) + BVC 99f @ no error - normal return + + @Test for Error_HeapExcessiveShrink - report any other error + LDR R1, =0x187 @ Error_HeapExcessiveShrink + LDR R2, [R0] @ get error number in R2; [TV 011221] + CMP R2, R1 + SWINE 0x2B @ OS_GenerateError - no return + + @ ignore Error_HeapExcessiveShrink + RSB R3, R3, #0 @ complement R3 to give actual change + + @ exit +99: MOV R, R3 @ APCS return value + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,94 @@ +@os_read_var_val_size - return length of a variable +@ Initial Release 23-Mar-99 Tony van der Hoff + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@ This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error +@ when R2 bit 31 is set to read the variable length. The object code is patched into the +@ library at build time by the MakeFile + +@#include "oslib/Types.Hdr" + +R .req r0 + + .global os_read_var_val_size + .type os_read_var_val_size, %function + + .text + +@ os_Read_var_val_size +@ APCS Compliant +@Entry R0 (a1) -> name of a variable (may be wildcarded) +@ R1 (a2) -> context pointer for wildcarded names +@ R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) +@ R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found +@ R4 (v1) -> integer to contain variable type +@Exit R = updated context pointer +@ +@ C Prototype: +@extern int os_read_var_val_size ( +@ char const *var, +@ int context, +@ os_var_type var_type, +@ int *used, +@ os_var_type *var_type_out); + +@ C prototype: int xos_read_var_val_size( char const *name, +@ int *context, +@ os_var_type var_type +@ ); +@ +@ + +os_read_var_val_size: + STMFD SP!, {A4, V1} + MOV R4, A3 @ variable type + MOV R3, A2 @ context in + MOV R2, #0x80000000 @ check variable + MOV R1, #0 @ unused + SWI 0x20023 @ XOS_ReadVarVal + BVC 90f @ no error + + @Ignore error if RO 3 or later + STMFD SP!, {R0, R2} @ keep results + MOV R0, #129 @ Get OS version + MOV R1, #0 + MOV R2, #0xFF + SWI 0x6 @ OS_Byte + LDMFD SP!, {R0, R2} @ restore state + CMP R1, #0xA3 @ test for RISC O S 3 + SWILO 0x2B @ RO2 - call OS_GenerateError + +90: LDR IP, [SP, #0] @ Result pointer + TEQ IP, #0 + STRNE R2, [IP] @ update result + LDR IP, [SP, #8] @ var-type out pointer + TEQ IP, #0 + STRNE R4, [IP] @ update var type + MOV R, R3 @ new context + +99: ADD SP, SP, #4 @ flatten stack + LDMFD SP!, {V1} @ restore state + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR @ exit +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,81 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.asm 20031228 +@ os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if +@ the change was only partially performed +@ +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV +@ Bug Fix 20-Feb-02 TV +@ +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global xos_change_dynamic_area_no_fail + .type xos_change_dynamic_area_no_fail, %function + + .text + +@ os_change_dynamic_area_no_fail +@ APCS Compliant +@Entry A1 = area type +@ A2 = required size change in bytes (signed integer) +@ A3 -> actual size change in bytes (unsigned integer) +@ +@ C Prototype: +@extern os_error* os_change_dynamic_area_no_fail( os_dynamic_area_no area, +@ int size_increase, +@ int* size_change +@ ); +@ +@ This code works around the problem that OS_ChangeDynamicArea throws an error if the move is only +@ partially performed. OSLib is then unable to return the amount by which the area has changed. +@ The object code is patched into the library at build time by the MakeFile. + +xos_change_dynamic_area_no_fail: + MOV IP, LR @ + + SWI 0x2002a @ XOS_ChangeDynamicArea (PRM 1-377) + BVC 90f @ no error - normal return + + @Test for Error_ChDynamNotAllMoved - return any other error + @ fixed bug causing R1 (result) and R2 (A3) to be overwritten with scratch data [TV 020220] + STMFD SP,{R2} @ save workspace + LDR R3, =0x1c1 @ Error_ChDynamNotAllMoved + LDR R2, [R0] @ get error number in R2 [TV 011221] + CMP R2, R3 + LDMFD SP,{R2} @ restore workspace + BNE 99f @ return error + + @ ignore Error_ChDynamNotAllMoved + + @ valid return +90: TEQ A3, #0 @ check null pointer + STRNE R1, [A3] @ output R1 [TV 020220] + MOV R, #0 @ clear error pointer + + @ exit +99: +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,84 @@ +@ Index: OSLib/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.asm 20031228 +@ osheap_resize_no_fail - Extend or shrink heap without throwing error if shrink fails +@ Initial Release 08-Nov-00 Tony van der Hoff +@ Bug fix 21-Dec-01 TV +@ Bug Fix 20-Feb-02 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global xosheap_resize_no_fail + .type xosheap_resize_no_fail, %function + + .text + +@ xosheap_resize_no_fail +@ APCS Compliant +@Entry A1 = pointer to heap +@ A2 = required size change in bytes (signed integer) +@ A3 -> actual size change in bytes (signed integer) +@Exit R = os_error code + +@ C Prototype: +@extern os_error *xosheap_resize_no_fail( byte* heap, +@ int size_increase, +@ int* size_change +@ ); +@ +@ This code works around the problem that OSHeap_Resize throws an error if shrink fails. +@ OSLib is then unable to return the amount by which the heap shrunk. +@ The object code is patched into the library at build time by the MakeFile + +xosheap_resize_no_fail: + MOV IP, LR @ + + MOV R3, A2 @ required change + MOV R1, A1 @ pointer to heap + MOV R0, #5 @ OSHeap_Resize - reason code + SWI 0x2001d @ XOS_Heap + BVC 90f @ no error - normal return + + @ Test for Error_HeapExcessiveShrink - report any other error + @ fixed bug causing R2 (A3) to be overwritten with scratch data [TV 020220] + STMFD SP,{R2} @ save workspace + LDR R1, =0x187 @Error_HeapExcessiveShrink + LDR R2, [R0] @ get error number in R2; [TV 011221] + CMP R2, R1 + LDMFD SP,{R2} @ restore workspace + BNE 99f @ return any other error + + @ ignore Error_HeapExcessiveShrink + RSB R3, R3, #0 @ complement R3 to give actual change + + @ valid return +90: TEQ A3, #0 @ check null pointer + STRNE R3, [A3] @ output R3 + MOV R, #0 @ clear error pointer + + @ exit +99: +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,96 @@ +@xos_read_var_val_size - return length of a variable +@ Initial Release 23-mar-99 Tony van der Hoff +@ History +@ 001230 TV Update for 32-bit compatibility + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@ This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error +@ when R2 bit 31 is set to read the variable length. The object code is patched into the +@ library at build time by the MakeFile + +@#include "oslib/Types.Hdr" + +R .req r0 + + .global xos_read_var_val_size + .type xos_read_var_val_size, %function + + .text + +@ xos_Read_var_val_size +@ APCS Compliant +@Entry R0 (a1) -> name of a variable (may be wildcarded) +@ R1 (a2) -> context pointer for wildcarded names +@ R2 (a3) = expand variable flag (os_VARTYPE_EXPANDED or 0) +@ R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found +@ R4 (v1) -> integer to contain variable type +@Exit R = 0, or pointer to error block +@ +@ C Prototype: +@extern os_error *xos_read_var_val_size ( +@ char const *var, +@ int context, +@ os_var_type var_type, +@ int *used, +@ int *context_out, +@ os_var_type *var_type_out ); + +xos_read_var_val_size: + MOV IP, LR + STMFD SP!, {A4, V1} + MOV R4, A3 @ expand variable flag + MOV R3, A2 @ context pointer + MOV R2, #0x80000000 @ check variable + MOV R1, #0 @ unused + SWI 0x20023 @ XOS_ReadVarVal + BVC 90f + + @Ignore error if RO 3 or later + STMFD SP!, {R0, R2} @ keep results + MOV R0, #129 @ Get OS version + MOV R1, #0 + MOV R2, #0xFF + SWI 0x20006 @ XOS_Byte + ADDVS SP, SP, #8 @ flatten stack + BVS 99f @ error exit + LDMFD SP!, {R, R2} @ restore state + CMP R1, #0xA3 @ test for RISC O S 3 + BLO 99f @ RO2 - Can't ignore error + + @ no real error +90: LDR LR, [SP, #0] @ a4 = pointer to result + TEQ LR, #0 + STRNE R2, [LR] @ save result + LDR LR, [SP, #8] @ v1 = pointer to context out + TEQ LR, #0 + STRNE R3, [LR] @ update context + LDR LR, [SP, #12] @ a3 = pointer to var type + TEQ LR, #0 + STRNE R4, [LR] @ variable type out + MOV R, #0 @ clear error pointer + +99: ADD SP, SP, #4 @ flatten stack + LDMFD SP!, {V1} @ restore arguments +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP @ exit +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,227 @@ + [ :LNOT: :DEF: Macros_Hdr + GBLL Macros_Hdr + +;OSLib---efficient, type-safe, transparent, extensible, +; register-safe A P I coverage of RISC O S +;Copyright \xA9 1994 Jonathan Coxhead + +; OSLib is free software; you can redistribute it and/or modify +;it under the terms of the GNU General Public License as published by +;the Free Software Foundation; either version 1, or (at your option) +;any later version. +; +; OSLib is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +;along with this programme; if not, write to the Free Software +;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + + MACRO +$label Inc $c, $r1 +$label ADD$c $r1, $r1, #1 + MEND + + MACRO +$label IncS $c, $r1 +$label ADD$c.S $r1, $r1, #1 + MEND + + MACRO +$label Dec $c, $r1 +$label SUB$c $r1, $r1, #1 + MEND + + MACRO +$label DecS $c, $r1 +$label SUB$c.S $r1, $r1, #1 + MEND + + MACRO +$label Max $r1, $r2, $r3 + ;r1 = MAX (r2, r3) +$label CMP $r2, $r3 + MOVGT $r1, $r2 + MOVLE $r1, $r3 + MEND + + MACRO +$label Min $r1, $r2, $r3 + ;r1 = MIN (r2, r3) +$label CMP $r2, $r3 + MOVLT $r1, $r2 + MOVGE $r1, $r3 + MEND + + MACRO +$label MaxAB $r1, $r2 + ;r1 = MAX (r1, r2) +$label CMP $r1, $r2 + MOVLT $r1, $r2 + MEND + + MACRO +$label MinAB $r1, $r2 + ;r1 = MIN (r1, r2) +$label CMP $r1, $r2 + MOVGT $r1, $r2 + MEND + + MACRO +$label Abs $r1, $r2 + ;r1 = ABS (r2) +$label CMP $r2, #0 + MOVGE $r1, $r2 + RSBLT $r1, $r2, #0 + MEND + + MACRO +$label Sgn $r1, $r2 + ;r1 = SGN (r2) +$label CMP $r2, #0 + MOVGT $r1, #1 + MOVEQ $r1, #0 + MVNLT $r1, #0 + MEND + + MACRO +$label Dim $r1, $r2, $r3 + ;r1 = DIM (r2, r3) +$label CMP $r2, $r3 + SUBGT $r1, $r2, $r3 + MOVLE $r1, #0 + MEND + + MACRO +$label Sqr $c, $r1, $r2 + ;r1 = SQR (r2) +$label MUL$c $r1, $r2, $r2 + MEND + + MACRO +$label Bool $r1, $r2 + ;r1 = BOOL (r2) +$label TEQ $r2, #0 + MOVNE $r2, #True + MOVEQ $r2, #False + MEND + + MACRO +$label Int $r1, $r2 + ;r1 = INT (r2) +$label SUB $r1, $r2, #"0" + CMP $r1, #9 + SUBHI $r1, $r2, #"a" + CMPHI $r1, #5 + SUBHI $r1, $r2, #"A" + CMPHI $r1, #5 + ADDHI $r1, $r1, #10 + MEND + + MACRO +$label UChar $r1, $r2 + ;r1 = UCHAR (r2) +$label CMP $r2, #10 + ADDLT $r1, $r2, #"0" + ADDGE $r1, $r2, #"A"-10 + MEND + + MACRO +$label LChar $r1, $r2 + ;r1 = LCHAR (r2) +$label CMP $r2, #10 + ADDLT $r1, $r2, #"0" + ADDGE $r1, $r2, #"a"-10 + MEND + + MACRO +$label BinExp $c, $r1, $r2 + ;r1 = BINEXP (r2) +$label MOV$c $r1, #1 + MOV$c $r1, $r1, LSL $r2 + MEND + + MACRO +$label Align $c, $r1, $r2 + ;r1 = ALIGN (r2) +$label ADD$c $r1, $r2, #3 + BIC$c $r1, $r1, #3 + MEND + + MACRO +$label SetC + ;C=1 V=0 Z=0 N=0 +$label CMP PC, #0 + MEND + + MACRO +$label ClearFlags + ;C=0 V=0 Z=0 N=0 +$label CMN PC, #0 + MEND + + MACRO +$label ClrV +$label ClearFlags + MEND + + MACRO +$label ClrC +$label ClearFlags + MEND + + MACRO +$label ClrN +$label ClearFlags + MEND + + MACRO +$label SetV + ;C=0 V=1 Z=0 N=1 +$label CMP PC, #&80000000 + MEND + + MACRO +$label SetN + ;C=0 V=0 Z=0 N=1 +$label CMN PC, #&80000000 + MEND + + MACRO +$label SetZ + ;C=* V=* Z=1 N=0 +$label TST PC, #0 + MEND + + MACRO +$label ClrZ + ;C=* V=* Z=0 N=0 +$label TEQ PC, #0 + MEND + + MACRO +$label NOP +$label & 0 + MEND + + MACRO +$label DivRem $rc, $ra, $rb, $rtemp + ;rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt +$label MOV $rtemp, $rb + CMP $rtemp, $ra, LSR #1 +01 MOVLS $rtemp, $rtemp, LSL #1 + CMPLS $rtemp, $ra, LSR #1 + BLS %BT01 + MOV $rc, #0 +02 CMP $ra, $rtemp + SUBCS $ra, $ra, $rtemp + ADC $rc, $rc, $rc + MOV $rtemp, $rtemp, LSR #1 + CMP $rtemp, $rb + BCS %BT02 + MEND + + ] + END Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,202 @@ +#ifndef Macros_Hdr +# define Macros_Hdr + +# ifndef Get_Types +# define Get_Types +# include "oslib/Types.Hdr" +# endif + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@Copyright � 1994 Jonathan Coxhead + +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public License as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public License +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + + .macro Inc c, r1 + ADD\c \r1, \r1, #1 + .endm + + .macro IncS c, r1 + ADD\cS \r1, \r1, #1 + .endm + + .macro Dec c, r1 + SUB\c \r1, \r1, #1 + .endm + + .macro DecS c, r1 + SUB\cS \r1, \r1, #1 + .endm + + @ r1 = MAX (r2, r3) + .macro Max r1, r2, r3 + CMP \r2, \r3 + MOVGT \r1, \r2 + MOVLE \r1, \r3 + .endm + + @ r1 = MIN (r2, r3) + .macro Min r1, r2, r3 + CMP \r2, \r3 + MOVLT \r1, \r2 + MOVGE \r1, \r3 + .endm + + @ r1 = MAX (r1, r2) + .macro MaxAB r1, r2 + CMP \r1, \r2 + MOVLT \r1, \r2 + .endm + + @ r1 = MIN (r1, r2) + .macro MinAB r1, r2 + CMP \r1, \r2 + MOVGT \r1, \r2 + .endm + + @ r1 = ABS (r2) + .macro Abs r1, r2 + CMP \r2, #0 + MOVGE \r1, \r2 + RSBLT \r1, \r2, #0 + .endm + + @ r1 = SGN (r2) + .macro Sgn r1, r2 + CMP \r2, #0 + MOVGT \r1, #1 + MOVEQ \r1, #0 + MVNLT \r1, #0 + .endm + + @ r1 = DIM (r2, r3) + .macro Dim r1, r2, r3 + CMP \r2, \r3 + SUBGT \r1, \r2, \r3 + MOVLE \r1, #0 + .endm + + @ r1 = SQR (r2) + .macro Sqr c, r1, r2 + MUL\c \r1, \r2, \r2 + .endm + + @ r1 = BOOL (r2) + .macro Bool r1, r2 + TEQ \r2, #0 + MOVNE \r2, #True + MOVEQ \r2, #False + .endm + + @ r1 = INT (r2) + .macro Int r1, r2 + SUB \r1, \r2, #"0" + CMP \r1, #9 + SUBHI \r1, \r2, #"a" + CMPHI \r1, #5 + SUBHI \r1, \r2, #"A" + CMPHI \r1, #5 + ADDHI \r1, \r1, #10 + .endm + + @ r1 = UCHAR (r2) + .macro UChar r1, r2 + CMP \r2, #10 + ADDLT \r1, \r2, #"0" + ADDGE \r1, \r2, #"A"-10 + .endm + + @ r1 = LCHAR (r2) + .macro LChar r1, r2 + CMP \r2, #10 + ADDLT \r1, \r2, #"0" + ADDGE \r1, \r2, #"a"-10 + .endm + + @ r1 = BINEXP (r2) + .macro BinExp c, r1, r2 + MOV\c \r1, #1 + MOV\c \r1, \r1, LSL \r2 + .endm + + @ r1 = ALIGN (r2) + .macro Align c, r1, r2 + ADD\c \r1, \r2, #3 + BIC\c \r1, \r1, #3 + .endm + + @ C=1 V=0 Z=0 N=0 + .macro SetC + CMP PC, #0 + .endm + + @ C=0 V=0 Z=0 N=0 + .macro ClearFlags + CMN PC, #0 + .endm + + .macro ClrV + ClearFlags + .endm + + .macro ClrC + ClearFlags + .endm + + .macro ClrN + ClearFlags + .endm + + @ C=0 V=1 Z=0 N=1 + .macro SetV + CMP PC, #&80000000 + .endm + + @ C=0 V=0 Z=0 N=1 + .macro SetN + CMN PC, #&80000000 + .endm + + @ C=* V=* Z=1 N=0 + .macro SetZ + TST PC, #0 + .endm + + @ C=* V=* Z=0 N=0 + .macro ClrZ + TEQ PC, #0 + .endm + + .macro NOP + & 0 + .endm + + @ rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt + .macro DivRem rc, ra, rb, rtemp + MOV \rtemp, \rb + CMP \rtemp, \ra, LSR #1 +1: MOVLS \rtemp, \rtemp, LSL #1 + CMPLS \rtemp, \ra, LSR #1 + BLS 1b + MOV \rc, #0 +2: CMP \ra, \rtemp + SUBCS \ra, \ra, \rtemp + ADC \rc, \rc, \rc + MOV \rtemp, \rtemp, LSR #1 + CMP \rtemp, \rb + BCS 2b + .endm + +#endif Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,227 +0,0 @@ - [ :LNOT: :DEF: Macros_Hdr - GBLL Macros_Hdr - -;OSLib---efficient, type-safe, transparent, extensible, -; register-safe A P I coverage of RISC O S -;Copyright \xA9 1994 Jonathan Coxhead - -; OSLib is free software; you can redistribute it and/or modify -;it under the terms of the GNU General Public License as published by -;the Free Software Foundation; either version 1, or (at your option) -;any later version. -; -; OSLib is distributed in the hope that it will be useful, -;but WITHOUT ANY WARRANTY; without even the implied warranty of -;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -;along with this programme; if not, write to the Free Software -;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. - - MACRO -$label Inc $c, $r1 -$label ADD$c $r1, $r1, #1 - MEND - - MACRO -$label IncS $c, $r1 -$label ADD$c.S $r1, $r1, #1 - MEND - - MACRO -$label Dec $c, $r1 -$label SUB$c $r1, $r1, #1 - MEND - - MACRO -$label DecS $c, $r1 -$label SUB$c.S $r1, $r1, #1 - MEND - - MACRO -$label Max $r1, $r2, $r3 - ;r1 = MAX (r2, r3) -$label CMP $r2, $r3 - MOVGT $r1, $r2 - MOVLE $r1, $r3 - MEND - - MACRO -$label Min $r1, $r2, $r3 - ;r1 = MIN (r2, r3) -$label CMP $r2, $r3 - MOVLT $r1, $r2 - MOVGE $r1, $r3 - MEND - - MACRO -$label MaxAB $r1, $r2 - ;r1 = MAX (r1, r2) -$label CMP $r1, $r2 - MOVLT $r1, $r2 - MEND - - MACRO -$label MinAB $r1, $r2 - ;r1 = MIN (r1, r2) -$label CMP $r1, $r2 - MOVGT $r1, $r2 - MEND - - MACRO -$label Abs $r1, $r2 - ;r1 = ABS (r2) -$label CMP $r2, #0 - MOVGE $r1, $r2 - RSBLT $r1, $r2, #0 - MEND - - MACRO -$label Sgn $r1, $r2 - ;r1 = SGN (r2) -$label CMP $r2, #0 - MOVGT $r1, #1 - MOVEQ $r1, #0 - MVNLT $r1, #0 - MEND - - MACRO -$label Dim $r1, $r2, $r3 - ;r1 = DIM (r2, r3) -$label CMP $r2, $r3 - SUBGT $r1, $r2, $r3 - MOVLE $r1, #0 - MEND - - MACRO -$label Sqr $c, $r1, $r2 - ;r1 = SQR (r2) -$label MUL$c $r1, $r2, $r2 - MEND - - MACRO -$label Bool $r1, $r2 - ;r1 = BOOL (r2) -$label TEQ $r2, #0 - MOVNE $r2, #True - MOVEQ $r2, #False - MEND - - MACRO -$label Int $r1, $r2 - ;r1 = INT (r2) -$label SUB $r1, $r2, #"0" - CMP $r1, #9 - SUBHI $r1, $r2, #"a" - CMPHI $r1, #5 - SUBHI $r1, $r2, #"A" - CMPHI $r1, #5 - ADDHI $r1, $r1, #10 - MEND - - MACRO -$label UChar $r1, $r2 - ;r1 = UCHAR (r2) -$label CMP $r2, #10 - ADDLT $r1, $r2, #"0" - ADDGE $r1, $r2, #"A"-10 - MEND - - MACRO -$label LChar $r1, $r2 - ;r1 = LCHAR (r2) -$label CMP $r2, #10 - ADDLT $r1, $r2, #"0" - ADDGE $r1, $r2, #"a"-10 - MEND - - MACRO -$label BinExp $c, $r1, $r2 - ;r1 = BINEXP (r2) -$label MOV$c $r1, #1 - MOV$c $r1, $r1, LSL $r2 - MEND - - MACRO -$label Align $c, $r1, $r2 - ;r1 = ALIGN (r2) -$label ADD$c $r1, $r2, #3 - BIC$c $r1, $r1, #3 - MEND - - MACRO -$label SetC - ;C=1 V=0 Z=0 N=0 -$label CMP PC, #0 - MEND - - MACRO -$label ClearFlags - ;C=0 V=0 Z=0 N=0 -$label CMN PC, #0 - MEND - - MACRO -$label ClrV -$label ClearFlags - MEND - - MACRO -$label ClrC -$label ClearFlags - MEND - - MACRO -$label ClrN -$label ClearFlags - MEND - - MACRO -$label SetV - ;C=0 V=1 Z=0 N=1 -$label CMP PC, #&80000000 - MEND - - MACRO -$label SetN - ;C=0 V=0 Z=0 N=1 -$label CMN PC, #&80000000 - MEND - - MACRO -$label SetZ - ;C=* V=* Z=1 N=0 -$label TST PC, #0 - MEND - - MACRO -$label ClrZ - ;C=* V=* Z=0 N=0 -$label TEQ PC, #0 - MEND - - MACRO -$label NOP -$label & 0 - MEND - - MACRO -$label DivRem $rc, $ra, $rb, $rtemp - ;rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt -$label MOV $rtemp, $rb - CMP $rtemp, $ra, LSR #1 -01 MOVLS $rtemp, $rtemp, LSL #1 - CMPLS $rtemp, $ra, LSR #1 - BLS %BT01 - MOV $rc, #0 -02 CMP $ra, $rtemp - SUBCS $ra, $ra, $rtemp - ADC $rc, $rc, $rc - MOV $rtemp, $rtemp, LSR #1 - CMP $rtemp, $rb - BCS %BT02 - MEND - - ] - END Modified: branches/simplified-build/!OsLib/Source/Macros/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,7 +2,6 @@ # List of modules comprising Macros # for inclusion in Make files independant of platform -# modules with no SWIs -MODULES += \ -Macros \ - +# Modules defined by handwritten .h, .AOFHdr and .ELFHdr files. +HDRMODULES = \ +Macros Modified: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-29 21:55:38 UTC (rev 255) @@ -3,6 +3,11 @@ # Build type: CROSSGCC_AOF (default), CROSSGCC_ELF [NORCROFT_AOF: not supported yet] BUILDTYPE ?= CROSSGCC_AOF +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +else ifeq ($(BUILDTYPE),CROSSGCC_AOF) +else +$(error Unknown BUILDTYPE value) +endif include Makefile.setup.$(BUILDTYPE) .PHONY: all install release-oslib release-cstrong clean oslib cstrong BuildRequirements @@ -31,31 +36,31 @@ cd $(BUILDDIR) && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLibStrongHelp $(OSLIBCSTRONG) clean: + $(MAKE) -C Types/oslib $@ $(MAKE) -C Computer/oslib $@ $(MAKE) -C Core/oslib $@ $(MAKE) -C Macros/oslib $@ $(MAKE) -C Toolbox/oslib $@ - $(MAKE) -C Types/oslib $@ $(MAKE) -C User/oslib $@ -$(RM) $(BUILDDIR) oslib: $(OSLIBLIB) $(OSLIBLIB): BuildRequirements + $(MAKE) -C Types/oslib oslib $(MAKE) -C Computer/oslib oslib $(MAKE) -C Core/oslib oslib $(MAKE) -C Macros/oslib oslib $(MAKE) -C Toolbox/oslib oslib - $(MAKE) -C Types/oslib oslib $(MAKE) -C User/oslib oslib cd $(OBJDIR) && $(LIBFILE) $@ */*.o cstrong: $(OSLIBCSTRONG) $(OSLIBCSTRONG): BuildRequirements + $(MAKE) -C Types/oslib cstrong $(MAKE) -C Computer/oslib cstrong $(MAKE) -C Core/oslib cstrong $(MAKE) -C Macros/oslib cstrong $(MAKE) -C Toolbox/oslib cstrong - $(MAKE) -C Types/oslib cstrong $(MAKE) -C User/oslib cstrong cd $(BUILDDIR) && $(BINDHELP) $(CSTRONGDIR) $@ Modified: branches/simplified-build/!OsLib/Source/Makefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-29 21:55:38 UTC (rev 255) @@ -1,19 +1,25 @@ # ... -ASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES)) -CHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES)) +# SWIMODULES and MODULES all have their .swi file. The former have one or +# more SWI's defined, the latter no SWI's at all. +# HDRMODULES only have handwritten .h, .AOFHdr and .ELFHdr files. +# ASMMODULES only have handwritten .asm (AOF) and .gas (ELF) assembler files. + +ASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES) $(HDRMODULES)) +CHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES) $(HDRMODULES)) CSTRONG = $(patsubst %,%.help,$(SWIMODULES) $(MODULES)) SWIOBJS = $(patsubst %,%.o,$(SWIMODULES)) -ASMOBJS = $(patsubst %,%.o,$(CMODULES)) +ASMOBJS = $(patsubst %,%.o,$(ASMMODULES)) -# To be generated from .swi files (only used for removing those files) -GENASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES)) -GENCHEADERS = $(patsubst %,%.h,$(SWIMODULES)) -GENCSTRONG = $(patsubst %,%.help,$(SWIMODULES)) +# Generated files from .swi files (only used for removing those files in clean +# rule) +GENASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES) $(HDRMODULES)) +GENCHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES)) +GENCSTRONG = $(patsubst %,%.help,$(SWIMODULES) $(MODULES)) .PHONY: oslib cstrong clean -# Building one subdirectory in Source can not happen in parallel because ViaFile -# creation. +# Building inside one subdirectory of Source can not happen in parallel +# because of ViaFile creation in defmod. .NOTPARALLEL: # Targets: @@ -29,18 +35,28 @@ -$(RM) l/* -$(RM) $(GENASMHEADERS) $(GENCHEADERS) $(GENCSTRONG) $(SWIOBJS) $(ASMOBJS) -# convert arg to lower case +# Convert arg to lower case tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) #------------------------------------------------------------------------ # general rules: .SUFFIXES: -.SUFFIXES: .o .h .swi .Hdr .help .asm +.SUFFIXES: .o .h .swi .Hdr .AOFHdr .ELFHdr .help .asm .gas +# Source files: .h .swi .AOFHdr .ELFHdr .asm .gas +# Derived files: .o .h .help + # Assmebler header generation: .swi.Hdr: $(DEFMOD) -hdr < $< > $@ +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +.ELFHdr.Hdr: + if [ -s "$<" ]; then $(CP) $< $@; fi +else +.AOFHdr.Hdr: + if [ -s "$<" ]; then $(CP) $< $@; fi +endif # C header generation: .swi.h: @@ -58,6 +74,11 @@ $(DEFMOD) -cstrong -o $(CSTRONGDIR) < $< @touch $@ -# Object code generation (from .asm file): +# Object code generation (from .asm or .gas file): +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +.gas.o: + $(AS) -o $@ $< +else .asm.o: - $(AS) -mapcs-32 -Wa,-apcs32 -o $@ $< + $(AS) -o $@ $< +endif Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-29 21:55:38 UTC (rev 255) @@ -25,12 +25,14 @@ export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := gcc -export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs-32 -Wa,-apcs32 export LIBFILE := libfile -c export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install +ASMEXT = .asm + OSLIBLIB = $(BUILDDIR)/OSLib32.o OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-29 21:55:38 UTC (rev 255) @@ -19,18 +19,20 @@ export BYTEWIDE := $(SOURCEDIR)/ByteWide export DEFMOD := $(BINDIR)/defmod -asmtype gccelf -export REDUCEAOF := $(BINDIR)/reduceaof +export REDUCEAOF := @echo Not needed for ELF build: reduceaof export BINDHELP := $(BINDIR)/bindhelp export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := arm-unknown-riscos-gcc -export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -export LIBFILE := arm-unknown-riscos-ar -r +export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs32 +export LIBFILE := arm-unknown-riscos-ar rs export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install +ASMEXT = .gas + OSLIBLIB = $(BUILDDIR)/OSLib32.o OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 Modified: branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -1,8 +1,8 @@ # OSLib/Source/Toolbox/oslib/Modules # Modules definition for Toolbox Make -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ ActionButton \ Button \ ColourDbox \ @@ -38,17 +38,16 @@ Toolbox \ Window \ WindowSupportExternal \ -WritableField +WritableField -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ Adjuster \ FileDbox \ KeyboardShortcut \ Label \ LabelledBox \ -ResEd +ResEd -# modules defined other than by SWI definition -CMODULES += - +# Modules defined other than by SWI definition +ASMMODULES = Copied: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help =================================================================== Modified: branches/simplified-build/!OsLib/Source/Types/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,8 +2,8 @@ # List of modules comprising Macros # for inclusion in Make files independant of platform -# modules with no SWIs -MODULES += \ +# Modules defined by handwritten .h, .AOFHdr and .ELFHdr files. +HDRMODULES = \ ColTrans32 \ DeviceFS32 \ DOSFS32 \ @@ -18,4 +18,3 @@ PDriver32 \ Types \ Wimp32 - Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,20 @@ +;/* OSCore32.Hdr +;** Used by OSCore.HDR to create the short synonyms for 32-bit file handles +;** +;** Tony van der Hoff 10-11-01 +;*/ + + [ :LNOT: :DEF: OSCore32_Hdr + GBLL OSCore32_Hdr + + [ :LNOT: :DEF: OSF32_Hdr + GET OSLIB:oslib.Hdr.OSF32 + ] + + [ :LNOT: :DEF: OSLIB_F8 + ] + + ] + + + END Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,6 @@ +@ OSCore32.Hdr +@ Used by OSCore.Hdr to create the short synonyms for 32-bit file handles +@ +@ Tony van der Hoff 10-11-01 + +#include "oslib/OSF32.Hdr" Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,20 +0,0 @@ -;/* OSCore32.Hdr -;** Used by OSCore.HDR to create the short synonyms for 32-bit file handles -;** -;** Tony van der Hoff 10-11-01 -;*/ - - [ :LNOT: :DEF: OSCore32_Hdr - GBLL OSCore32_Hdr - - [ :LNOT: :DEF: OSF32_Hdr - GET OSLIB:oslib.Hdr.OSF32 - ] - - [ :LNOT: :DEF: OSLIB_F8 - ] - - ] - - - END Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,18 @@ +; OSF32.h +; creates a short-form synonym for OS_FW +; +; Tony van der Hoff 10-11-01 +; + + [ :LNOT: :DEF: OSF32_Hdr + GBLL OSF32_Hdr + + [ :LNOT: :DEF: OSLIB_F8 + GBLS $OS_F +;$OS_F SETS OS_FW ; TV 20021128 +OS_F SETS OS_FW + ] + + ] + + END Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,11 @@ +@ OSF32.h +@ creates a short-form synonym for OS_FW +@ +@ Tony van der Hoff 10-11-01 + +#ifndef OSF32_Hdr +# define OSF32_Hdr + +# define OS_F OS_FW + +#endif Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,18 +0,0 @@ -; OSF32.h -; creates a short-form synonym for OS_FW -; -; Tony van der Hoff 10-11-01 -; - - [ :LNOT: :DEF: OSF32_Hdr - GBLL OSF32_Hdr - - [ :LNOT: :DEF: OSLIB_F8 - GBLS $OS_F -;$OS_F SETS OS_FW ; TV 20021128 -OS_F SETS OS_FW - ] - - ] - - END Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr ============... [truncated message content] |
From: <jt...@us...> - 2007-04-28 13:28:46
|
Revision: 254 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=254&view=rev Author: jtytgat Date: 2007-04-28 06:28:42 -0700 (Sat, 28 Apr 2007) Log Message: ----------- Start of DefMod2 changes to support both AOF and ELF toolkits using the same binary. - New option: -asmtype specifying which assembler program needs to be used (default: gccaof). - Constify some function APIs, variables. - Made APCS-32 default. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF branches/simplified-build/!OsLib/Tools/DefMod2/Makefile branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-28 13:28:42 UTC (rev 254) @@ -18,7 +18,7 @@ export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions export BYTEWIDE := $(SOURCEDIR)/ByteWide -export DEFMOD := $(BINDIR)/defmod +export DEFMOD := $(BINDIR)/defmod -asmtype gccaof export REDUCEAOF := $(BINDIR)/reduceaof export BINDHELP := $(BINDIR)/bindhelp Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-28 13:28:42 UTC (rev 254) @@ -18,7 +18,7 @@ export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions export BYTEWIDE := $(SOURCEDIR)/ByteWide -export DEFMOD := $(BINDIR)/defmod +export DEFMOD := $(BINDIR)/defmod -asmtype gccelf export REDUCEAOF := $(BINDIR)/reduceaof export BINDHELP := $(BINDIR)/bindhelp Modified: branches/simplified-build/!OsLib/Tools/DefMod2/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-28 13:28:42 UTC (rev 254) @@ -1,11 +1,6 @@ # Targets: all install clean # Using: CC CFLAGS LD LDFLAGS YACC YFLAGS RM INSTALL INSTALL_PROGRAM bindir -# Which assembler DefMod should use (set this using CFLAGS): -# USE_GCC for GCCSDK -# USE_ARMASM for PACE/solaris -# USE_OBJASM for RISC OS native build using Norcroft - .PHONY: all install clean OBJS = \ asmhelp.o \ @@ -20,7 +15,7 @@ # In case they are not defined, use default values. CC ?= /usr/bin/gcc -CFLAGS ?= -g -DUSE_GCC -DUNIX -DEXECUTE_ON_UNIX -D__swi +CFLAGS ?= -g -DUNIX -DEXECUTE_ON_UNIX -D__swi LD ?= /usr/bin/gcc LDFLAGS ?= YACC ?= bison Modified: branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c 2007-04-28 13:28:42 UTC (rev 254) @@ -72,7 +72,7 @@ break; } - return SKIP; + return NULL; } /*-----------------------------------------------------------------------*/ Modified: branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-04-28 13:28:42 UTC (rev 254) @@ -68,7 +68,7 @@ #endif /* Set this to 1 to make APCS 3/32 the default */ -#define DEFAULT_TO_APCS_32 0 +#define DEFAULT_TO_APCS_32 1 #if DEFAULT_TO_APCS_32 # define HELP_STRING_26 "" # define HELP_STRING_32 " [default]" @@ -1028,7 +1028,7 @@ if (!p) { yyerror ("not enough memory for |qalloc()|"); - exit (1); + exit (EXIT_FAILURE); } //tracef( "qalloc returns 0x%x\n" _ p ); @@ -1122,8 +1122,7 @@ yydebug = 0; - i = 1; - while (i < argc && argv [i] [0] == '-') + for (i = 1; i < argc && argv [i] [0] == '-'; ++i) { if (strcmp (argv [i], "-s") == 0) option = Objasm; else if (strcmp (argv [i], "-l") == 0) @@ -1149,8 +1148,7 @@ else if (strcmp (argv [i], "-o") == 0) output = argv [++i]; else if (strcmp (argv [i], "-help") == 0) - { const char* helptext = "DefMod " VERSION_INFO - ". Copyright � Jonathan Coxhead, 1994.\r" + { const char* helptext = "DefMod" VERSION_INFO ". Copyright � Jonathan Coxhead, 1994.\r" "DefMod comes with ABSOLUTELY NO WARRANTY.\r" "This is free software, and you are welcome to redistribute it " "under certain conditions. See the file Copying for details.\r" @@ -1158,20 +1156,26 @@ "[-o <output-dir> | > <output-file>] " "[-byte_wide <byte-wide-file>] " "[-26bit | -32bit] " + "[-asmtype [objasm | gccaof | armasm | gccelf ]] " "< <module-interface-file>\r" "Purpose: generate output from a module interface file\r" "-v\t\t" "verbose\r" "-q\t\t" "quiet\r" "-o\t\t" "is required when generating a " "directory\r" - "<output-dir>\t" "directory to create\r" + "\t<output-dir>\t" "directory to create\r" "-byte_wide\t" "is required with -s or -l for a " "module interface using byte-wide " "types defined elsewhere\r" - "<byte-wide-file>\t" "file containing whitespace-separated " + "\t<byte-wide-file>\t" "file containing whitespace-separated " "names of byte-wide types\r" "-26bit\t\t" "generate 26 bit code" HELP_STRING_26 "\r" "-32bit\t\t" "generate 32 bit code" HELP_STRING_32 "\r" + "-asmtype\t" "selects the assembler to use\r" + "\tobjasm\t" "...use ObjAsm (on RISC OS only)\r" + "\tgccaof\t" "...use GCC AOF toolkit (GCCSDK 3.4 only)\r" + "\tarmasm\t" "...use ARM ASM\r" + "\tgccelf\t" "...use GCC ELF toolkit (GCCSDK 4 only)\r" "<type> is one of:\r" "\t-asmhelp\t" "SrcEdit assembler help file\r" @@ -1180,13 +1184,13 @@ "\t-chelp\t\t" "SrcEdit C help file\r" "\t-cstrong\t" "StrongHelp C help directory\r" "\t-h\t\t" "C header file\r" - "\t-hdr\t\t" "ObjAsm header file\r" + "\t-hdr\t\t" "assembler header file (ObjAsm or GAS)\r" "\t-h++\t\t" "C++ header file (experimental)\r" "\t-l\t\t" "Directory for running LibFile -c " "-via ViaFile\r" "\t-p\t\t" "Pascal header file (not " "implemented)\r" - "\t-s\t\t" "ObjAsm source file\r"; + "\t-s\t\t" "assembler source file (ObjAsm or GAS)\r"; if ((error = xos_pretty_print (helptext, NULL, NULL)) != NULL) goto finish; @@ -1203,7 +1207,12 @@ #endif enum {Copying, Skipping} state = Skipping; - i++; + if (++i == argc) + { + fprintf (stderr, "Missing option value for -byte_wide\n"); + Parse_Error = TRUE; + goto finish; + } // tracef( "Main opening file: %s\n" _ argv[i] ); @@ -1289,13 +1298,36 @@ { mode = APCS32; } - - i++; + else if (strcmp (argv [i], "-asmtype") == 0) + { + ++i; + if (strcmp (argv [i], "objasm") == 0) + AsmType = AsmType_eObjAsm; + else if (strcmp (argv[i], "gccaof") == 0) + AsmType = AsmType_eGCCAOF; + else if (strcmp (argv[i], "armasm") == 0) + AsmType = AsmType_eARMASM; + else if (strcmp (argv[i], "gccelf") == 0) + AsmType = AsmType_eGCCELF; + else + { + fprintf (stderr, "Unknown option value %s for -asmtype\n", argv[i]); + Parse_Error = TRUE; + goto finish; + } + } + else + { + fprintf (stderr, "Unknown option %s\n", argv[i]); + Parse_Error = TRUE; + goto finish; + } } if (option == None) { tracef( "Parse error: No option\n" ); + fprintf (stderr, "Nothing to do\n"); Parse_Error = TRUE; goto finish; } @@ -1311,9 +1343,9 @@ switch (option) { case Objasm: tracef( "Objasm\n" ); - if ((error = objasm_output (stdout, Title, Author, needses, - needsatends, consts, types, swis, /*separate?*/ FALSE, - mode == APCS32, SKIP)) != NULL) + if ((error = objasm_output (stdout, Title, Author, + types, swis, /*separate?*/ FALSE, + mode == APCS32, NULL)) != NULL) goto finish; break; @@ -1348,10 +1380,9 @@ case Library: tracef( "Library\n" ); if (output != NULL) - if ((error = objasm_output (SKIP, Title, Author, needses, - needsatends, consts, types, swis, /*separate?*/ TRUE, - mode == APCS32, output)) != - NULL) + if ((error = objasm_output (NULL, Title, Author, types, + swis, /*separate?*/ TRUE, + mode == APCS32, output)) != NULL) goto finish; break; @@ -1378,10 +1409,10 @@ finish: trace_terminate (); if (error == NULL) - exit (Parse_Error? 1: 0); + exit (Parse_Error ? EXIT_FAILURE : EXIT_SUCCESS); else { fprintf (stderr, "%s\n", error->errmess); - exit (1); + exit (EXIT_FAILURE); } } Modified: branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c 2007-04-28 13:28:42 UTC (rev 254) @@ -1,9 +1,8 @@ -/* Index: OSLib/!OsLib/Tools/DefMod2/defmod/sources/hdr.c 20031228 */ /*hdr.c - output an assembler header file given a module defn*/ /*OSLib---efficient, type-safe, transparent, extensible,\n" register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ +/*Copyright � 1994 Jonathan Coxhead*/ /* OSLib is free software; you can redistribute it and/or modify Modified: branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c 2007-04-28 13:28:42 UTC (rev 254) @@ -20,24 +20,6 @@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. */ -#undef ASSEMBLER - -#define OBJASM 1 -#define GCC 2 -#define ARMASM 3 - -#if (defined USE_OBJASM) && !(defined USE_GCC) && !(defined USE_ARMASM) - #define ASSEMBLER OBJASM -#elif !(defined USE_OBJASM) && (defined USE_GCC) && !(defined USE_ARMASM) - #define ASSEMBLER GCC -#elif !(defined USE_OBJASM) && !(defined USE_GCC) && (defined USE_ARMASM) - #define ASSEMBLER ARMASM -#endif - -#ifndef ASSEMBLER - #error Target Assembler Undefined -#endif - #undef TRACE #define TRACE 0 @@ -63,12 +45,10 @@ #include "main.h" #include "objasm.h" -#define MEM_FOR_OBJASM (1024*1024) +AsmType_e AsmType = AsmType_eUnknown; +static const char *Local; -static char *Local; - -static char - *APCS_Names [] = +static const char * const APCS_Names [] = /*names of registers as seen by A P C S*/ { /*arguments*/ "A1", "A2", "A3", "A4", @@ -78,9 +58,9 @@ /*fixed purpose*/ "SL", "FP", "IP", "SP", "LR", "PC" - }, + }; - *SWI_Names [] = +static const char * const SWI_Names [] = /*names of registers as seen by SWI call*/ { /*general*/ "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", @@ -114,7 +94,7 @@ break; } - return SKIP; + return NULL; } /*-----------------------------------------------------------------------*/ static int Set_Count @@ -185,18 +165,19 @@ static int Emit_Header ( FILE *file, - char *title, - char *author + const char *title, + const char *author ) { time_t now; + time (&now); return fprintf ( file, ";ObjAsm file for %s\n" - ";written by DefMod (%s) on %s" + ";written by DefMod (" __DATE__ ") on %s" ";%s\n" "\n" "R0 RN 0\n" @@ -231,8 +212,7 @@ "PC RN 15\n" "\n", title, - __DATE__, - (time (&now), ctime (&now)), + ctime (&now), author ); } @@ -241,7 +221,7 @@ static int Emit0 ( FILE *file, - char *s0 + const char *s0 ) { int rc = 0; @@ -255,8 +235,8 @@ static int Emit1 ( FILE *file, - char *s0, - char *s1 + const char *s0, + const char *s1 ) { int rc = 0; @@ -271,9 +251,9 @@ static int Emit2 ( FILE *file, - char *s0, - char *s1, - char *s2 + const char *s0, + const char *s1, + const char *s2 ) { int rc = 0; @@ -288,10 +268,10 @@ static int Emit3 ( FILE *file, - char *s0, - char *s1, - char *s2, - char *s3 + const char *s0, + const char *s1, + const char *s2, + const char *s3 ) { int rc = 0; @@ -306,7 +286,7 @@ static int Emit_Label ( FILE *file, - char *s0 + const char *s0 ) { return fprintf (file, "%s ROUT\n", s0); @@ -316,7 +296,7 @@ static int Emit_Local ( FILE *file, - char *s0 + const char *s0 ) { file = file; @@ -338,7 +318,7 @@ static int Emit_Comment ( FILE *file, - char *comment + const char *comment ) { return fprintf (file, ";%s\n", comment); @@ -353,19 +333,20 @@ ) { char *cc = s0; - int n, rc = 0; + int n; for (n = 0; n < 16; n++) if (Set_Elem (n, set)) { - if ((rc = sprintf (cc, cc == s0? "{%s": ", %s", APCS_Names [n])) - < 0) + int rc; + + if ((rc = sprintf (cc, (cc == s0) ? "{%s" : ", %s", APCS_Names [n])) < 0) return rc; - cc += strlen (cc); + cc += rc; } - return sprintf (cc, cc == s0? "{}%s": "}%s", hat? "^": ""); + return sprintf (cc, (cc == s0) ? "{}%s" : "}%s", hat ? "^" : ""); } /*-----------------------------------------------------------------------*/ @@ -377,26 +358,27 @@ ) { char *cc = s0; - int n, rc = 0; + int n; for (n = 0; n < 16; n++) if (Set_Elem (n, set)) { - if ((rc = sprintf (cc, cc == s0? "{%s": ", %s", SWI_Names [n])) - < 0) + int rc; + + if ((rc = sprintf (cc, (cc == s0) ? "{%s" : ", %s", SWI_Names [n])) < 0) return rc; - cc += strlen (cc); + cc += rc; } - return sprintf (cc, cc == s0? "{}%s": "}%s", hat? "^": ""); + return sprintf (cc, (cc == s0) ? "{}%s" : "}%s", hat ? "^" : ""); } /*-----------------------------------------------------------------------*/ static int Emit_Code ( FILE *file, - char *swi, + const char *swi, def_s s, osbool nonx, osbool apcs32, @@ -899,11 +881,8 @@ os_error *objasm_output ( FILE *file, - char *title, - char *author, - lookup_t needs, - lookup_t needsatends, - lookup_t consts, + const char *title, + const char *author, lookup_t types, lookup_t swis, osbool separate, /*if |separate|, output is to the directory |output|; otherwise, @@ -920,8 +899,12 @@ osbool done_fopen_via_file = FALSE, done_fopen_object = FALSE; FILE *via_file = NULL, *object = NULL /*for Norcroft*/; - needs = needs, consts = consts, types = types; - NOT_USED (needsatends) + /* Make sure the assembler type has been set. */ + if (AsmType == AsmType_eUnknown) + { + fprintf (stderr, "Assembler type has not been set (-asmtype option)\n"); + goto finish; + } if (!separate) { @@ -945,9 +928,9 @@ /*Export the symbol with a preceding 'x.'*/ def_as_extern (c_name + 1, swi); c_name [0] = 'x'; - #if 0 +#if 0 def_as_c_plus_plus (c_plus_plus_name + 1, swi, s); - #endif +#endif c_plus_plus_name [0] = 'x'; if ((rc = Emit1 (file, "EXPORT", c_name)) < 0) @@ -1007,19 +990,6 @@ if ((error = xosfile_create_dir (output, 0)) != NULL) goto finish; -#if 0 - /*Get the prefix - needed because we'll be starting a subtask.*/ - if ((error = xos_read_var_val ("Prefix$Dir", prefix_dir, - FILENAME_MAX, context1, os_VARTYPE_EXPANDED, &len, &context1, - &var_type)) != NULL) - goto finish; - - if (len == 0) - strcpy (prefix_dir, "@"); - else - prefix_dir [len] = '\0'; -#endif - //#ifndef EXECUTE_ON_UNIX if ((via_file = fopen ("ViaFile", "w+")) == NULL) { @@ -1125,35 +1095,46 @@ } done_fopen_object = FALSE; -#if ASSEMBLER == GCC - /* The gcc '-mapcs-32' or '-mapcs-26' option is a requirement - for GCCSDK 3.4.6 Release 1 onwards if you want to control - the APCS flavour in the assembler backend. - The pass-through '-apcs26'/'-apcs32' is only necessary for - pre-GCCSDK 3.4.6 Release 1 releases, so for backwards - compatibility only as the gcc '-mapcs-32'/'-mapcs-26' - option will always be passed through the as assembler - as '-apcs26'/'-apcs32' from that release onwards. */ - if ((rc = sprintf( cmd, + switch (AsmType) + { + case AsmType_eObjAsm: + if ((rc = sprintf (cmd, "ObjAsm -from %s -to %s -apcs 3/%dbit/SWstackcheck", + name1, name2, apcs32 ? 32 : 26)) < 0) + goto finish; + break; + case AsmType_eGCCAOF: + /* The gcc '-mapcs-32' or '-mapcs-26' option is a requirement + for GCCSDK 3.4.6 Release 1 onwards if you want to control + the APCS flavour in the assembler backend. + The pass-through '-apcs26'/'-apcs32' is only necessary for + pre-GCCSDK 3.4.6 Release 1 releases, so for backwards + compatibility only as the gcc '-mapcs-32'/'-mapcs-26' + option will always be passed through the as assembler + as '-apcs26'/'-apcs32' from that release onwards. */ + if ((rc = sprintf (cmd, "gcc %s -c -xassembler -Wa,-objasm%s -o %s %s", apcs32 ? "-mapcs-32" : "-mapcs-26", apcs32 ? ",-apcs32" : ",-apcs26", name2, name1)) < 0) - goto finish; + goto finish; + break; + case AsmType_eARMASM: + if ((rc = sprintf (cmd, "armasm -from %s -to %s -apcs 3/%dbit/SWstackcheck", + name1, name2, apcs32 ? 32 : 26)) < 0) + goto finish; + break; + case AsmType_eGCCELF: + if ((rc = sprintf (cmd, + "arm-unknown-riscos-gcc -c -xassembler -Wa,%s -o %s %s", + apcs32 ? "-mapcs-32" : "-mapcs-26", + name2, name1)) < 0) + goto finish; + break; + default: + fprintf (stderr, "Unknown assembler type\n"); + goto finish; + } -#elif ASSEMBLER == OBJASM - if ((rc = sprintf (cmd, "ObjAsm -from %s -to %s " - "-apcs 3/%dbit/SWstackcheck", - name1, name2, apcs32 ? 32 : 26)) < 0) - goto finish; - -#elif ASSEMBLER == ARMASM - if ((rc = sprintf (cmd, "armasm -from %s -to %s " - "-apcs 3/%dbit/SWstackcheck", - name1, name2, apcs32 ? 32 : 26)) < 0) - goto finish; -#endif - tracef ("%s ...\n" _ cmd); if (!Quiet) if ((rc = printf ("%s\n", cmd)) < 0) Modified: branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h 2007-04-26 20:11:09 UTC (rev 253) +++ branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h 2007-04-28 13:28:42 UTC (rev 254) @@ -13,7 +13,17 @@ #include "lookup.h" #endif -extern os_error *objasm_output (FILE *, char *, char *, lookup_t, lookup_t, - lookup_t, lookup_t, lookup_t, osbool, osbool, char *output); +typedef enum { + AsmType_eUnknown, + AsmType_eObjAsm, + AsmType_eGCCAOF, + AsmType_eARMASM, + AsmType_eGCCELF + } AsmType_e; +extern AsmType_e AsmType; + +/*if |separate|, output is to the directory |output|; otherwise, to the file |file|.*/ +extern os_error *objasm_output (FILE *file, const char *title, const char *author, lookup_t types, lookup_t swis, osbool separate, osbool apcs32, char *output); + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-26 20:13:45
|
Revision: 253 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=253&view=rev Author: jtytgat Date: 2007-04-26 13:11:09 -0700 (Thu, 26 Apr 2007) Log Message: ----------- Consistent OSLib spelling and avoid hard space top bit characters Modified Paths: -------------- trunk/website/index.html trunk/website/svn.html Modified: trunk/website/index.html =================================================================== --- trunk/website/index.html 2007-04-24 22:55:47 UTC (rev 252) +++ trunk/website/index.html 2007-04-26 20:11:09 UTC (rev 253) @@ -93,7 +93,7 @@ </ul> OSLib also provides names for all the data structures and reason codes used -by the A�P�I. Code that uses it is superior to similar code using _kernel_swi() +by the API. Code that uses it is superior to similar code using _kernel_swi() or _swix(), both in terms of the compile time type checking that is available, and the size and speed of the code generated. Modified: trunk/website/svn.html =================================================================== --- trunk/website/svn.html 2007-04-24 22:55:47 UTC (rev 252) +++ trunk/website/svn.html 2007-04-26 20:11:09 UTC (rev 253) @@ -73,7 +73,7 @@ <p>There is quite a lot of code, so it may take a little while on a slow link, but I'm sure you'll find it whorthwhile! A <code>!Readme</code> file in the -application directory !OsLib explains how to build OSLib under RISC OS or other +application directory !OSLib explains how to build OSLib under RISC OS or other GCCSDK supported host using the cross-compiler. You will need a C compiler, a Linker, a Make utility, and an ARM assembler in addition to the tools provided. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-24 22:55:51
|
Revision: 252 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=252&view=rev Author: jtytgat Date: 2007-04-24 15:55:47 -0700 (Tue, 24 Apr 2007) Log Message: ----------- Top makefile with first step at release targets and AOF vs ELF cross building Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Makefile branches/simplified-build/!OsLib/Source/Makefile.inc Added Paths: ----------- branches/simplified-build/!OsLib/Makefile branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF Removed Paths: ------------- branches/simplified-build/!OsLib/AMUmakefile branches/simplified-build/!OsLib/GNUmakefile branches/simplified-build/!OsLib/GNUmakefile.settings Deleted: branches/simplified-build/!OsLib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/AMUmakefile 2007-04-24 22:50:26 UTC (rev 251) +++ branches/simplified-build/!OsLib/AMUmakefile 2007-04-24 22:55:47 UTC (rev 252) @@ -1,112 +0,0 @@ -# Index: OSLib/!OsLib/MakeFile,fe1 20031230 -# -DIR = ${MAKEFILEDIR} -BIN = <OSLib$BinDir> -TOOLS = <OSLib$ToolsDir> -SOURCE = <OSLib$SourceDir> -SUPPORT = <OSLib$SupportDir> -HELP = <OSLib$HelpDir> -RELEASEDIR = <OSLib$HomeDir>.release - -ifndef APCS -$(error APCS mode is undefined) -endif - -#tools -RM = rm -nq -MAKE = amu -desktop -MD = cdir - -CP = copy -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -WIPEFLAGS = ~CF~R~V - -.PHONY: all release release_wide release_deep release_support release_help -.PHONY: clean distclean dist_wide dist_deep dist_support dist_help - -all: - ${MAKE} -f ${TOOLS}.AMUmakefile stage1 APCS=${APCS} - ${MAKE} -f ${SOURCE}.AMUmakefile oslib APCS=${APCS} - ${MAKE} -f ${SOURCE}.AMUmakefile test APCS=${APCS} - ${MAKE} -f ${SUPPORT}.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${TOOLS}.AMUmakefile stage2 APCS=${APCS} - ${MAKE} -f ${SOURCE}.AMUmakefile cstrong APCS=${APCS} - ${MAKE} -f ${DIR}.AMUmakefile release - -release: release_wide release_deep release_help release_support - -release_wide: - @${MD} ${RELEASEDIR} - @${MD} ${RELEASEDIR}.wide - ${CP} ${DIR}.docs.ChangeLog ${RELEASEDIR}.wide.* ${COPYFLAGS} - ${CP} ${DIR}.docs.Copying ${RELEASEDIR}.wide.* ${COPYFLAGS} - ${CP} ${DIR}.docs.OSLib_API ${RELEASEDIR}.wide.* ${COPYFLAGS} - ${CP} ${DIR}.docs.OSLib_readme ${RELEASEDIR}.wide.* ${COPYFLAGS} - ${CP} ${DIR}.docs.WideFuncts ${RELEASEDIR}.wide.* ${COPYFLAGS} - ${MAKE} -f ${SOURCE}.AMUmakefile release_widelib RELEASEDIR=${RELEASEDIR}.wide - -release_deep: - @${MD} ${RELEASEDIR} - @${MD} ${RELEASEDIR}.deep - ${CP} ${DIR}.docs.ChangeLog ${RELEASEDIR}.deep.* ${COPYFLAGS} - ${CP} ${DIR}.docs.Copying ${RELEASEDIR}.deep.* ${COPYFLAGS} - ${CP} ${DIR}.docs.OSLib_API ${RELEASEDIR}.deep.* ${COPYFLAGS} - ${CP} ${DIR}.docs.OSLib_readme ${RELEASEDIR}.deep.* ${COPYFLAGS} - ${CP} ${DIR}.docs.WideFuncts ${RELEASEDIR}.deep.* ${COPYFLAGS} - ${MAKE} -f ${SOURCE}.AMUmakefile release_deeplib RELEASEDIR=${RELEASEDIR}.deep - -release_support: - @${MD} ${RELEASEDIR} - ${MAKE} -f ${SUPPORT}.AMUmakefile release RELEASEDIR=${RELEASEDIR} - -release_help: - @${MD} ${RELEASEDIR} - ${MAKE} -f ${SOURCE}.AMUmakefile release_help RELEASEDIR=${RELEASEDIR} - -clean: - ${MAKE} -f ${SOURCE}.AMUmakefile clean - ${MAKE} -f ${SUPPORT}.AMUmakefile clean - ${MAKE} -f ${TOOLS}.AMUmakefile clean - -distclean: - ${MAKE} -f ${SOURCE}.AMUmakefile distclean - ${MAKE} -f ${SUPPORT}.AMUmakefile distclean - ${MAKE} -f ${TOOLS}.AMUmakefile distclean - ${RM} -r ${RELEASEDIR} - ${RM} -r zips - ${RM} -r ${BIN} - -dist: dist_wide dist_deep dist_help dist_support - -dist_wide: @.zips.OSLib_RO4/zip -@.zips.OSLib_RO4/zip: release_wide - ${MD} zips - ${RM} $@ - dir release.wide - GCCBin:zip -9r ${MAKEFILEDIR}.$@ * - back - -dist_deep: @.zips.OSLib/zip -@.zips.OSLib/zip: release_deep - ${MD} zips - ${RM} $@ - dir release.deep - GCCBin:zip -9r ${MAKEFILEDIR}.$@ * - back - -dist_support: @.zips.OSLibSupport/zip -@.zips.OSLibSupport/zip: release_support - ${MD} zips - ${RM} $@ - dir release.OSLibSupport - GCCBin:zip -9r ${MAKEFILEDIR}.$@ * - back - -dist_help: @.zips.OSLibHelp/zip -@.zips.OSLibHelp/zip: release_help - ${MD} zips - ${RM} $@ - dir release.help - GCCBin:zip -9rI ${MAKEFILEDIR}.$@ * - back Deleted: branches/simplified-build/!OsLib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/GNUmakefile 2007-04-24 22:50:26 UTC (rev 251) +++ branches/simplified-build/!OsLib/GNUmakefile 2007-04-24 22:55:47 UTC (rev 252) @@ -1,171 +0,0 @@ -# -# Makefile for OSLib for UNIX. -# - -include GNUmakefile.settings - -#------------------------------------------------------------------------ -#tools -CP = cp -p -RM = rm -fr - -#------------------------------------------------------------------------ -#macros - -ALL = Tools Source OSLibSupport - -#------------------------------------------------------------------------ -#targets - -.PHONY: ${ALL} tools oslib support cstrong clean distclean install release -.PHONY: release/wide release/deep release/unix release/help -.PHONY: release/OSLibSupport release/unix/OSLibSupport -.PHONY: dist/wide dist/deep dist/unix dist/help dist/OSLibSupport dist/examples -.PHONY: zips/wide zips/deep zips/unix zips/help zips/OSLibSupport zips/examples - -all: ${ALL} release - -tools: Tools -Tools: ;${MAKE} -C $@ - -oslib: Source -Source: Tools - ${MAKE} -C $@ - -support: OSLibSupport -OSLibSupport: Source - ${MAKE} -C $@ - -cstrong: ;${MAKE} -C Source cstrong - -clean: ;$(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) - -distclean: clean - ${RM} release Bin zips dist - -install: release/unix - ( cd release/unix/OSLib; ${GCCSDK_INSTALL_ENV}/ro-install OSLib32.o ${GCCSDK_INSTALL_ENV}/lib/libOSLib32.o ) - ( cd release/unix/OSLib; ${GCCSDK_INSTALL_ENV}/ro-install -d oslib ${GCCSDK_INSTALL_ENV}/include/oslib; cd oslib; ${GCCSDK_INSTALL_ENV}/ro-install *.h *.Hdr ${GCCSDK_INSTALL_ENV}/include/oslib ) - -release: release_wide \ - release_deep \ - release_unix \ - release_help \ - release_support \ - release_unix_support \ - release_examples - -release_wide : release/wide -release/wide: oslib - ${MAKE} -C Source/Computer/oslib release_wide RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Core/oslib release_wide RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Toolbox/oslib release_wide RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/User/oslib release_wide RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Types/oslib release_wide RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Macros/oslib release_wide RELEASEDIR=${CURDIR}/$@ - @if [ ! -d $@/OSLib/o ]; then mkdir -p $@/OSLib/o; fi - @${CP} docs/ChangeLog $@/ - @${CP} docs/Copying $@/ - @${CP} docs/OSLib_API $@/ - @${CP} docs/OSLib_readme $@/ - @${CP} docs/WideFuncts $@/ - @${CP} docs/Unix_Build $@/ - @${CP} Source/SetVarsRO4,feb $@/OSLib/SetVars,feb - @${CP} Source/OSLib.o $@/OSLib/o/OSLib,ffd - @${CP} Source/OSLib32.o $@/OSLib/o/OSLib32,ffd - -release_deep : release/deep -release/deep: oslib - ${MAKE} -C Source/Computer/oslib release_deep RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Core/oslib release_deep RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Toolbox/oslib release_deep RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/User/oslib release_deep RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Types/oslib release_deep RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Macros/oslib release_deep RELEASEDIR=${CURDIR}/$@ - @if [ ! -d $@/OSLib/o ]; then mkdir -p $@/OSLib/o; fi - @${CP} docs/ChangeLog $@/ - @${CP} docs/Copying $@/ - @${CP} docs/OSLib_API $@/ - @${CP} docs/OSLib_readme $@/ - @${CP} docs/WideFuncts $@/ - @${CP} docs/Unix_Build $@/ - @${CP} Source/SetVars,feb $@/OSLib/SetVars,feb - @${CP} Source/OSLib.o $@/OSLib/o/OSLib,ffd - @${CP} Source/OSLib32.o $@/OSLib/o/OSLib32,ffd - -release_unix : release/unix -release/unix: oslib - ${MAKE} -C Source/Computer/oslib release_unix RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Core/oslib release_unix RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Toolbox/oslib release_unix RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/User/oslib release_unix RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Types/oslib release_unix RELEASEDIR=${CURDIR}/$@ - ${MAKE} -C Source/Macros/oslib release_unix RELEASEDIR=${CURDIR}/$@ - @if [ ! -d $@/OSLib ]; then mkdir -p $@/OSLib; fi - @${CP} docs/ChangeLog $@/ - @${CP} docs/Copying $@/ - @${CP} docs/OSLib_API $@/ - @${CP} docs/OSLib_readme $@/ - @${CP} docs/WideFuncts $@/ - @${CP} docs/Unix_Build $@/ - @${CP} Source/SetVarsRO4,feb $@/OSLib/SetVars,feb - @${CP} Source/OSLib.o $@/OSLib/OSLib.o - @${CP} Source/OSLib32.o $@/OSLib/OSLib32.o - -release_unix_support: release/unix/OSLibSupport -release/unix/OSLibSupport: support - ${MAKE} -C OSLibSupport release_unix RELEASEDIR=${CURDIR}/$@ - -release_help: release/help -release/help: cstrong - @if [ ! -d $@ ]; then mkdir -p $@; fi - @${CP} Source/OSLib,3d6 $@/ - -release_support: release/OSLibSupport -release/OSLibSupport: ;${MAKE} -C OSLibSupport release RELEASEDIR=${CURDIR}/$@ - -release_examples: release/examples -release/examples: ;@if [ ! -d $@ ]; then mkdir -p $@; fi - @${CP} examples/*.c $@/ - @${CP} examples/!* $@/ - @${CP} examples/*makefile* $@/ - -dist: dist_wide dist_deep dist_unix dist_help dist_support dist_examples - -dist_wide: zips/wide -zips/wide: release/wide - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_wide.zip - cd release/wide; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_wide * - -dist_deep: zips/deep -zips/deep: release/deep - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_deep.zip - cd release/deep; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_deep * - -dist_unix: zips/unix -zips/unix: release/unix release_unix_support - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_unix.zip - cd release/unix; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_unix * - -dist_support: zips/OSLibSupport -zips/OSLibSupport: release/OSLibSupport - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_support.zip - cd release/OSLibSupport; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_support * - -dist_help: zips/help -zips/help: release/help - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_help.zip - cd release/help; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_help * - -dist_examples: zips/examples -zips/examples: release/examples - @if [ ! -d $@ ]; then mkdir -p $@; fi - ${RM} $@/OSLib_examples.zip - cd release/examples; ${GCCSDK_INSTALL_CROSSBIN}/zip -, -9r ${CURDIR}/$@/OSLib_examples * - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/GNUmakefile.settings =================================================================== --- branches/simplified-build/!OsLib/GNUmakefile.settings 2007-04-24 22:50:26 UTC (rev 251) +++ branches/simplified-build/!OsLib/GNUmakefile.settings 2007-04-24 22:55:47 UTC (rev 252) @@ -1,13 +0,0 @@ -# -# Makefile specifying the environment settings for all GNUmakefiles -# - -#------------------------------------------------------------------------ -# environment settings -GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin -GCCSDK_INSTALL_ENV ?= /home/riscos/env - -export GCCSDK_INSTALL_CROSSBIN -export GCCSDK_INSTALL_ENV - -#------------------------------------------------------------------------ Added: branches/simplified-build/!OsLib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Makefile 2007-04-24 22:55:47 UTC (rev 252) @@ -0,0 +1,40 @@ +# ... + +.PHONY: all clean install release oslib-aof oslib-aof-n-release oslib-elf oslib-elf-n-release cstrong cstrong-n-release Tools + +all: oslib-elf cstrong + +clean: + $(MAKE) -C Tools clean + $(MAKE) -C Source clean + +# Installs the ELF headers & library in GCCSDK environment. +install: oslib-elf + $(MAKE) -C Source install + +# Builds a full AOF and ELF based OSLib release: +release: oslib-aof-n-release oslib-elf-n-release cstrong-n-release + @echo Done. + +oslib-aof: Tools + $(MAKE) -C Source clean + $(MAKE) -C Source oslib BUILDTYPE=CROSSGCC_AOF + +oslib-aof-n-release: oslib-aof + $(MAKE) -C Source release-oslib BUILDTYPE=CROSSGCC_AOF + +oslib-elf: Tools + $(MAKE) -C Source clean + $(MAKE) -C Source oslib BUILDTYPE=CROSSGCC_ELF + +oslib-elf-n-release: oslib-elf + $(MAKE) -C Source release-oslib BUILDTYPE=CROSSGCC_ELF + +cstrong: Tools + $(MAKE) -C Source cstrong + +cstrong-n-release: cstrong + $(MAKE) -C Source release-cstrong + +Tools: + $(MAKE) -C $@ Modified: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile 2007-04-24 22:50:26 UTC (rev 251) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-24 22:55:47 UTC (rev 252) @@ -1,34 +1,35 @@ # ... -export SOURCEDIR := $(abspath .) -export BINDIR := $(SOURCEDIR)/../Bin -export BUILDDIR := $(SOURCEDIR)/Build +# Build type: CROSSGCC_AOF (default), CROSSGCC_ELF [NORCROFT_AOF: not supported yet] +BUILDTYPE ?= CROSSGCC_AOF -export HEADERDIR := $(BUILDDIR)/Header/oslib -export CSTRONGDIR := $(BUILDDIR)/CStrong -export OBJDIR := $(BUILDDIR)/Objs -export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions +include Makefile.setup.$(BUILDTYPE) -export BYTEWIDE := $(SOURCEDIR)/ByteWide -export DEFMOD := $(BINDIR)/defmod -export REDUCEAOF := $(BINDIR)/reduceaof -export BINDHELP := $(BINDIR)/bindhelp +.PHONY: all install release-oslib release-cstrong clean oslib cstrong BuildRequirements +all: oslib cstrong -export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) +# Only for GCCSDK cross-compilation install purposes: +install: oslib + cd $(BUILDDIR) && $(INSTALL) OSLib32.o $(GCCSDK_INSTALL_ENV)/lib/libOSLib32.o + cd $(HEADERDIR) && $(INSTALL) *.h *.Hdr $(GCCSDK_INSTALL_ENV)/include/oslib -export CC := gcc -export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -export LIBFILE := libfile -export MKDIR := mkdir -p -export RM := rm -rf -export CP := cp -r +# Zips the library & headers (Unix and RISC OS 'wide' distribution): +release-oslib: + -$(MKDIR) $(RELEASEDIR)/$(BUILDTYPE) + -$(RM) $(RELEASEDIR)/$(BUILDTYPE)/OSLib-unix.zip + cd $(HEADERDIR)/.. && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLib-unix.zip oslib + cd $(BUILDDIR) && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLib-unix.zip OSLib32.o + -$(RM) $(RELEASEDIR)/$(BUILDTYPE)/OSLib-wide.zip + -$(MKDIR) $(HEADERDIR)/h $(HEADERDIR)/Hdr $(HEADERDIR)/../o + cd $(HEADERDIR) && find . -type f -exec rename 's/(.+)\.(.+)/$$2\/$$1/' {} \; + $(CP) $(OSLIBLIB) $(HEADERDIR)/o/OSLib32 + cd $(HEADERDIR)/.. && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLib-wide.zip . -OSLIBLIB = $(BUILDDIR)/OSLib32.o -OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 +# Zips the StrongHelp file: +release-cstrong: + $(MKDIR) $(RELEASEDIR)/$(BUILDTYPE) + cd $(BUILDDIR) && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLibStrongHelp $(OSLIBCSTRONG) -.PHONY: all clean oslib cstrong BuildRequirements -all: oslib cstrong - clean: $(MAKE) -C Computer/oslib $@ $(MAKE) -C Core/oslib $@ @@ -46,7 +47,7 @@ $(MAKE) -C Toolbox/oslib oslib $(MAKE) -C Types/oslib oslib $(MAKE) -C User/oslib oslib - cd $(OBJDIR) && $(LIBFILE) -c $@ */*.o + cd $(OBJDIR) && $(LIBFILE) $@ */*.o cstrong: $(OSLIBCSTRONG) $(OSLIBCSTRONG): BuildRequirements Modified: branches/simplified-build/!OsLib/Source/Makefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-24 22:50:26 UTC (rev 251) +++ branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-24 22:55:47 UTC (rev 252) @@ -19,8 +19,7 @@ # Targets: oslib: $(ASMHEADERS) $(CHEADERS) $(SWIOBJS) $(ASMOBJS) $(CP) *.Hdr $(HEADERDIR) - echo $(wildcard *.h) - $(foreach hdr,$(wildcard *.h),$(eval $(shell $(CP) $(hdr) $(HEADERDIR)/$(call tolower,$(hdr))))) + $(foreach hdr,$(shell ls *.h),$(eval $(shell $(CP) $(hdr) $(HEADERDIR)/$(call tolower,$(hdr))))) if [ ! -z "$(SWIMODULES)" ]; then $(CP) $(patsubst %,l/%,$(SWIMODULES)) $(OBJDIR); fi if [ ! -z "$(ASMOBJS)" ]; then $(CP) $(ASMOBJS) $(OBJEXCEPTDIR); fi Added: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-24 22:55:47 UTC (rev 252) @@ -0,0 +1,36 @@ +# ... + +ifndef GCCSDK_INSTALL_CROSSBIN +$(error Environment variable GCCSDK_INSTALL_CROSSBIN is not defined) +endif +ifndef GCCSDK_INSTALL_ENV +$(error Environment variable GCCSDK_INSTALL_ENV is not defined) +endif + +export SOURCEDIR := $(abspath .) +export BINDIR := $(SOURCEDIR)/../Bin +export BUILDDIR := $(SOURCEDIR)/Build +export RELEASEDIR := $(SOURCEDIR)/../Release + +export HEADERDIR := $(BUILDDIR)/Header/oslib +export CSTRONGDIR := $(BUILDDIR)/CStrong +export OBJDIR := $(BUILDDIR)/Objs +export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions + +export BYTEWIDE := $(SOURCEDIR)/ByteWide +export DEFMOD := $(BINDIR)/defmod +export REDUCEAOF := $(BINDIR)/reduceaof +export BINDHELP := $(BINDIR)/bindhelp + +export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) + +export CC := gcc +export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export LIBFILE := libfile -c +export MKDIR := mkdir -p +export RM := rm -rf +export CP := cp -r +export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install + +OSLIBLIB = $(BUILDDIR)/OSLib32.o +OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 Added: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-24 22:55:47 UTC (rev 252) @@ -0,0 +1,36 @@ +# ... + +ifndef GCCSDK_INSTALL_CROSSBIN +$(error Environment variable GCCSDK_INSTALL_CROSSBIN is not defined) +endif +ifndef GCCSDK_INSTALL_ENV +$(error Environment variable GCCSDK_INSTALL_ENV is not defined) +endif + +export SOURCEDIR := $(abspath .) +export BINDIR := $(SOURCEDIR)/../Bin +export BUILDDIR := $(SOURCEDIR)/Build +export RELEASEDIR := $(SOURCEDIR)/../Release + +export HEADERDIR := $(BUILDDIR)/Header/oslib +export CSTRONGDIR := $(BUILDDIR)/CStrong +export OBJDIR := $(BUILDDIR)/Objs +export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions + +export BYTEWIDE := $(SOURCEDIR)/ByteWide +export DEFMOD := $(BINDIR)/defmod +export REDUCEAOF := $(BINDIR)/reduceaof +export BINDHELP := $(BINDIR)/bindhelp + +export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) + +export CC := arm-unknown-riscos-gcc +export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export LIBFILE := arm-unknown-riscos-ar -r +export MKDIR := mkdir -p +export RM := rm -rf +export CP := cp -r +export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install + +OSLIBLIB = $(BUILDDIR)/OSLib32.o +OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-24 22:50:28
|
Revision: 251 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=251&view=rev Author: jtytgat Date: 2007-04-24 15:50:26 -0700 (Tue, 24 Apr 2007) Log Message: ----------- First step in new Tools building Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c branches/simplified-build/!OsLib/Tools/oslib/unix/osfile.c Added Paths: ----------- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c branches/simplified-build/!OsLib/Tools/DefMod2/Makefile branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c branches/simplified-build/!OsLib/Tools/DefMod2/cheader.h branches/simplified-build/!OsLib/Tools/DefMod2/chelp.c branches/simplified-build/!OsLib/Tools/DefMod2/chelp.h branches/simplified-build/!OsLib/Tools/DefMod2/cstrong.c branches/simplified-build/!OsLib/Tools/DefMod2/cstrong.h branches/simplified-build/!OsLib/Tools/DefMod2/def.c branches/simplified-build/!OsLib/Tools/DefMod2/def.h branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h branches/simplified-build/!OsLib/Tools/DefMod2/main.h branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h branches/simplified-build/!OsLib/Tools/DefMod2/oslibsupport.c branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile branches/simplified-build/!OsLib/Tools/IndexHelp/oslibsupport.c branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile branches/simplified-build/!OsLib/Tools/IndexHelp/AMUmakefile branches/simplified-build/!OsLib/Tools/IndexHelp/GNUmakefile branches/simplified-build/!OsLib/Tools/ReduceAOF/AMUmakefile branches/simplified-build/!OsLib/Tools/ReduceAOF/GNUmakefile Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 2007-04-24 22:50:26 UTC (rev 251) @@ -1,5 +0,0 @@ -Echo <Sys$Time> Releasing <Obey$Dir> ... -WIMPSlot -min 1024K -max 1024K -if "<C$MODE>" = "32" then Do AMU -f <Obey$Dir>.Makefile -desktop -D release APCS=32 OSLIB=32 -if "<C$MODE>"<> "32" then Do AMU -f <Obey$Dir>.Makefile -desktop -D release APCS=26 -Echo <Sys$Time> Done. Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,17 +0,0 @@ -# -# Makefile for BindHelp under RISC OS. -# -#------------------------------------------------------------------------ -#target-specific macros - -TARGET = BindHelp -ALL = ${TARGET} -VPATH = -INCLUDES = OSLibSupport: OSLib: C: -DEFINES = -LIBS = OSLibSupport:o.${SUPPORT} OSLib:o.${OSLib} C:o.Stubs - -MODULES = ${TARGET} - -# all the general rules are in ^.AMUmakefile/source -include ${MAKEFILEDIR}.^.AMUmakefile/source Modified: branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c 2007-04-24 22:50:26 UTC (rev 251) @@ -105,18 +105,18 @@ #define DATA 0x41544144u #define HELP 0x504c4548u -#define ERRNO(x) ( 1<<30 | x ) +#define ERRNO(x) ( (1<<30) | x ) -#define FREE(x) x_FREE( ( x ) ); \ - ( x ) = 0 +#define FREE(x) do { x_FREE( x ); \ + ( x ) = 0; } while (0) #define RO_DIR_SEP "." #define UNIX_DIR_SEP "/" #ifdef EXECUTE_ON_UNIX - #define DIR_SEP UNIX_DIR_SEP +# define DIR_SEP UNIX_DIR_SEP #else - #define DIR_SEP RO_DIR_SEP +# define DIR_SEP RO_DIR_SEP #endif /* data structures */ @@ -827,7 +827,7 @@ "#Wrap Off\n" "#Align Centre\n" "OSLib by {*}Jonathan Coxhead{*}\n" - "Copyright \xA9 Jonathan Coxhead and OSLib Maintainers " + "Copyright � Jonathan Coxhead and OSLib Maintainers " "1995 - %s\n" "StrongHelp Manual created %s by BindHelp\n" "<http://ro-oslib.sourceforge.net=>#url>\n" @@ -1078,7 +1078,7 @@ if( verbose ) { - fprintf( stdout, "BindHelp " VERSION " "__DATE__ " \xA9 Tony van der Hoff\n" ); + fprintf( stdout, "BindHelp " VERSION " "__DATE__ " � Tony van der Hoff\n" ); #if USE_STRONGHELP fprintf( stdout, "Using StrongHelp calls\n" ); #endif Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,18 +0,0 @@ -# -# Makefile for BindHelp for UNIX. -# -#------------------------------------------------------------------------ -#target-specific macros - -TARGET = BindHelp -MODULES = ${TARGET} os osgbpb osfile osargs osfind x kernel unix -INCLUDES = -I.. -I../support -DEFINES = -DUNIX -DEXECUTE_ON_UNIX -D__swi -VPATH = ../support ../oslib/unix - -# additional modules required if tracing -TRACEMODULES = trace m - - -# all the general rules are in ../GNUmakefile.source -include ../GNUmakefile.source Added: branches/simplified-build/!OsLib/Tools/BindHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,40 @@ +# Targets: all install clean +# Using: CC CFLAGS LD LDFLAGS RM INSTALL INSTALL_PROGRAM bindir + +.PHONY: all install clean +OBJS = \ + BindHelp.o \ + oslibsupport.o + +# In case they are not defined, use default values. +CC ?= /usr/bin/gcc +CFLAGS ?= -g -DUNIX -DEXECUTE_ON_UNIX -D__swi +LD ?= /usr/bin/gcc +LDFLAGS ?= +RM ?= rm +INSTALL ?= cp +INSTALL_PROGRAM ?= $(INSTALL) +bindir ?= ../../Bin + +# No user options from here on: +ALL_CFLAGS = -Wall -funsigned-char -I.. -I../support $(CFLAGS) +ALL_LDFLAGS = $(LDFLAGS) + +TARGET = bindhelp + +all: $(TARGET) + +install: $(TARGET) + $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) + +clean: + -$(RM) $(TARGET) *.o + +$(TARGET): $(OBJS) + $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) + +# Rules: +.SUFFIXES: +.SUFFIXES: .o .c + +.c.o: ;$(CC) $(ALL_CFLAGS) -o $@ -c $< Added: branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,12 @@ +/* Pull in the sources from Tools/support we need here. */ +#include "kernel.c" +#include "lookup.c" +#include "x.c" +#ifdef EXECUTE_ON_UNIX +# include "oslib/unix/os.c" +# include "oslib/unix/osargs.c" +# include "oslib/unix/osfile.c" +# include "oslib/unix/osfind.c" +# include "oslib/unix/osgbpb.c" +# include "unix.c" +#endif Deleted: branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,15 +0,0 @@ -# -# AMUmakefile for defmod under RISC OS -# -MAKE = amu -desktop - -#------------------------------------------------------------------------ -#targets -.PHONY: all clean distclean tree - -all: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile all APCS=${APCS} -clean: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile clean -distclean: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile distclean -tree: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile tree - - Deleted: branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,13 +0,0 @@ -# -# Makefile for defmod for UNIX. -# - -#------------------------------------------------------------------------ -#targets -.PHONY: all clean - -all: ;${MAKE} -C defmod/Build_GNU all -clean: ;${MAKE} -C defmod/Build_GNU clean - - - Added: branches/simplified-build/!OsLib/Tools/DefMod2/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,55 @@ +# Targets: all install clean +# Using: CC CFLAGS LD LDFLAGS YACC YFLAGS RM INSTALL INSTALL_PROGRAM bindir + +# Which assembler DefMod should use (set this using CFLAGS): +# USE_GCC for GCCSDK +# USE_ARMASM for PACE/solaris +# USE_OBJASM for RISC OS native build using Norcroft + +.PHONY: all install clean +OBJS = \ + asmhelp.o \ + cheader.o \ + chelp.o \ + cstrong.o \ + def.o \ + defmod.o \ + hdr.o \ + objasm.o \ + oslibsupport.o + +# In case they are not defined, use default values. +CC ?= /usr/bin/gcc +CFLAGS ?= -g -DUSE_GCC -DUNIX -DEXECUTE_ON_UNIX -D__swi +LD ?= /usr/bin/gcc +LDFLAGS ?= +YACC ?= bison +YFLAGS ?= +RM ?= rm +INSTALL ?= cp +INSTALL_PROGRAM ?= $(INSTALL) +bindir ?= ../../Bin + +# No user options from here on: +ALL_CFLAGS = -Wall -funsigned-char -I.. -I../support $(CFLAGS) +ALL_LDFLAGS = $(LDFLAGS) + +TARGET = defmod + +all: $(TARGET) + +install: $(TARGET) + $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) + +clean: + -$(RM) $(TARGET) *.o defmod.c + +$(TARGET): $(OBJS) + $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) + +# Rules: +.SUFFIXES: +.SUFFIXES: .o .c .y + +.c.o: ;$(CC) $(ALL_CFLAGS) -o $@ -c $< +.y.c: ;$(YACC) -y -o $@ $< Copied: branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/asmhelp.c) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,128 @@ +/*asmhelp.c - output a help file given a module defn*/ + +/*OSLib---efficient, type-safe, transparent, extensible,\n" + register-safe A P I coverage of RISC O S*/ +/*Copyright \xA9 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +#include <ctype.h> +#include <stdio.h> +#include <string.h> +#include <kernel.h> /* TV 980115 */ + +#include "oslib/os.h" + +#include "lookup.h" + +#include "def.h" +#include "asmhelp.h" + +os_error *asmhelp_output +( + FILE *file, + char *title, + char *author, + lookup_t needses, + lookup_t needsatends, + lookup_t consts, + lookup_t types, + lookup_t swis +) +{ + os_error *error = NULL; + int rc = 0; + char *cnst, *type, *swi; + def_c c; + def_t t; + def_s s; + void *context; + + NOT_USED (author) + NOT_USED (needses) + NOT_USED (needsatends) + + /*Emit the CONST declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, &context)) + != NULL) + goto finish; + + if (context == 0) break; + + if ((rc = fprintf + ( file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a constant value\n\n", + cnst, title)) < 0) + goto finish; + } + + /*Emit the TYPE declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, &context)) + != NULL) + goto finish; + + if (context == 0) break; + + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s.h\n" + "Symbol for the size of a data structure\n\n", + type, title)) < 0) + goto finish; + } + + /*Emit the SWI declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) != + NULL) + goto finish; + + if (context == 0) break; + + if (s->starred_swi) + { + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a SWI number\n\n", + swi, title)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a SWI reason code\n\n", + swi, title)) < 0) + goto finish; + } } + +finish: + if (rc < 0) error = (os_error*)_kernel_last_oserror (); /* TV 980115 */ + return error; +} Copied: branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/asmhelp.h) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,19 @@ +/*asmhelp.h - output an help file given a module defn*/ +#ifndef asmhelp_H +#define asmhelp_H + +#include <stdio.h> + +#ifndef os_H + #include "oslib/os.h" +#endif + +/* from support */ +#ifndef lookup_H + #include "lookup.h" +#endif + +extern os_error *asmhelp_output (FILE *, char *title, char *author, + lookup_t, lookup_t, lookup_t, lookup_t, lookup_t); + +#endif Copied: branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/cheader.c) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,1710 @@ +/*cheader.c - output a cheader file given a module defn*/ + +/*OSLib---efficient, type-safe, transparent, extensible,\n" + register-safe A P I coverage of RISC O S*/ +/*Copyright � 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +#include <ctype.h> +#include <stdio.h> +#include <string.h> +#include <time.h> +#include <kernel.h> /* TV 980115 */ + +#include "oslib/os.h" +#include "oslib/types.h" +#include "oslib/macros.h" + +#include "lookup.h" + +#include "def.h" +#include "cheader.h" + +static int strsplen +( + char *s +) +{ + char *p = s; + + while (*p != '\0' && *p != ' ') p++; + + return p - s; +} +/*-----------------------------------------------------------------------*/ + +static char *Op +( + def_op op +) +{ + switch (op) + { + case def_OP_DISJOINS: + return "|="; + break; + + case def_OP_CONJOINS: + return "&="; + break; + + case def_OP_ADDS: + return "+="; + break; + + case def_OP_EXCLUSIVELY_DISJOINS: + return "^="; + break; + } + + return SKIP; +} +/*-----------------------------------------------------------------------*/ + +/*Prints a declaration of |v| as an object of type |t|, using |tag| as the + structure tag. If |var|, emit 'N' instead of 'UNKNOWN' and escape + newlines.*/ + +static int Print_Decl +( + FILE *file, + def_t t, + char *tag, + char *v, + osbool var, + int nest +) +{ + int rc = 0; + + switch (t->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, v == NULL? "int": "int %s", v)) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, v == NULL? "short": "short %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, v == NULL? "byte": "byte %s", v)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if ((rc = fprintf (file, v == NULL? "char": "char %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, v == NULL? "bits": "bits %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, v == NULL? "bytes": "bytes %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, v == NULL? "osbool": "osbool %s", v)) < 0) + goto finish; + break; + + case def_TYPE_REF: + { + char v1 [def_ID_LIMIT + 1]; + + if (v == NULL || v [0] == '/') + { + if (v != NULL) + { + if ((rc = sprintf (v1, "*%s", v)) < 0) + goto finish; + } + else + { + if ((rc = sprintf (v1, "*")) < 0) + goto finish; + } + } + else + { + if ((rc = sprintf (v1, "*%s", v)) < 0) /*was (%s) 2nd Mar + 1994*/ + goto finish; + } + + if ((rc = Print_Decl (file, t->data AS ref, NULL, v1, var, + nest + 1)) < 0) + goto finish; + } + break; + + case def_TYPE_STRING: + if ((rc = fprintf (file, "char %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_ASM: + if ((rc = fprintf (file, "void %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_DATA: + if ((rc = fprintf (file, "byte %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_STRUCT: + case def_TYPE_UNION: + { + int i; + + if + ( ( rc = + tag != NULL? + fprintf + ( + file, + "%s %s%s\n%*s{ ", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union": "list", + var? " \\": "", + tag, + 3*(nest + 1), "" + ): + fprintf + ( + file, + "%s%s\n%*s{ ", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union": "list", + var? " \\": "", + 3*(nest + 1), "" + ) + ) + < 0 + ) + goto finish; + + // variable-size data structure ending in ellipsis + if (t->tag == def_TYPE_STRUCT && t->data AS list.base) + { + char base [def_ID_LIMIT + 1]; + def_as_macro (base, t->data AS list.base->data AS id); + if ((rc = fprintf (file, "%s_MEMBERS%s\n%*s ", + base, var? " \\": "", 3*(nest + 1), "")) < 0) + goto finish; + } + for (i = 0; i < t->data AS list.count; i++) + { + if (i == t->data AS list.count - 1 && + t->tag == def_TYPE_STRUCT && + t->data AS list.ellipsis) + { + char v1 [def_ID_LIMIT + 1]; + + if ((rc = sprintf (v1, t->data AS list.members [i]->name [0] + == '*'? "(%s) [%s]": "%s [%s]", + t->data AS list.members [i]->name, + !var? "UNKNOWN": "N")) < 0) + goto finish; + + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, v1, var, nest + 1)) < 0) + goto finish; + } + else + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, var, + nest + 1)) < 0) + goto finish; + + if ((rc = fprintf (file, ";%s\n%*s", var? " \\": "", + 3*(nest + 1), "")) < 0) + goto finish; + + if (i != t->data AS list.count - 1) + if ((rc = fprintf (file, " ")) < 0) + goto finish; + } + + if (v != NULL) + { + if ((rc = fprintf (file, "}%s\n%*s%s", var? " \\": "", + 3*(nest + 1), "", v)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "}")) < 0) + goto finish; + } + } + break; + + case def_TYPE_ROW: + { + char v1 [def_ID_LIMIT + 1], v2 [MAX (DEC_WIDTH + 1, 8)]; + + if (t->data AS row.count == 1) + strcpy (v2, "UNKNOWN"); + else + if ((rc = sprintf (v2, "%d", t->data AS row.count)) < 0) + goto finish; + + if (v == NULL || v [0] == '/') + { + if (v != NULL) + { + if ((rc = sprintf (v1, "%s [%s]", v, v2)) < 0) + goto finish; + } + else + { + if ((rc = sprintf (v1, "[%s]", v2)) < 0) + goto finish; + } + } + else + { + if ((rc = sprintf (v1, v [0] == '*'? "(%s) [%s]": "%s [%s]", + v, v2)) < 0) + goto finish; + } + + if ((rc = Print_Decl (file, t->data AS row.base, NULL, v1, var, + nest + 1)) < 0) + goto finish; + } + break; + + case def_TYPE_VOID: + if ((rc = fprintf (file, v == NULL? "void": "void %s", v)) < 0) + goto finish; + break; + + case def_TYPE_ID: + { + char c_name [def_ID_LIMIT + 1]; + + def_as_extern (c_name, t->data AS id); + + if ((rc = fprintf (file, v == NULL? "%s": "%s %s", c_name, v)) < + 0) + goto finish; + } + break; + + default: + break; + } + +finish: + return rc; +} +/*-----------------------------------------------------------------------*/ +os_error *cheader_output +( + FILE *file, + char *title, + char *author, + lookup_t needses, + lookup_t needsatends, + lookup_t consts, + lookup_t types, + lookup_t swis, + osbool c_plus_plus +) +{ + os_error *error = NULL; + char *needs, *needsatend, *cnst, *type, *swi, *comment; + def_c c; + def_t t; + def_s s; + char c_name [def_ID_LIMIT + 1]; + void *context; + int i, rc = 0; + time_t now; + osbool start; + + comment = !c_plus_plus? " *": "//"; + + /*Emit the TITLE and AUTHOR declarations.*/ + def_as_extern (c_name, title); + if (!c_plus_plus) + { + if + ( + ( rc = + fprintf + ( + file, + "#ifndef %s_H\n" + "#define %s_H\n\n" + "/* C header file for %s\n" + " * written by DefMod (%s) on %s" + " * %s\n" + " */\n\n", + c_name, + c_name, + title, + __DATE__, + ctime ((time (&now), &now)), + author + ) + ) + < 0 + ) + goto finish; + } + else // c_plus_plus + { + if + ( + ( + rc = + fprintf + ( + file, + "#ifndef %s_H\n" + "#define %s_H\n\n" + "// C++ header file for %s\n" + "// written by DefMod (%s) on %s" + "// %s\n\n", + c_name, + c_name, + title, + __DATE__, + ctime ((time (&now), &now)), + author + ) + ) + < 0 + ) + goto finish; + } + + /*Emit the G P L.*/ + if ((rc = fprintf (file, + "/*OSLib---efficient, type-safe, transparent, extensible,\n" + " register-safe A P I coverage of RISC O S*/\n" + "/*Copyright � 1994 Jonathan Coxhead*/\n" + "\n" + "/*\n" + " OSLib is free software; you can redistribute it and/or modify\n" + " it under the terms of the GNU General Public License as published by\n" + " the Free Software Foundation; either version 1, or (at your option)\n" + " any later version.\n" + "\n" + " OSLib is distributed in the hope that it will be useful,\n" + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " GNU General Public License for more details.\n" + "\n" + " You should have received a copy of the GNU General Public License\n" + " along with this programme; if not, write to the Free Software\n" + " Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A.\n" + "*/\n" + "\n")) < 0) + goto finish; + + /*Make sure we have "types.h".*/ + if ((rc = fprintf (file, + "#ifndef types_H\n" + "#include \"oslib/types.h\"\n" /*no spaces for GCC etc. 30th Jan 1995*/ + /* OsLib path: 4 May 2000 */ + /* oslib subdirectory TV 20000930 */ + "#endif\n\n")) < 0) + goto finish; + +#if 0 /* not everything needs os.h */ + /*Make sure we have "os.h".*/ + if ((rc = fprintf (file, + "#ifndef os_H\n" + "#include \"oslib/os.h\"\n" + "#endif\n\n")) < 0) + goto finish; +#endif + + /*Emit the NEEDS declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (needses, &needs, NULL, &context)) != + NULL) + goto finish; + + if (context == 0) break; + + def_as_extern (c_name, needs); + if ((rc = fprintf (file, + "#ifndef %s_H\n" + "#include \"oslib/%s.h\"\n" /*no spaces for GCC etc. 30th Jan 1995*/ + /* OsLib path: 4 May 2000 */ + /* oslib subdirectory TV 20000930 */ + "#endif\n\n", + c_name, c_name)) < 0) + goto finish; + } + + /* Emit the C++ namespace declaration */ + /* TV 20000529 */ + if ( + ( rc = fprintf( file, + "#if defined NAMESPACE_OSLIB\n" + " namespace OSLib {\n" + "#endif\n\n" + ) + ) < 0 + ) + goto finish; + + /*Emit the constant declarations derived from the starred-swi parts.*/ + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (s->starred_swi) + { + if (start) + { if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/**********************************\n" + " * SWI names and SWI reason codes *\n" + " **********************************/\n")) + < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// **********************************\n" + "// * SWI names and SWI reason codes *\n" + "// **********************************\n")) < + 0) + goto finish; + } + start = FALSE; + } + + if ((rc = fprintf (file, "#undef %s\n#define %-39s 0x%X\n", swi, + swi, s->swi)) < 0 || + (rc = fprintf (file, "#undef X%s\n#define X%-38s 0x%X\n", + swi, swi, s->swi | 1 << 17)) < 0) + goto finish; + } + else + for (i = 0; i < 10; i++) + if (s->starred_constants [i]) + { + if (start) + { + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/**********************************\n" + " * SWI names and SWI reason codes *\n" + " **********************************/\n")) + < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// **********************************\n" + "// * SWI names and SWI reason codes *\n" + "// **********************************\n")) < + 0) + goto finish; + } + start = FALSE; + } + + if ((rc = fprintf (file, "#undef %s\n#define %-39s 0x%X\n", + swi, swi, s->constants [i])) < 0) + goto finish; + break; + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + + /*Emit the TYPE declarations. First, do |struct| forward references, so + that we can refer to these things before they are defined fully.*/ + if (!c_plus_plus) + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (t == NULL || t->tag == def_TYPE_STRUCT || + t->tag == def_TYPE_UNION || t->tag == def_TYPE_ABSTRACT) + { + if (start) + { + if ((rc = fprintf (file, + "/************************************\n" + " * Structure and union declarations *\n" + " ************************************/\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_extern (c_name, type); + + if (t == NULL || t->tag == def_TYPE_ABSTRACT) + /* typedef abstract struct */ + { + char c_name_ [def_ID_LIMIT + 1]; + + sprintf (c_name_, "%s_", c_name); + + if ((rc = fprintf (file, "typedef struct %-32s *%s;\n", + c_name_, c_name)) < 0) + goto finish; + + if (t != NULL && t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + } + else // typdef struct, union, or list + { + if ((rc = fprintf (file, "typedef %s %-32s %s;\n", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union ": "list", + c_name, c_name)) < 0) + goto finish; + + if ( t -> tag == def_TYPE_STRUCT + && t -> data AS list.ellipsis + ) + { + def_as_extern (c_name, type); + strcat( c_name, "_base" ); + + if ( ( rc = fprintf( file, + "typedef %s %-32s %s;\n", + t->tag == def_TYPE_STRUCT? + "struct": + t->tag == def_TYPE_UNION? + "union ": + "list", + c_name, + c_name + ) + ) < 0 + ) + goto finish; + } + } + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else /* c_plus_plus */ + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (t == NULL || t->tag == def_TYPE_STRUCT || + t->tag == def_TYPE_UNION || t->tag == def_TYPE_ABSTRACT) + { + if (start) + { + if ((rc = fprintf (file, + "// ************************************\n" + "// * Structure and union declarations *\n" + "// ************************************\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_extern (c_name, type); + + if (t == NULL || t->tag == def_TYPE_ABSTRACT) + { + if ((rc = fprintf (file, "typedef struct %s_ *%s;\n", + c_name, c_name)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "%s %s;\n", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union ": "list", + c_name)) < 0) + goto finish; + } + + if (t != NULL && t->tag == def_TYPE_ABSTRACT && + t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } /* end c_plus_plus */ + + /* Emit non-abstract Type definitions */ + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (!(t == NULL || t->tag == def_TYPE_ABSTRACT)) + /* valid type definition */ + { + if (start) /* header */ + { + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/********************\n" + " * Type definitions *\n" + " ********************/\n")) < 0) + goto finish; + } + else /* c_plus_plus */ + { + if ((rc = fprintf (file, + "// ********************\n" + "// * Type definitions *\n" + "// ********************\n")) < 0) + goto finish; + } /* end c_plus_plus */ + start = FALSE; + } /* end header */ + + if (t->tag == def_TYPE_STRUCT || t->tag == def_TYPE_UNION) + /* structure or union definition */ + { + def_as_extern (c_name, type); + + if (t->description != NULL) + { + /*Start the description part.*/ + osbool first; + + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/* -----------------------------------" + "-------------------------------------\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// -----------------------------------" + "-------------------------------------\n")) < 0) + goto finish; + } + + if ((rc = fprintf (file, + "%s Type: %s\n" + "%s\n" + "%s Description: %s\n", + comment, c_name, + comment, + comment, t->description)) < 0) + goto finish; + + first = TRUE; + for (i = 0; i < t->data AS list.count; i++) + if (t->data AS list.members [i]->description != NULL) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, "%s %-14s %s - %s\n", + comment, first? "Fields:": "", + t->data AS list.members [i]->name, + t->data AS list.members [i]->description)) + < 0) + goto finish; + + first = FALSE; + } + + /*Finish it off.*/ + if (!c_plus_plus) + { + if ((rc = fprintf (file, " */\n\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + } /* End Description */ + + if (t->tag == def_TYPE_STRUCT && t->data AS list.ellipsis && + t->data AS list.count > 1) + /* variable-size structure definition containing ellipsis */ + { + char macro_name [def_ID_LIMIT + 1]; + int i; + + // create the macro name + def_as_macro (macro_name, type); + + /* start the macro definition line */ + if ((rc = fprintf (file, "#define %s_MEMBERS", + macro_name)) < 0) + goto finish; + + if (t->data AS list.base) + { + /* the macro is based upon another macro */ + char base [def_ID_LIMIT + 1]; + def_as_macro (base, t->data AS list.base->data AS id); + if ((rc = fprintf (file, " \\\n %s_MEMBERS", base)) < 0) + goto finish; + } + + /* write each structure member to the macro */ + for (i = 0; i < t->data AS list.count - 1; i++) + { + if ((rc = fprintf (file, " \\\n ")) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, ";")) < 0) + goto finish; + } + + /* emit a definition of the base structure (TV 20001021) */ + if ( (rc = fprintf( file, + "\n\n/* Base %s structure without variable part */" + "\nstruct %s_base\n { %s_MEMBERS\n };", + c_name, c_name, macro_name + ) + ) < 0 + ) + goto finish; + + /* emit a structure definition consisting of the macro + ** followed by an UNKNOWN array of the repeated member */ + if ((rc = fprintf (file, + "\n\n/* legacy structure */" + "\nstruct %s\n { %s_MEMBERS\n ", + c_name, macro_name)) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, " [UNKNOWN];\n }")) < 0) + goto finish; + + } /* end variable-size structure definition */ + else + if ((rc = Print_Decl (file, t, c_name, NULL, FALSE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, ";\n\n")) < 0) + goto finish; + + /*Emit a macro to define a type of arbitrarily many of the + repeating field, iff the repeating field is of fixed width + (i e, def_VALUE_REGISTER or def_VALUE_FIXED).*/ + if (t->tag == def_TYPE_STRUCT && t->data AS list.ellipsis && + t->data AS list.members + [t->data AS list.count - 1]->value != def_VALUE_VARIABLE) + { + char macro_name [def_ID_LIMIT + 1]; + int i = t->data AS list.count - 1; + char *suffix; + + def_as_macro (macro_name, type); + + if ((rc = fprintf (file, "#define %s(N) \\\n ", + macro_name)) < 0) + goto finish; + + if ((rc = fprintf (file, "struct \\\n { ")) < 0) + goto finish; + if (t->data AS list.count > 1) + if ((rc = fprintf (file, "%s_MEMBERS \\\n ", + macro_name)) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, " [N]; \\\n }")) < 0) + goto finish; + + if ((rc = fprintf (file, "\n\n")) < 0) + goto finish; + + /*Also emit a macro to calculate the size of such a type.*/ + if ((suffix = strchr (macro_name, '_')) != NULL) + { + if ((rc = fprintf (file, + "#define %.*s_SIZEOF%s(N) \\\n (", + (int)(suffix - macro_name), macro_name, suffix)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "#define %s_SIZEOF(N) (", + macro_name)) < 0) + goto finish; + } + + /*This calculates an offset (using |offsetof|).*/ + if ((i = t->data AS list.count) > 1) + { + if ((rc = fprintf (file, + "offsetof (%s, %s) + \\\n" + " (N)*sizeof ((%s *) NULL)->%s", + c_name, t->data AS list.members [i - 1]->name, + c_name, t->data AS list.members [i - 1]->name)) < + 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "(N)*sizeof ((%s *) NULL)->%s", + c_name, t->data AS list.members [0]->name)) < 0) + goto finish; + } + + if ((rc = fprintf (file, ")\n\n")) < 0) + goto finish; + } + } + else + { + def_as_extern (c_name, type); + + if ((rc = fprintf (file, "typedef ")) < 0) + goto finish; + + if ((rc = Print_Decl (file, t, NULL, c_name, FALSE, 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ";\n")) < 0) + goto finish; + + if (t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + } /* end valid type definition */ + } + + /*Emit the CONST declarations.*/ + if (!c_plus_plus) + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (start) + { + if ((rc = fprintf (file, + "/************************\n" + " * Constant definitions *\n" + " ************************/\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_macro (c_name, cnst); + if ((rc = fprintf (file, "#define %-39s ", c_name)) < 0) + goto finish; + + switch (c->type->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, "%s%d%s", c->value < 0? "(": "", + c->value, c->value < 0? ")": "")) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, "((short) %d)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, "((byte) %d)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if (isprint (c->value)) + { + if ((rc = fprintf (file, "((char) '%c')", c->value)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "((char) '\\x%.2X')", c->value)) + < 0) + goto finish; + } + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, "((bytes) 0x%Xu)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, "%s", WHETHER (c->value))) < 0) + goto finish; + break; + + default: + if ((rc = fprintf (file, "((")) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, NULL, FALSE, + 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ") 0x%Xu)", c->value)) < 0) + /*was %d in either case 19th Apr 1995*/ + goto finish; + break; + } + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + + if (c->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + c->description)) < 0) + goto finish; + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else + { + start = TRUE; + context = 0; + while (TRUE) + { + char v [def_ID_LIMIT + 1]; + + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (start) + { + if ((rc = fprintf (file, + "// ************************\n" + "// * Constant definitions *\n" + "// ************************\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_macro (c_name, cnst); + if ((rc = sprintf (v, "const %s", c_name)) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, v, FALSE, 0)) < 0) + goto finish; + + if ((rc = fprintf (file, " = ")) < 0) + goto finish; + + switch (c->type->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if (isprint (c->value)) + { + if ((rc = fprintf (file, "'%c'", c->value)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "'\\x%.2X'", c->value)) < 0) + goto finish; + } + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, "%s", WHETHER (c->value))) < 0) + goto finish; + break; + + default: + if ((rc = fprintf (file, "(")) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, NULL, FALSE, + 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ") %d", c->value)) < 0) + goto finish; + break; + } + + if ((rc = fprintf (file, ";\n")) < 0) + goto finish; + + if (c->description != NULL) + if ((rc = fprintf (file, " //%s\n", + c->description)) < 0) + goto finish; + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + + /*Emit the SWI declarations.*/ + start = TRUE; + context = 0; + while (TRUE) + { + osbool nonx, first; + + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (!s->absent) + { + int result = s->value != NONE? def_bit_index (s->value, 0): -1; + /*number of register returned as result*/ + + if (start) + { + if (!c_plus_plus) + { if ((rc = fprintf (file, + "/*************************\n" + " * Function declarations *\n" + " *************************/\n\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// *************************\n" + "// * Function declarations *\n" + "// *************************\n" + "\n")) < 0) + goto finish; + } + + /*Allow this C header file to be used from C++.*/ + if (!c_plus_plus) + if ((rc = fprintf (file, + "#ifdef __cplusplus\n extern \"C\" {\n#endif\n\n")) + < 0) + goto finish; + + start = FALSE; + } + + def_as_extern (c_name, swi); + + /*Start the description part.*/ + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/* -----------------------------------" + "-------------------------------------\n" + " * Function: %s()\n" + " *\n", c_name)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// -----------------------------------" + "-------------------------------------\n" + "// Function: %s()\n" + "//\n", c_name)) < 0) + goto finish; + } + + if (s->description != NULL && strlen (s->description) != 0) + { + int L, col; + char *p = s->description; + + L = strsplen (p); + + if ((rc = fprintf (file, "%s %-14s", comment, + "Description:")) < 0) + goto finish; + col = 17; + + do + { + if ((rc = fprintf (file, " %.*s", L, p)) < 0) + goto finish; + col += L + 1, p += L; /*p -> null or space*/ + + if (*p == ' ') + { + p++; /*p -> next word to print, and there is one*/ + L = strsplen (p); + if (col + 1 + L > 75) + { + if ((rc = fprintf (file, "\n%s ", + comment)) < 0) + goto finish; + col = 17; + } + } + } + while (*p != '\0'); + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else if (s->starred_swi) + { + if ((rc = fprintf (file, "%s %-14s Calls SWI 0x%X\n", + comment, "Description:", s->swi)) < 0) + goto finish; + } + else + for (i = 0; i < 10; i++) + if (s->starred_constants [i]) + { + if ((rc = fprintf (file, + "%s %-14s Calls reason code %d of SWI 0x%X\n", + comment, "Description:", s->constants [i], + s->swi)) < 0) + goto finish; + break; + } + + if (!def_using_block (s)) + { + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->i & 1 << i) != NONE) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if (s->inputs [i]->description != NULL) + { + if ((rc = fprintf (file, "%s %-14s %s - %s\n", + comment, first? "Input:": "", + s->inputs [i]->name, + s->inputs [i]->description)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%s %-14s %s - value of R%d on entry\n", + comment, first? "Input:": "", + s->inputs [i]->name, i)) < 0) + goto finish; + } + + first = FALSE; + } + + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->o & 1 << i) != NONE) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if (s->outputs [i]->description != NULL) + { + if ((rc = fprintf (file, "%s %-14s %s - %s%s\n", + comment, first? "Output:": "", + s->outputs [i]->name, + s->outputs [i]->description, + i == result? " (X version only)": "")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%s %-14s %s - value of R%d on exit%s\n", + comment, first? "Output:": "", + s->outputs [i]->name, i, + i == result? " (X version only)": "")) < 0) + goto finish; + } + + first = FALSE; + } + + if (s->f_out) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, + "%s %-14s %s - processor status register on exit%s\n", + comment, first? "Output:": "", "psr", + def_FLAGS == result? " (X version only)": "")) < 0) + goto finish; + } + } + else + { + /*First locate the register pointing to the block.*/ + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->i & 1 << i) != NONE) + { + int cpt; + + for (cpt = 0; cpt < s->inputs [i]->data AS list.count; + cpt++) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, + "%s %-14s %s - component %d\n", comment, + first? "Input:": "", s->inputs [i]->data AS + list.members [cpt]->name, cpt)) < 0) + goto finish; + + first = FALSE; + } + + break; + } + } + + if (s->value != NONE) + { + char name [10]; + + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = sprintf (name, result != def_FLAGS? "R%d": "psr", + result)) < 0) + ... [truncated message content] |
From: <jt...@us...> - 2007-04-22 22:17:35
|
Revision: 250 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=250&view=rev Author: jtytgat Date: 2007-04-22 15:17:32 -0700 (Sun, 22 Apr 2007) Log Message: ----------- First step in unified build Added Paths: ----------- branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile branches/simplified-build/!OsLib/Source/Core/oslib/Makefile branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.help branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile branches/simplified-build/!OsLib/Source/Makefile branches/simplified-build/!OsLib/Source/Makefile.inc branches/simplified-build/!OsLib/Source/Toolbox/oslib/Makefile branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.h branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.h branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.h branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.h branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.h branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help branches/simplified-build/!OsLib/Source/Types/oslib/Makefile branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.help branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.h branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.help branches/simplified-build/!OsLib/Source/Types/oslib/Types.h branches/simplified-build/!OsLib/Source/Types/oslib/Types.help branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.h branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.help branches/simplified-build/!OsLib/Source/User/oslib/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Source/AMUmakefile branches/simplified-build/!OsLib/Source/AMUmakefile.inc branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 branches/simplified-build/!OsLib/Source/GNUmakefile branches/simplified-build/!OsLib/Source/GNUmakefile.settings branches/simplified-build/!OsLib/Source/GNUmakefile.source branches/simplified-build/!OsLib/Source/Macros/oslib/AHelp branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Macros/oslib/CHelp branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h branches/simplified-build/!OsLib/Source/SetVars,feb branches/simplified-build/!OsLib/Source/Toolbox/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Toolbox/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/Makefile,fe1 branches/simplified-build/!OsLib/Source/Types/oslib/coltrans32.h branches/simplified-build/!OsLib/Source/Types/oslib/devicefs32.h branches/simplified-build/!OsLib/Source/Types/oslib/dosfs32.h branches/simplified-build/!OsLib/Source/Types/oslib/filecore32.h branches/simplified-build/!OsLib/Source/Types/oslib/fileswch32.h branches/simplified-build/!OsLib/Source/Types/oslib/osargs32.h branches/simplified-build/!OsLib/Source/Types/oslib/oscore32.h branches/simplified-build/!OsLib/Source/Types/oslib/osf32.h branches/simplified-build/!OsLib/Source/Types/oslib/osfind32.h branches/simplified-build/!OsLib/Source/Types/oslib/osfsctrl32.h branches/simplified-build/!OsLib/Source/Types/oslib/osgbpb32.h branches/simplified-build/!OsLib/Source/Types/oslib/pdriver32.h branches/simplified-build/!OsLib/Source/Types/oslib/types.h branches/simplified-build/!OsLib/Source/Types/oslib/wimp32.h branches/simplified-build/!OsLib/Source/User/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/User/oslib/GNUmakefile Deleted: branches/simplified-build/!OsLib/Source/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,169 +0,0 @@ -# Index: OSLib/!OsLib/Source/AMUmakefile.inc 20040304 -#=================================================================== -# -# AMUmakefile for SOURCES under RISC OS -# - -#------------------------------------------------------------------------ -# paths & directories -DIR = ${MAKEFILEDIR} -BINDIR = <OSLib$BinDir> - -#tools -MAKE = amu -desktop -LIBFILE = LibFile -INDEXHELP = IndexHelp -BINDHELP = BindHelp -RM = rm -nq -MD = cdir - -CP = copy -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -#------------------------------------------------------------------------ -#target-specific macros - -SOURCES = Computer Core Toolbox User - -OSLIB = OSLib.o -OSLIB32 = OSLib32.o -CSTRONG = help.OSLib -LIST = list.OSLib -LIST32 = list.OSLib32 - -#------------------------------------------------------------------------ -#targets - -.PHONY: all cstrong Computer computer Core core Toolbox toolbox User user \ - Test test oslib libs clean - -all: oslib - -oslib: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.AMUmakefile ${LIST} - ${MAKE} -f ${DIR}.AMUmakefile ${LIST32} - -computer: Computer -Computer: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -core: Core -Core: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -toolbox: Toolbox -Toolbox: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -user: User -User: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -#test: Test -Test: ;${MAKE} -f ${DIR}.$@.AMUmakefile all APCS=${APCS} - -cstrong : ${CSTRONG} -${CSTRONG}: - @-${RM} $@ - @${MD} Helpdata - @${MD} help - @${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.User.oslib.AMUmakefile cstrong - ${INDEXHELP} ${DIR}.HelpData.action_ -p Action - ${INDEXHELP} ${DIR}.HelpData.class_ -p Class - ${INDEXHELP} ${DIR}.HelpData.error_ -p Error - ${INDEXHELP} ${DIR}.HelpData.message_ -p Message - ${INDEXHELP} ${DIR}.HelpData.service_ -p Service - ${BINDHELP} ${DIR}.HelpData ${DIR}.$@ - -list: ${LIST} -${LIST}: ${OSLIB} - ${MD} list - ${LIBFILE} -s o.OSLib { > $@ } - @SetType $@ text - -list32: ${LIST32} -${LIST32}: ${OSLIB32} - ${MD} list - ${LIBFILE} -s o.OSLib32 { > $@ } - @SetType $@ text - -clean: cleanlib cleanhelp cleanfiles - ${MAKE} -f ${DIR}.Test.AMUmakefile clean - -distclean: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Test.AMUmakefile distclean - ${RM} -r $(addprefix ${DIR}., o list help ) - ${RM} -r $(addprefix ${DIR}., Helpdata ) - -cleanlib: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanlib - ${RM} $(addprefix ${DIR}., o.OSLib o.OSLib32 ) - ${RM} $(addprefix ${DIR}., ${LIST} ${LIST32} ) - -cleanfiles: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanfiles - -cleanhelp: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanhelp - ${RM} -r ${DIR}.Helpdata - ${RM} ${DIR}.${CSTRONG} - -release_widelib: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.OSLib - ${CP} SetVarsRO4 ${RELEASEDIR}.SetVars ${COPYFLAGS} - ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} - ${MAKE} -f ${DIR}.computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - -release_deeplib: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.OSLib - ${CP} SetVars ${RELEASEDIR}.OSLib.SetVars ${COPYFLAGS} - ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} - ${MD} ${RELEASEDIR}.OSLib.Computer - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Computer.oslib - ${MD} ${RELEASEDIR}.OSLib.Core - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Core.oslib - ${MD} ${RELEASEDIR}.OSLib.Macros - ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Macros.oslib - ${MD} ${RELEASEDIR}.OSLib.Toolbox - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Toolbox.oslib - ${MD} ${RELEASEDIR}.OSLib.Types - ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Types.oslib - ${MD} ${RELEASEDIR}.OSLib.User - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.User.oslib - -release_help: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.help - ${CP} ${CSTRONG} ${RELEASEDIR}.help.* ${COPYFLAGS} - -#------------------------------------------------------------------------ -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/AMUmakefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/AMUmakefile.inc 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/AMUmakefile.inc 2007-04-22 22:17:32 UTC (rev 250) @@ -1,166 +0,0 @@ -# !OSLib.Source.Makefile/inc -# Include file for making lower-level OSLib projects - -# tools -DEFMOD = do DefMod -REDUCEAOF = ReduceAOF -RM = rm -nq -MD = cdir -AS = do objasm -throwback -TOLOWER = ToLower -MAKE = amu -desktop -LIBFILE = libfile -ECHO = @echo $@ -CP = copy - -# flags -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -# name rules -HDRS = $(addprefix Hdr., ${SWIMODULES} ${MODULES}) -OBJASM = $(addprefix s., ${SWIMODULES}) -OBJASM32 = $(addprefix s32., ${SWIMODULES}) -LIBS = $(addprefix o., ${SWIMODULES}) -LIBS32 = $(addprefix o32., ${SWIMODULES}) -CHEADERS = $(addprefix h., ${SWIMODULES} ${MODULES}) -CSTRONG = $(addprefix help., ${SWIMODULES} ${MODULES}) -OBJS = $(addprefix o., ${CMODULES}) -OBJS32 = $(addprefix o32., ${CMODULES}) - -#------------------------------------------------------------------------ -# file locations -SOURCEDIR = <OSLib$SourceDir> -BYTEWIDE = ${SOURCEDIR}.ByteWide -HELPDATA = ${SOURCEDIR}.HelpData -OSLIB = ${SOURCEDIR}.o.OSLib -OSLIB32 = ${SOURCEDIR}.o.OSLib32 - -.PHONY: all oslib cstrong hdrs cheaders objasm objasm32 clean distclean cleanlib -.PHONY: cleanfiles cleanhelp release_deeplib release_widelib release_help - -# final targets -all: oslib -oslib: libs libs32 objasm objasm32 hdrs cheaders - ${ECHO} - -cstrong: ${CSTRONG} - ${ECHO} - -hdrs: ${HDRS} - ${ECHO} - -cheaders: ${CHEADERS} - ${ECHO} - -objasm: ${OBJASM} - ${ECHO} - -objasm32: ${OBJASM32} - ${ECHO} - -clean: cleanfiles cleanlib cleanhelp - ${ECHO} - -distclean: clean - ${RM} $(addprefix s_0., ${SWIMODULES} ) - ${RM} $(addprefix s32_0., ${SWIMODULES} ) - ${RM} $(addprefix ${MAKEFILEDIR}., h Hdr l o o32 s s32 s_0 s32_0 help ) - @echo - -cleanlib: - ${RM} ${LIBS} - ${RM} ${LIBS32} - -cleanfiles: - ${RM} ${HDRS} - ${RM} ${CHEADERS} - ${RM} ${OBJASM} - ${RM} ${OBJASM32} - ${RM} ${OBJS} ${OBJS32} - -cleanhelp: - ${RM} ${CSTRONG} - ${RM} -r HelpData - - -release: -ifndef RELEASEDIR - error Release Dir undefined -endif - -${CP} s s_0 ${COPYFLAGS} - -${CP} s32 s32_0 ${COPYFLAGS} - ${MD} ${RELEASEDIR} - ${CP} Hdr ${RELEASEDIR}.Hdr ${COPYFLAGS} - ${CP} h ${RELEASEDIR}.h ${COPYFLAGS} - -#------------------------------------------------------------------------ - - -.SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm - -.asm.o: ;@${MD} o - @Set OSLib$Output $@ - ${AS} -I<OSLib$Path> -from $< -to <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.asm.o32: ;@${MD} o - @Set OSLib$Output $@ - ${AS} -I<OSLib$Path> -Throwback -apcs 3/32bit -from $< -to <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.s: ;@${MD} s - @Set OSLib$Output $@ - ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.s32: ;@${MD} s32 - @Set OSLib$Output $@ - ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} -32bit < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.h: ;@${MD} h - @Set OSLib$Output $@ - @${TOLOWER} OSLib$Output - ${DEFMOD} -q -h < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.Hdr: ;@${MD} Hdr - ${DEFMOD} -q -hdr < $< > $@ - -.swi.h++: ;${DEFMOD} -q -h++ < $< > $@ - -.swi.ch: ;${DEFMOD} -q -chelp < $< > $@ - -.swi.ah: ;${DEFMOD} -q -asmhelp < $< > $@ - -.swi.o: ;@${MD} ${SOURCEDIR}.o - @${MD} l - @${MD} o - @IfThere ${OSLIB} then else ${LIBFILE} -c -o ${OSLIB} - ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} < $< - @${REDUCEAOF} -via ViaFile - #@-${LIBFILE} -d ${OSLIB} l.$*.* - ${LIBFILE} -i -o ${OSLIB} -v ViaFile - @create $@ - @delete ViaFile - @Wipe l.$* ~C~FR~V - @echo - -.swi.o32: ;@${MD} ${SOURCEDIR}.o - @${MD} l - @${MD} o32 - @IfThere ${OSLIB32} then else ${LIBFILE} -c -o ${OSLIB32} - ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} -32bit < $< - @${REDUCEAOF} -via ViaFile - #@-${LIBFILE} -d ${OSLIB32} l.$*.* - ${LIBFILE} -i -o ${OSLIB32} -v ViaFile - @create $@ - @delete ViaFile - @Wipe l.$* ~C~FR~V - @echo - -.swi.help: ;@${MD} ${HELPDATA} - @${MD} help - ${ECHO} - ${DEFMOD} -q -cstrong -o ${HELPDATA} < $< - @IfThere $@ then stamp $@ else Create $@ Deleted: branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,26 +0,0 @@ -# OSLib.Source.Computer.oslib.Makefile TV 20031228 -# Makefile for Computer/oslib under RISC OS -# - -#include the module list -include ${MAKEFILEDIR}.modules - -#include the global definitions afther the local ones -# to allow the latter to be recognised -include <OSLib$SourceDir>.AMUmakefile/inc - -# local targets -.PHONY: computer libs libs32 - -computer: all - @echo - -libs: ${LIBS} - @echo - -libs32: ${LIBS32} - @echo - - -#------------------------------------------------------------------------ -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,16 +0,0 @@ -# OSLib/Source/Computer/oslib/GNUmakefile TV 20040115 -# Makefile for Computer/oslib under GNU -# - -SOURCEDIR = ../.. -TARGET = Computer - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ - -.PHONY: ${OSLIB32} ${OSLIB} - -${OSLIB}: ${LIBS} ${HDRS} ${OBJS} - -${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} Added: branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,36 +0,0 @@ -# OSLib.Source.Core.oslib.Makefile TV 20031228 -# - -include ${MAKEFILEDIR}.Modules - -#include the global definitions afther the local ones -# to allow the latter to be recognised -include <OSLib$SourceDir>.AMUmakefile/inc - -# local targets -.PHONY: core libs libs32 - -core: all - @echo - -libs: ${OSLIB} - @echo - -libs32: ${OSLIB32} - @echo - -REPLACE = \ -l.OSHeap.0x00010.o.001 \ -l.OSHeap.0x00010x.o.001 \ -l.OS.0x00020.o.000 \ -l.OS.0x00020x.o.000 \ -l.OS.0x00020.o.001 \ -l.OS.0x00020x.o.001 - -${OSLIB}: ${OBJS} ${LIBS} ${HDRS} - -${LIBFILE} -d ${OSLIB} ${REPLACE} - ${LIBFILE} -i -o ${OSLIB} ${OBJS} - -${OSLIB32}: ${OBJS32} ${LIBS32} ${HDRS} - -${LIBFILE} -d ${OSLIB32} ${REPLACE} - ${LIBFILE} -i -o ${OSLIB32} ${OBJS32} Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,33 +0,0 @@ -# OSLib/Source/Core/oslib/GNUmakefile TV 20040119 -# -# - -SOURCEDIR = ../.. -TARGET = Core - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ - -#.PHONY: ${OSLIB32} ${OSLIB} - -REPLACE = \ -l/OSHeap/0x00010.001.o \ -l/OSHeap/0x00010x.001.o \ -l/OS/0x00020.000.o \ -l/OS/0x00020x.000.o \ -l/OS/0x00020.001.o \ -l/OS/0x00020x.001.o - -#------------------------------------------------------------------------ -${OSLIB}: ${LIBS} ${HDRS} ${OBJS} - -${LIBFILE} -d ${OSLIB} ${REPLACE} - ${LIBFILE} -i ${OSLIB} ${OBJS} - -${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} - -${LIBFILE} -d ${OSLIB32} ${REPLACE} - ${LIBFILE} -i ${OSLIB32} ${OBJS32} - -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 2007-04-22 22:17:32 UTC (rev 250) @@ -1,9 +0,0 @@ -| OSLib.Source.Core.oslib.!Make TV 20031228 -| -SetEval Make$Dir Obey$Dir - -SetEval OSLib$Slot 2*1024 -Do WIMPSlot -min <OSLib$Slot>K -Do WIMPSlot -max <OSLib$Slot>K - -AMU -D -f <Make$Dir>.Makefile -desktop %0 Added: branches/simplified-build/!OsLib/Source/Core/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,107 +0,0 @@ -# -# Makefile for SOURCES under GNU -# - -#------------------------------------------------------------------------ -include ../GNUmakefile.settings -SOURCEDIR = ${CURDIR} -include GNUmakefile.settings - -#------------------------------------------------------------------------ -# paths & directories - -#------------------------------------------------------------------------ -# tools -LIBFILE = ${GCCSDK_INSTALL_CROSSBIN}/libfile -INDEXHELP = ${BINDIR}/IndexHelp -BINDHELP = ${BINDIR}/BindHelp -RM = rm -f -RD = rm -fr - -#------------------------------------------------------------------------ -# target-specific macros - -SOURCES = Computer Core Toolbox User - -OSLIB = OSLib.o -OSLIB32 = OSLib32.o -CSTRONG = OSLib,3d6 -LIST = OSLib.list -LIST32 = OSLib32.list - -#------------------------------------------------------------------------ -# targets - -.PHONY: all cstrong Computer Core Toolbox User Test oslib libs clean - -all: oslib Test cstrong - -cstrong: ${CSTRONG} - -computer: Computer -Computer: ;${MAKE} -C $@/oslib all - -core: Core -Core: ;${MAKE} -C $@/oslib all - -toolbox: Toolbox -Toolbox: ;${MAKE} -C $@/oslib all - -user: User -User: ;${MAKE} -C $@/oslib all - -test: Test -Test: ;${MAKE} -C $@ all - -oslib: - ${MAKE} -C Computer/oslib oslib - ${MAKE} -C Core/oslib oslib - ${MAKE} -C Toolbox/oslib oslib - ${MAKE} -C User/oslib oslib - ${MAKE} list - ${MAKE} list32 - -hdrs: - ${MAKE} -C Computer/oslib hdrs - ${MAKE} -C Core/oslib hdrs - ${MAKE} -C Toolbox/oslib hdrs - ${MAKE} -C User/oslib hdrs - -list: ${LIST} -${LIST}: ${OSLIB} - ${LIBFILE} -s ${OSLIB} > ${LIST} - -list32: ${LIST32} -${LIST32}: ${OSLIB32} - ${LIBFILE} -s ${OSLIB} > ${LIST32} - -libs: - ${MAKE} -C Computer/oslib libs - ${MAKE} -C Core/oslib libs - ${MAKE} -C Toolbox/oslib libs - ${MAKE} -C User/oslib libs - -${CSTRONG}: - ${MAKE} -C Computer/oslib cstrong - ${MAKE} -C Core/oslib cstrong - ${MAKE} -C Toolbox/oslib cstrong - ${MAKE} -C User/oslib cstrong - ${INDEXHELP} HelpData/action_ -p Action - ${INDEXHELP} HelpData/class_ -p Class - ${INDEXHELP} HelpData/error_ -p Error - ${INDEXHELP} HelpData/message_ -p Message - ${INDEXHELP} HelpData/service_ -p Service - ${BINDHELP} HelpData $@ - -clean: ;$(foreach dir, ${SOURCES}, ${MAKE} -C ${dir}/oslib clean; ) - ${MAKE} -C Test clean - -${RM} OSLib.o OSLib32.o ${LIST} ${LIST32} ${CSTRONG} - -${RD} HelpData - -cleanhelp: - ${MAKE} -C Computer/oslib cleanhelp - ${MAKE} -C Core/oslib cleanhelp - ${MAKE} -C Toolbox/oslib cleanhelp - ${MAKE} -C User/oslib cleanhelp - ${RD} HelpData/* - ${RM} ${CSTRONG} Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile.settings =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile.settings 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile.settings 2007-04-22 22:17:32 UTC (rev 250) @@ -1,17 +0,0 @@ -# -# Makefile specifying the environment settings for all GNUmakefiles -# inside the Source directory. -# -# SOURCEDIR must be defined by the caller, and must -# point to the top of the source tree. - -#------------------------------------------------------------------------ -# environment settings -ifeq ($(origin SOURCEDIR), undefined) -$(error SOURCEDIR is not defined) -endif -BINDIR = ${SOURCEDIR}/../Bin - -export BINDIR - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile.source 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile.source 2007-04-22 22:17:32 UTC (rev 250) @@ -1,211 +0,0 @@ -# -# Makefile for to include in oslib source GNUmakefiles -# -# SOURCEDIR must be defined by the caller, and must -# point to the top of the source tree. - -#define MALLOC_CHECK to enable malloc debugging hooks while running defmod -#MALLOC_CHECK = MALLOC_CHECK_=1 - -#------------------------------------------------------------------------ -# Source Directories - -SOURCES = Computer Core Toolbox User -INCLUDES = Macros Types ${SOURCES} - -#------------------------------------------------------------------------ -# tools - -ASMFLAGS = -objasm,-I..,-I${SOURCEDIR}/Types - -DEFMOD = ${BINDIR}/defmod -q -REDUCEAOF = ${BINDIR}/reduceaof -INDEXHELP = ${BINDIR}/IndexHelp -BINDHELP = ${BINDIR}/BindHelp -CP = cp -p -RM = rm -f -DIFF = diff -AS = ${GCCSDK_INSTALL_CROSSBIN}/gcc -c -xassembler -Wa,${ASMFLAGS} -CC = ${GCCSDK_INSTALL_CROSSBIN}/gcc -LINK = ${GCCSDK_INSTALL_CROSSBIN}/gcc -LIBFILE = ${GCCSDK_INSTALL_CROSSBIN}/libfile - -#------------------------------------------------------------------------ -# macros -ALL = ${SWIMODULES} ${MODULES} ${CMODULES} -HDRS = $(patsubst %, %.Hdr,${SWIMODULES} ${MODULES}) -OBJASM = $(patsubst %, %.s,${SWIMODULES}) -OBJASM32 = $(patsubst %, %.s32,${SWIMODULES}) -LIBS = $(patsubst %, %.o,${SWIMODULES}) -LIBS32 = $(patsubst %, %.o32,${SWIMODULES}) -CHEADERS = $(patsubst %, %.h,${SWIMODULES} ${MODULES}) -CSTRONG = $(patsubst %, %.help,${SWIMODULES} ${MODULES}) -OBJS = $(patsubst %, %.o,${CMODULES}) -OBJS32 = $(patsubst %, %.o32,${CMODULES}) -FILES = ${LIBS} ${LIBS32} ${OBJASM} ${OBJASM32} ${HDRS} ${CHEADERS} - -#------------------------------------------------------------------------ -# file locations -BYTEWIDE = ${SOURCEDIR}/ByteWide -HELPDATA = ${SOURCEDIR}/HelpData -OSLIB = ${SOURCEDIR}/OSLib.o -OSLIB32 = ${SOURCEDIR}/OSLib32.o - -#------------------------------------------------------------------------ -#helper functions - -# convert arg to lower case -tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) - -#------------------------------------------------------------------------ -# Targets - -.PHONY: oslib all cstrong hdrs cheaders objasm objasm32 clean regression regression32 - -oslib: all -all: libs libs32 objasm objasm32 hdrs cheaders objs objs32 - -libs: ${OSLIB} - -libs32: ${OSLIB32} - -cstrong: ${CSTRONG} - -hdrs: ${HDRS} - -cheaders: ${CHEADERS} - -objasm: ${OBJASM} - -objasm32: ${OBJASM32} - -objs: ${HDRS} ${OBJS} - -objs32: ${HDRS} ${OBJS32} - -clean: - @- ${RM} -r l/* - @- ${RM} ${FILES} ${LIBS} ${LIBS32} ${OBJS} ${OBJS32} ${CSTRONG} ViaFile - @- ${RM} $(call tolower, ${CHEADERS}) - -cleanhelp: ;@-${RM} ${CSTRONG} - -regression: - -@$(foreach TARGET, ${OBJASM}, \ - echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ - ${DIFF} -y --suppress-common-lines ${TARGET} 's; \ - 0/$(basename, $(call tolower, ${TARGET} ) )'; ) - -regression32: - -@$(foreach TARGET, ${OBJASM32}, \ - echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ - ${DIFF} -y --suppress-common-lines ${TARGET} 's32; \ - 0/$(basename, $(call tolower, ${TARGET} ) )'; ) - -release_wide: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi - @if [ ! -d ${RELEASEDIR}/OSLib/oslib/h ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib/h; fi - @if [ ! -d ${RELEASEDIR}/OSLib/oslib/Hdr ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib/Hdr; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/h/$(basename ${file} ); ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/Hdr/$(basename ${file} ); ) - -release_deep: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib; fi - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/h ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/h; fi - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/${TARGET}/oslib/h/$(basename ${file} ); ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr/$(basename ${file} ); ) - -release_unix: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/${file}; ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/${file}; ) - -#------------------------------------------------------------------------ -# general rules: - -.SUFFIXES: -.SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm - -.swi.s: ;@echo making $@ - @${DEFMOD} -s -byte_wide ${BYTEWIDE} < $< > $@ - -.swi.s32: ;@echo making $@ - @${DEFMOD} -s -byte_wide ${BYTEWIDE} -32bit < $< > $@ - -.swi.h++: ;@echo making $@ - @${DEFMOD} -h++ < $< > $@ - -.swi.Hdr: ;@echo making $@ - @${DEFMOD} -hdr < $< > $@ - -.swi.ch: ;@echo making $@ - @${DEFMOD} -chelp < $< > $@ - -.swi.ah: ;@echo making $@ - @${DEFMOD} -asmhelp < $< > $@ - -.swi.h: ;@echo making $@ - @${DEFMOD} -h < $< > $(call tolower, $@) - @touch $@ - -.swi.o: ;@echo making $@ - @if [ ! -d l ]; then mkdir l; fi; - @env PATH=${GCCSDK_INSTALL_CROSSBIN}:${PATH} ${MALLOC_CHECK} \ - ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} < $< - @${REDUCEAOF} -via ViaFile - @if [ ! -a ${OSLIB} ]; then ${LIBFILE} -c ${OSLIB}; fi; - @-${LIBFILE} -d ${OSLIB} -v ViaFile - @${LIBFILE} -i ${OSLIB} -v ViaFile - @touch $@ - @${RM} ViaFile - @${RM} -r l/$* - -.swi.o32: ;@echo making $@ - @if [ ! -d l ]; then mkdir l; fi; - @env PATH=${GCCSDK_INSTALL_CROSSBIN}:$PATH ${MALLOC_CHECK} \ - ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} -32bit < $< - @${REDUCEAOF} -via ViaFile - @-if [ ! -a ${OSLIB32} ]; then ${LIBFILE} -c ${OSLIB32}; fi; - @-${LIBFILE} -d ${OSLIB32} -v ViaFile - @${LIBFILE} -i ${OSLIB32} -v ViaFile - @touch $@ - @${RM} ViaFile - @${RM} -r l/$* - -.swi.help: ;@echo making $@ - @if [ ! -d ${HELPDATA} ]; then mkdir ${HELPDATA}; fi; - ${DEFMOD} -cstrong -o ${HELPDATA} < $< - @touch $@ - -.asm.o: ;@echo making $@ - @-${LIBFILE} -d ${OSLIB} $@ - @${AS} -mapcs-26 -Wa,-apcs26 -o $@ $< - -.asm.o32: ;@echo making $@ - @-${LIBFILE} -d ${OSLIB32} $@ - @${AS} -mapcs-32 -Wa,-apcs32 -o $@ $< - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/AHelp =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,7 +0,0 @@ -# OSLib/Source/Macros/oslib/AMUmakefile TV 20040214 -# Makefile for Macros/oslib under RISC OS -# - -include ${MAKEFILEDIR}.Modules -include <OSLib$SourceDir>.AMUmakefile/inc -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/CHelp =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,10 +0,0 @@ -# OSLib/Source/Macros/oslib/GNUmakefile TV 20040214 -# Makefile for Macros/oslib under GNU -# - -SOURCEDIR = ../.. -TARGET = Macros - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,396 @@ +#ifndef macros_H +#define macros_H + +/*OSLib---efficient, type-safe, transparent, extensible, + register-safe A P I coverage of RISC O S*/ +/*Copyright \xA9 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +/************************ + * Constant definitions * + ************************/ +#ifndef SIG_LIMIT +#define SIG_LIMIT 11 +#endif +#ifndef DEC_WIDTH +#define DEC_WIDTH 10 +#endif +#ifndef SHORT_DEC_WIDTH +#define SHORT_DEC_WIDTH 5 +#endif +#ifndef LONG_DEC_WIDTH +#define LONG_DEC_WIDTH 10 +#endif +#ifndef OCT_WIDTH +#define OCT_WIDTH 11 +#endif +#ifndef SHORT_OCT_WIDTH +#define SHORT_OCT_WIDTH 6 +#endif +#ifndef LONG_OCT_WIDTH +#define LONG_OCT_WIDTH 11 +#endif +#ifndef UNSIGNED_WIDTH +#define UNSIGNED_WIDTH 10 +#endif +#ifndef SHORT_UNSIGNED_WIDTH +#define SHORT_UNSIGNED_WIDTH 5 +#endif +#ifndef LONG_UNSIGNED_WIDTH +#define LONG_UNSIGNED_WIDTH 10 +#endif +#ifndef HEX_WIDTH +#define HEX_WIDTH 8 +#endif +#ifndef SHORT_HEX_WIDTH +#define SHORT_HEX_WIDTH 4 +#endif +#ifndef LONG_HEX_WIDTH +#define LONG_HEX_WIDTH 8 +#endif +#ifndef FLT_WIDTH +#define FLT_WIDTH 7 +#endif +#ifndef DBL_WIDTH +#define DBL_WIDTH 17 +#endif +#ifndef LDBL_WIDTH +#define LDBL_WIDTH 17 +#endif +#ifndef FLT_EXP_WIDTH +#define FLT_EXP_WIDTH 2 +#endif +#ifndef DBL_EXP_WIDTH +#define DBL_EXP_WIDTH 3 +#endif +#ifndef LDBL_EXP_WIDTH +#define LDBL_EXP_WIDTH 3 +#endif + +/********************* + * Macro definitions * + *********************/ + +/* ------------------------------------------------------------------------ + * Macro: ABS() + * + * Description: Absolute value of a number + */ + +#define ABS(a) ((a) >= 0? (a): -(a)) + +/* ------------------------------------------------------------------------ + * Macro: ALIGN() + * + * Description: Rounds an integer up to the next multiple of 4 + */ + +#define ALIGN(b) ((b) + 3 & ~3) + +/* ------------------------------------------------------------------------ + * Macro: BINEXP() + * + * Description: 2 to the power of an integer + */ + +#define BINEXP(n) (1 << (n)) + +/* ------------------------------------------------------------------------ + * Macro: BIT() + * + * Description: The value of a bit at an offset from a pointer (cf CLR, + * SET) + */ + +#define BIT(p, i) (((bits *) (p)) [(i) >> 5] & 1 << ((i) & 31)) + +/* ------------------------------------------------------------------------ + * Macro: BOOL() + * + * Description: Converts non-0 values to 1 + */ + +#define BOOL(c) ((c) != 0? TRUE: FALSE) + +/* ------------------------------------------------------------------------ + * Macro: CLEAR() + * + * Description: Clears the contents of a string + */ + +#define CLEAR(s) ((s) [0] = '\0') + +/* ------------------------------------------------------------------------ + * Macro: CLR() + * + * Description: Clears the bit at an offset from a pointer (cf BIT, SET) + * + * Other notes: 5 = x: 2^^x == CHAR_BIT*sizeof (bits); 31 = + * CHAR_BIT*sizeof (bits) - 1 + */ + +#define CLR(p, i) (((bits *) (p)) [(i) >> 5] &= ~(1 << ((i) & 31))) + +/* ------------------------------------------------------------------------ + * Macro: COUNT() + * + * Description: The number of elements in an array + */ + +#define COUNT(a) (sizeof (a)/sizeof *(a)) + +/* ------------------------------------------------------------------------ + * Macro: DBLEQ() + * + * Description: Tests floating point numbers for approximate equality + */ + +#define DBLEQ(a, b, e) (fabs ((a) - (b)) <= (e)*(fabs (a) + fabs (b))) + +/* ------------------------------------------------------------------------ + * Macro: DIGIT() + * + * Description: The decimal digit corresponding to a character + */ + +#define DIGIT(c) ((c) - '0') + +/* ------------------------------------------------------------------------ + * Macro: DIM() + * + * Description: Positive difference + */ + +#define DIM(a, b) ((a) > (b)? (a) - (b): 0) + +/* ------------------------------------------------------------------------ + * Macro: DIV_DOWN_POS_() + * + * Description: Helper macro for DIV_DOWN, DIV_UP + */ + +#define DIV_DOWN_POS_(a, b) ((a)/(b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_UP_POS_() + * + * Description: Helper macro for DIV_DOWN, DIV_UP + */ + +#define DIV_UP_POS_(a, b) (((a) + (b) - 1)/(b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_DOWN() + * + * Description: Integer division, rounding down (towards -infinity) + */ + +#define DIV_DOWN(a, b) ((a) >= 0? DIV_DOWN_POS_ (a, b): -DIV_UP_POS_ (-(a), b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_UP() + * + * Description: Integer division, rounding up (towards +infinity) + */ + +#define DIV_UP(a, b) ((a) > 0? DIV_UP_POS_ (a, b): -DIV_DOWN_POS_ (-(a), b)) + +/* ------------------------------------------------------------------------ + * Macro: EMPTY() + * + * Description: Is a string empty? + */ + +#define EMPTY(s) ((s) [0] == '\0') + +/* ------------------------------------------------------------------------ + * Macro: ISDIGIT() + * + * Description: A decimal digit? + */ + +#define ISDIGIT(c) ('0' <= (c) && (c) <= '9') + +/* ------------------------------------------------------------------------ + * Macro: ISXDIGIT() + * + * Description: A hexadecimal digit? + */ + +#define ISXDIGIT(c) (('0' <= (c) && (c) <= '9') || \ + ('a' <= (c) && (c) <= 'f') || ('A' <= (c) && (c) <= 'F')) + +/* ------------------------------------------------------------------------ + * Macro: LCHAR() + * + * Description: The character corresponding to a digit, preferring lower + * case + */ + +#define LCHAR(i) ("0123456789abcdef" [i]) + +/* ------------------------------------------------------------------------ + * Macro: MAX() + * + * Description: The larger of two values + */ + +#define MAX(a, b) ((a) > (b)? (a): (b)) + +/* ------------------------------------------------------------------------ + * Macro: MAXAB() + * + * Description: The larger of two values and assign + */ + +#define MAXAB(a, b) ((a) < (b)? (a) = (b): (a)) + +/* ------------------------------------------------------------------------ + * Macro: MIN() + * + * Description: The smaller of two values + */ + +#define MIN(a, b) ((a) < (b)? (a): (b)) + +/* ------------------------------------------------------------------------ + * Macro: MINAB() + * + * Description: The smaller of two values and assign + */ + +#define MINAB(a, b) ((a) > (b)? (a) = (b): (a)) + +/* ------------------------------------------------------------------------ + * Macro: NCOPY() + * + * Description: Copy a string of limited length + */ + +#define NCOPY(s1, s2, n) (sprintf (s1, "%.*s", n, s2), s1) + +/* ------------------------------------------------------------------------ + * Macro: OFFSETOF() + * + * Description: Offset of a member in a variable of structure type + */ + +#define OFFSETOF(var, mem) ((char *) &(var).mem - (char *) &(var)) + +/* ------------------------------------------------------------------------ + * Macro: RATIO() + * + * Description: Integer division, rounding to nearest + */ + +#define RATIO(a, b) ((2*(a) + (b))/(2*(b))) + +/* ------------------------------------------------------------------------ + * Macro: SET() + * + * Description: Sets the bit at an offset from a pointer (cf BIT, CLR) + */ + +#define SET(p, i) (((bits *) (p)) [(i) >> 5] |= 1 << ((i) & 31)) + +/* ------------------------------------------------------------------------ + * Macro: SGN() + * + * Description: Signum + */ + +#define SGN(a) ((a) > 0? 1: (a) < 0? -1: 0) + +/* ------------------------------------------------------------------------ + * Macro: SHORT() + * + * Description: Assembles a short from an unaligned pointer + */ + +#define SHORT(ptr) ((int) (((byte *) (ptr)) [0] | \ + ((byte *) (ptr)) [1] << 8) << 16 >> 16) + +/* ------------------------------------------------------------------------ + * Macro: SQR() + * + * Description: Square + */ + +#define SQR(a) ((a)*(a)) + +/* ------------------------------------------------------------------------ + * Macro: STR_() + * + * Description: Helper macro for STR + */ + +#define STR_(s) #s + +/* ------------------------------------------------------------------------ + * Macro: STR() + * + * Description: Stringise a macro + */ + +#define STR(s) STR_ (s) + +/* ------------------------------------------------------------------------ + * Macro: STRLEN() + * + * Description: The length of a string constant, as a constant + */ + +#define STRLEN(s) (sizeof (s) - 1) + +/* ------------------------------------------------------------------------ + * Macro: UCHAR() + * + * Description: The character corresponding to a hexadecimal digit, + * preferring upper case + */ + +#define UCHAR(i) ("0123456789ABCDEF" [i]) + +/* ------------------------------------------------------------------------ + * Macro: WORD() + * + * Description: Assembles a word at an unaligned character pointer + */ + +#define WORD(ptr) ((int) (((byte *) (ptr)) [0] | \ + ((byte *) (ptr)) [1] << 8 | ((byte *) (ptr)) [2] << 16 | \ + ((byte *) (ptr)) [3] << 24)) + +/* ------------------------------------------------------------------------ + * Macro: XDIGIT() + * + * Description: The hexadecimal digit corresponding to a character + */ + +#define XDIGIT(c) ((byte) (c) < 'A'? (c) - '0': \ + (byte) (c) < 'a'? (c) - 'A' + 10: (c) - 'a' + 10) + +/* ------------------------------------------------------------------------ + * Macro: WHETHER() + * + * Description: Converts a boolean value to a string + */ + +#define WHETHER(c) ((c)? "TRUE": "FALSE") + +#endif Added: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.help =================================================================== Added: branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h 2007-04-22 22:17:32 UTC (rev 250) @@ -1,396 +0,0 @@ -#ifndef macros_H -#define macros_H - -/*OSLib---efficient, type-safe, transparent, extensible, - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -/************************ - * Constant definitions * - ************************/ -#ifndef SIG_LIMIT -#define SIG_LIMIT 11 -#endif -#ifndef DEC_WIDTH -#define DEC_WIDTH 10 -#endif -#ifndef SHORT_DEC_WIDTH -#define SHORT_DEC_WIDTH 5 -#endif -#ifndef LONG_DEC_WIDTH -#define LONG_DEC_WIDTH 10 -#endif -#ifndef OCT_WIDTH -#define OCT_WIDTH 11 -#endif -#ifndef SHORT_OCT_WIDTH -#define SHORT_OCT_WIDTH 6 -#endif -#ifndef LONG_OCT_WIDTH -#define LONG_OCT_WIDTH 11 -#endif -#ifndef UNSIGNED_WIDTH -#define UNSIGNED_WIDTH 10 -#endif -#ifndef SHORT_UNSIGNED_WIDTH -#define SHORT_UNSIGNED_WIDTH 5 -#endif -#ifndef LONG_UNSIGNED_WIDTH -#define LONG_UNSIGNED_WIDTH 10 -#endif -#ifndef HEX_WIDTH -#define HEX_WIDTH 8 -#endif -#ifndef SHORT_HEX_WIDTH -#define SHORT_HEX_WIDTH 4 -#endif -#ifndef LONG_HEX_WIDTH -#define LONG_HEX_WIDTH 8 -#endif -#ifndef FLT_WIDTH -#define FLT_WIDTH 7 -#endif -#ifndef DBL_WIDTH -#define DBL_WIDTH 17 -#endif -#ifndef LDBL_WIDTH -#define LDBL_WIDTH 17 -#endif -#ifndef FLT_EXP_WIDTH -#define FLT_EXP_WIDTH 2 -#endif -#ifndef DBL_EXP_WIDTH -#define DBL_EXP_WIDTH 3 -#endif -#ifndef LDBL_EXP_WIDTH -#define LDBL_EXP_WIDTH 3 -#endif - -/********************* - * Macro definitions * - *********************/ - -/* ------------------------------------------------------------------------ - * Macro: ABS() - * - * Description: Absolute value of a number - */ - -#define ABS(a) ((a) >= 0? (a): -(a)) - -/* ------------------------------------------------------------------------ - * Macro: ALIGN() - * - * Description: Rounds an integer up to the next multiple of 4 - */ - -#define ALIGN(b) ((b) + 3 & ~3) - -/* ------------------------------------------------------------------------ - * Macro: BINEXP() - * - * Description: 2 to the power of an integer - */ - -#define BINEXP(n) (1 << (n)) - -/* ------------------------------------------------------------------------ - * Macro: BIT() - * - * Description: The value of a bit at an offset from a pointer (cf CLR, - * SET) - */ - -#define BIT(p, i) (((bits *) (p)) [(i) >> 5] & 1 << ((i) & 31)) - -/* ------------------------------------------------------------------------ - * Macro: BOOL() - * - * Description: Converts non-0 values to 1 - */ - -#define BOOL(c) ((c) != 0? TRUE: FALSE) - -/* ------------------------------------------------------------------------ - * Macro: CLEAR() - * - * Description: Clears the contents of a string - */ - -#define CLEAR(s) ((s) [0] = '\0') - -/* ------------------------------------------------------------------------ - * Macro: CLR() - * - * Description: Clears the bit at an offset from a pointer (cf BIT, SET) - * - * Other notes: 5 = x: 2^^x == CHAR_BIT*sizeof (bits); 31 = - * CHAR_BIT*sizeof (bits) - 1 - */ - -#define CLR(p, i) (((bits *) (p)) [(i) >> 5] &= ~(1 << ((i) & 31))) - -/* ------------------------------------------------------------------------ - * Macro: COUNT() - * - * Description: The number of elements in an array - */ - -#define COUNT(a) (sizeof (a)/sizeof *(a)) - -/* ------------------------------------------------------------------------ - * Macro: DBLEQ() - * - * Description: Tests floating point numbers for approximate equality - */ - -#define DBLEQ(a, b, e) (fabs ((a) - (b)) <= (e)*(fabs (a) + fabs (b))) - -/* ------------------------------------------------------------------------ - * Macro: DIGIT() - * - * Description: The decimal digit corresponding to a character - */ - -#define DIGIT(c) ((c) - '0') - -/* ------------------------------------------------------------------------ - * Macro: DIM() - * - * Description: Positive difference - */ - -#define DIM(a, b) ((a) > (b)? (a) - (b): 0) - -/* ------------------------------------------------------------------------ - * Macro: DIV_DOWN_POS_() - * - * Description: Helper macro for DIV_DOWN, DIV_UP - */ - -#define DIV_DOWN_POS_(a, b) ((a)/(b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_UP_POS_() - * - * Description: Helper macro for DIV_DOWN, DIV_UP - */ - -#define DIV_UP_POS_(a, b) (((a) + (b) - 1)/(b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_DOWN() - * - * Description: Integer division, rounding down (towards -infinity) - */ - -#define DIV_DOWN(a, b) ((a) >= 0? DIV_DOWN_POS_ (a, b): -DIV_UP_POS_ (-(a), b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_UP() - * - * Description: Integer division, rounding up (towards +infinity) - */ - -#define DIV_UP(a, b) ((a) > 0? DIV_UP_POS_ (a, b): -DIV_DOWN_POS_ (-(a), b)) - -/* ------------------------------------------------------------------------ - * Macro: EMPTY() - * - * Description: Is a string empty? - */ - -#define EMPTY(s) ((s) [0] == '\0') - -/* ------------------------------------------------------------------------ - * Macro: ISDIGIT() - * - * Description: A decimal digit? - */ - -#define ISDIGIT(c) ('0' <= (c) && (c) <= '9') - -/* ------------------------------------------------------------------------ - * Macro: ISXDIGIT() - * - * Description: A hexadecimal digit? - */ - -#define ISXDIGIT(c) (('0' <= (c) && (c) <= '9') || \ - ('a' <= (c) && (c) <= 'f') || ('A' <= (c) && (c) <= 'F')) - -/* ------------------------------------------------------------------------ - * Macro: LCHAR() - * - * Description: The character corresponding to a digit, preferring lower - * case - */ - -#define LCHAR(i) ("0123456789abcdef" [i]) - -/* ------------------------------------------------------------------------ - * Macro: MAX() - * - * Description: The larger of two values - */ - -#define MAX(a, b) ((a) > (b)? (a): (b)) - -/* ------------------------------------------------------------------------ - * Macro: MAXAB() - * - * Description: The larger of two values and assign - */ - -#define MAXAB(a, b) ((a) < (b)? (a) = (b): (a)) - -/* ------------------------------------------------------------------------ - * Macro: MIN() - * - * Description: The smaller of two values - */ - -#define MIN(a, b) ((a) < (b)? (a): (b)) - -/* ------------------------------------------------------------------------ - * Macro: MINAB() - * - * Description: The smaller of two values and assign - */ - -#define MINAB(a, b) ((a) > (b)? (a) = (b): (a)) - -/* ------------------------------------------------------------------------ - * Macro: NCOPY() - * - * Description: Copy a string of limited length - */ - -#define NCOPY(s1, s2, n) (sprintf (s1, "%.*s", n, s2), s1) - -/* ------------------------------------------------------------------------ - * Macro: OFFSETOF() - * - * Description: Offset of a member in a variable of structure type - */ - -#define OFFSETOF(var, mem) ((char *) &(var).mem - (char *) &(var)) - -/* ------------------------------------------------------------------------ - * Macro: RATIO() - * - * Description: Integer division, rounding to nearest - */ - -#define RATIO(a, b) ((2*(a) + (b))/(2*(b))) - -/* ------------------------------------------------------------------------ - * Macro: SET() - * - * Description: Sets the bit at an offset from a pointer (cf BIT, CLR) - */ - -#define SET(p, i) (((bits *) (p)) [(i) >> 5] |= 1 << ((i) & 31)) - -/* ------------------------------------------------------------------------ - * Macro: SGN() - * - * Description: Signum - */ - -#define SGN(a) ((a) > 0? 1: (a) < 0? -1: 0) - -/* ------------------------------------------------------------------------ - * Macro: SHORT() - * - * Description: Assembles a short from an unaligned pointer - */ - -#define SHORT(ptr) ((int) (((byte *) (ptr)) [0] | \ - ((byte *) (ptr)) [1] << 8) << 16 >> 16) - -/* ------------------------------------------------------------------------ - * Macro: SQR() - * - * Description: Square - */ - -#define SQR(a) ((a)*(a)) - -/* ------------------------------------------------------------------------ - * Macro: STR_() - * - * Description: Helper macro for STR - */ - -#define STR_(s) #s - -/* ------------------------------------------------------------------------ - * Macro: STR() - * - * Description: Stringise a macro - */ - -#define STR(s) STR_ (s) - -/* ------------------------------------------------------------------------ - * Macro: STRLEN() - * - * Description: The length of a string constant, as a constant - */ - -#define STRLEN(s) (sizeof (s) - 1) - -/* ------------------------------------------------------------------------ - * Macro: UCHAR() - * - * Description: The character corresponding to a hexadecimal digit, - * preferring upper case - */ - -#define UCHAR(i) ("0123456789ABCDEF" [i]) - -/* ------------------------------------------------------------------------ - * Macro: WORD() - * - * Description: Assembles a word at an unaligned character pointer - */ - -#define WORD(ptr) ((int) (((byte *) (ptr)) [0] | \ - ((byte *) (ptr)) [1] << 8 | ((byte *) (ptr)) [2] << 16 | \ - ((byte *) (ptr)) [3] << 24)) - -/* ------------------------------------------------------------------------ - * Macro: XDIGIT() - * - * Description: The hexadecimal digit corresponding to a character - */ - -#define XDIGIT(c) ((byte) (c) < 'A'? (c) - '0': \ - (byte) (c) < 'a'? (c) - 'A' + 10: (c) - 'a' + 10) - -/* ------------------------------------------------------------------------ - * Macro: WHETHER() - * - * Description: Converts a boolean value to a string - */ - -#define WHETHER(c) ((c)? "TRUE": "FALSE") - -#endif Added: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,66 @@ +# ... + +export SOURCEDIR := $(abspath .) +export BINDIR := $(SOURCEDIR)/../Bin +export BUILDDIR := $(SOURCEDIR)/Build + +export HEADERDIR := $(BUILDDIR)/Header/oslib +export CSTRONGDIR := $(BUILDDIR)/CStrong +export OBJDIR := $(BUILDDIR)/Objs +export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions + +export BYTEWIDE := $(SOURCEDIR)/ByteWide +export DEFMOD := $(BINDIR)/defmod +export REDUCEAOF := $(BINDIR)/reduceaof +export BINDHELP := $(BINDIR)/bindhelp + +export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) + +export CC := gcc +export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export LIBFILE := libfile +export MKDIR := mkdir -p +export RM := rm -rf +export CP := cp -r + +OSLIBLIB = $(BUILDDIR)/OSLib32.o +OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 + +.PHONY: all clean oslib cstrong BuildRequirements +all: oslib cstrong + +clean: + $(MAKE) -C Computer/oslib $@ + $(MAKE) -C Core/oslib $@ + $(MAKE) -C Macros/oslib $@ + $(MAKE) -C Toolbox/oslib $@ + $(MAKE) -C Types/oslib $@ + $(MAKE) -C User/oslib $@ + -$(RM) $(BUILDDIR) + +oslib: $(OSLIBLIB) +$(OSLIBLIB): BuildRequirements + $(MAKE) -C Computer/oslib oslib + $(MAKE) -C Core/oslib oslib + $(MAKE) -C Macros/oslib oslib + $(MAKE) -C Toolbox/oslib oslib + $(MAKE) -C Types/oslib oslib + $(MAKE) -C User/oslib oslib + cd $(OBJDIR) && $(LIBFILE) -c $@ */*.o + +cstrong: $(OSLIBCSTRONG) +$(OSLIBCSTRONG): BuildRequirements + $(MAKE) -C Computer/oslib cstrong + $(MAKE) -C Core/oslib cstrong + $(MAKE) -C Macros/oslib cstrong + $(MAKE) -C Toolbox/oslib cstrong + $(MAKE) -C Types/oslib cstrong + $(MAKE) -C User/oslib cstrong + cd $(BUILDDIR) && $(BINDHELP) $(CSTRONGDIR) $@ + +BuildRequirements: + if [ ! -d $(BINDIR) ]; then $(MKDIR) $(BINDIR); fi + if [ ! -d $(CSTRONGDIR) ]; then $(MKDIR) $(CSTRONGDIR); fi + if [ ! -d $(HEADERDIR) ]; then $(MKDIR) $(HEADERDIR); fi + if [ ! -d $(OBJDIR) ]; then $(MKDIR) $(OBJDIR); fi + if [ ! -d $(OBJEXCEPTDIR) ]; then $(MKDIR) $(OBJEXCEPTDIR); fi Added: branches/simplified-build/!OsLib/Source/Makefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.inc (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,64 @@ +# ... + +ASMHEADERS = $(patsubst %,%.Hdr,$(S... [truncated message content] |
From: <jt...@us...> - 2007-04-21 11:34:25
|
Revision: 249 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=249&view=rev Author: jtytgat Date: 2007-04-21 04:34:22 -0700 (Sat, 21 Apr 2007) Log Message: ----------- - Slightly better syntax reporting. - Enforce file/directory permissions on the website working copy and make rsync to take those into account as well. - Check there is at least an index.html in the website directory (extra sanity check). Modified Paths: -------------- trunk/upload-website Modified: trunk/upload-website =================================================================== --- trunk/upload-website 2007-04-15 22:35:27 UTC (rev 248) +++ trunk/upload-website 2007-04-21 11:34:22 UTC (rev 249) @@ -1,12 +1,12 @@ #!/bin/bash # Uploads the OSLib website based on the local SVN repository contents. # Written by John Tytgat -# Syntax: update-website <sf.net username> +# Syntax: update-website <sourceforge.net username> set -e if [ "x"$1 == "x" ] ; then - echo "Syntax: update-website <sf.net username>" + echo "Syntax: update-website <sourceforge.net username>" exit 1 fi @@ -16,20 +16,30 @@ # Small sanity check verifying if we can find the root of the OSLib website as # directory. if [ ! -d "$WEBSITE_SRC" ] ; then - echo "Failed to find the OSLib website contents at $WEBSITE_SRC" + echo "Failed to find the OSLib website contents at $WEBSITE_SRC." exit 1 fi +if [ ! -f "$WEBSITE_SRC/index.html" ] ; then + echo "Website at $WEBSITE_SRC does not have an index.html file." + exit 1 +fi # Check if the local SVN repository of the website does not contain local modifications # which haven't been commited yet. SVNCHANGES="`svn status --non-interactive $WEBSITE_SRC 2>&1`" if [ ! -z "$SVNCHANGES" ] ; then - echo "Local SVN directory $WEBSITE_SRC is not clean. Please clean it and/or commit first." + echo "Local SVN directory $WEBSITE_SRC is not clean. Please clean it and/or commit changes first." echo $SVNCHANGES exit 1 fi +# Enforce the correct file/directory permissions as these are rsync'ed as well (allowing +# the other OSLib developers to upload/change the website contents without permission +# problems): +find "$WEBSITE_SRC" -type d -exec chmod 2775 "{}" \; +find "$WEBSITE_SRC" -type f -exec chmod 664 "{}" \; + # Sync it: -rsync -zr --delete --force --progress -C --rsh="ssh -l $USERNAME" $WEBSITE_SRC/ $USE...@sh...:/home/groups/r/ro/ro-oslib/htdocs +rsync -zrp --delete --force --progress -C --rsh="ssh -l $USERNAME" $WEBSITE_SRC/ $USE...@sh...:/home/groups/r/ro/ro-oslib/htdocs echo "Done." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-15 22:35:29
|
Revision: 248 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=248&view=rev Author: jtytgat Date: 2007-04-15 15:35:27 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Get rid of realloc() (as REALLOC()) implementation Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/support/m.h Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/support/doc/realloc branches/simplified-build/!OsLib/Tools/support/realloc.c branches/simplified-build/!OsLib/Tools/support/realloc.h Deleted: branches/simplified-build/!OsLib/Tools/support/doc/realloc =================================================================== --- branches/simplified-build/!OsLib/Tools/support/doc/realloc 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/doc/realloc 2007-04-15 22:35:27 UTC (rev 248) @@ -1,4 +0,0 @@ -realloc.c ---------- - - Just a portable realloc with no bugs. It's called REALLOC, though. Modified: branches/simplified-build/!OsLib/Tools/support/m.h =================================================================== --- branches/simplified-build/!OsLib/Tools/support/m.h 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/m.h 2007-04-15 22:35:27 UTC (rev 248) @@ -26,11 +26,6 @@ /*From CLib*/ #include <stdlib.h> -/*From Support*/ -#ifndef realloc_H - #include "realloc.h" -#endif - #ifndef trace_H #include "trace.h" #endif @@ -75,7 +70,7 @@ #define m_ALLOC(size) malloc (size) #define m_CALLOC(count, size) calloc (count, size) #define m_FREE(ptr, size) free (ptr) - #define m_REALLOC(ptr, old_size, size) REALLOC (ptr, size) + #define m_REALLOC(ptr, old_size, size) realloc (ptr, size) #define m_SUMMARY() SKIP #define m_VALIDATE_ADDRESS(ptr) ((void *) (ptr)) #endif Deleted: branches/simplified-build/!OsLib/Tools/support/realloc.c =================================================================== --- branches/simplified-build/!OsLib/Tools/support/realloc.c 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/realloc.c 2007-04-15 22:35:27 UTC (rev 248) @@ -1,55 +0,0 @@ -/*realloc.c - portable realloc with no bugs!*/ - -/*OSLib---efficient, type-safe, transparent, extensible,\n" - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -#include <stdlib.h> -#include <string.h> - -#include "realloc.h" - -void *REALLOC -( - void *ptr, - size_t size -) -{ - if (ptr != NULL && size != 0) - { - void *tmp; - - if ((tmp = malloc (size)) == NULL) - return NULL; - - memcpy (tmp, ptr, size); - - free (ptr); - - return tmp; - } - else if (size != 0) - return malloc (size); - else - { - /*ptr != NULL*/ - free (ptr); - return NULL; - } -} Deleted: branches/simplified-build/!OsLib/Tools/support/realloc.h =================================================================== --- branches/simplified-build/!OsLib/Tools/support/realloc.h 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/realloc.h 2007-04-15 22:35:27 UTC (rev 248) @@ -1,30 +0,0 @@ -#ifndef realloc_H -#define realloc_H - -/*realloc.c - portable realloc with no bugs!*/ - -/*OSLib---efficient, type-safe, transparent, extensible,\n" - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -#include <stddef.h> - -extern void *REALLOC (void *ptr, size_t size); - -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-15 14:07:19
|
Revision: 247 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=247&view=rev Author: jtytgat Date: 2007-04-15 07:07:13 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Go for flat src structure Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/DefMod2/defmod/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-15 12:42:38
|
Revision: 246 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=246&view=rev Author: jtytgat Date: 2007-04-15 05:42:37 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Created separate branch to trial out simplified build changes. Added Paths: ----------- branches/simplified-build/ Copied: branches/simplified-build (from rev 245, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-15 10:41:38
|
Revision: 245 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=245&view=rev Author: jtytgat Date: 2007-04-15 03:41:33 -0700 (Sun, 15 Apr 2007) Log Message: ----------- - Made it HTML compliant again (based on feedback from Erik Groenhuis <e.g...@xs...>) - Using LastChangedBy and LastChangedDate SVN keywords to show on each webpage who made the last change and when. Modified Paths: -------------- trunk/website/archives.html trunk/website/contact.html trunk/website/download.html trunk/website/faq.html trunk/website/future.html trunk/website/guide.html trunk/website/history.html trunk/website/index.html trunk/website/release-6.80.html trunk/website/release-6.90.html trunk/website/svn.html Property Changed: ---------------- trunk/website/archives.html trunk/website/contact.html trunk/website/download.html trunk/website/faq.html trunk/website/future.html trunk/website/guide.html trunk/website/history.html trunk/website/index.html trunk/website/release-6.80.html trunk/website/release-6.90.html trunk/website/svn.html Modified: trunk/website/archives.html =================================================================== --- trunk/website/archives.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/archives.html 2007-04-15 10:41:33 UTC (rev 245) @@ -127,16 +127,37 @@ <hr WIDTH="100%"> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<div align=right><font size=-1> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -Tony van der Hoff, -<br>02 January 2007 +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -</font></div> - </body> </html> Property changes on: trunk/website/archives.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/contact.html =================================================================== --- trunk/website/contact.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/contact.html 2007-04-15 10:41:33 UTC (rev 245) @@ -127,19 +127,36 @@ <hr WIDTH="100%"> -<!-- footer --> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -<div align=right><font size=-1> - -Tony van der Hoff, -<br>04 May 2005 - -</font></div> - +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> <!-- end footer --> </body> Property changes on: trunk/website/contact.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/download.html =================================================================== --- trunk/website/download.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/download.html 2007-04-15 10:41:33 UTC (rev 245) @@ -87,21 +87,37 @@ <hr WIDTH="100%"> -<!-- footer --> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -<div align=right><font size=-1> - -Tony van der Hoff, -<br>16 December 2006 - -</font></div> - +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> <!-- end footer --> - </body> </html> Property changes on: trunk/website/download.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/faq.html =================================================================== --- trunk/website/faq.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/faq.html 2007-04-15 10:41:33 UTC (rev 245) @@ -366,21 +366,41 @@ </blockquote> <a href="#top">top</a> <a href="index.html">Home</a> -<hr SIZE=4 WIDTH="100%"> +<hr WIDTH="100%"> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<div align=right> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> + +<td ALIGN=RIGHT> <font size=-1> -Tony van der Hoff -<br>04 January 2004 -</font></div> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -<hr WIDTH="100%"> - </body> </html> Property changes on: trunk/website/faq.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/future.html =================================================================== --- trunk/website/future.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/future.html 2007-04-15 10:41:33 UTC (rev 245) @@ -78,21 +78,37 @@ <hr WIDTH="100%"> -<!-- footer --> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -<div align=right><font size=-1> - -Tony van der Hoff, -<br>30 November 2002 - -</font></div> - +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> <!-- end footer --> - </body> </html> Property changes on: trunk/website/future.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/guide.html =================================================================== --- trunk/website/guide.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/guide.html 2007-04-15 10:41:33 UTC (rev 245) @@ -220,15 +220,42 @@ </UL> <p align = right><small>Jonathan Coxhead</small></P> +<BR><A HREF="index.html">Home</A> +<BR> -<HR WIDTH="100%"> +<hr WIDTH="100%"> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -<BR><A HREF="index.html">Home</A> -<BR> +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> + </BODY> </HTML> Property changes on: trunk/website/guide.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/history.html =================================================================== --- trunk/website/history.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/history.html 2007-04-15 10:41:33 UTC (rev 245) @@ -96,23 +96,39 @@ </td></tr> <!-- end main content --> </table> <!-- end outer table --> </center> -<hr> +<hr WIDTH="100%"> -<!-- footer --> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> - -<div align=right><font size=-1> - -Tony van der Hoff, -<br>30 November 2002 - -</font></div> - +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> <!-- end footer --> </body> Property changes on: trunk/website/history.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/index.html =================================================================== --- trunk/website/index.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/index.html 2007-04-15 10:41:33 UTC (rev 245) @@ -143,6 +143,12 @@ <hr WIDTH="100%"> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> + +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> <!-- any browser logo --> <a href="http://www.anybrowser.org/campaign"> <img border="0" @@ -150,7 +156,6 @@ alt="Viewable with any Browser" height="31" width="88"> </a> - <!-- html 4 logo --> <a href="http://validator.w3.org/check/referer"> <img border="0" @@ -158,14 +163,17 @@ alt="Valid HTML 4.01!" height="31" width="88"> </a> +</td></tr> +</table> -<div align=right><font size=-1> +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -Tony van der Hoff, -<br>04 December 2002 - -</font></div> - - </body> </html> Property changes on: trunk/website/index.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/release-6.80.html =================================================================== --- trunk/website/release-6.80.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/release-6.80.html 2007-04-15 10:41:33 UTC (rev 245) @@ -136,20 +136,39 @@ </tr> </table><!-- end outer table --> -<!--footer--> <hr WIDTH="100%"> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> + +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> <a href="http://validator.w3.org/check/referer"> - <img border="0" src="http://www.w3.org/Icons/valid-html401" - alt="Valid HTML 4.01!" height="31" width="88"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> </a> +</td></tr> +</table> -<div align=right><font size=-1> +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -Tony van der Hoff, -<br>31 December 2005 - -</font></div> - </body> </html> Property changes on: trunk/website/release-6.80.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/release-6.90.html =================================================================== --- trunk/website/release-6.90.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/release-6.90.html 2007-04-15 10:41:33 UTC (rev 245) @@ -37,7 +37,7 @@ </td></tr> <tr BGCOLOR="#80FFFF"><td> - <a href="whttp://downloads.sourceforge.net/ro-oslib/OSLib-wide-6.90.zip">Library</a> + <a href="http://downloads.sourceforge.net/ro-oslib/OSLib-wide-6.90.zip">Library</a> suitable for file systems with unlimited files per directory (e.g. RISC OS 4, LanMan, or X-Files) (1064 Kb) @@ -152,20 +152,39 @@ </tr> </table><!-- end outer table --> -<!--footer--> <hr WIDTH="100%"> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> + +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> <a href="http://validator.w3.org/check/referer"> - <img border="0" src="http://www.w3.org/Icons/valid-html401" - alt="Valid HTML 4.01!" height="31" width="88"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> </a> +</td></tr> +</table> -<div align=right><font size=-1> +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -Tony van der Hoff, -<br>02 January 2007 - -</font></div> - </body> </html> Property changes on: trunk/website/release-6.90.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate Modified: trunk/website/svn.html =================================================================== --- trunk/website/svn.html 2007-04-14 23:17:55 UTC (rev 244) +++ trunk/website/svn.html 2007-04-15 10:41:33 UTC (rev 245) @@ -69,7 +69,7 @@ <p>To obtain the sources for the current stable release version, you need to specify the version tag; i.e. <code>svn co https://ro-oslib.svn.sourceforge.net/svnroot/ro-oslib/tags/<tag> oslib</code>, -where <code><tag></code> is the specic OSlib version wanted, like e.g. oslib-690.</li> +where <code><tag></code> is the specic OSlib version wanted, like e.g. oslib-690. <p>There is quite a lot of code, so it may take a little while on a slow link, but I'm sure you'll find it whorthwhile! A <code>!Readme</code> file in the @@ -85,16 +85,37 @@ <hr WIDTH="100%"> -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> +<!-- start footer --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP><td> -<div align=right><font size=-1> +<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="250"> +<tr><td> +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> +</td></tr> +</table> -Tony van der Hoff, -<br>03 February 2007 +<td ALIGN=RIGHT> +<font size=-1> +$LastChangedBy$<br> +$LastChangedDate$ +</font> +</td></tr> +</table> +<!-- end footer --> -</font></div> - </body> </html> Property changes on: trunk/website/svn.html ___________________________________________________________________ Name: svn:keywords + LastChangedBy LastChangedDate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-14 23:17:58
|
Revision: 244 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=244&view=rev Author: jtytgat Date: 2007-04-14 16:17:55 -0700 (Sat, 14 Apr 2007) Log Message: ----------- This script can be used to update the OSLib website with the commited working copy. Use: ./uploate-website <username> with <username> your sf.net developer username. Added Paths: ----------- trunk/upload-website Added: trunk/upload-website =================================================================== --- trunk/upload-website (rev 0) +++ trunk/upload-website 2007-04-14 23:17:55 UTC (rev 244) @@ -0,0 +1,35 @@ +#!/bin/bash +# Uploads the OSLib website based on the local SVN repository contents. +# Written by John Tytgat +# Syntax: update-website <sf.net username> + +set -e + +if [ "x"$1 == "x" ] ; then + echo "Syntax: update-website <sf.net username>" + exit 1 +fi + +WEBSITE_SRC="`dirname $0`/website" +USERNAME="$1" + +# Small sanity check verifying if we can find the root of the OSLib website as +# directory. +if [ ! -d "$WEBSITE_SRC" ] ; then + echo "Failed to find the OSLib website contents at $WEBSITE_SRC" + exit 1 +fi + +# Check if the local SVN repository of the website does not contain local modifications +# which haven't been commited yet. +SVNCHANGES="`svn status --non-interactive $WEBSITE_SRC 2>&1`" +if [ ! -z "$SVNCHANGES" ] ; then + echo "Local SVN directory $WEBSITE_SRC is not clean. Please clean it and/or commit first." + echo $SVNCHANGES + exit 1 +fi + +# Sync it: +rsync -zr --delete --force --progress -C --rsh="ssh -l $USERNAME" $WEBSITE_SRC/ $USE...@sh...:/home/groups/r/ro/ro-oslib/htdocs + +echo "Done." Property changes on: trunk/upload-website ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-14 23:15:13
|
Revision: 243 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=243&view=rev Author: jtytgat Date: 2007-04-14 16:15:03 -0700 (Sat, 14 Apr 2007) Log Message: ----------- - Updated details of the CVS -> SVN repository change. - Consistent spelling for RISC OS, etc. Modified Paths: -------------- trunk/website/archives.html trunk/website/contact.html trunk/website/download.html trunk/website/faq.html trunk/website/future.html trunk/website/guide.html trunk/website/history.html trunk/website/index.html trunk/website/release-6.80.html trunk/website/release-6.90.html Added Paths: ----------- trunk/website/svn.html Removed Paths: ------------- trunk/website/cvs.html Modified: trunk/website/archives.html =================================================================== --- trunk/website/archives.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/archives.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release - Archives</title> </head> @@ -31,7 +31,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> - <li><a href="cvs.html">Source via CVS</a></li> + <li><a href="svn.html">Source via SVN</a></li> </ul> </li> <li><a href="contact.html">Contacts</a></li> @@ -85,7 +85,7 @@ <ul> <li><p> <b><a href="release-6.90.html">Version 6.90</a></b> - (02 January 2006). Adds some Reporter SWIs, and + (02 January 2007). Adds some Reporter SWIs, and fixes bugs in PCI, OS, and ColourTrans. </p></li> Modified: trunk/website/contact.html =================================================================== --- trunk/website/contact.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/contact.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release - Contacts</title> </head> @@ -32,7 +32,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> @@ -76,7 +76,7 @@ </li> <li><b>oslib-commits</b> -- This is a mail-list which sends -automatically-generated information whenever an update is committed to the CVS +automatically-generated information whenever an update is committed to the SVN repository. If you want to keep bang up-to-date with OSLib, then this is for you. Subscribe via the <a href="http://sourceforge.net/projects/ro-oslib/"> @@ -114,6 +114,10 @@ administers these web pages, and arranges periodic releases of the library. </li> +<li><a href="mailto:Joh...@aa...">John Tytgat</a> -- John is driving +the start of OSLib 7.00 development. +</li> + </ul> </td></tr> <!-- end main content --> Deleted: trunk/website/cvs.html =================================================================== --- trunk/website/cvs.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/cvs.html 2007-04-14 23:15:03 UTC (rev 243) @@ -1,125 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> - <meta name="Author" content="Tony van der Hoff"> - <title>The OSLib GPL Release - cvs</title> -</head> -<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> - -<p> -<center><h1>Obtaining OSLib via CVS</h1></center> - -<hr> - -<!--Begin outer table --> -<center> -<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > -<tr VALIGN=TOP> -<td> - - -<!-- contents list Table --> -<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > - -<!-- Contents list --> -<tr BGCOLOR="#80ffff"> -<td> -<h2>Site Contents</h2> -<ul> -<li><a href="history.html">History and Copyright</a></li> -<li><a href="future.html">Future Development</a></li> -<li><a href="download.html">Obtaining OSLib</a> -<ul> -<li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> -</ul></li> -<li><a href="contact.html">Contacts</a></li> -<li><a href="faq.html">FAQ</a></li> -</ul> -<a href="index.html">Home</a> -</td></table> <!-- end contents list table --> - -<td ALIGN=LEFT> <!--Begin main content table --> - -<p><h2><a name="summary">Summary</a></h2> - -<p>The sources for OSLib, OSLibSupport, and the various build tools are -freely available via CVS from SourceForge. - -<p>You may browse the repository using <a -href="http://ro-oslib.cvs.sourceforge.net/ro-oslib">ViewCVS</a>. - -<p>In order to check out the repository to a local directory on your RISC OS -machine, you'll need a CVS client running. <a -href="http://www.cvs.riscos.org.uk">John Tytgat's port</a> is suitable, athough -the front end application is out of date in respect to the main application, -so it's probably best to use the command line interface. In order to -correctly perform the filename translation from UNIX style to RISC OS, you'll -need to set suffix swapping (either in the application window or via the -environment variable UnixEnv$cvs$sfix) to include the extensions -c:cc:h:swi:asm:s:Hdr:y. - -<p>The alternative is to check out the project onto a Linux box. If you're -using Linux, you'll know how to do this. OSLib and its tools may be built under Linux, -or under RISC OS. To do the latter, it is necessary to change all -filenames from UNIX <name>.<ext> format to the RISC OS -<dir>.<name> format. This is most easily achieved by using Tony -van der Hoff's <a href="http://www.vanderhoff.org/software/risc_os/unixify.zip">Unixify</a> -command-line utility. The archive contains a couple of example TaskObey -files, one of which shows how to RISCOSify the OSLib sandbox. - -<p>Whichever platform you choose to use, the anonymous checkout procedure is -similar: - -<ol> - -<li>Set the environment variable CVSROOT to -:pserver:ano...@ro...:/cvsroot/ro-oslib</li> - -<li>Log in to SourceForge using the command "cvs login"; when prompted for a -password, simply press Enter.</li> - -<li>Set the working directory to wherever you want your sandbox to end up -(alternatively use -dir <dir> in the cvs checkout command, but this can -involve a lot of typing in a deeply-nested structure).</li> - -<li>Check out the repository, using the command -"cvs -z3 checkout -P OSLib". This will get you the head -revision, which is what most CVS users will want. However, be warned that -this is in development, and may contain some unwanted surprises. To obtain -the sources for the current stable release version, you need to specify the -version tag; i.e. -"cvs -z3 checkout -dP -r <tag> OSLib", -where <tag> is the OSlib version, e.g. "oslib-690".</li> - -</ol> - -<p>There is quite a lot of code, so it may take a little while on a slow -link, but I'm sure you'll find it whorthwhile! A !Readme file in the main -application directory explains how to build OSLib under RISC OS. You will -need a C compiler, a Linker, a Make utility, and an ARM assembler in addition -to the tools provided. - -</td></tr> <!-- end main content --> - -</table> <!-- end outer table --> -</center> - -<hr WIDTH="100%"> - -<a href="http://validator.w3.org/check/referer"><img border="0" -src="http://www.w3.org/Icons/valid-html401" -alt="Valid HTML 4.01!" height="31" width="88"></a> - -<div align=right><font size=-1> - -Tony van der Hoff, -<br>03 February 2007 - -</font></div> - -</body> -</html> Modified: trunk/website/download.html =================================================================== --- trunk/website/download.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/download.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release - Download</title> </head> @@ -32,7 +32,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> @@ -57,21 +57,21 @@ <p>First, the <a href="archives.html"><b>OSLib Library</b></a> in binary (ALF) form, complete with C and assembler headers, is available for download as a zipped archive, for download. This is all you need to link with your own -applications to provide access to all the RISC O S SWI calls from assembler +applications to provide access to all the RISC OS SWI calls from assembler or C. The archive contains both 26-bit and 32-bit versions, for linking with the appropriate Stubs or UnixLib. <p>Secondly, the <a href="archives.html"><b>OSLibSupport library</b></a>, again in binary (ALF) form, complete with C, is available for download as a zipped archive, for download. This is a C library of support functions, -designed to make programming the RISC OS WIMP and Toolbox modules as easy as +designed to make programming the RISC OS WIMP and Toolbox modules as easy as possible. <p>Third, a <a href="archives.html"><b>StrongHelp</b></a> manual covering the entire API from C is available for each version. -<p>Finally, the <a href="cvs.html"><b>complete source</b></a> for the project -is now available via CVS from +<p>Finally, the <a href="svn.html"><b>complete source</b></a> for the project +is now available via SVN from SourceForge. This includes all source files, together with the tools necessary to build the library. In addition, Makefiles are provided to build the tools, and the library, from scratch, out of the box, with just one Modified: trunk/website/faq.html =================================================================== --- trunk/website/faq.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/faq.html 2007-04-14 23:15:03 UTC (rev 243) @@ -32,7 +32,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> @@ -66,13 +66,13 @@ <ul> -<li> <a href="#wide file handles"> What are wide file handles and why are +<li><a href="#wide file handles">What are wide file handles and why are 8-bit handles retained?</a> </li> -<li> <a href="#signed ints"> Why are file sizes and os_t typed as signed +<li><a href="#signed ints">Why are file sizes and os_t typed as signed ints?</a> </li> -<li> <a href="#command line"> What command line should I use for compiling +<li><a href="#command line">What command line should I use for compiling or assembling a program using OSLib?</a> </li> </ul> @@ -101,11 +101,6 @@ Does OSLib support 32-bit architectures?</a></li> <li> -<a href="#Why both"> -Why do the distribution archives contain both 32-bit and 26-bit versions of -the library?</a></li> - -<li> <a href="#tboxlib"> Why does my toolbox application crash when linked with OSLib and tboxlibs? </a></li> @@ -164,7 +159,7 @@ <blockquote> OSLib originally defined file handles to be 8 bits wide. This was based on -inside knowledge of the OS, and even under RISC OS 4, no file handle greater +inside knowledge of the OS, and even under RISC OS 4, no file handle greater than &FF is ever issued. However, the PRMs do specify that file handles should be 32 bits wide for future compatibility. @@ -226,19 +221,50 @@ <p> A generalised command line for Acorn (Norcroft) C using standard C, OSLibSupport, and OSLib would be something like this:<br> -cc -IC:,OSLibSupport:,OSLib: program.c -o program.o<br> +<blockquote> + <code> +cc -IC:,OSLibSupport:,OSLib: C:o.stubs OSLib:o.OSLib OSLibSupport:o.OSLibSupport -o program.o program.c + </code> +</blockquote> +or: +<blockquote> + <code> +cc -IC:,OSLibSupport:,OSLib: -c program.c -o program.o<br> link program.o C:o.stubs OSLib:o.OSLib OSLibSupport:o.OSLibSupport -output program + </code> +</blockquote> <p> For GCC (with UnixLib) this becomes somewhat simpler with the compile and link -steps merged: <br> +steps merged:<br> +<blockquote> + <code> gcc program.c -I OSLib: -I OSLibSupport: OSLib:o.OSLib OSLibSupport:o.OSLibSupport -o program + </code> +</blockquote> +or: +<blockquote> + <code> +gcc -I OSLib: -I OSLibSupport: -c program.c -o program +gcc program.o OSLib:o.OSLib OSLibSupport:o.OSLibSupport -o program + </code> +</blockquote> <p> ObjASM doesn't seem to be able to expand path variables in the command line, so it is necessary to bodge things a bit:<br> +<blockquote> + <code> do ObjASM -I <OSLibPath> program.s program.o<br> link program.o -output program + </code> +</blockquote> <p> -I don't yet know how to invoke GCC assembler, sorry. +The GCC assembler can get invoked by:<br> +<blockquote> + <code> +gcc -I OSLib: -I OSLibSupport: -c program.s -o program.o<br> +gcc program.o OSLib:o.OSLib OSLibSupport:o.OSLibSupport -o program + </code> +</blockquote> </blockquote> @@ -307,43 +333,24 @@ <H4>Does OSLib support 32-bit architectures?</H4> <blockquote> -OSLib can be built for both 26 bit and 32 bit architectures. The source code +<p>OSLib can be built using APCS-R and APCS-32 ABIs. The former can only be used +for running on 26-bit architectures, while the latter can run on both 26-bit and +32-bit architectures. APCS-R is deprecated and it is recommmended to have your +programs built using APCS-32 for future compatibility with new ARM hardware. + +<p>The OSLib source code is identical for either. The binary distribution contains two ALF images: -OSLib and OSLib32. The 32 bit version does not preserve the caller's +OSLib (APCS-R) and OSLib32 (APCS-32). The 32 bit version does not preserve the caller's processor flags, the 26 bit one does; this may raise compatibility issues -when migrating from one to the other. Link to whichever you wish. -</blockquote> +when migrating from one to the other so choose the correct one you're linking. -<a href="#top">top</a> <a href="index.html">Home</a> -<hr SIZE=4 WIDTH="100%"> +<p>Note that the last version of APCS-R OSLibSupport is 6.70. All later versions of +OSLibSupport library are APCS-32 only. -<P><a name="Why both"></a> -<H4>Why do the distribution archives contain both 32-bit and 26-bit versions -of the library?</H4> +<p>It is expected that OSLib 7.00 release will be APCS-32 only and that APCS-R support +will be dropped for good. +</blockquote> -<blockquote> -This requirement is imposed by the lack of general availability of the 32-bit -Shared C Library (SCL) within RISC OS. Also, UNIXLib is currently still only -available in 26-bit form.<br> - -<p>The APCS-R (26-bit) SCL and UNIXLib absolutely requires flag preservation -across calls, and this wouldn't work with APCS-32 code. Also, the structure -of the stubs has been changed significantly to accommodate a 32-bit system -(where you can't use B to branch to the C library). A new C library is -required to support those stubs. - -<p>It is not generally possible to mix APCS-R (26 bit) and APCS-32 (32 bit) -code, and the linker will warn you if you try to do so. Hopefully everyone -will be building APCS-32 soon, but until then people will need the APCS-R -version of OSLib. <br> - -<p>It is presently impossible to mandate that application builders use only -the 32-bit Shared C Library, despite the latter being readily available, and -32-bit UNIXLib is currently unavailable. As it is not possible to mix a -32-bit OSLib with a 26-bit C library, the OSLib team are making both versions -available, and will continue to do so until the 32-bit C libraries becomes -the norm.<br> </blockquote> - <a href="#top">top</a> <a href="index.html">Home</a> <hr SIZE=4 WIDTH="100%"> Modified: trunk/website/future.html =================================================================== --- trunk/website/future.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/future.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release - Further Development</title> </head> @@ -33,7 +33,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> Modified: trunk/website/guide.html =================================================================== --- trunk/website/guide.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/guide.html 2007-04-14 23:15:03 UTC (rev 243) @@ -32,7 +32,7 @@ into the call stack or however small the function in progress. This is done by keeping to a strict discipline (when I can be bothered :-) <P> Every function that everyone has ever written can return -an error. Normally in RISC O S code this is done by returning an |os_error +an error. Normally in RISC OS code this is done by returning an |os_error *|. In <BR>UNIX-style code, it is done by returning -1 and setting |errno|. Whatever the mechanism is, it *must* be checked when calling the function. Every @@ -40,7 +40,7 @@ an error, a |goto finish;| is executed immediately. (The only thing that can be done before "go to finish" is to assign the current function's error indicator.) At |finish:|, any local resources that may have been claimed -(in C, chiefly malloced memory and file handlers, but under RISC O S also +(in C, chiefly malloced memory and file handlers, but under RISC OS also windows, fonts, vectors, etc) are released. The current function then returns the error back to its own caller. <P> In this way, when any function returns an error, the whole @@ -92,7 +92,7 @@ <BR> <H3> DefMod and SWILib</H3> - DefMod is a RISC O S programme written in C, and it looks as though + DefMod is a RISC OS programme written in C, and it looks as though it uses OSLib. If it did, it could never have been written, as it logically <BR>precedes OSLib. So how was this done? <P> It uses a hand-crafted set of macros called SWILib. This @@ -171,7 +171,7 @@ <BR> <H3> Extensible Interfaces</H3> - There are lots of cases in RISC O S of extensible interfaces: + There are lots of cases in RISC OS of extensible interfaces: Wimp messages can be defined by anyone, for example. It is not good in these <BR>cases to put all of them into a file (swi.Wimp): this would mean that Modified: trunk/website/history.html =================================================================== --- trunk/website/history.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/history.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release - History</title> </head> @@ -33,7 +33,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> Modified: trunk/website/index.html =================================================================== --- trunk/website/index.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/index.html 2007-04-14 23:15:03 UTC (rev 243) @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Zap HoTMeaL"> - <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="content" content="Acorn, RISC OS, OSLib"> <meta name="Author" content="Tony van der Hoff"> <title>The OSLib GPL Release</title> </head> @@ -25,7 +25,7 @@ --> <!-- Begin header --> -<center><h1>The RISC OS OSLib GPL Release</h1></center> +<center><h1>The RISC OS OSLib GPL Release</h1></center> <hr> @@ -48,7 +48,7 @@ <li><a href="download.html">Obtaining OSLib</a> <ul> <li><a href="archives.html">ZIP Archives</a></li> -<li><a href="cvs.html">Source via CVS</a></li> +<li><a href="svn.html">Source via SVN</a></li> </ul></li> <li><a href="contact.html">Contacts</a></li> <li><a href="faq.html">FAQ</a></li> @@ -65,12 +65,12 @@ <h3>Summary</h3> OSLib is a highly optimized interface library for the Application Programmers' -Interface (API) for the Acorn series of 32 bit RISC OS computers. It is +Interface (API) for the Acorn series of 32 bit RISC OS computers. It is a useful tool for application program writers for this platform. It is of no use for any other platform. <p>OSLib provides a set of functions and C headers For its target platform, -to provide complete coverage of the RISC OS API (the so-called SWIs) as a set +to provide complete coverage of the RISC OS API (the so-called SWIs) as a set of C/C++ and ARM Assembler headers, together with a thin veneer library. <p>OSLib is: @@ -97,7 +97,7 @@ or _swix(), both in terms of the compile time type checking that is available, and the size and speed of the code generated. -<p>OSLib provides a very convenient interface to the RISC O�S programmer, +<p>OSLib provides a very convenient interface to the RISC OS programmer, since all the facilities of the C compiler are available to catch errors and generate good code. It is very small, and code written using it is smaller and faster than code written using other means. @@ -107,9 +107,9 @@ <p> <h3>OSLibSupport</h3> Whilst not strictly part of OSLib, which specialises in providing an -interface to the RISC OS API, the OSLib development team also maintain a +interface to the RISC OS API, the OSLib development team also maintain a higher-level C library, providing an easier to use interface, via OSLib, to -the more arcane parts of RISC OS, and deals with Events, Messages, Tasks, +the more arcane parts of RISC OS, and deals with Events, Messages, Tasks, Exceptions, and Errors. This is distributed on the same basis and under the same licence conditions as OSLib itself. @@ -122,7 +122,7 @@ <hr WIDTH="100%"> <!-- footer --> -<p><center>The RISC OS OSLib project repository is hosted by SourceForge. +<p><center>The <a href="http://sourceforge.net/projects/ro-oslib/">RISC OS OSLib project 'ro-oslib'</a> is hosted by SourceForge. <br> <!-- SourceForge Logo --> Modified: trunk/website/release-6.80.html =================================================================== --- trunk/website/release-6.80.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/release-6.80.html 2007-04-14 23:15:03 UTC (rev 243) @@ -39,14 +39,14 @@ <tr BGCOLOR="#80FFFF"><td> <a href="http://downloads.sourceforge.net/ro-oslib/OSLib-wide-6.80.zip">Library</a> suitable for file systems with unlimited - files per directory (e.g. RISC OS 4, + files per directory (e.g. RISC OS 4, LanMan, or X-Files) (1080 Kb) </td></tr> <tr BGCOLOR="#80FFFF"><td> <a href="http://downloads.sourceforge.net/ro-oslib/OSLib-unix-6.80.zip">Library</a> using UNIX file-naming conventions. - Suitable for building RISC-OS + Suitable for building RISC OS targets under UNIX/LINUX (1007 Kb) </td></tr> @@ -59,8 +59,8 @@ <a href="http://downloads.sourceforge.net/ro-oslib/OSLibExamples-6.80.zip">Examples</a> from the PRMs, but using OSLib (956 Kb).<br /> Note that an example of a full WIMP application using - OSLib and the RISC OS toolbox can be found at - <a href="http://www.vanderhoff.org/software/risc_os/dustbin.zip"> + OSLib and the RISC OS toolbox can be found at + <a href="http://www.vanderhoff.org/software/risc_os/dustbin.zip"> Tony's web site </a> </td></tr> Modified: trunk/website/release-6.90.html =================================================================== --- trunk/website/release-6.90.html 2007-04-14 17:46:43 UTC (rev 242) +++ trunk/website/release-6.90.html 2007-04-14 23:15:03 UTC (rev 243) @@ -64,8 +64,8 @@ <a href="http://downloads.sourceforge.net/ro-oslib/OSLibExamples-6.90.zip">Examples</a> from the PRMs, but using OSLib (30 Kb).<br /> Note that an example of a full WIMP application using - OSLib and the RISC OS toolbox can be found at - <a href="http://www.vanderhoff.org/software/risc_os/dustbin.zip"> + OSLib and the RISC OS toolbox can be found at + <a href="http://www.vanderhoff.org/software/risc_os/dustbin.zip"> Tony's web site </a> </td></tr> Copied: trunk/website/svn.html (from rev 242, trunk/website/cvs.html) =================================================================== --- trunk/website/svn.html (rev 0) +++ trunk/website/svn.html 2007-04-14 23:15:03 UTC (rev 243) @@ -0,0 +1,100 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, RISC OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - SVN</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<p> +<center><h1>Obtaining OSLib via SVN</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"> +<td> +<h2>Site Contents</h2> +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="svn.html">Source via SVN</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> +<a href="index.html">Home</a> +</td></table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p><h2><a name="summary">Summary</a></h2> + +<p>The sources for OSLib and OSLibSupport, the build tools and even the +contents of this website are freely available via SVN from <a href="http://sourceforge.net/">SourceForge</a>. + +<p>You may browse the repository using <a +href="http://ro-oslib.svn.sourceforge.net/viewvc/ro-oslib/">ViewVC</a>. + +<p>In order to check out the repository to a local directory on your RISC OS +machine, you'll need an SVN client running. <a +href="http://www.cp15.org/versioncontrol/">Alex Waugh's port</a> is the one you +need. In order to correctly have RISC OS filetype support, you need to have +set <code>*set svn$filetypeext ""</code>. + +<p>The alternative is to check out the project onto a non-RISC OS platform which is supported +by the <a href="http://gccsdk.riscos.info/">GCCSDK</a> project using an SVN client suited +for that host. + +<p>Whichever platform you choose to use, the anonymous checkout procedure is +similar : check out the repository, using the command <code>svn co https://ro-oslib.svn.sourceforge.net/svnroot/ro-oslib/trunk oslib</code>. This will get you the head revision, which is what most SVN users will want. However, be warned that +this is in development, and may contain some unwanted surprises. + +<p>To obtain +the sources for the current stable release version, you need to specify the version tag; i.e. +<code>svn co https://ro-oslib.svn.sourceforge.net/svnroot/ro-oslib/tags/<tag> oslib</code>, +where <code><tag></code> is the specic OSlib version wanted, like e.g. oslib-690.</li> + +<p>There is quite a lot of code, so it may take a little while on a slow +link, but I'm sure you'll find it whorthwhile! A <code>!Readme</code> file in the +application directory !OsLib explains how to build OSLib under RISC OS or other +GCCSDK supported host using the cross-compiler. You will +need a C compiler, a Linker, a Make utility, and an ARM assembler in addition +to the tools provided. + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>03 February 2007 + +</font></div> + +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-04-14 17:46:46
|
Revision: 242 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=242&view=rev Author: jtytgat Date: 2007-04-14 10:46:43 -0700 (Sat, 14 Apr 2007) Log Message: ----------- Copy of the current website with the following changes: - now binary zip releases are pointing to sf.net's File Releases area. - a couple of HTML related changes so all pages are validating again. Added Paths: ----------- trunk/website/ trunk/website/archives.html trunk/website/contact.html trunk/website/cvs.html trunk/website/download.html trunk/website/faq.html trunk/website/future.html trunk/website/guide.html trunk/website/history.html trunk/website/images/ trunk/website/images/browserany.gif trunk/website/images/valid-html401.png trunk/website/index.html trunk/website/release-6.80.html trunk/website/release-6.90.html Added: trunk/website/archives.html =================================================================== --- trunk/website/archives.html (rev 0) +++ trunk/website/archives.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,142 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - Archives</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<h1>OSLib Archives</h1> + +<hr> + +<!--Begin outer table --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > + <tr VALIGN=TOP> + <td> + <!-- contents list Table --> + <table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + + <!-- Contents list --> + <tr BGCOLOR="#80ffff"> + <td> + <h2>Site Contents</h2> + + <ul> + <li><a href="history.html">History and Copyright</a></li> + <li><a href="future.html">Future Development</a></li> + <li><a href="download.html">Obtaining OSLib</a> + <ul> + <li><a href="archives.html">ZIP Archives</a></li> + <li><a href="cvs.html">Source via CVS</a></li> + </ul> + </li> + <li><a href="contact.html">Contacts</a></li> + <li><a href="faq.html">FAQ</a></li> + </ul> + </td> + </tr> + + <tr><td></td></tr> + + <tr BGCOLOR="#80ffff"> + <td><a href="index.html">Home</a></td> + </tr> + + </table> <!-- end contents list table --> + + <td ALIGN=LEFT> <!--Begin main content --> + + <h2>Summary</h2> + <p>Links to specific OSLib releases are provided below; + you should normally only need the latest version; + the links to earlier + versions are only provided to give a fallback + in case you have problems with + the latest release, and for historical interest. + </p> + + <p> + All available OSLib releases can be found at OSLib's <a href="https://sourceforge.net/project/showfiles.php?group_id=51230">Sourceforge + Files Release area</a>. + </p> + + <p>The down-loadable files on this site are all in + Spark compressed zip file + format. To uncompress any of them, use + <a href="mailto:da...@pi...">David Pilling</a>'s + freeware self extracting + <a href="http://www.netlink.co.uk/users/pilling/splug.bas"> + SparkPlug + </a> + application (set the file type to BASIC, and double-click), + or his excellent commercial + <a href="http://www.netlink.co.uk/users/pilling/sprkfs.html"> + SparkFS + </a> + filing system. + </p> + + <h2><a>OSLib Releases</a></h2> + + <ul> + <li><p> + <b><a href="release-6.90.html">Version 6.90</a></b> + (02 January 2006). Adds some Reporter SWIs, and + fixes bugs in PCI, OS, and ColourTrans. + </p></li> + + <li><p> + <b><a href="release-6.80.html">Version 6.80</a></b> + (31 December 2005). Adds a number of new functions, + and some constants, together with a few bug fixes + </p></li> + + <li><p> + <b><a href="https://sourceforge.net/project/showfiles.php?group_id=51230&package_id=228627&release_id=501110">APCS-R (26-bit) OSLibSupport library</a></b> + (09 March 2005). The GCCSDK, which is used to build OSLib and + its support library no longer supports the compilation of + 26-bit code. In consequence, the OSLib project will also + no longer issue 26-bit versions of the library. This should not be + a problem for the main library, as the code is fully compatible. + For the Support library, there may be a problem with linking with + older 26-bit C code. The Support library under this link + is a final build, compiled using the Castle compiler with 26-bit + APCS. It will remain here, + at the level of OSLib 6.70, but will not be further developed. + For the current, 32-bit, OSLibSupport library, please follow the + links to the current OSLib page. + </p></li> + </ul> + + Use of the library is quite straightforward and intuitive, but first-time + users may find some examples useful. These are available from the download + page. + <br>A complete example of an application using the Toolbox and OSLib + can be found + <a href="http://www.vanderhoff.org/software/risc_os/"> + here + </a>. + + </td></tr> <!-- end main content --> + +</table> <!-- end outer table --> + +<hr WIDTH="100%"> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>02 January 2007 + +</font></div> + +</body> +</html> Added: trunk/website/contact.html =================================================================== --- trunk/website/contact.html (rev 0) +++ trunk/website/contact.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,142 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - Contacts</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<p><center><h1>OSLib Contacts</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=20 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h2>Site Contents</h2> + +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p> +<h2><a name="maillists">Mail Lists</a></h2> + +<p>We have set up a number of mail lists to allow discussion of the development +of OSLib, and for dissemination of information. Tom Hughes is running these +on his compton.nu domain, and we gratefully acknowledge his help in this. +<p>To subscribe, send a blank e-mail to: <listname>-su...@co... (or just click on the links below); +<br>Post submissions to <listname>@compton.nu + +<ul> + +<li><b>oslib-user</b> -- This is the main discussion and self-help channel +for users of OSLib and its build tools. It is also for feedback from users to +the development team. Send any bug reports and suggested enhancements here to +ensure the widest distribution. Both <a +href="mailto:osl...@co...">subscribing</a> and <a +href="mailto:osl...@co...">posting</a> is open. </li> + +<li><b>oslib-team</b> -- For discussions amongst the developer team and close +associates. Both <a +href="mailto:osl...@co...">subscription</a> and <a +href="mailto:osl...@co...">posting</a> is moderated. </li> + +<li><b>oslib-announce</b> -- For announcements from the developer team +regarding new releases, features, etc. <a +href="mailto:osl...@co...">Subscription</a> is open; +<a href="mailto:osl...@co...">posting</a> moderated. +</li> + +<li><b>oslib-commits</b> -- This is a mail-list which sends +automatically-generated information whenever an update is committed to the CVS +repository. If you want to keep bang up-to-date with OSLib, then this is for you. +Subscribe via the +<a href="http://sourceforge.net/projects/ro-oslib/"> +SourceForge OSLib project page</a>, by clicking on "Mail lists". +</li> + +</ul> + +<p><h2><a name="team">OSLib Team</a></h2> + +<p>The OSLib development Team at present is made up of a number individuals, each +of whom have put in a lot of effort to bring you Free OSLib, and will +continue to do so. Please join us with any help you can give! + +<p>If you have any queries about OSLib development, either post to the +appropriate mail list, or if appropriate, write to any of us. We don't have +individual 'roles' but by the nature of the project, and for historical and +personal reasons, responsibilities tend to be devolved as outlined below. +Naturally, there are cross-overs, and everyone is involved in bug-fixing from +time to time. + +<ul> + +<li><a href="mailto:jon...@do...">Jonathan Coxhead</a> -- The +original author of OSLib. Jonathan is no longer involved in the day-to-day +running of the project, but still provides a lot of help regarding historical +issues and design concepts. We are grateful for his original work, and +continued support.</li> + +<li><a href="mailto:to...@co...">Tom Hughes</a> -- Tom is the main author +of new modules, thus keeping OSLib up to date, and also runs the OSLib mail +lists.</li> + +<li><a href="mailto:to...@va...">Tony van der Hoff</a> -- Tony +administers these web pages, and arranges periodic releases of the library. +</li> + +</ul> + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<!-- footer --> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>04 May 2005 + +</font></div> + +<!-- end footer --> + +</body> +</html> Added: trunk/website/cvs.html =================================================================== --- trunk/website/cvs.html (rev 0) +++ trunk/website/cvs.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - cvs</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<p> +<center><h1>Obtaining OSLib via CVS</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"> +<td> +<h2>Site Contents</h2> +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> +<a href="index.html">Home</a> +</td></table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p><h2><a name="summary">Summary</a></h2> + +<p>The sources for OSLib, OSLibSupport, and the various build tools are +freely available via CVS from SourceForge. + +<p>You may browse the repository using <a +href="http://ro-oslib.cvs.sourceforge.net/ro-oslib">ViewCVS</a>. + +<p>In order to check out the repository to a local directory on your RISC OS +machine, you'll need a CVS client running. <a +href="http://www.cvs.riscos.org.uk">John Tytgat's port</a> is suitable, athough +the front end application is out of date in respect to the main application, +so it's probably best to use the command line interface. In order to +correctly perform the filename translation from UNIX style to RISC OS, you'll +need to set suffix swapping (either in the application window or via the +environment variable UnixEnv$cvs$sfix) to include the extensions +c:cc:h:swi:asm:s:Hdr:y. + +<p>The alternative is to check out the project onto a Linux box. If you're +using Linux, you'll know how to do this. OSLib and its tools may be built under Linux, +or under RISC OS. To do the latter, it is necessary to change all +filenames from UNIX <name>.<ext> format to the RISC OS +<dir>.<name> format. This is most easily achieved by using Tony +van der Hoff's <a href="http://www.vanderhoff.org/software/risc_os/unixify.zip">Unixify</a> +command-line utility. The archive contains a couple of example TaskObey +files, one of which shows how to RISCOSify the OSLib sandbox. + +<p>Whichever platform you choose to use, the anonymous checkout procedure is +similar: + +<ol> + +<li>Set the environment variable CVSROOT to +:pserver:ano...@ro...:/cvsroot/ro-oslib</li> + +<li>Log in to SourceForge using the command "cvs login"; when prompted for a +password, simply press Enter.</li> + +<li>Set the working directory to wherever you want your sandbox to end up +(alternatively use -dir <dir> in the cvs checkout command, but this can +involve a lot of typing in a deeply-nested structure).</li> + +<li>Check out the repository, using the command +"cvs -z3 checkout -P OSLib". This will get you the head +revision, which is what most CVS users will want. However, be warned that +this is in development, and may contain some unwanted surprises. To obtain +the sources for the current stable release version, you need to specify the +version tag; i.e. +"cvs -z3 checkout -dP -r <tag> OSLib", +where <tag> is the OSlib version, e.g. "oslib-690".</li> + +</ol> + +<p>There is quite a lot of code, so it may take a little while on a slow +link, but I'm sure you'll find it whorthwhile! A !Readme file in the main +application directory explains how to build OSLib under RISC OS. You will +need a C compiler, a Linker, a Make utility, and an ARM assembler in addition +to the tools provided. + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>03 February 2007 + +</font></div> + +</body> +</html> Added: trunk/website/download.html =================================================================== --- trunk/website/download.html (rev 0) +++ trunk/website/download.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,107 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - Download</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<p> +<center><h1>Obtaining OSLib</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h2>Site Contents</h2> +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> + +</td></tr> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p><h2><a name="summary">Summary</a></h2> + +<p>There are a number of ways of obtaining OSLib, and the OSLibSupport +library, depending upon your requirements. + + +<p>First, the <a href="archives.html"><b>OSLib Library</b></a> in binary +(ALF) form, complete with C and assembler headers, is available for download +as a zipped archive, for download. This is all you need to link with your own +applications to provide access to all the RISC O S SWI calls from assembler +or C. The archive contains both 26-bit and 32-bit versions, for linking with +the appropriate Stubs or UnixLib. + +<p>Secondly, the <a href="archives.html"><b>OSLibSupport library</b></a>, +again in binary (ALF) form, complete with C, is available for download as a +zipped archive, for download. This is a C library of support functions, +designed to make programming the RISC OS WIMP and Toolbox modules as easy as +possible. + +<p>Third, a <a href="archives.html"><b>StrongHelp</b></a> manual covering the +entire API from C is available for each version. + +<p>Finally, the <a href="cvs.html"><b>complete source</b></a> for the project +is now available via CVS from +SourceForge. This includes all source files, together with the tools +necessary to build the library. In addition, Makefiles are provided to build +the tools, and the library, from scratch, out of the box, with just one +double-click. You will need a C compiler, a Linker, a Make utility, and an +ARM assembler in addition to the tools provided. The OSLib team use the Acorn +C/C++ package, but the <a href="http://gccsdk.riscos.info/">GCCSDK</a> is +an excellent alternative. + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<!-- footer --> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>16 December 2006 + +</font></div> + +<!-- end footer --> + + +</body> +</html> Added: trunk/website/faq.html =================================================================== --- trunk/website/faq.html (rev 0) +++ trunk/website/faq.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,379 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="Author" content="tony"> + <meta name="GENERATOR" content="ZAP HoTMeal [en-gb] (RISC OS 4.03)"> + <meta name="KeyWords" content="OSLib, FAQ, RISC OS"> + <title>OSLib FAQ</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<center> <h1> OSLib Frequently Asked Questions</h1></center> + +<a name ="top"></a> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250"> + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h3>Site Contents</h3> + +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul></td></tr> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content --> + +<p>This page summarizes some of the most frequently asked questions regarding +the operation and use of OSLib. We hope it will be helpful. If you have any +questions that are not covered here, please feel free to ask on the <a +href="contact.html#maillists">OSLib-users</a> mail-list. + +<h3><br>Copyright and Licencing</h3> + +<ul> + +<li><a href="#copyright">Who owns the Copyright in OSLib?</a></li> + +<li><a href="#proprietary">Can I distribute my proprietary applications built +with OSLib?</a></li> + +</ul> + +<h3><br>Use of OSLib</h3> + +<ul> + +<li> <a href="#wide file handles"> What are wide file handles and why are +8-bit handles retained?</a> </li> + +<li> <a href="#signed ints"> Why are file sizes and os_t typed as signed +ints?</a> </li> + +<li> <a href="#command line"> What command line should I use for compiling +or assembling a program using OSLib?</a> </li> + +</ul> + +<h3><br>Compiler Issues</h3> + +<ul> + + <li> <a href="#supported compilers">Which compilers does +OSLib support?</a></li> + +<li> +<a href="#__swi">Why does my compiler reject the __swi symbol</a>?</li> +</ul> + +<h3><br> +Compatibility Issues</h3> + +<ul> +<li> +<a href="#C++ Templates">Templates in other C++ libraries +clash with some typedefs in OSLib</a></li> + +<li> +<a href="#32-bit architectures"> +Does OSLib support 32-bit architectures?</a></li> + +<li> +<a href="#Why both"> +Why do the distribution archives contain both 32-bit and 26-bit versions of +the library?</a></li> + +<li> +<a href="#tboxlib"> +Why does my toolbox application crash when linked with OSLib and tboxlibs? +</a></li> + +</ul> + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr SIZE=4 WIDTH="100%"> + +<a name="copyright"></a> +<h4>Who owns the Copyright in OSLib?</h4> + +<blockquote> +<a href="mailto:jon...@do...">Jonathan Coxhead</a> wrote OSLib +as a private project during he time that he was employed by Acorn. He is the +sole copyright owner of the library, together with the OSLib maintainers who +share the copyright of certain aspects of the package. + +OSLib is now in the public domain under the GNU General Public Licence (GPL), +nonetheless, we ask you to respect Jonathan's copyright. + +</blockquote> + +<a name="proprietary"></a> +<h4>Can I distribute my proprietary applications built with OSLib?</h4> + +<blockquote> +The <a href="http://www.fsf.org/copyleft/gpl.html">GNU General Public Licence</a> +stipulates that any program which embodies any GPL code must itself be +distributed under the terms of the GPL. In particular this means that source code +must be made available for any such program. This is clearly unacceptable for +any proprietary, commercial, code. + +<p>The <a href="http://www.fsf.org/copyleft/lesser.html">GNU Lesser General +Public Licence</a> relaxes this requirement somewhat in only requiring that +binary object files be freely available, thus protecting investment in +proprietary code to some extent. + +<p>The OSLib copyright owner has relaxed even this requirement, as explained +<a href="history.html">elsewhere</a> and any code linked with OSLib may be +distributed in whichever way the developer sees fit. In other words, OSLib +may be freely used in the construction of proprietary software. However, do +please consider joining the ever increasing free software movement, by +placing your work in the public domain. Free source is good; hoarded source +bad! + +</blockquote> + +<a NAME="wide file handles"></a> +<H4>What are wide file handles and why are 8-bit handles retained?</H4> + +<blockquote> + +OSLib originally defined file handles to be 8 bits wide. This was based on +inside knowledge of the OS, and even under RISC OS 4, no file handle greater +than &FF is ever issued. However, the PRMs do specify that file handles +should be 32 bits wide for future compatibility. + +<p>This has left the OSLib maintainers with a bit of a dilemma. It is our +faithful promise to never break an existing interface, but, clearly, the +present situation could not be allowed to continue. + +<p>OSLib V6.0 went some way to resolving the problem by defining a 32 bit +file handle, OS_FW, and a set of functions to use it. The intention is that +they would be used in place of the legacy OS_F and its associated functions. +However, many users felt this was non-intuitive behaviour, and pleaded for +the return of OS_F, but in a 32-bit guise. Unfortunately, it was impossible +to simply change the type of OS_F, because that would cause many programs to +break if they relied on 8 bit file handles. + +<p>The problem was finally resolved in OSLib V6.3, by adding extra header +files which, by default, makes OS_F a synonym of OS_FW, and does likewise +with their associated functions. However, it leaves OS_F and its friends as +symbols in the library, to allow legacy code to be linked correctly. +Therefore, any new compilations will, by default, use 32-bit file handles, +but 8-bit compatibility is assured. + +<p>One further refinement to this scheme is that this name translation can be +disabled by defining the constant OSLIB_F8, which will cause the headers to +revert to their previous behaviour, and thus allowing anyone who particularly +needs to retain 8-bit handles to do so. This is best achieved by passing +-DOSLIB_F8 in any makefile or command line when invoking the compiler. + +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> + +<hr SIZE=4 WIDTH="100%"> + +<a NAME= "signed ints"</a><H4>Why are file sizes and os_t typed as signed ints?</H4> + +<blockquote> +A rule has been adopted throughout OSLib that any 32-bit field upon which arithmetic can be performed is typed as a signed int. This makes it straightforfard to do comparisons. It is acknowledged that using an unsigned int gives an extra bit of information in the absence of a long long int, but this would be at the expense of usability, and therefore considered a bodge. If you really need the extra range, cast it to unsigned yourself. + +<p>Regarding os_t, code such as the following from PRM 3-185, is made much simpler with a signed int, and correctly handles wrap-around - which an unsigned wouldn't: +<blockquote> +<pre> +os_t newtime = os_read_monotonic_time(); +while ((newtime-oldtime) > 0 ) + oldtime += 100;<br> +</pre> +</blockquote> +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> + +<hr SIZE=4 WIDTH="100%"> + +<a NAME= "command line" </a><H4> What command line should I use for compiling +or assembling a program using OSLib?</H4> + +<blockquote> +There is really nothing special about using OSLib with C or assembler programs. +<p> +A generalised command line for Acorn (Norcroft) C using standard C, OSLibSupport, +and OSLib would be something like this:<br> +cc -IC:,OSLibSupport:,OSLib: program.c -o program.o<br> +link program.o C:o.stubs OSLib:o.OSLib OSLibSupport:o.OSLibSupport -output program +<p> +For GCC (with UnixLib) this becomes somewhat simpler with the compile and link +steps merged: <br> +gcc program.c -I OSLib: -I OSLibSupport: OSLib:o.OSLib OSLibSupport:o.OSLibSupport -o program +<p> +ObjASM doesn't seem to be able to expand path variables in the command line, so +it is necessary to bodge things a bit:<br> +do ObjASM -I <OSLibPath> program.s program.o<br> +link program.o -output program +<p> +I don't yet know how to invoke GCC assembler, sorry. + +</blockquote> + + + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<a NAME="supported compilers"></a> +<H4>Which compilers does OSLib support?</H4> + +<blockquote> + +OSLib is, with one <a href="#Why does my compiler">exception</a>, completely +compiler independent. It was originally built and used using the Acorn +(Norcroft) compiler, and many people are successfully using it with GCC and +GC++. + +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<a NAME="__swi"></a><H4>Why does my compiler reject the __swi +symbol?</H4> + +<blockquote> + +The Acorn (Norcroft) compiler reserves the special symbol "__swi", as an +optimizing hint. Other compilers don't recognise it, and fault it. Also, for +some reason best known to themselves, when using Acorn's compiler through +CFront, it also faults __swi. In these instances you need to define the +symbol to nothing by placing "#define __swi" in your code files before +#including any OSLib headers, or by putting -D__swi in any command line or +makefile command when calling your compiler. + +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<P><a NAME="C++ Templates"></a> +<H4>Templates in other C++ libraries clash with some typedefs/structures in +OSLib</H4> + +<blockquote> + +This problem is evident wen using CathLibCPP (map.h) with OSLib (os.h) under +CFront, when the map field clashes. There appears to be a problem with Cfront +(its template handling was never very good) which causes a template name to +clash with other symbols. As a work-round try the following: + +<blockquote>#define map addr +<br>#include "os.h" +<br>#undef map +<br>#include "map.h" +<br>#define map addr +</blockquote> + +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<P><a NAME="32-bit architectures"></a> +<H4>Does OSLib support 32-bit architectures?</H4> + +<blockquote> +OSLib can be built for both 26 bit and 32 bit architectures. The source code +is identical for either. The binary distribution contains two ALF images: +OSLib and OSLib32. The 32 bit version does not preserve the caller's +processor flags, the 26 bit one does; this may raise compatibility issues +when migrating from one to the other. Link to whichever you wish. +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<P><a name="Why both"></a> +<H4>Why do the distribution archives contain both 32-bit and 26-bit versions +of the library?</H4> + +<blockquote> +This requirement is imposed by the lack of general availability of the 32-bit +Shared C Library (SCL) within RISC OS. Also, UNIXLib is currently still only +available in 26-bit form.<br> + +<p>The APCS-R (26-bit) SCL and UNIXLib absolutely requires flag preservation +across calls, and this wouldn't work with APCS-32 code. Also, the structure +of the stubs has been changed significantly to accommodate a 32-bit system +(where you can't use B to branch to the C library). A new C library is +required to support those stubs. + +<p>It is not generally possible to mix APCS-R (26 bit) and APCS-32 (32 bit) +code, and the linker will warn you if you try to do so. Hopefully everyone +will be building APCS-32 soon, but until then people will need the APCS-R +version of OSLib. <br> + +<p>It is presently impossible to mandate that application builders use only +the 32-bit Shared C Library, despite the latter being readily available, and +32-bit UNIXLib is currently unavailable. As it is not possible to mix a +32-bit OSLib with a 26-bit C library, the OSLib team are making both versions +available, and will continue to do so until the 32-bit C libraries becomes +the norm.<br> </blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + +<p><a name="tboxlib"></a> +<H4>Why does my toolbox application crash when linked with OSLib and tboxlibs?</H4> + +<blockquote> +Never do that! Whilst the syntax of the OSLib toolbox calls may look similar to those +provided by Acorn's tboxlibs, they are subtly different in the parameters they pass. +Unless you <b>really</b> know what you're doing, and can guarantee which one is called, +never mix the two libraries. OSLib provides a complete, and better, coverage of the toolbox +API, and there is no need to use tboxlibs. +</blockquote> + +<a href="#top">top</a> <a href="index.html">Home</a> +<hr SIZE=4 WIDTH="100%"> + + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right> +<font size=-1> +Tony van der Hoff +<br>04 January 2004 +</font></div> + +<hr WIDTH="100%"> + +</body> + +</html> Added: trunk/website/future.html =================================================================== --- trunk/website/future.html (rev 0) +++ trunk/website/future.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,98 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - Further Development</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<p> +<center><h1>Further Development</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h2>Site Contents</h2> + +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> + +</td></tr> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p>The original author, Jonathan Coxhead, is unable to devote as much time to +further development and enhancement of OSLib as he feels is necessary; and +this, together with his respect and admiration for Richard Stallman and the +<a href="http://www.fsf.org/home.html">Free Software Foundation</a>, were the +main factors contributing to his decision in 1998 to release the source as +free software. + +<p>As free source software, anyone is entitled to modify and re-distribute +the library. In order to avoid this getting out hand, a group of keen OSLib +supporters have teamed up to provide a controlled development environment +for OSLib in which we can ensure that further development follows the strict +discipline which Jonathan himself applied, and can therefore guarantee +that interfaces won't be 'broken' by ill-advised tinkering. + +<p>We therefore ask potential contributors of new or updated modules to +follow a set of <a href="guide.html">guidelines</a>, and make any submissions +for amendments and improvements via the <a +href="contact.html#maillists">oslib-user</a> mail-list. Other users, and the +OSLib <a href="contact.html#team">Maintainers</a> will then comment, and if +appropriate, your submissions will be added to the library. + + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<!-- footer --> + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>30 November 2002 + +</font></div> + +<!-- end footer --> + + +</body> +</html> Added: trunk/website/guide.html =================================================================== --- trunk/website/guide.html (rev 0) +++ trunk/website/guide.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,234 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> + <META NAME="Author" CONTENT="Tony van der Hoff"> + <META NAME="GENERATOR" CONTENT="Zap HoTMealM"> + <TITLE>OSLib Developers' Guide</TITLE> +</HEAD> +<BODY TEXT="#000000" BGCOLOR="#FFFFC0" LINK="#0000FF" VLINK="#800080" ALINK="#FF00FF"> + +<CENTER> +<H1> +OSLib Developers' Guide</H1></CENTER> + +<CENTER> +<HR WIDTH="100%"></CENTER> + +<H3> +Purpose:</H3> +This guide provides information and guidelines to developers wh propose +to make submissions for inclusion in OSLib. +<BR>The following information is extracted from Jonathan's instructions +<H3> +Very brief and cryptic notes about the source release of OSLib</H3> + It's 14Mb built. The part you use (headers + library) is 3Mb +big. +<P> This is 5.3. See ChangeLog for changes since 5.2. +<H3> +Error Handling</H3> + The most important coding point to emphasise is that *all* +errors are detected and reported, no matter how deeply nested we may be +into the call stack or however small the function in progress. This is +done by keeping to a strict discipline (when I can be bothered :-) +<P> Every function that everyone has ever written can return +an error. Normally in RISC O S code this is done by returning an |os_error +*|. In +<BR>UNIX-style code, it is done by returning -1 and setting |errno|. Whatever +the mechanism is, it *must* be checked when calling the function. Every +function called *must* then have its error return checked. If there was +an error, a |goto finish;| is executed immediately. (The only thing that +can be done before "go to finish" is to assign the current function's error +indicator.) At |finish:|, any local resources that may have been claimed +(in C, chiefly malloced memory and file handlers, but under RISC O S also +windows, fonts, vectors, etc) are released. The current function then returns +the error back to its own caller. +<P> In this way, when any function returns an error, the whole +of the call stack is unwound to the top level where it can be handled cleanly. +This is a just a low-level way of emulating C++-style exceptions. +<BR> +<H3> +Regression Testing</H3> + The other important point is regression testing. When a change +is made, everything is differed with the previous version to make sure +that +<BR>nothing has changed for the worse. For the objasm files, I've provided +s;0 directories, but it should be done for headers too: that's easy because +they are textual anyway, and you already have copies. The objasm diff checks +that the *code* is the same. (The objasm files aren't used for anything +else, but the code that writes them is the same as the code that writes +the tiny files that make up the library as a whole, so it's important.) +<P> This is your guarantee that everything you do will work. +<BR> +<H3> +Generating the library</H3> + Installation is roughly as follows: run SetVars; open DefMod; +run !Make (twice) (you need yacc (or Bison) for this); copy the DefMod +absolute into the OSLib directory, or into your path; run !Make in OSlib. +<BR> +<H3> +In Progress</H3> + There are sketches or starts or initial hacks at some more +swi files in InProgress. +<P> The comments in the objasm files "Registers available for +scratch use" was a piece of work-in-progress. The idea was from Mark Wooding, +I think: he suggested that instead of stacking values that must be saved +over the SWI, it would be more efficient to save them in registers that +were not otherwise used. (These are V1--V6 if the SWI will corrupt them, +as A P C S demands they are preserved by a function call, and any registers +containing addresses of output arguments that are needed on entry to the +SWI or corrupted by it.) This is commented out, not finished, and doesn't +work. Feel free to give it a shot. +<P> DefMod can make SrcEdit help files for either C or assembler---no-one +wants these, though. I also started something to do with Pascal, as well +as a start to native C++ support (so you wouldn't need the |extern "C"| +directives, and potentially allow overloaded functions to call the same +SWI). +<BR> +<H3> +NDEBUG</H3> + I think that defining NDEBUG would stop lookup.c working. +That was probably a mistake. +<BR> +<H3> +DefMod and SWILib</H3> + DefMod is a RISC O S programme written in C, and it looks as though +it uses OSLib. If it did, it could never have been written, as it logically +<BR>precedes OSLib. So how was this done? +<P> It uses a hand-crafted set of macros called SWILib. This +defines the functions provided by OSLib as macros expanding to calls to +|_swi(x?)|---but just the SWI's that DefMod uses. (SWILib was the first +version of OSLib. The first version of DefMod generated SWILib-style headers: +macros rather than function declarations.) Do not change this, or you could +potentially end up in a situation where the whole system could not get +off the ground. +<BR> +<H3> +UNKNOWN types</H3> + I have been asked to explain the way the [UNKNOWN] types work. When +a type (e g, wimp_menu, wimp_window) has a repeating final part, DefMod +also generates some extra macros wimp_MENU (n) and wimp_SIZEOF_MENU (n). +You can use the first to write out data structures in your code. It does +show how flexible the C type system is, if you use it well. +<P>Here's a menu definition I use in another of my proggies ... +<BLOCKQUOTE>wimp_MENU (2) Main_Menu = +<BR>{ +<BLOCKQUOTE>"PlaceName", +<BR>wimp_COLOUR_BLACK, +<BR>wimp_COLOUR_LIGHT_GREY, +<BR>wimp_COLOUR_BLACK, +<BR>SKIP, +<BR>9*wimp_CHAR_XSIZE, +<BR>wimp_MENU_ITEM_HEIGHT, +<BR>wimp_MENU_ITEM_GAP, +<BR>{ +<BLOCKQUOTE>{ +<BR>wimp_MENU_GIVE_WARNING, +<BR>wimp_DEFER_SUB_MENU, +<BR>wimp_ICON_TEXT | wimp_ICON_FILLED | +<BR> wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT +| +<BR> wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT, +<BR>"Info" +<BR>}, +<BR>{ +<BR>wimp_MENU_LAST, +<BR>wimp_NO_SUB_MENU, +<BR>wimp_ICON_TEXT | wimp_ICON_FILLED | +<BR> wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT +| +<BR> wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT, +<BR>"Quit" +<BR>}</BLOCKQUOTE> +}</BLOCKQUOTE> +};</BLOCKQUOTE> + +<P><BR>This is then used in calls like +<BLOCKQUOTE>wimp_create_menu ((wimp_menu *) &Main_Menu);</BLOCKQUOTE> +---it needs to be cast. If you want to build a structure like this on the +fly, you can write +<BLOCKQUOTE>wimp_menu *menu = malloc (wimp_SIZEOF_MENU (2));</BLOCKQUOTE> +and use references like +<BLOCKQUOTE>... menu->entries [1].data AS indirected_text.text ...</BLOCKQUOTE> +to get at the text of the 1st icon. +<P> So these macros can let you write some very complicated +data structures right in the code, without needing to read them from a +resource file, but still in a reasonably maintainable way. +<BR> +<H3> +Hierarchy</H3> + In general, you you must always make sure you know where a +module fits in with other modules. There must be a strict hierarchy, with +files only needing (the NEEDS statement) files in an acyclic fashion. That's +not say things can't be introduced into the middle (JPEG needs OS, but +PDriver needs JPEG, even though JPEG didn't exist till long after PDriver +was first thought of.) DrawFile is another complicated one: does DrawFile +need Font (Draw objects can contain font handles), or does Font need DrawFile +(the Font manager can write font outlines to a Draw group). This is a tie +really, and it's broken in an unpleasant way. It might have been better +to invent a "graphics.h" to be included by both, but that would break the +correspondence between swi files and modules. +<BR> +<H3> +Extensible Interfaces</H3> + There are lots of cases in RISC O S of extensible interfaces: +Wimp messages can be defined by anyone, for example. It is not good in +these +<BR>cases to put all of them into a file (swi.Wimp): this would mean that +the file would have to be extended all the time. Instead, the basic interface +is provided in 1 file, and other people can write their own header files. +This is what's done in swi.Gadget. No gadget types are defined there: that's +all done in a distributed way. This is also why the wimp_message struct +only has a few of the defined message data types in its data field. (It +has all of the ones defined as "system" and "Wimp" types.) Ones defined +by modules (e g, message_HELP_REQUEST, printing messages, alarm messages) +are defined by their respective modules. Otherwise, every time a new module +added a message, "wimp.h" would have to be updated. This means that some +otherwise avoidable type casts are needed; oh well. +<BR> +<H3> +Help Files</H3> + DefMod writes HelpData and Index files for use by StrongHelp. +These are all copied into a big archive by the Make process. (This has +to be an archive only because there are lots more than 77 files). Then +Alexander Thoukidides' ConvHelp can turn all of these into a StrongHelp +help file. If you use Zap, you can bind F1 to mje_helpcontext, and then +you point to a SWI name in your code and get help on it in 1 keystroke. +This help is all linked together internally, and in 2 clicks you can get +all the valid values for any constant. +<BR> +<H3> +Parsing</H3> + You need a version of YACC or Bison. The one I used was ported +by me from the Berkeley YACC sources. I could have used Bison, but then +OSlib would have fallen under the G P L. At that time, I wanted to keep +the 'swi' files private, so that there wouldn't be incompatible extensions +to widely-used modules; but I'm convinced now that that isn't a problem. +The approach to the parsing is is unconventional in 2 ways: +<UL> +<LI> +(1) I didn't use Lex (or Flex): everything is done by the grammar in defmod.y. +This was just so I didn't have to learn Lex as well as YACC, and to see +if it could be done.</LI> + +<LI> +(2) String values are not put in a symbol table and carefully managed. +Instead, the grammar passes round whole strings of up to 255 characters +on the stack and copies them every time a character is appended. This is +hopelessly slow and inefficient---but it works, and it's "fast enough". +The limit is not checked in the code, despite what I said above. Sorry.</LI> +</UL> + +<p align = right><small>Jonathan Coxhead</small></P> + +<HR WIDTH="100%"> + + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<BR><A HREF="index.html">Home</A> +<BR> +</BODY> +</HTML> Added: trunk/website/history.html =================================================================== --- trunk/website/history.html (rev 0) +++ trunk/website/history.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,119 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release - History</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + + +<center><h1>OSLib History, Ownership and Copyright issues</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250" > + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h2>Site Contents</h2> + +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul> + +</td></tr> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content table --> + +<p>OSLib is copyright © 1994, 1998 <a +href="mailto:jon...@do...">Jonathan Coxhead</a>. It is +distributed in the hope that it will be useful, but without any warranty; +without even the implied warranty of merchantability or fitness for a +particular purpose. + +<p>Jonathan wrote OSLib during the time that he was employed by +<b>Acorn Computers Ltd</b> during the mid-1990s, as a private project, but +generously ceded the copyright for specific versions to them. For that reason +OSLib version 5.1 was available from the Acorn Computers FTP site under their +copyright. With the demise of Acorn in 1999, their FTP site was closed, and +this is now the only supported source for OSLib. + +<p>After Jonathan left Acorn in 1995, he continued with the development of +OSLib, and in December 1998 released version 5.3 into the public domain as +free source software under the <a +href="http://www.fsf.org/copyleft/gpl.html">GNU public licence</a>. + +<p>Under the conditions of this licence, the term 'free' is used +in the context of 'unfettered' rather than 'gratis'. It means that the +source code is freely available, and that anyone may use it to build and +distribute a version of their own, with the two provisos that they make +no charge for it, other than the reasonable cost of the distribution media, +and that they redistribute all copyright and ownership notices intact. +The new distribution may not be under more onerous terms than the original. + +<p>The copyright holder has granted a small relaxation of the conditions +of the GNU Public Licence, in that OSLib is itself free software, but applications +linked to it need not be. This means that any changes to OSLib itself (the +contents of the OSLib, OSLibHelp, OSLibSrc, and OSLibSupport archives) +fall under the terms of the GNU Public Licence; but programs written using +OSLib need not be so restricted. + +<p>In other words, OSLib may be freely used in the construction of proprietary +software. However, do please consider joining the ever increasing free +software movement, by placing your work in the public domain. Free source +is good; hoarded source bad! + +<p>Naturally, although anyone may make a distribution, it does not make +much sense for lots of different distributions with different capabilities +to spring up, and the developer team therefore request that any submissions +for inclusion be routed here. This is the sole reference site for OSLib +supported by the author and copyright holder, Jonathan Coxhead. + +</td></tr> <!-- end main content --> +</table> <!-- end outer table --> +</center> +<hr> + + +<!-- footer --> + + +<a href="http://validator.w3.org/check/referer"><img border="0" +src="http://www.w3.org/Icons/valid-html401" +alt="Valid HTML 4.01!" height="31" width="88"></a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>30 November 2002 + +</font></div> + +<!-- end footer --> + +</body> +</html> Added: trunk/website/images/browserany.gif =================================================================== (Binary files differ) Property changes on: trunk/website/images/browserany.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/website/images/valid-html401.png =================================================================== (Binary files differ) Property changes on: trunk/website/images/valid-html401.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/website/index.html =================================================================== --- trunk/website/index.html (rev 0) +++ trunk/website/index.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,171 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Zap HoTMeaL"> + <meta name="content" content="Acorn, Risc OS, OSLib"> + <meta name="Author" content="Tony van der Hoff"> + <title>The OSLib GPL Release</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<!-- The page looks like this: + + Header +|--------------------------------------------| +| outer table | +||----------------||------------------------|| +|| contents list || main text || +|| || || +||----------------||------------------------|| +| | +|--------------------------------------------| + footer + +--> + +<!-- Begin header --> +<center><h1>The RISC OS OSLib GPL Release</h1></center> + +<hr> + +<!--Begin outer table --> +<center> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > +<tr VALIGN=TOP> +<td> + + +<!-- contents list Table --> +<table BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="250"> + +<!-- Contents list --> +<tr BGCOLOR="#80ffff"><td><h3>Site Contents</h3> + +<ul> +<li><a href="history.html">History and Copyright</a></li> +<li><a href="future.html">Future Development</a></li> +<li><a href="download.html">Obtaining OSLib</a> +<ul> +<li><a href="archives.html">ZIP Archives</a></li> +<li><a href="cvs.html">Source via CVS</a></li> +</ul></li> +<li><a href="contact.html">Contacts</a></li> +<li><a href="faq.html">FAQ</a></li> +</ul></td></tr> + +<tr><td></td></tr> + +<tr BGCOLOR="#80ffff"><td><a href="index.html">Home</a></td></tr> + +</table> <!-- end contents list table --> + +<td ALIGN=LEFT> <!--Begin main content --> + +<h3>Summary</h3> + +OSLib is a highly optimized interface library for the Application Programmers' +Interface (API) for the Acorn series of 32 bit RISC OS computers. It is +a useful tool for application program writers for this platform. It is +of no use for any other platform. + +<p>OSLib provides a set of functions and C headers For its target platform, +to provide complete coverage of the RISC OS API (the so-called SWIs) as a set +of C/C++ and ARM Assembler headers, together with a thin veneer library. + +<p>OSLib is: +<ul> + +<li><b>efficient:</b> often, memory access is completely avoided;</li> + +<li><b>type safe</b>: every argument can be type checked by the compiler;</li> + +<li><b>obvious</b>: a SWI is called by the "obvious" syntax;</li> + +<li><b>register safe</b>: hides (often idiosyncratic) register allocation;</li> + +<li><b>complete</b>: every SWI is covered;</li> + +<li><b>language independent</b>: although the headers are specific to C and assembler, +the library is not - any APCS conformant language can call it. +</li> + +</ul> + +OSLib also provides names for all the data structures and reason codes used +by the A�P�I. Code that uses it is superior to similar code using _kernel_swi() +or _swix(), both in terms of the compile time type checking that is available, +and the size and speed of the code generated. + +<p>OSLib provides a very convenient interface to the RISC O�S programmer, +since all the facilities of the C compiler are available to catch errors +and generate good code. It is very small, and code written using it is +smaller and faster than code written using other means. + +<div align=right><font size=-1>Jonathan Coxhead</font></div> + +<p> +<h3>OSLibSupport</h3> +Whilst not strictly part of OSLib, which specialises in providing an +interface to the RISC OS API, the OSLib development team also maintain a +higher-level C library, providing an easier to use interface, via OSLib, to +the more arcane parts of RISC OS, and deals with Events, Messages, Tasks, +Exceptions, and Errors. This is distributed on the same basis and under the +same licence conditions as OSLib itself. + + +</td></tr> <!-- end main content --> + +</table> <!-- end outer table --> +</center> + +<hr WIDTH="100%"> + +<!-- footer --> +<p><center>The RISC OS OSLib project repository is hosted by SourceForge. +<br> + +<!-- SourceForge Logo --> +<A href="http://sourceforge.net"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=51230&type=5" +width="210" height="62" border="0" alt="SourceForge Logo"> +</A> + +<p>If you wish to provide a link to this site from your own home pages, +please link to either the <a href="http://ro-oslib.sourceforge.net/"> +SourceForge home page</a>, or to the redirector at <a +href="http://OSLib.riscos.org.uk">http://OSLib.riscos.org.uk</a> + +<br>This will ensure you are unaffected by any future changes to the site +layout. + +</center> + +<hr WIDTH="100%"> + +<!-- any browser logo --> +<a href="http://www.anybrowser.org/campaign"> +<img border="0" + src="images/browserany.gif" + alt="Viewable with any Browser" + height="31" width="88"> +</a> + +<!-- html 4 logo --> +<a href="http://validator.w3.org/check/referer"> +<img border="0" + src="images/valid-html401.png" + alt="Valid HTML 4.01!" + height="31" width="88"> +</a> + +<div align=right><font size=-1> + +Tony van der Hoff, +<br>04 December 2002 + +</font></div> + + +</body> +</html> Added: trunk/website/release-6.80.html =================================================================== --- trunk/website/release-6.80.html (rev 0) +++ trunk/website/release-6.80.html 2007-04-14 17:46:43 UTC (rev 242) @@ -0,0 +1,155 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Hand-Crafted using ZAP HotMeaL"> + <meta name="Author" content="Tony van der Hoff"> + <title>Free OSLib Release Page</title> +</head> +<body text="#000000" bgcolor="#FFFFC0" link="#0000FF" vlink="#800080" alink="#FF00FF"> + +<center><h1>Free OSLib Release 6.80</h1></center> + +<center><b>31 December 2005</b></center> + +<hr> + +<!--Begin outer table --> +<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" > + <tr VALIGN = TOP>... [truncated message content] |
From: Tony v. d. H. <to...@us...> - 2007-01-02 13:03:22
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28361/!OsLib/docs Modified Files: ChangeLog Log Message: 20070102-1 Renamed various ColourTrans_GCol constants to avoid namespace clashes Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** ChangeLog 2 Jan 2007 12:54:55 -0000 1.83 --- ChangeLog 2 Jan 2007 13:03:17 -0000 1.84 *************** *** 7,10 **** --- 7,13 ---- OSLib CVS --------- + + OSLib 6.90 - Tony van der Hoff 02/01/2007 + ---------- * Enhancemnts - Added 7 Reporter SWIs (20060125-2, Phil Ludlam) *************** *** 12,16 **** * Bug Fixes - PCI.swi: Amended PCI_HardwareAddress to return Address in R4 ! (20060718-1, Christian Ludlam) - OS.swi: As documented in http://www.iyonix.com/32bit/32bit.shtml OS_PlatformFeatures bit _6_ (&40) should be 32-bit OS and bit _7_ (&80) --- 15,19 ---- * Bug Fixes - PCI.swi: Amended PCI_HardwareAddress to return Address in R4 ! (20060718-1, Christian Ludlam) - OS.swi: As documented in http://www.iyonix.com/32bit/32bit.shtml OS_PlatformFeatures bit _6_ (&40) should be 32-bit OS and bit _7_ (&80) |
From: Tony v. d. H. <to...@us...> - 2007-01-02 12:55:12
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24722/!OsLib/docs Modified Files: ChangeLog Added Files: .cvsignore Log Message: 20070102-1 Renamed various ColourTrans_GCol constants to avoid namespace clashes --- NEW FILE: .cvsignore --- .directory Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** ChangeLog 1 Aug 2006 10:48:32 -0000 1.82 --- ChangeLog 2 Jan 2007 12:54:55 -0000 1.83 *************** *** 16,19 **** --- 16,31 ---- OS_PlatformFeatures bit _6_ (&40) should be 32-bit OS and bit _7_ (&80) should be 26-bit unavailable. (20060801-1 Phil Ludlam) + - ColourTrans.swi: Renamed GCOL constants ColourTrans_SetFG, ColourTrans_SetBG, + ColourTrans_UseECFS, ColourTrans_SetText to ColourTrans_SetFG_GCol, + ColourTrans_SetBG_GCol, ColourTrans_UseECFS_GCol, ColourTrans_SetText_GCol + respectively to avoid clash with similarly named SetColour and SetTextColour + constants. + Renamed SetColour constants ColourTrans_SetFG, ColourTrans_SetBG, + ColourTrans_SetText to ColourTrans_SetFGCol, ColourTrans_SetBGCol, + ColourTrans_SetTextCol respectively for consistency. + Renamed SetTextColour constants ColourTrans_SetFG, ColourTrans_SetBG + to ColourTrans_SetFGTextCol, ColourTrans_SetBGTextCol respectively + for consistency. + (20070102-1, Christian Ludlam) * Build Environment |
From: Tony v. d. H. <to...@us...> - 2007-01-02 12:55:00
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24722/!OsLib/Source/Core/oslib Modified Files: ColourTrans.swi Log Message: 20070102-1 Renamed various ColourTrans_GCol constants to avoid namespace clashes Index: ColourTrans.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/ColourTrans.swi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColourTrans.swi 11 Mar 2002 14:12:48 -0000 1.2 --- ColourTrans.swi 2 Jan 2007 12:54:55 -0000 1.3 *************** *** 16,23 **** CONST //for SetGCOL ! ColourTrans_SetFG = ColourTrans_GCOLFlags: 0, ! ColourTrans_SetBG = ColourTrans_GCOLFlags: 0b10000000, ! ColourTrans_UseECFS = ColourTrans_GCOLFlags: 0b100000000, ! ColourTrans_SetText = ColourTrans_GCOLFlags: 0b1000000000; TYPE ColourTrans_TableFlags = .Bits; --- 16,24 ---- CONST //for SetGCOL ! // TV renamed 20070102-1 ! ColourTrans_SetFG_GCol = ColourTrans_GCOLFlags: 0, ! ColourTrans_SetBG_GCol = ColourTrans_GCOLFlags: 0b10000000, ! ColourTrans_UseECFS_GCol = ColourTrans_GCOLFlags: 0b100000000, ! ColourTrans_SetText_GCol = ColourTrans_GCOLFlags: 0b1000000000; TYPE ColourTrans_TableFlags = .Bits; *************** *** 44,56 **** CONST //for SetColour ! ColourTrans_SetFG = ColourTrans_ColourFlags: 0, ! ColourTrans_SetBG = ColourTrans_ColourFlags: 0b10000000, ! ColourTrans_SetText = ColourTrans_ColourFlags: 0b1000000000; TYPE ColourTrans_TextColourFlags = .Bits; CONST //for SetTextColour ! ColourTrans_SetFG = ColourTrans_TextColourFlags: 0, ! ColourTrans_SetBG = ColourTrans_TextColourFlags: 0b10000000; CONST --- 45,59 ---- CONST //for SetColour ! // TV renamed 20070102-1 ! ColourTrans_SetFGCol = ColourTrans_ColourFlags: 0, ! ColourTrans_SetBGCol = ColourTrans_ColourFlags: 0b10000000, ! ColourTrans_SetTextCol = ColourTrans_ColourFlags: 0b1000000000; TYPE ColourTrans_TextColourFlags = .Bits; CONST //for SetTextColour ! // TV renamed 20070102-1 ! ColourTrans_SetFGTextCol = ColourTrans_TextColourFlags: 0, ! ColourTrans_SetBGTextCol = ColourTrans_TextColourFlags: 0b10000000; CONST |