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: Tony v. d. H. <to...@us...> - 2004-11-21 12:11:46
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Events_ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24857 Modified Files: Modules Log Message: Fix to correct Event* functions not being included in OSLibSupport build Index: Modules =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Events_/Modules,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Modules 3 May 2004 15:03:25 -0000 1.2 --- Modules 21 Nov 2004 12:11:16 -0000 1.3 *************** *** 1,5 **** # OSLibSupport/Events_/Modules #------------------------------------------------------ ! TARGET := Tbevent Wimpevent Wimpmsg DIR := Events_ --- 1,5 ---- # OSLibSupport/Events_/Modules #------------------------------------------------------ ! TARGET := Tbevent Wimpevent Wimpmsg Event DIR := Events_ |
From: Tom H. <th...@us...> - 2004-10-20 18:49:10
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9012/Source/Core/oslib Modified Files: FPEmulator.swi Log Message: Added constants to define FPSR bits. Change 20041020-1. Index: FPEmulator.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/FPEmulator.swi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FPEmulator.swi 20 Nov 2002 19:19:25 -0000 1.2 --- FPEmulator.swi 20 Oct 2004 18:49:01 -0000 1.3 *************** *** 14,20 **** TYPE FPEmulator_RegisterDump = .Struct ! ( .Bits: fpsr, [12] .Byte: f0, [12] .Byte: f1, --- 14,54 ---- TYPE + FPEmulator_FPSR = .Bits; + + CONST + FPEmulator_FPSRCumulativeIVO = FPEmulator_FPSR: 0x1 "Invalid operation cumulative exception flag", + FPEmulator_FPSRCumulativeDVZ = FPEmulator_FPSR: 0x2 "Division by zero cumulative exception flag", + FPEmulator_FPSRCumulativeOFL = FPemulator_FPSR: 0x4 "Overflow cumulative exception flag", + FPEmulator_FPSRCumulativeUFL = FPEmulator_FPSR: 0x8 "Underflow cumulative exception flag", + FPEmulator_FPSRCumulativeINX = FPEmulator_FPSR: 0x10 "Inexact cumulative exception flag", + FPEmulator_FPSRControlND = FPEmulator_FPSR: 0x100 "No denormalised numbers", + FPEmulator_FPSRControlNE = FPEmulator_FPSR: 0x200 "NaN exception", + FPEmulator_FPSRControlSO = FPEmulator_FPSR: 0x400 "Select synchronous operation of FPA", + FPEmulator_FPSRControlEP = FPEmulator_FPSR: 0x800 "Use expanded packed decimal format", + FPEmulator_FPSRControlAC = FPEmulator_FPSR: 0x1000 "Use alternative definition for C flag on compare operations", + FPEmulator_FPSREnableIVO = FPEmulator_FPSR: 0x10000 "Invalid operation trap enable", + FPEmulator_FPSREnableDVZ = FPEmulator_FPSR: 0x20000 "Division by zero trap enable", + FPEmulator_FPSREnableOFL = FPEmulator_FPSR: 0x40000 "Overflow trap enable", + FPEmulator_FPSREnableUFL = FPEmulator_FPSR: 0x80000 "Underflow trap enable", + FPEmulator_FPSREnableINX = FPEmulator_FPSR: 0x100000 "Inexact trap enable", + FPEmulator_FPSRSystemID = FPEmulator_FPSR: 0xff000000 "System ID mask", + FPEmulator_FPSRSystemIDShift = .Int: 24 "System ID shift", + FPEmulator_FPSRSystemClass = FPEmulator_FPSR: 0x80000000 "System class", + FPEmulator_FPSRSystemClassShift = .Int: 31 "System class shift"; + + CONST + FPEmulator_SystemOldFPE = .Int: 0x00 "Old Floating Point Emulator", + FPEmulator_SystemFPE400 = .Int: 0x01 "New Floating Point Emulator", + FPEmulator_SystemFPPC = .Int: 0x80 "Floating Point Protocol Convertor with WE32206", + FPEmulator_SystemFPA = .Int: 0x81 "ARM Floating Point Accelerator"; + + CONST + FPEmulator_ClassSoftware = .Int: 0, + FPEmulator_ClassHardware = .Int: 1; + + TYPE FPEmulator_RegisterDump = .Struct ! ( FPEmulator_FPSR: fpsr, [12] .Byte: f0, [12] .Byte: f1, |
From: Tom H. <th...@us...> - 2004-10-20 18:49:10
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9012/docs Modified Files: ChangeLog Log Message: Added constants to define FPSR bits. Change 20041020-1. Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** ChangeLog 22 Sep 2004 14:44:52 -0000 1.67 --- ChangeLog 20 Oct 2004 18:49:01 -0000 1.68 *************** *** 8,11 **** --- 8,12 ---- --------- * Enhancemnts + - Added constants for FPSR bits to FPEmulator (20041020-1, Tom Hughes) * Bug Fixes |
From: Tony v. d. H. <to...@us...> - 2004-09-22 14:45:02
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17276/!OsLib/docs Modified Files: ChangeLog Log Message: Tools/BindHelp fixed to correctly set file types in StrongHelp image under UNIX (2004-0922-1, Stefan Bellon) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** ChangeLog 16 Aug 2004 12:34:04 -0000 1.66 --- ChangeLog 22 Sep 2004 14:44:52 -0000 1.67 *************** *** 13,16 **** --- 13,18 ---- SWI numbers swapped. (See OSLib 6.21 fixes) Corrected back again. (20040816-1, Christian Ludlam) + * - Tools/BindHelp fixed to correctly set file types in StrongHelp image + under UNIX (2004-0922-1, Stefan Bellon) OSLib 6.70 - Tony van der Hoff 08/07/2004 |
From: Tony v. d. H. <to...@us...> - 2004-09-22 14:45:02
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17276/!OsLib/Tools/BindHelp Modified Files: BindHelp.c Log Message: Tools/BindHelp fixed to correctly set file types in StrongHelp image under UNIX (2004-0922-1, Stefan Bellon) Index: BindHelp.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp/BindHelp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BindHelp.c 3 May 2004 15:03:31 -0000 1.7 --- BindHelp.c 22 Sep 2004 14:44:52 -0000 1.8 *************** *** 27,33 **** ** 20011212 TV V1.00 Original release ** 20010130 TV V1.01 Fixes calls to *printf with null pointers (Timothy Baldwin) */ ! #define VERSION "V1.01" /* Calling Syntax: --- 27,34 ---- ** 20011212 TV V1.00 Original release ** 20010130 TV V1.01 Fixes calls to *printf with null pointers (Timothy Baldwin) + ** 20040922 TV V1.10 fixes bug where file types were incorrectly set under UNIX */ ! #define VERSION "V1.10" /* Calling Syntax: *************** *** 989,992 **** --- 990,1014 ---- tracef( "scan_dir - found file: %s"DIR_SEP"%s \n" _ dir _ INFO->name ); + #if defined EXECUTE_ON_UNIX + /* V1.10 */ + /* Under RISC OS, the file type information is available in the info block; + // not so under UNIX. It is important, as searchable (using F1) files are typed + // "text", and non-searchable files are typed "data". + // Fortunately, in this case, an alternative distinguishing feature is that + // the (non-searchable) index files are named "!Root", or have file names starting with "_", + // so under Unix we use this clue to set the file type. + */ + if( (INFO -> name[0] == '_') || (stricmp( INFO->name, "!Root" ) == 0) ) + { + INFO->load_addr = 0xFFFFFD00u; + INFO->exec_addr = 0; + } + else + { + INFO->load_addr = 0xFFFFFF00u; + INFO->exec_addr = 0; + } + #endif + *root = dir_entry = add_file( INFO->name, INFO->size, |
From: Tony v. d. H. <to...@us...> - 2004-08-16 12:34:22
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30598/!OsLib/docs Modified Files: ChangeLog Log Message: Toolbox_RegisterObjectModule and Toolbox_RegisterPostFilter had SWI numbers swapped (See OSLib 6.21 fixes). Corrected back again. (20040816-1, Christian Ludlam) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ChangeLog 8 Jul 2004 11:29:45 -0000 1.65 --- ChangeLog 16 Aug 2004 12:34:04 -0000 1.66 *************** *** 5,8 **** --- 5,17 ---- ********************************************************************** + OSLib CVS + --------- + * Enhancemnts + + * Bug Fixes + - Toolbox_RegisterObjectModule and Toolbox_RegisterPostFilter had + SWI numbers swapped. (See OSLib 6.21 fixes) Corrected back again. + (20040816-1, Christian Ludlam) + OSLib 6.70 - Tony van der Hoff 08/07/2004 ---------- |
From: Tony v. d. H. <to...@us...> - 2004-08-16 12:34:22
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30598/!OsLib/Source/Toolbox/oslib Modified Files: Toolbox.swi Log Message: Toolbox_RegisterObjectModule and Toolbox_RegisterPostFilter had SWI numbers swapped (See OSLib 6.21 fixes). Corrected back again. (20040816-1, Christian Ludlam) Index: Toolbox.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib/Toolbox.swi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Toolbox.swi 11 Mar 2002 14:13:48 -0000 1.4 --- Toolbox.swi 16 Aug 2004 12:34:04 -0000 1.5 *************** *** 457,465 **** CONST Toolbox_DeRegisterFilter = Toolbox_RegisterFlags: 1; // V621 TV SWI number corrected SWI Toolbox_RegisterObjectModule = // named Toolbox_RegisterPostFilter (!) ! ( //NUMBER 0x44EFD "Registers an object module", ! NUMBER 0x44EFF "Registers an object module", ENTRY ( R0 = .Bits: flags, --- 457,466 ---- CONST Toolbox_DeRegisterFilter = Toolbox_RegisterFlags: 1; + // 20040816-1 TV SWI number corrected back again // V621 TV SWI number corrected SWI Toolbox_RegisterObjectModule = // named Toolbox_RegisterPostFilter (!) ! ( NUMBER 0x44EFD "Registers an object module", ! //NUMBER 0x44EFF "Registers an object module", ENTRY ( R0 = .Bits: flags, *************** *** 481,488 **** ), // V621 TV SWI number corrected Toolbox_RegisterPostFilter = // named Toolbox_RegisterObjectModule (!) ! ( //NUMBER 0x44EFF "Registers an object module's post-filter", ! NUMBER 0x44EFD "Registers an object module's post-filter", ENTRY ( R0 = Toolbox_RegisterFlags: flags, --- 482,490 ---- ), + // 20040816-1 TV SWI number corrected back again // V621 TV SWI number corrected Toolbox_RegisterPostFilter = // named Toolbox_RegisterObjectModule (!) ! ( NUMBER 0x44EFF "Registers an object module's post-filter", ! //NUMBER 0x44EFD "Registers an object module's post-filter", ENTRY ( R0 = Toolbox_RegisterFlags: flags, |
From: Tony v. d. H. <to...@us...> - 2004-08-07 11:10:59
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv844 Modified Files: AMUmakefile Log Message: Fix failure to run test/readvarval under RISC OS Index: AMUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval/AMUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AMUmakefile 3 May 2004 15:03:29 -0000 1.2 --- AMUmakefile 7 Aug 2004 11:10:35 -0000 1.3 *************** *** 53,57 **** ${TARGET}: ${OBJS} ${LIBS_C} ${OS_LIB} ${LINK} -output $@ ${OBJS} ${LIBS_C} ${OS_LIB} ! ${MAKE} ${MAKEFILEDIR}.AMUmakefile run run: ${TARGET} --- 53,57 ---- ${TARGET}: ${OBJS} ${LIBS_C} ${OS_LIB} ${LINK} -output $@ ${OBJS} ${LIBS_C} ${OS_LIB} ! ${MAKE} -f ${MAKEFILEDIR}.AMUmakefile run run: ${TARGET} |
From: Tony v. d. H. <to...@us...> - 2004-08-07 11:00:45
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31856 Modified Files: defmod.y Log Message: fix bug causing compile failure under RISC OS. Index: defmod.y =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/defmod.y,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** defmod.y 3 May 2004 15:03:33 -0000 1.4 --- defmod.y 7 Aug 2004 11:00:34 -0000 1.5 *************** *** 1201,1205 **** bits psr; int f; - bits psr; #endif enum {Copying, Skipping} state = Skipping; --- 1201,1204 ---- |
From: Tony v. d. H. <to...@us...> - 2004-08-03 10:59:17
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26450 Modified Files: GNUmakefile Log Message: Fixed failure to build libraries under UNIX Index: GNUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GNUmakefile 3 May 2004 15:03:22 -0000 1.2 --- GNUmakefile 3 Aug 2004 10:59:09 -0000 1.3 *************** *** 35,43 **** OSLibSupport.o: ${SOURCES} @if [ ! -a $@ ]; then ${LIBFILE} -c $@; fi; ! ${LIBFILE} -i $@ $(addsuffix .o, ${MODULES}) OSLibSupport32.o: ${SOURCES} @if [ ! -a $@ ]; then ${LIBFILE} -c $@; fi; ! ${LIBFILE} -i $@ $(addsuffix .o32, ${MODULES}) Choices_: ;${MAKE} -C $@ --- 35,43 ---- OSLibSupport.o: ${SOURCES} @if [ ! -a $@ ]; then ${LIBFILE} -c $@; fi; ! ${LIBFILE} -i $@ ${GNUMODULES} OSLibSupport32.o: ${SOURCES} @if [ ! -a $@ ]; then ${LIBFILE} -c $@; fi; ! ${LIBFILE} -i $@ ${GNUMODULES32} Choices_: ;${MAKE} -C $@ |
From: Tony v. d. H. <to...@us...> - 2004-07-09 09:44:56
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25599 Modified Files: GNUmakefile Log Message: changes to zip file names Index: GNUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/GNUmakefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GNUmakefile 8 Jul 2004 15:43:44 -0000 1.4 --- GNUmakefile 9 Jul 2004 09:44:47 -0000 1.5 *************** *** 21,26 **** .PHONY: ${ALL} tools oslib support clean pristine .PHONY: release/wide release/deep release/unix release/help release/OSLibSupport ! .PHONY: dist/wide dist/deep dist/unix dist/help dist/OSLibSupport ! .PHONY: zips/wide zips/deep zips/unix zips/help zips/OSLibSupport all: ${ALL} release --- 21,26 ---- .PHONY: ${ALL} tools oslib support clean pristine .PHONY: release/wide release/deep release/unix release/help release/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 *************** *** 29,37 **** Tools: ;${MAKE} -C $@ ! oslib: Tools Source ! Source: ;${MAKE} -C $@ support: OSLibSupport ! OSLibSupport: ;${MAKE} -C $@ cstrong: ;${MAKE} -C Source cstrong --- 29,39 ---- Tools: ;${MAKE} -C $@ ! oslib: Source ! Source: Tools ! ${MAKE} -C $@ support: OSLibSupport ! OSLibSupport: Source ! ${MAKE} -C $@ cstrong: ;${MAKE} -C Source cstrong *************** *** 42,46 **** ${RM} release Bin zips dist ! release: release_wide release_deep release_unix release_help release_support release_wide : release/wide --- 44,48 ---- ${RM} release Bin zips dist ! release: release_wide release_deep release_unix release_help release_support release_examples release_wide : release/wide *************** *** 120,155 **** zips/wide: release/wide @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib.zip ! cd release/wide; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib * dist_deep: zips/deep zips/deep: release/deep @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib.zip ! cd release/deep; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib * dist_unix: zips/unix zips/unix: release/unix @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib.zip ! cd release/unix; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib * dist_support: zips/OSLibSupport zips/OSLibSupport: release/OSLibSupport @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLibSupport.zip ! cd release/OSLibSupport; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLibSupport * dist_help: zips/help zips/help: release/help @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib.zip ! cd release/help; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib * dist_examples: zips/examples zips/examples: release/examples @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/examples.zip ! cd release/examples; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/examples * #------------------------------------------------------------------------ --- 122,157 ---- zips/wide: release/wide @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib_wide.zip ! cd release/wide; ${CROSSPATH}/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; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib_deep * dist_unix: zips/unix zips/unix: release/unix @if [ ! -d $@ ]; then mkdir -p $@; fi ! ${RM} $@/OSLib_unix.zip ! cd release/unix; ${CROSSPATH}/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; ${CROSSPATH}/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; ${CROSSPATH}/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; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib_examples * #------------------------------------------------------------------------ |
From: Tony v. d. H. <to...@us...> - 2004-07-08 15:43:54
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15640 Modified Files: GNUmakefile Log Message: fix support zip Index: GNUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/GNUmakefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GNUmakefile 8 Jul 2004 12:56:45 -0000 1.3 --- GNUmakefile 8 Jul 2004 15:43:44 -0000 1.4 *************** *** 139,143 **** @if [ ! -d $@ ]; then mkdir -p $@; fi ${RM} $@/OSLibSupport.zip ! cd release; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLibSupport * dist_help: zips/help --- 139,143 ---- @if [ ! -d $@ ]; then mkdir -p $@; fi ${RM} $@/OSLibSupport.zip ! cd release/OSLibSupport; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLibSupport * dist_help: zips/help |
From: Tony v. d. H. <to...@us...> - 2004-07-08 12:56:54
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13871 Modified Files: GNUmakefile Log Message: Examples added Index: GNUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GNUmakefile 3 May 2004 15:03:22 -0000 1.2 --- GNUmakefile 8 Jul 2004 12:56:45 -0000 1.3 *************** *** 109,113 **** release/OSLibSupport: ;${MAKE} -C OSLibSupport release RELEASEDIR=${CURDIR}/$@ ! dist: dist_wide dist_deep dist_unix dist_help dist_support dist_wide: zips/wide --- 109,119 ---- 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 *************** *** 141,143 **** --- 147,155 ---- cd release/help; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/OSLib * + dist_examples: zips/examples + zips/examples: release/examples + @if [ ! -d $@ ]; then mkdir -p $@; fi + ${RM} $@/examples.zip + cd release/examples; ${CROSSPATH}/zip -, -9r ${CURDIR}/$@/examples * + #------------------------------------------------------------------------ |
From: Tony v. d. H. <to...@us...> - 2004-07-08 11:29:55
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29744/docs Modified Files: ChangeLog Log Message: OSLib 6.70 release Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** ChangeLog 4 May 2004 16:36:01 -0000 1.64 --- ChangeLog 8 Jul 2004 11:29:45 -0000 1.65 *************** *** 5,9 **** ********************************************************************** ! OSLib CVS ---------- * Enhancements: --- 5,9 ---- ********************************************************************** ! OSLib 6.70 - Tony van der Hoff 08/07/2004 ---------- * Enhancements: *************** *** 23,27 **** - Syslog now defines a set of functions to control logs by handle (20040504-3, Philip Ludlam) ! * Bug Fixes: - FrontEnd and SysLog now include OS (20040504-2, Philip Ludlam) --- 23,27 ---- - Syslog now defines a set of functions to control logs by handle (20040504-3, Philip Ludlam) ! * Bug Fixes: - FrontEnd and SysLog now include OS (20040504-2, Philip Ludlam) *************** *** 74,87 **** * Build Environment: - Corrections to Makefiles, Obey files and a few file names to enable ! OSLib to be built on a case-sensitive filing system. Note, in particular, that Hdr.types has been changed to Hdr.Types (20031227-1, Tony van der Hoff). - The Make files now use the enhanced GNU-type syntax available with the 32-bit Castle tools. These, or GNU Make are now required ! to build OSLib using the supplied tools (20031227-1, Tony van der Hoff). - Fix to DefMod to no longer emit the OSLib: prefix to assembler Hdr includes (20031227-1, Tony van der Hoff). - Makefiles updated to include latest modules ! (20031227-1, Tony van der Hoff). - Test suite updated to include latest modules (20031227-1, Tony van der Hoff). --- 74,87 ---- * Build Environment: - Corrections to Makefiles, Obey files and a few file names to enable ! OSLib to be built on a case-sensitive filing system. Note, in particular, that Hdr.types has been changed to Hdr.Types (20031227-1, Tony van der Hoff). - The Make files now use the enhanced GNU-type syntax available with the 32-bit Castle tools. These, or GNU Make are now required ! to build OSLib using the supplied tools (20031227-1, Tony van der Hoff). - Fix to DefMod to no longer emit the OSLib: prefix to assembler Hdr includes (20031227-1, Tony van der Hoff). - Makefiles updated to include latest modules ! (20031227-1, Tony van der Hoff). - Test suite updated to include latest modules (20031227-1, Tony van der Hoff). *************** *** 101,105 **** * To facilitate cross referencing this file with CVS updates, a reference number is now included, as well as the originator of the change. ! * Enhancements: - Defines ADFS_DiscOp64 for RISC O S 5 and adds placeholders for two --- 101,105 ---- * To facilitate cross referencing this file with CVS updates, a reference number is now included, as well as the originator of the change. ! * Enhancements: - Defines ADFS_DiscOp64 for RISC O S 5 and adds placeholders for two *************** *** 117,125 **** - Define OS_LeaveOS. (Tom Hughes) - Defines Territory_AlphabetLatin5, Territory_AlphabetWelsh, ! Territory_AlphabetLatin9, Territory_AlphabetLatin6. (20030226-1, Theo Markettos) - Amended OSLib_Readme to clarify use of compiler and linker. (20030226-1, Tony van der Hoff) ! * Bug Fixes: - Changes char* to toolbox_msg_ref for: --- 117,125 ---- - Define OS_LeaveOS. (Tom Hughes) - Defines Territory_AlphabetLatin5, Territory_AlphabetWelsh, ! Territory_AlphabetLatin9, Territory_AlphabetLatin6. (20030226-1, Theo Markettos) - Amended OSLib_Readme to clarify use of compiler and linker. (20030226-1, Tony van der Hoff) ! * Bug Fixes: - Changes char* to toolbox_msg_ref for: *************** *** 127,131 **** toolaction_gadget.off_text, toolaction_object.off_text (20030226-1, Dave Appleby) ! - Corrected Help Text for FileSwitch Error_NotFound (20030226-1, J-J van der Geer) - Corrected capitalisation of include file "Wimp" in: --- 127,131 ---- toolaction_gadget.off_text, toolaction_object.off_text (20030226-1, Dave Appleby) ! - Corrected Help Text for FileSwitch Error_NotFound (20030226-1, J-J van der Geer) - Corrected capitalisation of include file "Wimp" in: *************** *** 134,142 **** - Added Toolaction, which was missing, to Toolbox MakeFile (20030226-1, J.M. Temple) ! OSLib Version 6.40 - Tony van der Hoff - 28/11/2002 ------------------ * Enhancements: ! - Defines SWI Wimp_SetIconStateFromBlock (wimp_set_icon_state_from_block) and TYPE Wimp_SetIconStateBlock (wimp_set_icon_state_block) to implement the native RISC OS SWI. (Philip Ludlam) --- 134,142 ---- - Added Toolaction, which was missing, to Toolbox MakeFile (20030226-1, J.M. Temple) ! OSLib Version 6.40 - Tony van der Hoff - 28/11/2002 ------------------ * Enhancements: ! - Defines SWI Wimp_SetIconStateFromBlock (wimp_set_icon_state_from_block) and TYPE Wimp_SetIconStateBlock (wimp_set_icon_state_block) to implement the native RISC OS SWI. (Philip Ludlam) *************** *** 164,183 **** - Updated FileCore to reflect RISC O S 5 changes, including the addition of FileCore_DiscOp64. (Tom Hughes) ! - Adds OSSpriteOp_ReadPixelColourDeep and OSSpriteOp_WritePixelColourDeep to manipulate 24-bit RGB values. (John Clark) ! - Distribution now includes 32-bit neutral version of OSLibSupport32 library. (Tony van der Hoff) - Added OS_ReadLine32, OS_HeapSort32 and OS_SubstituteArgs32 for 32 bit support in RISC O S 5. (Tom Hughes) ! ! * Build Environment - OSLib may now be built under either a 26-bit or a 32-bit environment. This is ! autodetected, and the build tools are linked accordingly. To this end YACC, ! which had been coded in pre-ANSI C, has been replaced by a modern port of bison. Castle 32-bit compiler. (Tony van der Hoff) - Defmod build is is now free of warning messages. (Tony van der Hoff) - Instated pre-release test for assembler headers similar to that used for C headers. (Tony van der Hoff) ! * Bug Fixes: - Font_ReadFontMetrics misc information structure (Font_MetricsMiscInfo) is now correctly --- 164,183 ---- - Updated FileCore to reflect RISC O S 5 changes, including the addition of FileCore_DiscOp64. (Tom Hughes) ! - Adds OSSpriteOp_ReadPixelColourDeep and OSSpriteOp_WritePixelColourDeep to manipulate 24-bit RGB values. (John Clark) ! - Distribution now includes 32-bit neutral version of OSLibSupport32 library. (Tony van der Hoff) - Added OS_ReadLine32, OS_HeapSort32 and OS_SubstituteArgs32 for 32 bit support in RISC O S 5. (Tom Hughes) ! ! * Build Environment - OSLib may now be built under either a 26-bit or a 32-bit environment. This is ! autodetected, and the build tools are linked accordingly. To this end YACC, ! which had been coded in pre-ANSI C, has been replaced by a modern port of bison. Castle 32-bit compiler. (Tony van der Hoff) - Defmod build is is now free of warning messages. (Tony van der Hoff) - Instated pre-release test for assembler headers similar to that used for C headers. (Tony van der Hoff) ! * Bug Fixes: - Font_ReadFontMetrics misc information structure (Font_MetricsMiscInfo) is now correctly *************** *** 187,219 **** - types.h now tests for __bool_true_false_are_defined and sets BOOL_DEFINED if true, to provide support for inclusion of <stdbool.h> (Kevin Bracey) ! - EventInternet_RARPReply corrected to take 2 args; the requester's address had been omitted. (Dave Ruck) - Corrected value of FileCore_HardDiscsCanEject. (Tom Hughes) - Fixes BASICTrans_Error to return a pointer to a string, not an OS_Error. (Ralph Corderoy) ! - Fixed sizes of FontMenu_ActionSelection and FontDbox_ActionApplyFont to 212 bytes from 216. (Kevin Bracey) ! - OS_CRC now takes the same data type (byte*) for both input and output. This is not 100% backward compatible as it may cause a compiler warning (not an error). (Jan-Jaap van der Geer) ! - Removed all references to OS_F in Arcweb module. 8-bit file handles were never supported. (Tom Hughes) - Fixed assembly error when including HDR.OSF32. (Philip Ludlam) - Fixed all instances in Iconbar.swi of Toolbox_o in favour of Toolbox_O. ! (Philip Ludlam) ! - Fixed duplicate symbols in assembler headers. In order to preserve compatibility in C headers, this is achieved by a name case change for the constants. (Philip Ludlam) ! - Fixed Defmod generating bad Macro definitions for nested macros in Assembler Headers. (Tony van der Hoff) ! * CVS release: - this version is the first to be made available as a CVS archive. In ! preparation for this, some of the source directory names in OSLibSupport have been changed, and many minor changes have been made to the build ! environment. As a result of these changes, OSLib can now be fully built ! "out of the box". The CVS archive goes back to version 6.0 for historical ! purposes, thus it correctly reflects the changes to the sources since then; ! it is however not intended that early OSLib versions can be correctly re-built from these retrospective archives. --- 187,219 ---- - types.h now tests for __bool_true_false_are_defined and sets BOOL_DEFINED if true, to provide support for inclusion of <stdbool.h> (Kevin Bracey) ! - EventInternet_RARPReply corrected to take 2 args; the requester's address had been omitted. (Dave Ruck) - Corrected value of FileCore_HardDiscsCanEject. (Tom Hughes) - Fixes BASICTrans_Error to return a pointer to a string, not an OS_Error. (Ralph Corderoy) ! - Fixed sizes of FontMenu_ActionSelection and FontDbox_ActionApplyFont to 212 bytes from 216. (Kevin Bracey) ! - OS_CRC now takes the same data type (byte*) for both input and output. This is not 100% backward compatible as it may cause a compiler warning (not an error). (Jan-Jaap van der Geer) ! - Removed all references to OS_F in Arcweb module. 8-bit file handles were never supported. (Tom Hughes) - Fixed assembly error when including HDR.OSF32. (Philip Ludlam) - Fixed all instances in Iconbar.swi of Toolbox_o in favour of Toolbox_O. ! (Philip Ludlam) ! - Fixed duplicate symbols in assembler headers. In order to preserve compatibility in C headers, this is achieved by a name case change for the constants. (Philip Ludlam) ! - Fixed Defmod generating bad Macro definitions for nested macros in Assembler Headers. (Tony van der Hoff) ! * CVS release: - this version is the first to be made available as a CVS archive. In ! preparation for this, some of the source directory names in OSLibSupport have been changed, and many minor changes have been made to the build ! environment. As a result of these changes, OSLib can now be fully built ! "out of the box". The CVS archive goes back to version 6.0 for historical ! purposes, thus it correctly reflects the changes to the sources since then; ! it is however not intended that early OSLib versions can be correctly re-built from these retrospective archives. |
From: Tony v. d. H. <to...@us...> - 2004-07-08 11:17:48
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27881 Modified Files: !Readme Log Message: GCCSDK url changed Index: !Readme =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/!Readme,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** !Readme 3 May 2004 15:03:22 -0000 1.7 --- !Readme 8 Jul 2004 11:17:39 -0000 1.8 *************** *** 10,17 **** from http://ro-oslib.sourceforge.net. ! ***************************************************************************** ! Directory structure ------------------- --- 10,17 ---- from http://ro-oslib.sourceforge.net. ! ***************************************************************************** ! Directory structure ------------------- *************** *** 54,58 **** ***************************************************************************** ! Building OSLib under RISC OS ---------------------------- --- 54,58 ---- ***************************************************************************** ! Building OSLib under RISC OS ---------------------------- *************** *** 106,117 **** ***************************************************************************** ! Building OSLib under UNIX/Linux ------------------------------- ! Building under Linux is possible with the support of the GCCSDK, which can ! be found at <http://hard-mofo.dsvr.net/gcc/index.html>. Build and install it ! as necessary. Please note that the latest version of 'as' is required; at the ! time of writing this doesn't appear in any of the pre-compiled archives; you ! need to check out the head revision from CVS. Otherwise, building under LINUX is very similar to building under RISC OS. --- 106,116 ---- ***************************************************************************** ! Building OSLib under UNIX/Linux ------------------------------- ! Building under Linux is possible with the support of the GCCSDK, which can ! be found at <http://gccsdk.riscos.info/>. You'll need at least 3.3.3-pre2. ! Build and install it as appropriate. OSLib assumes the default location for ! the binaries, i.e. /home/riscos/. Otherwise, building under LINUX is very similar to building under RISC OS. |
From: Tony v. d. H. <to...@us...> - 2004-07-08 10:59:50
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24406/Source/Test/readvarval Modified Files: !Run,fd7 Log Message: object file name changed Index: !Run,fd7 =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval/!Run,fd7,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** !Run,fd7 31 Jan 2004 11:29:29 -0000 1.4 --- !Run,fd7 8 Jul 2004 10:59:38 -0000 1.5 *************** *** 1 **** ! /<obey$Dir>.main \ No newline at end of file --- 1 ---- ! /<obey$Dir>.readvarval \ No newline at end of file |
Update of /cvsroot/ro-oslib/OSLib/!OsLib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22314/examples Added Files: !Agenda,fd7 !Make,fd7 .cvsignore AMUmakefile,fe1 Ex0.c Ex1.c Ex2.c GNUmakefile Helloworld.c P1-046.c P1-053.c P1-067.c P1-068.c P1-108.c P1-109.c P1-110.c P1-219.c P1-332.c P1-334.c P1-467.c P1-606.c P1-754.c P1-833.c P1-834.c P2-042.c P2-083.c P2-099.c P2-383.c P2-413.c P2-491.c P2-492.c P2-493.c P2-524.c P2-526.c P2-589.c P2-615.c P2-616.c P2-617.c P2-618.c P2-619.c P2-622.c P2-625.c P2-629.c P2-632.c P2-634.c P2-636.c P2-638.c P2-691.c P2-735.c P2-740.c P2-743.c P3-007.c P3-018.c P3-023.c P3-024.c P3-025.c P3-063.c P3-070.c P3-072.c P3-073.c P3-162.c P3-185.c P3-198.c P3-231.c P3-246.c P3-411.c P3-421.c P3-433.c P3-469.c P3-549.c P3-562.c P3-659.c P3-743.c Log Message: OSLib examples added back in --- NEW FILE: .cvsignore --- # examples/.cvsignore o o/* --- NEW FILE: P3-198.c --- #include "oslib/wimp.h" wimp_t task_from_icon (wimp_w w, wimp_i i) { wimp_message message; message.size = 20; message.your_ref = 0; /*rest not used*/ return wimp_send_message_to_window (wimp_USER_MESSAGE_ACKNOWLEDGE, &message, w, i); } --- NEW FILE: P1-834.c --- #include "oslib/colourtrans.h" #include "oslib/os.h" #include "oslib/osspriteop.h" extern osspriteop_area *Ram; extern osspriteop_trans_tab *Pix_Trans; void ex (void) /*ColourTrans can do this itself.*/ { osspriteop_header *sptr; sptr = (osspriteop_header *) ((char *) Ram + Ram->first); colourtrans_select_table_for_sprite (Ram, (osspriteop_id) sptr, colourtrans_CURRENT_MODE, colourtrans_CURRENT_PALETTE, Pix_Trans, colourtrans_GIVEN_SPRITE); } --- NEW FILE: P2-617.c --- #include <stdio.h> #include <stdlib.h> #include "oslib/econet.h" void ex1 (int status) { econet_convert_status_to_error (status, NULL, 0, 0, 0); } void ex2 (int status) { os_error error; econet_convert_status_to_error (status, &error, sizeof error, 0, 0); } void ex3 (int status, byte station, byte net) { os_error error; econet_convert_status_to_error (status, &error, sizeof error, station, net); } void ex4 (int status) { if (status == econet_STATUS_TRANSMITTED) { printf ("OK\n"); exit (0); } } --- NEW FILE: P3-562.c --- #include "oslib/os.h" #include "oslib/osfind.h" #include "oslib/pdriver.h" void skeleton (void) { pdriver_info (...); osfind_openout (..., "printer:", ...); pdriver_select_job (...); if (... driver supports pdriver_declare_font ...) { while (... fonts to be declared ...) pdriver_declare_font (...); pdriver_declare_font (...); } for (... each page to print ...) { do pdriver_give_rectangle (...); while (... rectangles to declare ...); pdriver_draw_page (...); while (... more rectangles to print ...) { ... plot returned rectangles using supported output calls ...; pdriver_get_rectangle (...); } } pdriver_end_job (...); osfind_close (...); } --- NEW FILE: P3-659.c --- #include "oslib/os.h" #include "oslib/osfind.h" #include "oslib/pdriver.h" extern os_error *Get_Document_Size (os_box *); extern os_error *Fit_Two_Pages (int x0, int y0, int x1, int y1, os_box *, os_hom_trfm *, os_coord *, os_coord *); extern os_error *Draw_Page (int page, os_box *); os_error *print_out (int first_page, int last_page, char *title, char *file_name, font_f *font_ptr) { os_error *error; os_f job, old_job; osbool done_openout = FALSE, done_select_job = FALSE, more; bits features; os_box box, printable, box2; os_hom_trfm trfm; os_coord o1, o2; int page, page_to_print; if ((error = xosfind_openout (osfind_NO_PATH | osfind_ERROR_IF_DIR | osfind_ERROR_IF_ABSENT, "printer:", NULL, &job)) != NULL) goto finish; done_openout = TRUE; if ((error = xpdriver_select_job (job, title, &old_job)) != NULL) goto finish; done_select_job = TRUE; /*This code is not explicitly in the BASIC, but PROCdeclarefonts must do something like this:*/ if ((error = xpdriver_info (NULL, NULL, NULL, &features, NULL, NULL, NULL, NULL)) != NULL) goto finish; if ((features & pdriver_FEATURE_DECLARE_FONT) != 0) do if ((error = xpdriver_declare_font (*font_ptr, NULL, 0)) != NULL) goto finish; while (*font_ptr++ != 0); if ((error = Get_Document_Size (&box)) != NULL) goto finish; if ((error = xpdriver_page_size (NULL, NULL, &printable.x0, &printable.y0, &printable.x1, &printable.y1)) != NULL) goto finish; if ((error = Fit_Two_Pages (printable.x0, printable.y0, printable.x1, printable.y1, &box, &trfm, &o1, &o2)) != NULL) goto finish; for (page = first_page; page <= last_page; page += 2) { if ((error = xpdriver_give_rectangle (page, &box, &trfm, &o1, os_COLOUR_WHITE)) != NULL) goto finish; if (page < last_page) if ((error = xpdriver_give_rectangle (page + 1, &box, &trfm, &o2, os_COLOUR_WHITE)) != NULL) goto finish; if ((error = xpdriver_draw_page (1, &box2, 0, NULL, &more, &page_to_print)) != NULL) goto finish; while (more) { if ((error = Draw_Page (page_to_print, &box2)) != NULL) goto finish; if ((error = xpdriver_get_rectangle (&box2, &more, &page_to_print)) != NULL) goto finish; } } finish: if (done_select_job) { os_error *error1; error1 = error == NULL? xpdriver_end_job (job): xpdriver_abort_job (job); if (error == NULL) error = error1; error1 = xpdriver_select_job (old_job, NULL, NULL); if (error == NULL) error = error1; } if (done_openout) { os_error *error1; error1 = xosfind_close (job); if (error == NULL) error = error1; } return error; } --- NEW FILE: P2-622.c --- /*Note there are bugs in the assembler: the receive block is not abandoned if econet_do_transmit() fails, and R6, R7 are the wrong way round in the call to Econet_DoTransmit.*/ #include "oslib/econet.h" #include "oslib/os.h" #define ENTRY_PORT 0x1Fu #define ERROR_NUMBER_BUFFER_OVERFLOW 1 extern byte Server_Station, Server_Net; extern int Server_Delay, Server_Tx_Delay, Server_Tx_Count; static os_error Buffer_Overflow_Error = {ERROR_NUMBER_BUFFER_OVERFLOW, "Command too long for buffer"}; os_error *example (char *text) { byte reply_port = 0, buffer [80]; os_error *error = NULL, error1; econet_rx_cb rx_cb = 0; int i,status; char c; if ((error = xeconet_allocate_port (&reply_port)) != NULL) goto finish; if ((error = xeconet_create_receive (reply_port, Server_Station, Server_Net, buffer, sizeof buffer, &rx_cb, NULL)) != NULL) goto finish; buffer [0] = reply_port; for (i = 1, c = *text++;; i++) { if (!(i < sizeof buffer)) { error = &Buffer_Overflow_Error; goto finish; } if (c < ' ') { buffer [i] = '\r'; break; } else buffer [i] = c; } if ((error = xeconet_do_transmit (NONE, ENTRY_PORT, Server_Station, Server_Net, buffer, sizeof buffer, Server_Tx_Count, Server_Tx_Delay, &status, NULL)) != NULL) goto finish; if (status != econet_STATUS_TRANSMITTED) { error = xeconet_convert_status_to_error (status, &error1, sizeof error1, Server_Station, Server_Net); goto finish; } if ((error = xeconet_wait_for_reception (rx_cb, Server_Delay, /*abort on excape?*/ FALSE, &status, NULL, NULL, NULL, NULL, NULL, NULL)) != NULL) goto finish; rx_cb = 0; if (status != econet_STATUS_RECEIVED) { error = xeconet_convert_status_to_error (status, &error1, sizeof error1, Server_Station, Server_Net); goto finish; } Server_Command_Port = *(int *) buffer; finish: if (error != NULL) { if (rx_cb != 0) { os_error *error1; error1 = xeconet_abandon_receive (rx_cb); if (error == NULL) error = error1; } if (reply_port != 0) { os_error *error1; error1 = xeconet_de_allocate_port (reply_port); if (error == NULL) error = error1; } } return error; } --- NEW FILE: P3-411.c --- #include <string.h> #include "oslib/os.h" extern char Old_Font_Path []; extern void Cache_List_Of_Fonts (void); void ex (void) { char buffer [0x200]; int used; os_gs_trans ("<Font$Prefix> and <Font$Path>", buffer, sizeof buffer - 1, &used); buffer [used] = '\0'; /*ensure there is a terminator (0 for C)*/ if (strcmp (buffer, Old_Font_Path) != 0) { strcpy (Old_Font_Path, buffer); Cache_List_Of_Fonts (); } } --- NEW FILE: P3-549.c --- #include "oslib/macros.h" #include "oslib/draw.h" #define PATH_LEN 256 static int Path [PATH_LEN/sizeof (int)], Path_Ptr = 0; static os_error Too_Small = {0, "Insufficient path buffer"}; void add (int value) { if (Path_Ptr + 1 > COUNT (Path)) os_generate_error (&Too_Small); Path [Path_Ptr++] = value; } int main (void) { int xsize, ysize, xscale, yscale; os_trfm trfm; draw_path *path = (draw_path *) Path; draw_line_style line_style; xsize = 210000, ysize = 160000; xscale = 1280*256/xsize << 16; yscale = 1024*256/ysize << 16; trfm.entries [0] [0] = xscale; trfm.entries [0] [1] = 0; trfm.entries [1] [0] = 0; trfm.entries [1] [1] = yscale; trfm.entries [2] [0] = 0; trfm.entries [2] [1] = 0; line_style.join_style = draw_JOIN_BEVELLED; line_style.end_cap_style = draw_CAP_ROUND; line_style.start_cap_style = draw_CAP_ROUND; line_style.reserved = 0; line_style.mitre_limit = 0; line_style.start_cap_width = 0; line_style.start_cap_length = 0; line_style.end_cap_width = 0; line_style.end_cap_length = 0; add (draw_MOVE_TO), add (80000), add (80000); add (draw_LINE_TO), add (80000), add (120000); add (draw_LINE_TO), add (170000), add (120000); add (draw_LINE_TO), add (170000), add (80000); add (draw_MOVE_TO), add (50000), add (50000); add (draw_BEZIER_TO), add (80000), add (80000), add (85000), add (30000), add (50000), add (60000); add (draw_CLOSE_GAP); add (draw_END_PATH), add (PATH_LEN - (Path_Ptr + 1)*sizeof (int)); os_writen ("\x1D\0\0\0\0", 5); draw_stroke (path, NONE, &trfm, xsize/640, 5000, &line_style, NULL); trfm.entries [2] [0] = 60 << 8; trfm.entries [2] [1] = -100 << 8; draw_stroke (path, NONE, &trfm, xsize/640, 2500, &line_style, NULL); return 0; } --- NEW FILE: P2-625.c --- #include <string.h> #include "oslib/econet.h" #include "oslib/os.h" #include "oslib/osbyte.h" #include "oslib/osmodule.h" #include "oslib/osword.h" typedef struct clock_list clock_list; extern int Event_Veneer (void); struct clock_list {clock_list *next; econet_tx_cb tx; os_date_and_time clock;}; extern byte Command_Port; extern econet_rx_cb Rx_Handle; extern clock_list *Tx_List; extern int Reply_Count, Reply_Delay; extern byte Buffer [80]; os_error *start (void) { os_error *error = NULL; if ((error = xos_claim (EventV, (void *) &Event_Veneer, NULL)) != NULL) goto finish; if ((error = xos_byte (osbyte_ENABLE_EVENT, Event_EconetRx, SKIP, NULL, NULL)) != NULL) goto finish; if ((error = xos_byte (osbyte_ENABLE_EVENT, Event_EconetTx, SKIP, NULL, NULL)) != NULL) goto finish; if ((error = xeconet_create_receive (Command_Port, 0, 0, Buffer, sizeof Buffer, &Rx_Handle, NULL)) != NULL) goto finish; finish: /*If error != NULL, should abandon receive (if created), disable enabled events and release EventV (if claimed) here.*/ return error; } os_error *event (int *event, econet_rx_cb rx, int status) /*or (int *event, econet_tx_cb tx, int status)*/ /*The mechanism by which event_handler() calls event() is not detailed here. Assume that if event is set to -1 on exit, the call is claimed.*/ { os_error *error = NULL; clock_list *clock_ptr; byte port, station, net, *buffer; oswordreadclock_utc_block utc; switch (*event) { case Event_EconetRx: if (rx == Rx_Handle) { if ((error = xeconet_read_receive (rx, NULL, NULL, &port, &station, &net, &buffer, NULL)) != NULL) goto finish; if ((error = xosmodule_alloc (sizeof *clock_ptr, (void **) &clock_ptr)) != NULL) goto finish; utc.op = oswordreadclock_OP_UTC; if ((error = xoswordreadclock_utc (&utc)) != NULL) goto finish; memcpy (clock_ptr->clock, utc.utc, sizeof (os_date_and_time)); if ((error = xeconet_start_transmit (0, Buffer [0], station, net, (byte *) &clock_ptr->clock, sizeof clock_ptr->clock, Reply_Count, Reply_Delay, &clock_ptr->tx, NULL)) != NULL) goto finish; /*Add the list to new record.*/ clock_ptr->next = Tx_List; Tx_List = clock_ptr; /*Now reopen the reception.*/ if ((error = xeconet_create_receive (Command_Port, 0, 0, Buffer, sizeof Buffer, &Rx_Handle, NULL)) != NULL) goto finish; /*claim vector*/ *event = -1; } break; case Event_EconetTx: { econet_tx_cb tx = (econet_tx_cb) rx; /*change of name only*/ clock_list **t; for (t = &Tx_List; *t != NULL; t = &(*t)->next) if ((*t)->tx == tx) { /*Remove from the list*/ *t = (*t)->next; (void) xeconet_abandon_transmit (tx, NULL); (void) xosmodule_free ((byte *) *t); } /*claim vector*/ *event = -1; } break; } finish: return error; } --- NEW FILE: P1-754.c --- #include <stdlib.h> #include "oslib/os.h" #include "oslib/osspriteop.h" extern osspriteop_area *My_Area; extern char My_Sprite []; extern os_error No_Memory; extern osbool Interested; void ex1 (void) { int r0, r1, r2, r3; osspriteop_switch_output_to_sprite (osspriteop_NAME, My_Area, (osspriteop_id) My_Sprite, NULL, &r0, &r1, &r2, &r3); /*... do whatever graphics we want ...*/ osspriteop_unswitch_output (r0, r1, r2, r3); } void ex2 (void) { osspriteop_save_area *save_area; int c0, c1, c2, c3; if ((save_area = malloc (osspriteop_read_save_area_size (osspriteop_NAME, My_Area, (osspriteop_id) My_Sprite))) == NULL) os_generate_error (&No_Memory); save_area->a [0] = 0; while (Interested) { osspriteop_switch_output_to_sprite (osspriteop_NAME, My_Area, (osspriteop_id) My_Sprite, save_area, &c0, &c1, &c2, &c3); /*... work on the sprite ...*/ osspriteop_unswitch_output (c0, c1, c2, c3); /*... talk to the user ...*/ } } --- NEW FILE: P2-740.c --- #include "oslib/hourglass.h" #include "oslib/os.h" void example (void) { hourglass_on (); hourglass_on (); hourglass_percentage (10); /*sets to 10*/ hourglass_percentage (20); /*sets to 20*/ hourglass_on (); hourglass_percentage (50); /*DOESN'T set to 50*/ hourglass_off (); hourglass_percentage (30); /*sets to 30*/ hourglass_off (); /*turns off percentages*/ hourglass_off (); /*turns off hourglass*/ } --- NEW FILE: P1-334.c --- #include "oslib/os.h" #include "oslib/osbyte.h" extern void Timer_Veneer (void); extern void *Alarm; extern void Call_Back_Veneer (void); extern void *Save_Block; extern void Event_Veneer (void); void add_call_back (void) /*The code to install the handler only.*/ { os_call_after (200, (void *) &Timer_Veneer, Alarm); } void call_back_handler (void) /*Installation code only.*/ { void *old_callbacks, *old_events; byte *old_buffer; osbool shift_pressed; old_callbacks = os_change_environment (os_HANDLER_CALL_BACK, (void *) &Call_Back_Veneer, 0, Save_Block, NULL, &old_buffer); old_events = os_change_environment (os_HANDLER_EVENT, (void *) &Event_Veneer, 0, 0, NULL, NULL); os_byte (osbyte_ENABLE_EVENT, Event_MouseTransition, SKIP, NULL, NULL); do os_byte (osbyte_IN_KEY, 0 ^ 0xFF, 0xFF, &shift_pressed, NULL); while (!shift_pressed); /*loop until shift*/ os_byte (osbyte_DISABLE_EVENT, Event_MouseTransition, SKIP, NULL, NULL); os_change_environment (os_HANDLER_EVENT, old_events, 0, 0, NULL, NULL); os_change_environment (os_HANDLER_CALL_BACK, old_callbacks, 0, old_buffer, NULL, NULL); } --- NEW FILE: P3-072.c --- #include <kernel.h> #include "oslib/os.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; extern char My_Command []; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_Reset: Task_Handle = 0; break; case Service_StartedWimp: if (Task_Handle == (wimp_t) -1) Task_Handle = 0; break; } } --- NEW FILE: P3-063.c --- #include <kernel.h> #include "oslib/os.h" #include "oslib/osmodule.h" #include "oslib/wimp.h" #define ENTRY_COMMAND 42 static char Title [] = "MyModule"; static wimp_t Task_Handle; /*This is a CMHG-style command entry point.*/ _kernel_oserror *main_command (char *tail, int argc, int cmd_no, void *workspace) { os_error *error = NULL; switch (cmd_no) { case ENTRY_COMMAND: if ((error = xosmodule_enter (Title, tail)) != NULL) goto finish; break; /*other commands*/ } finish: return (_kernel_oserror *) error; } /*This is the module's language entry point.*/ int main (void) { os_error *error = NULL; if (Task_Handle != 0) { wimp_t t = Task_Handle; Task_Handle = 0; if ((error = xwimp_close_down (t)) != NULL) goto finish; } /*Now claim any workspace etc required before initialising the WIMP*/ if ((error = xwimp_initialise (wimp_VERSION_RO3, Title, NULL, NULL, &Task_Handle)) != NULL) goto finish; /*Rest of the application.*/ finish: return 0; } --- NEW FILE: P3-025.c --- #include "oslib/os.h" #include "oslib/osspriteop.h" #include "oslib/wimp.h" int main (void) { osspriteop_area *rom; wimp_base_of_sprites (&rom, NULL); osspriteop_save_sprite_file (osspriteop_USER_AREA, rom, "WSprite"); return 0; } --- NEW FILE: P2-743.c --- #include "oslib/hourglass.h" #include "oslib/os.h" #include "oslib/osfile.h" extern byte Buffer []; extern os_error *Process_Byte (byte); os_error *do_load_and_process (char *file_name) { os_error *error = NULL; int i, size; osbool done_on = FALSE; if ((error = xosfile_load_stamped (file_name, Buffer, NULL, NULL, NULL, &size, NULL)) != NULL) goto finish; /*note that osfile_load loads a file at its load address*/ if (size != 0) { if ((error = xhourglass_on ()) != NULL) goto finish; done_on = TRUE; for (i = 0; i < size; i++) { if ((error = xhourglass_percentage (100*i/size)) != NULL) goto finish; if ((error = Process_Byte (Buffer [i])) != NULL) goto finish; } } finish: if (done_on) { os_error *error1; error1 = xhourglass_off (); if (error == NULL) error = error1; } return error; } --- NEW FILE: P2-042.c --- #include "oslib/os.h" #include "oslib/osfile.h" os_error *ex (char *file_name) { int obj_type; os_error *error = NULL; if ((error = xosfile_read_stamped (file_name, &obj_type, NULL, NULL, NULL, NULL, NULL)) != NULL) goto finish;; if (obj_type != osfile_IS_FILE) { error = xosfile_make_error (file_name, obj_type); goto finish; } finish: return error; } --- NEW FILE: P3-469.c --- #include "oslib/font.h" void ex (char *file_name) { font_un_cache_file (file_name, FALSE); /*... replace old file with new one ...*/ font_un_cache_file (file_name, TRUE); } --- NEW FILE: P2-735.c --- #include "oslib/hourglass.h" #include "oslib/os.h" #include "oslib/osfile.h" extern byte Buffer []; extern os_error *Process_Byte (byte); os_error *do_load_and_process (char *file_name) { os_error *error = NULL; int i, size; osbool done_on = FALSE; if ((error = xosfile_load_stamped (file_name, Buffer, NULL, NULL, NULL, &size, NULL)) != NULL) goto finish; /*note that osfile_load loads a file at its load address*/ if (size != 0) { if ((error = xhourglass_on ()) != NULL) goto finish; done_on = TRUE; for (i = 0; i < size; i++) if ((error = Process_Byte (Buffer [i])) != NULL) goto finish; } finish: if (done_on) { os_error *error1; error1 = xhourglass_off (); if (error == NULL) error = error1; } return error; } --- NEW FILE: P2-413.c --- #include <kernel.h> #include "oslib/resourcefs.h" extern resourcefs_file_list Files; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_ResourceFSStarting: (*(void (*) (resourcefs_file_list *, int, int, int)) regs->r [2]) (&Files, SKIP, SKIP, regs->r [3]); break; } } --- NEW FILE: P2-526.c --- #include "oslib/osfscontrol.h" extern int Image_File_Type; os_error *remove_image (void) { return xosfscontrol_deregister_image_fs (Image_File_Type); } --- NEW FILE: P1-606.c --- #include "oslib/os.h" int xwind_size (void) { int value_list [2]; static os_VDU_VAR_LIST (3) var_list = {os_MODEVAR_XEIG_FACTOR, os_MODEVAR_XWIND_LIMIT, -1}; os_read_vdu_variables ((os_vdu_var_list *) &var_list, value_list); return value_list [1] + 1 << value_list [0]; } --- NEW FILE: P2-691.c --- #include "oslib/econet.h" #include "oslib/messagetrans.h" #include "oslib/os.h" static os_error Error_No_Econet = {error_ECONET_NO_ECONET, "NoEco"}; os_error *has_econet (void) /*Return an error if no econet*/ { os_error *error = NULL, *error1; if ((error1 = xeconet_set_protection (NONE, ALL, NULL)) != NULL && error1->errnum == error_NO_SUCH_SWI) { error = xmessagetrans_error_lookup (&Error_No_Econet, NULL, NULL, 0, 0, 0, 0, 0); goto finish; } finish: return error; } --- NEW FILE: P3-018.c --- #include "oslib/os.h" #include "oslib/wimp.h" extern wimp_block Block; /*|Block| is the wimp_poll block*/ void redraw (void) { osbool more; for (more = wimp_redraw_window (&Block.redraw); more; more = wimp_get_rectangle (&Block.redraw)) { /*Redraw contents of appropriate window*/ } } --- NEW FILE: P1-332.c --- #include "oslib/os.h" void read_variable (void) { char value [255]; int context, len; context = 0; while (xos_read_var_val ("Sys$*", value, sizeof value - 1, context, os_VARTYPE_EXPANDED, &len, &context, NULL) == NULL) { os_writen (value, len); os_new_line (); } } extern void Code_Veneer (void); extern int Code_Size; void create_code_variable (void) /*Must be done in assembler. The creation part could be done like this, assuming Code_Veneer is the assembler code.*/ { os_set_var_val ("Mode", (void *) &Code_Veneer, Code_Size, 0, os_VARTYPE_CODE, NULL); } --- NEW FILE: P3-023.c --- #include <string.h> #include "oslib/macros.h" #include "oslib/os.h" #include "oslib/wimp.h" os_error *write_icon (wimp_w w, wimp_i i, char *buffer, char *string) { os_error *error = NULL; wimp_caret caret; strcpy (buffer, string); /*assume that these are 0-terminated, rather than 13 as in BASIC*/ if ((error = xwimp_get_caret_position (&caret)) != NULL) goto finish; if (w == caret.w && i == caret.i) { int len = strlen (buffer); if ((error = xwimp_set_caret_position (caret.w, caret.i, caret.pos.x, caret.pos.y, -1, MIN (caret.index, len))) != NULL) goto finish; } if ((error = xwimp_set_icon_state (w, i, NONE, NONE)) != NULL) goto finish; finish: return error; } --- NEW FILE: P1-467.c --- /*Example of how to use OS_ReadArgs in C.*/ #include <stdio.h> #include "oslib/macros.h" #include "oslib/os.h" int main (void) { struct {char *programme, *from, *to, *since; osbool help; os_gi *size; os_gs *name; char argd [1024];} argl; os_read_args ("programme/a,from/a,to/a,since/k,help/s,size/e,name/g", os_get_env (NULL, NULL), (char *) &argl, sizeof argl); /*Each structure element must correspond to the keyword in that place: keyword qualifier component type ------- --------- --------- ---- switch (/s) osbool expression (/e) os_gi string (/g) os_gs everything else char * */ printf ( "programme: %s\n" "from: %s\n" "to: %s\n" "since: %s\n" "help: %s\n" /*"size: %d\n" -- TV 20040707 */ "size: %hd\n" "name: %.*s\n", argl.programme, argl.from, argl.to, argl.since? argl.since: "(not given)", WHETHER (argl.help), argl.size? WORD (argl.size->i): -1, argl.name? /*SHORT*/ (argl.name->size): 80, argl.name? argl.name->s: "(not given)" ); /*Note use of WORD and SHORT, since these are not necessarily word- aligned pointers.*/ /* The logic of this statement escapes me; moreover, SHORT has to be commented out, else it gives a compiler warning. -- TV 20040707 */ return 0; } --- NEW FILE: P3-421.c --- #include "oslib/font.h" void apply_encoding (char *result, int size, char *original, char *encoding) /*There is a SWI to do this.*/ { font_apply_fields (original, encoding, result, size); } --- NEW FILE: P1-053.c --- #include "oslib/buffer.h" #include "oslib/os.h" #include "oslib/osbyte.h" void ex (void) { os_byte (osbyte_BUFFER_INSERT, buffer_KEYBOARD, 'A', NULL, NULL); } --- NEW FILE: P2-615.c --- #include <stdio.h> #include "oslib/econet.h" extern econet_tx_cb Tx_Cb; void ex1 (void) { byte buf [20]; Tx_Cb = econet_start_transmit (NONE, 99, 7, 0, buf, sizeof buf, 3, 100, NULL); } void ex2 (void) { int status; do { status = econet_poll_transmit (Tx_Cb); printf ("%d\n", status); } while (status == econet_STATUS_TX_READY || status == econet_STATUS_TRANSMITTING); } --- NEW FILE: P2-491.c --- #include <kernel.h> #include "oslib/filer.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; extern char My_Command []; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_StartFiler: if (Task_Handle == 0) { Task_Handle = (wimp_t) -1; regs->r [0] = (int) My_Command; regs->r [1] = FALSE; } break; } } --- NEW FILE: P1-108.c --- #include <stdio.h> #include "oslib/os.h" #include "oslib/territory.h" extern void Vector_Veneer (void); void ex (void) { char *lowercase_table, *uppercase_table, flag = 1, command [80]; os_error *error = NULL; osbool done_claim = FALSE; if ((error = xterritory_lower_case_table (territory_CURRENT, &lowercase_table)) != NULL) goto finish; if ((error = xterritory_upper_case_table (territory_CURRENT, &uppercase_table)) != NULL) goto finish; if ((error = xos_claim (WrchV, (void *) &Vector_Veneer, (byte *) &flag)) != NULL) goto finish; done_claim = TRUE; do { fgets (command, sizeof command - 1, stdin); if ((error = xos_cli (command)) != NULL) goto finish; } while (command [0] != '\n'); finish: if (done_claim) { os_error *error1; error1 = xos_release (WrchV, (void *) &Vector_Veneer, (byte *) &flag); if (error == NULL) error = error1; } if (error != NULL) os_generate_error (error); } --- NEW FILE: P1-109.c --- #include "oslib/os.h" os_error *read_palette (os_gcol entry_no, int entry_type, os_colour *on, os_colour *off) { os_error *error = NULL; osbool incomplete; if ((error = xpalettev_read_entry (entry_no, entry_type, on, off, &incomplete)) != NULL) goto finish; if (incomplete) { if ((error = xos_read_palette (entry_no, entry_type, on, off)) != NULL) goto finish; *on |= (*on & 0xF0F0F000) >> 4; *off |= (*off & 0xF0F0F000) >> 4; } finish: return error; } --- NEW FILE: P1-046.c --- #include "oslib/messagetrans.h" #include "oslib/os.h" extern void Acknowledge_Escape (void); static os_error Error = {error_ESCAPE, "Escape"}; /*error block for escape*/ void ex (void) { if ((os_read_escape_state () & _C) != NONE) { Acknowledge_Escape (); /*acknowledge it*/ os_generate_error (xmessagetrans_error_lookup (&Error, NULL, NULL, 0, SKIP, SKIP, SKIP, SKIP)); /* Exactly the same effect would be given by messagetrans_error_lookup (&Error, NULL, NULL, 0, SKIP, SKIP, SKIP, SKIP); */ } } --- NEW FILE: P3-024.c --- #include "oslib/os.h" #include "oslib/wimp.h" void delete_and_recreate (wimp_w w, wimp_i i) { /*to delete*/ wimp_set_icon_state (w, i, wimp_ICON_NEEDS_HELP | wimp_ICON_DELETED, wimp_ICON_NEEDS_HELP | wimp_ICON_DELETED); /*to recreate*/ wimp_set_icon_state (w, i, NONE, wimp_ICON_NEEDS_HELP | wimp_ICON_DELETED); } --- NEW FILE: P2-589.c --- #include <kernel.h> #include "oslib/filecore.h" #include "oslib/osfscontrol.h" extern char *Filing_System_Name; os_error *select (void) { return xosfscontrol_select_fs ((osfscontrol_id) Filing_System_Name); } #define Module_DiscOp 0x12345 /*My disc op SWI number*/ extern byte *Instance; /*This is a CMHG-style SWI entry point.*/ _kernel_oserror *main_swi (int swi, _kernel_swi_regs *regs, void *workspace) { os_error *error = NULL; switch (swi) { case Module_DiscOp & 0x3F: regs->r [8] = (int) Instance; if ((error = (os_error *) _kernel_swi (FileCore_DiscOp, regs, regs)) != NULL) goto finish; break; /*other SWI code*/ } finish: return (_kernel_oserror *) error; } --- NEW FILE: P1-833.c --- #include "oslib/os.h" #include "oslib/osspriteop.h" extern osspriteop_area *Ram; extern char Sprite_Name []; void ex (int height, int width, os_mode mode, os_palette *palette) { osspriteop_header *sptr; os_sprite_palette *pal; int i; osspriteop_create_sprite (osspriteop_NAME, Ram, Sprite_Name, /*create_palette?*/ FALSE, height, width, mode); sptr = (osspriteop_header *) ((char *) Ram + Ram->first); pal = (os_sprite_palette *) ((char *) sptr + sizeof (osspriteop_header)); sptr->image += 2048; sptr->mask += 2048; sptr->size += 2048; Ram->used += 2048; for (i = 0; i < 255; i++) pal->entries [i].on = pal->entries [i].off = palette->entries [i] & ~0xFFu; } --- NEW FILE: P2-083.c --- #include "oslib/osfscontrol.h" os_error *ex (char *command_tail_ptr, byte *execution_address, char *command_name_ptr) { os_error *error = NULL; os_error *(*fn) (void) = (os_error *(*) (void)) ((bits) execution_address & ~0xFC000003); /*address with no flags, user mode*/ if ((error = xosfscontrol_start_application (command_tail_ptr, (byte *) fn, command_name_ptr)) != NULL) goto finish; /*assume not in SVC mode (mode-switching harder in C)*/ /*Enter application: assume CAO is function address*/ error = (*fn) (); os_exit (error, 0); /*in case it returns*/ finish: return error; } --- NEW FILE: P3-070.c --- #include <kernel.h> #include "oslib/os.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; extern char My_Command []; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_StartWimp: if (Task_Handle == 0) Task_Handle = (wimp_t) -1; regs->r [0] = (int) My_Command; regs->r [1] = FALSE; break; } } --- NEW FILE: P3-743.c --- #include <stddef.h> #include <string.h> #include "oslib/os.h" #include "oslib/osmodule.h" #include "oslib/messagetrans.h" extern void *x_alloc (int); typedef struct desc desc; struct desc {messagetrans_control_block cb; char file_name [UNKNOWN];}; #define DESC(N) struct {messagetrans_control_block cb; char file_name [N];} #define SIZEOF_DESC(N) (offsetof (desc, file_name) + (N)) void ex (char *file_name) { bits flags; int size; char *buffer; desc *file_desc; messagetrans_file_info (file_name, &flags, &size); if ((flags & messagetrans_DIRECT_ACCESS) != NONE) buffer = NULL; else buffer = x_alloc (size); file_desc = osmodule_alloc (SIZEOF_DESC (strlen (file_name) + 1)); strcpy (file_desc->file_name, file_name); messagetrans_open_file (&file_desc->cb, file_desc->file_name, buffer); } --- NEW FILE: P2-619.c --- #include "oslib/econet.h" #include "oslib/os.h" os_error *tx (void) { byte buf [20]; int status; os_error *error = NULL; char text [50], *end; if ((error = xeconet_do_transmit (NONE, 99, 7, 0, buf, sizeof buf, 6, 100, &status, NULL)) != NULL) goto finish; if (status != econet_STATUS_TRANSMITTED) { if ((error = xos_convert_cardinal1 (status, text, sizeof text, &end)) != NULL) goto finish; if ((error = xeconet_convert_status_to_string (status, end, sizeof text - (end - text), 99, 7, NULL)) != NULL) goto finish; if ((error = xos_write0 (text)) != NULL) goto finish; } finish: return error; } --- NEW FILE: Helloworld.c --- #include "oslib/os.h" int main (void) { os_write0 ("Hello, World!\n\r"); return 0; } --- NEW FILE: P3-073.c --- #include <kernel.h> #include "oslib/os.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; extern char My_Command []; /*This is a CMHG-style termination entry point.*/ _kernel_oserror *main_terminate (osbool fatal, int instance, void *workspace) { os_error *error = NULL, *error1; if (Task_Handle != 0) { error1 = xwimp_close_down (Task_Handle); if (error == NULL) error = error1; } return (_kernel_oserror *) error; } --- NEW FILE: P2-618.c --- #include <stdio.h> #include "oslib/econet.h" #include "oslib/os.h" void tx1 (void) { byte buf [20]; int status; os_error error; status = econet_do_transmit (NONE, 99, 7, 0, buf, sizeof buf, 6, 100, NULL); if (status != econet_STATUS_TRANSMITTED) econet_convert_status_to_error (status, &error, sizeof error, SKIP, SKIP); } os_error *tx2 (void) { byte buf [20]; int status; os_error *error = NULL, error1; if ((error = xeconet_do_transmit (NONE, 99, 7, 0, buf, sizeof buf, 6, 100, &status, NULL)) != NULL) goto finish; if (status != econet_STATUS_TRANSMITTED) { error = xeconet_convert_status_to_error (status, &error1, sizeof error1, SKIP, SKIP); goto finish; } finish: return error; } --- NEW FILE: P2-634.c --- #include "oslib/buffer.h" #include "oslib/osbyte.h" os_error *insert_character (byte *buffer) { return xos_byte (osbyte_BUFFER_INSERT, buffer [4], buffer_KEYBOARD, NULL, NULL); } --- NEW FILE: Ex1.c --- /*52 instructions*/ #include "oslib/colourtrans.h" #include "oslib/font.h" #include "oslib/os.h" #include "oslib/pdriver.h" os_error *x (int page, char *t) { osbool more; os_box req; os_error *error = NULL; if ((error = xpdriver_draw_page (1, &req, page, NULL, &more, NULL)) != NULL) goto finish; while (more) { if ((error = xcolourtrans_set_gcol (os_COLOUR_BLACK, colourtrans_SET_FG, os_ACTION_OVERWRITE, NULL, NULL)) != NULL) goto finish; if ((error = xfont_paint (0, t, NONE, 0, 0, NULL, NULL, 0)) != NULL) goto finish; if ((error = xpdriver_get_rectangle (&req, &more, NULL)) != NULL) goto finish; } finish: return error; } --- NEW FILE: P2-632.c --- #include <string.h> #include "oslib/econet.h" #include "oslib/os.h" #include "oslib/osbyte.h" #include "oslib/osmodule.h" #include "oslib/osword.h" #define RPC_SEND_TIME 42 /*some number, unique for this net*/ typedef struct clock_list clock_list; struct clock_list {clock_list *next; econet_tx_cb tx; os_date_and_time clock;}; extern byte Command_Port; extern clock_list *Tx_List; extern int Reply_Count, Reply_Delay; extern byte Buffer [80]; extern void Event_Veneer (void); extern osbool Claimed_Flag; os_error *start (void) { os_error *error = NULL; if ((error = xos_claim (EventV, (void *) &Event_Veneer, NULL)) != NULL) goto finish; Claimed_Flag = TRUE; if ((error = xos_byte (osbyte_ENABLE_EVENT, Event_EconetUserRPC, SKIP, NULL, NULL)) != NULL) goto finish; if ((error = xos_byte (osbyte_ENABLE_EVENT, Event_EconetTx, SKIP, NULL, NULL)) != NULL) goto finish; finish: /*If error != NULL, should disable enabled events and release EventV (if claimed) here.*/ return error; } os_error *event (int *event, byte *args, int rpc, byte station, byte net) /*or (int *event, econet_tx_cb tx, int status)*/ /*The mechanism by which Event_Veneer() calls event() is not detailed here. Assume that if event is set to -1 on exit, the call is claimed.*/ { os_error *error = NULL; clock_list *clock_ptr; oswordreadclock_utc_block utc; switch (*event) { case Event_EconetUserRPC: if (rpc == RPC_SEND_TIME && args [0] == 1) { if ((error = xosmodule_alloc (sizeof *clock_ptr, (void **) &clock_ptr)) != NULL) goto finish; utc.op = oswordreadclock_OP_UTC; if ((error = xoswordreadclock_utc (&utc)) != NULL) goto finish; memcpy (clock_ptr->clock, utc.utc, sizeof (os_date_and_time)); if ((error = xeconet_start_transmit (0, args [1], station, net, (byte *) &clock_ptr->clock, sizeof clock_ptr->clock, Reply_Count, Reply_Delay, &clock_ptr->tx, NULL)) != NULL) goto finish; /*Add the list to new record.*/ clock_ptr->next = Tx_List; Tx_List = clock_ptr; /*claim vector*/ *event = -1; } break; case Event_EconetTx: { econet_tx_cb tx = (econet_tx_cb) args; clock_list **t; for (t = &Tx_List; *t != NULL; t = &(*t)->next) if ((*t)->tx == tx) { /*Remove from the list*/ *t = (*t)->next; (void) xeconet_abandon_transmit (tx, NULL); (void) xosmodule_free ((byte *) *t); } /*claim vector*/ *event = -1; } break; } finish: return error; } --- NEW FILE: Ex2.c --- /*44 instructions*/ #include "oslib/colourtrans.h" #include "oslib/font.h" #include "oslib/os.h" #include "oslib/pdriver.h" void x (int page, char *t) { osbool more; os_box req; for (pdriver_draw_page (1, /* number of copies */ &req, /* plotting rectangle */ page, /* page sequence number */ NULL, /* page number */ NULL /* returned identification for rectangle */ ); more; xpdriver_get_rectangle (&req, &more, NULL) ) { colourtrans_set_gcol (os_COLOUR_BLACK, colourtrans_SET_FG, os_ACTION_OVERWRITE, NULL); font_paint (0, t, NONE, 0, 0, NULL, NULL, 0); } } --- NEW FILE: P3-433.c --- #include "oslib/font.h" char *move_string (int move) { static char S [5]; char *p = S; *p++ = font_COMMAND_YMOVE; *p++ = move; *p++ = move >> 8; *p++ = move >> 16; return S; } --- NEW FILE: AMUmakefile,fe1 --- # Makefile for OSLib # *********************************** # *** C h a n g e L i s t *** # *********************************** # Date Name Description # ---- ---- ----------- # 16-Aug-94 JC Created. # 05-Sep-94 AMcC Added Generic RISC OS Build rules # 27th Feb 1995 JC Added Macros headers # 21st Jun 1995 JRC Split into 4 pieces # 11th Apr 2001 TV Amended Include path # removed dynamic dependencies; they don't help # 07th Jul 2004 TV Modifications in line with current working LIBDIR = INCLUDE = -IC:,OSLib: # # Generic options: # MKDIR = cdir WIPE = wipe WFLAGS = ~c~v # # Program specific options: # COMPONENT = OSLib EXAMPLES = \ o.Ex0 \ o.Ex1 \ o.Ex2 \ o.HelloWorld \ o.p1-046 \ o.p1-053 \ o.p1-067 \ o.p1-068 \ o.p1-108 \ o.p1-109 \ o.p1-110 \ o.p1-219 \ o.p1-332 \ o.p1-334 \ o.p1-467 \ o.p1-606 \ o.p1-754 \ o.p1-833 \ o.p1-834 \ o.p2-042 \ o.p2-083 \ o.p2-099 \ o.p2-383 \ o.p2-413 \ o.p2-491 \ o.p2-492 \ o.p2-493 \ o.p2-524 \ o.p2-526 \ o.p2-589 \ o.p2-615 \ o.p2-616 \ o.p2-617 \ o.p2-618 \ o.p2-619 \ o.p2-625 \ o.p2-629 \ o.p2-632 \ o.p2-634 \ o.p2-636 \ o.p2-638 \ o.p2-691 \ o.p2-735 \ o.p2-740 \ o.p2-743 \ o.p3-018 \ o.p3-023 \ o.p3-024 \ o.p3-025 \ o.p3-063 \ o.p3-070 \ o.p3-072 \ o.p3-073 \ o.p3-162 \ o.p3-185 \ o.p3-198 \ o.p3-231 \ o.p3-246 \ o.p3-411 \ o.p3-421 \ o.p3-433 \ o.p3-469 \ o.p3-549 \ o.p3-659 \ o.p3-743 all: ${EXAMPLES} examples: ${EXAMPLES} clean: ;${WIPE} o.* ${WFLAGS} .SUFFIXES: .c .o .c.o:; cc -c -throwback ${INCLUDE} -wp -fc -D__swi -o $@ $< # Create $@ #Truncate file since we don't actually need it #------------------------------------------------------------------------ # Dynamic dependencies: --- NEW FILE: Ex0.c --- /*56 instructions*/ #include <kernel.h> #include "oslib/colourtrans.h" #include "oslib/font.h" #include "oslib/os.h" #include "oslib/pdriver.h" _kernel_oserror *x (int page, char *t) { osbool more; os_box req; _kernel_oserror *oserror = NULL; _kernel_swi_regs swi_regs; swi_regs.r [0] = 1; swi_regs.r [1] = (int) &req; swi_regs.r [2] = page; swi_regs.r [3] = (int) NULL; if ((oserror = _kernel_swi (PDriver_DrawPage, &swi_regs, &swi_regs)) != NULL) goto finish; while (more) { swi_regs.r [0] = os_COLOUR_BLACK; swi_regs.r [3] = colourtrans_SET_FG; swi_regs.r [4] = os_ACTION_OVERWRITE; if ((oserror = _kernel_swi (ColourTrans_SetGCOL, &swi_regs, &swi_regs)) != NULL) goto finish; swi_regs.r [1] = (int) t; swi_regs.r [2] = NONE; swi_regs.r [3] = 0; swi_regs.r [4] = 0; if ((oserror = _kernel_swi (Font_Paint, &swi_regs, &swi_regs)) != NULL) goto finish; swi_regs.r [1] = (int) &req; if ((oserror = _kernel_swi (PDriver_GetRectangle, &swi_regs, &swi_regs)) != NULL) goto finish; more = swi_regs.r [0]; } finish: return oserror; } --- NEW FILE: P3-007.c --- #include "oslib/os.h" #include "oslib/wimp.h" int main (void) { osboolfinished = FALSE; wimp_block blk; /*get the block for wimp_poll()*/ int event; wimp_initialise (...); /*tell the wimp about the task*/ while (!finished) { wimp_poll (... &blk ... &event); switch (event) { case wimp_NULL_REASON_CODE: /*... do Wimp_NullReasonCode ...*/ break; case wimp_REDRAW_WINDOW_REQUEST: /*... do Wimp_RedrawWindowRequest ...*/ break; /*etc*/ } } wimp_close_down (...); return 0; } --- NEW FILE: P2-524.c --- #include "oslib/osfscontrol.h" extern char *Filing_System_Name; os_error *select (void) { return xosfscontrol_select_fs ((osfscontrol_id) Filing_System_Name); } os_error *remove (void) { return xosfscontrol_remove_fs (Filing_System_Name); } --- NEW FILE: P2-099.c --- #include "oslib/osfscontrol.h" char *fts (int fti) { static char file_type [9]; osfscontrol_read_file_type (fti, (bits *) &file_type [0], (bits *) &file_type [4]); file_type [8] = '\0'; return file_type; } --- NEW FILE: !Make,fd7 --- Echo <sys$Time> Making <Obey$Dir> ... Dir <Obey$Dir> SetEval OSLib$Slot 3*1024/2 Do WIMPSlot -min <OSLib$Slot>K Do WIMPSlot -max <OSLib$Slot>K Do AMU -f <Obey$Dir>.AMUmakefile -desktop -k examples Echo <Sys$Time> Done. --- NEW FILE: GNUmakefile --- # Makefile for OSLib examples # *********************************** # *** C h a n g e L i s t *** # *********************************** # Date Name Description # ---- ---- ----------- # 16-Aug-94 JC Created. # 05-Sep-94 AMcC Added Generic RISC OS Build rules # 27th Feb 1995 JC Added Macros headers # 21st Jun 1995 JRC Split into 4 pieces # 11th Apr 2001 TV Amended Include path # removed dynamic dependencies; they don't help # 07th Jul 2004 TV new version renamed GNUmakefile for builfing under GNU/Unix #------------------------------------------------------------------------ # paths & directories LIBDIR = ../release/unix/OSLib/ CROSSPATH = /home/riscos/cross INCLUDE = -I${LIBDIR} #------------------------------------------------------------------------ # tools AS = ${CROSSPATH}/bin/gcc -xassembler -Wa,${ASOPTIONS} GCC = ${CROSSPATH}/bin/gcc GPP = ${CROSSPATH}/bin/g++ LD = ${CROSSPATH}/bin/gcc RM = rm -f EXAMPLES = \ Ex0 \ Ex1 \ Ex2 \ Helloworld \ P1-046 \ P1-053 \ P1-067 \ P1-068 \ P1-108 \ P1-109 \ P1-110 \ P1-219 \ P1-332 \ P1-334 \ P1-467 \ P1-606 \ P1-754 \ P1-833 \ P1-834 \ P2-042 \ P2-083 \ P2-099 \ P2-383 \ P2-413 \ P2-491 \ P2-492 \ P2-493 \ P2-524 \ P2-526 \ P2-589 \ P2-615 \ P2-616 \ P2-617 \ P2-618 \ P2-619 \ P2-625 \ P2-629 \ P2-632 \ P2-634 \ P2-636 \ P2-638 \ P2-691 \ P2-735 \ P2-740 \ P2-743 \ P3-018 \ P3-023 \ P3-024 \ P3-025 \ P3-063 \ P3-070 \ P3-072 \ P3-073 \ P3-162 \ P3-185 \ P3-198 \ P3-231 \ P3-246 \ P3-411 \ P3-421 \ P3-433 \ P3-469 \ P3-549 \ P3-659 \ P3-743 all: examples examples: $(addsuffix .o,${EXAMPLES} ) clean: ;${RM} $(addsuffix .o,${EXAMPLES} ) .SUFFIXES: .c .o .c.o: ;${GCC} -c ${INCLUDE} -D__swi -o $@ $< #------------------------------------------------------------------------ # Dynamic dependencies: --- NEW FILE: P3-246.c --- /*This is a version using OSLib rather than RISC_OSLib. It emits the '/' ("run") (referred to in the text), checks that the environment variable exists before it dereferences it, and checks for the string being empty.*/ #include <stdlib.h> #include "oslib/fileswitch.h" #include "oslib/macros.h" #include "oslib/os.h" #include "oslib/wimp.h" os_error *save_desktop (os_f handle) { char *ptr; os_error *error = NULL; if ((ptr = getenv ("Edit$Dir")) != NULL && !EMPTY (ptr)) { if ((error = xos_bput ('/', handle)) != NULL) goto finish; while (*ptr != '\0') if ((error = xos_bput (*ptr++, handle)) != NULL) goto finish; if ((error = xos_bput ('\n', handle)) != NULL) goto finish; } finish: return error; } --- NEW FILE: P2-492.c --- #include <kernel.h> #include "oslib/filer.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_StartedFiler: if (Task_Handle == (wimp_t) -1) Task_Handle = (wimp_t) 0; break; case Service_Reset: Task_Handle = (wimp_t) 0; break; } } --- NEW FILE: P2-616.c --- #include <stdio.h> #include "oslib/econet.h" extern econet_tx_cb Tx_Cb; void ex1 (void) { printf ("The final status was %d\n", econet_abandon_transmit (Tx_Cb)); } void ex2 (void) { byte buf [20]; printf ("The final status was %d\n", econet_do_transmit (NONE, 99, 7, 0, buf, sizeof buf, 6, 100, NULL)); } --- NEW FILE: P2-383.c --- #include <string.h> #include "oslib/os.h" #include "oslib/netfs.h" os_error *read_file_server_version (void) { os_error *error = NULL; int rx_count; netfs_read_version version; if ((error = xnetfs_do_fs_op (netfs_FS_OP_READ_VERSION, (netfs_op *) &version, 0, sizeof version, NULL, &rx_count)) != NULL) goto finish; version AS reply.version [rx_count] = '\0'; if ((error = xos_write0 (version AS reply.version)) != NULL) goto finish; if ((error = xos_new_line ()) != NULL) goto finish; finish: return error; } os_error *print_station_number_of_user (char *user) { os_error *error = NULL; os_station_number station_number; netfs_read_user_info user_info; char net_station [os_NET_STATION_LIMIT + 1]; strcpy (user_info AS request.user_name, user); user_info AS request.user_name [strlen (user_info AS request.user_name)] = '\r'; if ((error = xnetfs_do_fs_op (netfs_FS_OP_READ_USER_INFO, (netfs_op *) &user_info, 0, sizeof user_info, NULL, NULL)) != NULL) goto finish; station_number.net = user_info AS reply.net; station_number.station = user_info AS reply.station; if ((error = xos_convert_net_station (&station_number, net_station, os_NET_STATION_LIMIT, NULL)) != NULL) goto finish; if ((error = xos_write0 (net_station)) != NULL) goto finish; if ((error = xos_new_line ()) != NULL) goto finish; finish: return error; } --- NEW FILE: P2-629.c --- #include <stdio.h> #include <string.h> #include "oslib/econet.h" #include "oslib/os.h" extern byte Rx_Buffer [10]; extern byte Tx_Buffer [10]; extern byte Net_To_Test_For; void ex (void) { byte port; econet_rx_cb rx_cb; int status; port = econet_allocate_port (); rx_cb = econet_create_receive (port, 0, 0, Rx_Buffer, sizeof Rx_Buffer, NULL); strcpy ((char *) Tx_Buffer, "Bridge"); Tx_Buffer [6] = port; Tx_Buffer [7] = Net_To_Test_For; (void) econet_do_transmit (0x83u, 0x9Cu, 0xFFu, 0xFFu, Tx_Buffer, sizeof Tx_Buffer, 5, 5, NULL); status = econet_wait_for_reception (rx_cb, 10, FALSE, NULL, NULL, NULL, NULL, NULL, NULL); if (status == econet_STATUS_RECEIVED) printf ("Net number %d exists.\n", Net_To_Test_For); econet_de_allocate_port (port); } --- NEW FILE: P1-110.c --- #include "oslib/os.h" #include "oslib/osword.h" os_error *read_palette (os_gcol gcol, int entry_type, int on, int off) { os_error *error = NULL; osbool incomplete; osword_palette_block entry; if ((error = xpalettev_set_entry (gcol, entry_type, on, off, &incomplete)) != NULL) goto finish; if (incomplete) { entry.gcol = gcol; entry.colour_number = entry_type; entry.r = (on & os_R) >> os_RSHIFT; entry.g = (on & os_G) >> os_GSHIFT; entry.b = (on & os_B) >> os_BSHIFT; if ((error = xosword_write_palette (&entry)) != NULL) goto finish; } finish: return error; } --- NEW FILE: P1-219.c --- #include <kernel.h> #include "oslib/messagetrans.h" #include "oslib/os.h" static os_error Bad_Swi = {error_NO_SUCH_SWI, "BadSwi"}; extern char Module_Title []; _kernel_oserror *main_swi (int swi, _kernel_swi_regs *regs, void *workspace) { os_error *error = NULL; switch (swi) { case 0: break; case 1: break; /*... other cases as required ...*/ default: error = xmessagetrans_error_lookup (&Bad_Swi, NULL, NULL, 0, Module_Title, SKIP, SKIP, SKIP); goto finish; break; } finish: return (_kernel_oserror *) error; } --- NEW FILE: P2-638.c --- #include "oslib/econet.h" #include "oslib/macros.h" #include "oslib/os.h" #define ERROR_NUMBER_SYNTAX 1 #define ERROR_NUMBER_UNABLE_TO_DEFAULT 2 static os_error Error_Get_Regs_Syntax = {ERROR_NUMBER_SYNTAX, "Syntax: *Command <station number>"}; static os_error Error_Unable_To_Default = { ERROR_NUMBER_UNABLE_TO_DEFAULT, "Either a station number or a full network address is required" }; os_error *command_start (char *buf, byte *station_out, byte *net_out) { os_error *error = NULL; int station, net; /*must be int to detect -1 returns*/ if (EMPTY (buf)) { error = &Error_Get_Regs_Syntax; goto finish; } if ((error = xeconet_read_station_number (buf, NULL, &station, &net)) != NULL) goto finish; if (station == -1) { error = &Error_Unable_To_Default; goto finish; } if (net == -1) net = 0; *station_out = (byte) station; /*narrowing cast*/ *net_out = (byte) net; finish: return error; } --- NEW FILE: P2-493.c --- #include <kernel.h> #include "oslib/filer.h" #include "oslib/wimp.h" extern wimp_t Task_Handle; /*This is a CMHG-style service entry point.*/ void main_service (int service, _kernel_swi_regs *regs, void *workspace) { switch (service) { case Service_FilerDying: if (!(Task_Handle == (wimp_t) 0 || Task_Handle == (wimp_t) -1)) (void) xwimp_close_down (Task_Handle); Task_Handle = 0; break; } } --- NEW FILE: P1-067.c --- #include "oslib/os.h" #include "oslib/osbyte.h" extern void My_Byte_Veneer (void); void ex (void) { os_claim (ByteV, (void *) &My_Byte_Veneer, NULL); } --- NEW FILE: !Agenda,fd7 --- Echo Making <Obey$Dir> ... Dir <Obey$Dir> SetEval OSLib$Slot 3*1024/2 Do WIMPSlot -min <OSLib$Slot>K Do WIMPSlot -max <OSLib$Slot>K Do AMU -f <Obey$Dir>.AMUmakefile -desktop -n examples --- NEW FILE: P1-068.c --- #include "oslib/os.h" #include "oslib/osbyte.h" extern void My_Byte_Veneer (void); void ex (void) { os_release (ByteV, (void *) &My_Byte_Veneer, NULL); } --- NEW FILE: P3-185.c --- #include "oslib/os.h" extern os_t Old_Time; void ex (void) { Old_Time += 100*((os_read_monotonic_time () - Old_Time - 1)/100 + 1); } --- NEW FILE: P3-231.c --- #include "oslib/os.h" #include "oslib/wimp.h" #define EXIT 6 /*position in Task Manager menu of Exit entry*/ extern wimp_block *Block; extern wimp_t Quit_Sender; extern wimp_message Pre_Quit_Block, Quit_Block; extern int Event, Pre_Quit_Ref, Quit_Ref; extern void Quit (void); void ex1 (void) { wimp_get_caret_position (&Block->caret); Block->key.c = wimp_KEY_SHIFT | wimp_KEY_CONTROL | wimp_KEY_F12; wimp_send_message (wimp_KEY_PRESSED, &Block->message, Quit_Sender); } void ex2 (void) { switch (Event) { case wimp_MENU_SELECTION: if (Block->selection.items [0] == EXIT) { wimp_send_message (wimp_USER_MESSAGE_RECORDED, &Pre_Quit_Block, wimp_BROADCAST); Pre_Quit_Ref = Pre_Quit_Block.my_ref; } break; case wimp_USER_MESSAGE_ACKNOWLEDGE: if (Block->message.my_ref == Pre_Quit_Ref) { wimp_send_message (wimp_USER_MESSAGE_RECORDED, &Quit_Block, wimp_BROADCAST); Quit_Ref = Quit_Block.my_ref; } else if (Block->message.action == message_QUIT && Block->message.my_ref == Quit_Ref) Quit (); break; case wimp_USER_MESSAGE: case wimp_USER_MESSAGE_RECORDED: if (Block->message.action == message_QUIT && Block->message.my_ref != Quit_Ref) Quit (); break; } } --- NEW FILE: P3-162.c --- #include "oslib/wimp.h" #define ICON_COUNT 12 void ex (wimp_w w) { wimp_i icons [ICON_COUNT]; wimp_which_icon (w, icons, wimp_ICON_SELECTED, wimp_ICON_SELECTED); /*|icons| contains all selected icons*/ wimp_which_icon (w, icons, wimp_ICON_ESG | wimp_ICON_SELECTED, 1 << wimp_ICON_ESG_SHIFT | wimp_ICON_SELECTED); /*|icons| contains selected icons with E S G 1*/ } --- NEW FILE: P2-636.c --- #include "oslib/econet.h" #include "oslib/os.h" extern byte Buffer [40]; static os_error *print_version (byte *); os_error *report_station_version (byte station, byte net) { os_error *error = NULL; int status; static os_error Error; if ((error = xeconet_do_immediate (econet_IMMEDIATE_MACHINE_PEEK, SKIP, station, net, Buffer, sizeof Buffer, 40, 5, &status, NULL)) != NULL) goto finish; if (status == econet_STATUS_TRANSMITTED) print_version (Buffer); else if (status == econet_STATUS_NOT_LISTENING) status = econet_STATUS_NOT_PRESENT; if ((error = xeconet_convert_status_to_error (status, &Error, sizeof Error, station, net)) != NULL) goto finish; error = &Error; finish: return error; } os_error *print_version (byte *buf) { os_error *error = NULL; if ((error = xos_convert_hex2 (buf [3], (char *) Buffer, sizeof Buffer, NULL)) != NULL) goto finish; if ((error = xos_write0 ((char *) Buffer)) != NULL) goto finish; if ((error = xos_writec ('.')) != NULL) goto finish; if ((error = xos_convert_hex2 (buf [2], (char *) Buffer, sizeof Buffer, NULL)) != NULL) goto finish; if ((error = xos_write0 ((char *) Buffer)) != NULL) goto finish; finish: return error; } |
From: Tony v. d. H. <to...@us...> - 2004-07-07 15:21:15
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22614/examples Log Message: Directory /cvsroot/ro-oslib/OSLib/!OsLib/examples added to the repository |
From: Tony v. d. H. <to...@us...> - 2004-05-04 16:37:00
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28845/!OsLib/Source/Computer/oslib Modified Files: SysLog.swi Log Message: SysLog defines functions to control logs by handle (20040504-3) Index: SysLog.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib/SysLog.swi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SysLog.swi 4 May 2004 15:49:54 -0000 1.2 --- SysLog.swi 4 May 2004 16:36:01 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + // $Id$ + TITLE SysLog; *************** *** 15,18 **** --- 17,29 ---- SWI + SysLog_LogMessageByHandle = + ( NUMBER &4C880 "Log a message in a session log", + ENTRY + ( R0 = .Bits: handle, + R1 -> .Char: message, + R2 = .Int: priority + ) ); + + SWI SysLog_GetLogLevel = ( NUMBER &4C881 "Read the current logging level for a particular log", *************** *** 25,28 **** --- 36,49 ---- SWI + SysLog_GetLogLevelByHandle = + ( NUMBER &4C881 "Read the current logging level for a particular session log", + ENTRY + ( R0 = .Bits: handle + ), + EXIT + ( R0! = .Int: priority + ) ); + + SWI SysLog_FlushLog = ( NUMBER &4C882 "Writes any cached data from memory to the logs and *************** *** 33,36 **** --- 54,65 ---- SWI + SysLog_FlushLogByHandle = + ( NUMBER &4C882 "Writes any cached data from memory to the logs and + closes the files", + ENTRY + ( R0 = .Bits: handle + ) ); + + SWI SysLog_SetLogLevel = ( NUMBER &4C883 "Set the current logging level for a particular log", *************** *** 41,44 **** --- 70,81 ---- SWI + SysLog_SetLogLevelByHandle = + ( NUMBER &4C883 "Set the current logging level for a particular log", + ENTRY + ( R0 = .Bits: handle, + R1 = .Int: priority + ) ); + + SWI SysLog_LogUnstamped = ( NUMBER &4C884 "Log a message in a named system log or session log *************** *** 51,54 **** --- 88,101 ---- SWI + SysLog_LogUnstampedByHandle = + ( NUMBER &4C884 "Log a message in a session log + without stamping it with the time and date", + ENTRY + ( R0 = .Bits: handle, + R1 -> .Char: message, + R2 = .Int: priority + ) ); + + SWI SysLog_Indent = ( NUMBER &4C885 "Increases the indentation for a log", *************** *** 58,61 **** --- 105,115 ---- SWI + SysLog_IndentByHandle = + ( NUMBER &4C885 "Increases the indentation for a log", + ENTRY + ( R0 = .Bits: handle + ) ); + + SWI SysLog_UnIndent = ( NUMBER &4C886 "Decreases the indentation for a log", *************** *** 65,77 **** SWI SysLog_NoIndent = ( NUMBER &4C887 "Resets the indentation for a log", ENTRY ! ( R0 -> .Char: name_or_handle ) ); SWI SysLog_OpenSessionLog = ! ( NUMBER &4C888 "Open a session log file with a particular priority", ENTRY ( R0 -> .Char: name, --- 119,146 ---- SWI + SysLog_UnIndentByHandle = + ( NUMBER &4C886 "Decreases the indentation for a log", + ENTRY + ( R0 = .Bits: handle + ) ); + + SWI SysLog_NoIndent = ( NUMBER &4C887 "Resets the indentation for a log", ENTRY ! ( R0 -> .Char: handle ! ) ); ! ! SWI ! SysLog_NoIndentByHandle = ! ( NUMBER &4C887 "Resets the indentation for a log", ! ENTRY ! ( R0 = .Bits: handle ) ); SWI SysLog_OpenSessionLog = ! ( NUMBER &4C888 "Open a session log file with a particular priority ! - Prefer SysLog_OpenSessionLogByHandle", ENTRY ( R0 -> .Char: name, *************** *** 83,88 **** SWI SysLog_CloseSessionLog = ! ( NUMBER &4C889 "Close a session log and append it's date to the mail log", ENTRY ( R0 -> .Char: handle --- 152,169 ---- SWI + SysLog_OpenSessionLogByHandle = + ( NUMBER &4C888 "Open a session log file with a particular priority", + ENTRY + ( R0 -> .Char: name, + R1 = .Int: priority + ), + EXIT + ( R0! = .Bits: handle + ) ); + + SWI SysLog_CloseSessionLog = ! ( NUMBER &4C889 "Close a session log and append it's date to the mail log ! - Prefer SysLog_CloseSessionLogByHandle", ENTRY ( R0 -> .Char: handle *************** *** 90,93 **** --- 171,181 ---- SWI + SysLog_CloseSessionLogByHandle = + ( NUMBER &4C889 "Close a session log and append it's date to the mail log", + ENTRY + ( R0 = .Bits: handle + ) ); + + SWI SysLog_LogData = ( NUMBER &4C88A "Log a block of data as a hex dump", *************** *** 99,102 **** --- 187,202 ---- R4 -> .Data: base_address ) ); + + SWI + SysLog_LogDataByHandle = + ( NUMBER &4C88A "Log a block of data as a hex dump", + ENTRY + ( R0 = .Bits: handle, + R1 = .Int: priority, + R2 -> .Data: data, + R3 = .Int: data_size, + R4 -> .Data: base_address + ) ); + SWI SysLog_ReadErrorMessage = *************** *** 118,121 **** --- 218,229 ---- SWI + SysLog_LogCompleteByHandle = + ( NUMBER &4C88D "Flushes the names log and deallocates the space set + aside for it", + ENTRY + ( R0 = .Bits: handle + ) ); + + SWI SysLog_IRQMode = ( NUMBER &4C88E, |
From: Tony v. d. H. <to...@us...> - 2004-05-04 16:36:30
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28845/!OsLib/docs Modified Files: ChangeLog Log Message: SysLog defines functions to control logs by handle (20040504-3) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** ChangeLog 4 May 2004 15:49:55 -0000 1.63 --- ChangeLog 4 May 2004 16:36:01 -0000 1.64 *************** *** 21,25 **** - Added extra post-build tests to ensure all symbols are defined (20040504-1, Tony van der Hoff) ! * Bug Fixes: - FrontEnd and SysLog now include OS (20040504-2, Philip Ludlam) --- 21,27 ---- - Added extra post-build tests to ensure all symbols are defined (20040504-1, Tony van der Hoff) ! - Syslog now defines a set of functions to control logs by handle ! (20040504-3, Philip Ludlam) ! * Bug Fixes: - FrontEnd and SysLog now include OS (20040504-2, Philip Ludlam) |
From: Tony v. d. H. <to...@us...> - 2004-05-04 15:50:05
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19907/!OsLib/docs Modified Files: ChangeLog Log Message: FrontEnd and Syslog now include OS (20040504-2) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** ChangeLog 4 May 2004 13:38:57 -0000 1.62 --- ChangeLog 4 May 2004 15:49:55 -0000 1.63 *************** *** 1,2 **** --- 1,8 ---- + ********************************************************************** + ** Changelog for OSLib + ** $Id$ + ** + ********************************************************************** + OSLib CVS ---------- *************** *** 16,19 **** --- 22,28 ---- (20040504-1, Tony van der Hoff) + * Bug Fixes: + - FrontEnd and SysLog now include OS (20040504-2, Philip Ludlam) + OSLib 6.60 - Tony van der Hoff - 30/12/2003 --------- |
From: Tony v. d. H. <to...@us...> - 2004-05-04 15:50:04
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19907/!OsLib/Source/Toolbox/oslib Modified Files: FrontEnd.swi Log Message: FrontEnd and Syslog now include OS (20040504-2) Index: FrontEnd.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib/FrontEnd.swi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FrontEnd.swi 9 Mar 2002 11:06:14 -0000 1.1 --- FrontEnd.swi 4 May 2004 15:49:55 -0000 1.2 *************** *** 2,5 **** --- 2,7 ---- AUTHOR "Jonathan Coxhead, jon...@do..., 22 Sept 1994"; + NEEDS OS; + SWI FrontEnd_ExtendedCmdLine = (NUMBER 0x81400*), |
From: Tony v. d. H. <to...@us...> - 2004-05-04 15:50:03
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19907/!OsLib/Source/Computer/oslib Modified Files: SysLog.swi Log Message: FrontEnd and Syslog now include OS (20040504-2) Index: SysLog.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib/SysLog.swi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SysLog.swi 28 Sep 2002 11:24:30 -0000 1.1 --- SysLog.swi 4 May 2004 15:49:54 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- AUTHOR "Tom Hughes, to...@co..., 22 Sep 2002"; + NEEDS OS; + SWI SysLog_LogMessage = |
From: Tony v. d. H. <to...@us...> - 2004-05-04 13:39:36
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22960/!OsLib/docs Modified Files: ChangeLog Log Message: Added extra tests to confirm all NEEDS present (20040504-1) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** ChangeLog 4 May 2004 10:18:53 -0000 1.61 --- ChangeLog 4 May 2004 13:38:57 -0000 1.62 *************** *** 13,16 **** --- 13,18 ---- - Embodied changes to allow OSLib to be built under Linux as well as RISC OS. See file Unix_Build for details (20040503-1, Tony van der Hoff) + - Added extra post-build tests to ensure all symbols are defined + (20040504-1, Tony van der Hoff) OSLib 6.60 - Tony van der Hoff - 30/12/2003 |
From: Tony v. d. H. <to...@us...> - 2004-05-04 13:39:05
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22960/!OsLib/Source/Test/Test1 Added Files: .cvsignore GNUmakefile test.c test.s Log Message: Added extra tests to confirm all NEEDS present (20040504-1) --- NEW FILE: .cvsignore --- include.h include.Hdr --- NEW FILE: test.s --- ;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 --- NEW FILE: test.c --- /* test a new OSLib build by #includeing each headers */ //INCLUDE #include "include.h" int main (void) { return 0; } --- NEW FILE: GNUmakefile --- # Index: OSLib/!OsLib/Source/Test/Test1/GNUmakefile 20040504 #=================================================================== # $Header: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test1/GNUmakefile,v 1.1 2004/05/04 13:38:56 tonyvdh Exp $ #------------------------------------------------------------------------ # paths & directories SOURCEDIR = ../.. BINDIR = ${SOURCEDIR}/../Bin CROSSPATH = /home/riscos/cross #------------------------------------------------------------------------ #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 = ${CROSSPATH}/bin/gcc -xassembler -Wa,${ASOPTIONS} GCC = ${CROSSPATH}/bin/gcc GPP = ${CROSSPATH}/bin/g++ LD = ${CROSSPATH}/bin/gcc RM = rm -f tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) #------------------------------------------------------------------------ include ${CONTENTS} #------------------------------------------------------------------------ # Targets: .PHONY: all clean TEST_C = test.c TEST_CPP = test.cpp TEST_S = test.s OBJS = $(addsuffix .o, ${SWIMODULES}) 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: ;@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 s_%.o: ;@echo "Testing $(subst .o,.Hdr,$(subst s_,,$@))" @echo " GET oslib/$(subst .o,.Hdr,$(subst s_,,$@))" > include.Hdr @${AS} -c ${TEST_S} -o /dev/null clean: ;-${RM} include.h include.Hdr |