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-05-04 13:39:05
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22960/!OsLib/Source/Test/Test Removed Files: Makefile,fe1 Log Message: Added extra tests to confirm all NEEDS present (20040504-1) --- Makefile,fe1 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-04 13:39:03
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22960/!OsLib/Source/Test Modified Files: GNUmakefile Log Message: Added extra tests to confirm all NEEDS present (20040504-1) Index: GNUmakefile =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GNUmakefile 3 May 2004 15:03:27 -0000 1.2 --- GNUmakefile 4 May 2004 13:38:54 -0000 1.3 *************** *** 4,13 **** .PHONY: all Test clean ! TESTS = Test readvarval ! all: ;$(foreach dir, ${TESTS}, ${MAKE} -C ${dir}; ) ! Test: test ! test: ;${MAKE} -C $@ readvarval: ;${MAKE} -C $@ --- 4,13 ---- .PHONY: all Test clean ! TESTS = Test Test1 readvarval ! all: ;$(foreach dir, ${TESTS}, set -e; ${MAKE} -C ${dir}; ) ! Test: ;${MAKE} -C $@ ! Test1: ;${MAKE} -C $@ readvarval: ;${MAKE} -C $@ |
From: Tony v. d. H. <to...@us...> - 2004-05-04 13:28:27
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20598/Test1 Log Message: Directory /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test1 added to the repository |
From: Tony v. d. H. <to...@us...> - 2004-05-04 10:19:02
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16361/!OsLib/docs Modified Files: ChangeLog Log Message: reversed out 20040503-2 Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** ChangeLog 3 May 2004 15:45:19 -0000 1.60 --- ChangeLog 4 May 2004 10:18:53 -0000 1.61 *************** *** 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) - - All headers now include os.h (or OS.Hdr) to avoid faulting os_error - (20040503-2, Philip Ludlam) OSLib 6.60 - Tony van der Hoff - 30/12/2003 --- 13,16 ---- |
From: Tony v. d. H. <to...@us...> - 2004-05-04 10:19:01
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16361/!OsLib/Source/Test/Test Modified Files: .cvsignore Removed Files: oslib.h Log Message: reversed out 20040503-2 Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** .cvsignore 3 May 2004 15:03:27 -0000 1.6 --- .cvsignore 4 May 2004 10:18:38 -0000 1.7 *************** *** 1,5 **** *,ff8 ! h ! Hdr bin o --- 1,7 ---- *,ff8 ! h.oslib ! oslib.h ! Hdr.OSLib ! OSLib.Hdr bin o --- oslib.h DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-04 10:11:12
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15067/!OsLib/Tools/DefMod2/defmod/sources Modified Files: cheader.c hdr.c Log Message: reversed out 20040503-2 Index: hdr.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/hdr.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** hdr.c 3 May 2004 15:45:19 -0000 1.6 --- hdr.c 4 May 2004 10:11:01 -0000 1.7 *************** *** 666,669 **** --- 666,670 ---- goto finish; + /* guard against multiple inclusion */ if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) goto finish; *************** *** 677,683 **** --- 678,686 ---- goto finish; + #if 0 /* not everything needs OS.Hdr */ /*Make sure we have Hdr.OS.*/ if ((rc = Emit_Get (file, "OS")) < 0) goto finish; + #endif /*Emit the NEEDS declarations.*/ Index: cheader.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/cheader.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** cheader.c 3 May 2004 15:45:18 -0000 1.4 --- cheader.c 4 May 2004 10:11:00 -0000 1.5 *************** *** 438,441 **** --- 438,442 ---- goto finish; + #if 0 /* not everything needs os.h */ /*Make sure we have "os.h".*/ if ((rc = fprintf (file, *************** *** 444,447 **** --- 445,449 ---- "#endif\n\n")) < 0) goto finish; + #endif /*Emit the NEEDS declarations.*/ |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:45:58
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24275/!OsLib/docs Modified Files: ChangeLog Log Message: os.h now included in all headers (20040503-2) Index: ChangeLog =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/docs/ChangeLog,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** ChangeLog 3 May 2004 15:03:39 -0000 1.59 --- ChangeLog 3 May 2004 15:45:19 -0000 1.60 *************** *** 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) + - All headers now include os.h (or OS.Hdr) to avoid faulting os_error + (20040503-2, Philip Ludlam) OSLib 6.60 - Tony van der Hoff - 30/12/2003 |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:45:35
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24275/!OsLib/Tools/DefMod2/defmod/sources Modified Files: cheader.c hdr.c Log Message: os.h now included in all headers (20040503-2) Index: hdr.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/hdr.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** hdr.c 3 May 2004 15:03:33 -0000 1.5 --- hdr.c 3 May 2004 15:45:19 -0000 1.6 *************** *** 666,673 **** --- 666,684 ---- goto finish; + if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) + goto finish; + if ((rc = EmitSS (file, NULL, "GBLS", title, "_Hdr")) < 0) + goto finish; + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + /*Make sure we have Hdr.Types.*/ if ((rc = Emit_Get (file, "Types")) < 0) goto finish; + /*Make sure we have Hdr.OS.*/ + if ((rc = Emit_Get (file, "OS")) < 0) + goto finish; + /*Emit the NEEDS declarations.*/ context = 0; *************** *** 683,686 **** --- 694,698 ---- } + #if 0 // moved forward to ensure OS.Hdr is not included recursively if ((rc = EmitSSS (file, NULL, "[", ":LNOT: :DEF: ", title, "_Hdr")) < 0) goto finish; *************** *** 689,692 **** --- 701,705 ---- if ((rc = fprintf (file, "\n")) < 0) goto finish; + #endif /*Emit the CONST declarations.*/ Index: cheader.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/cheader.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cheader.c 3 May 2004 15:03:33 -0000 1.3 --- cheader.c 3 May 2004 15:45:18 -0000 1.4 *************** *** 438,441 **** --- 438,448 ---- goto finish; + /*Make sure we have "os.h".*/ + if ((rc = fprintf (file, + "#ifndef os_H\n" + "#include \"oslib/os.h\"\n" + "#endif\n\n")) < 0) + goto finish; + /*Emit the NEEDS declarations.*/ context = 0; |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:45:35
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24275/!OsLib/Source/Test/readvarval Modified Files: .cvsignore Removed Files: main.c Log Message: os.h now included in all headers (20040503-2) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 3 May 2004 15:03:29 -0000 1.5 --- .cvsignore 3 May 2004 15:45:16 -0000 1.6 *************** *** 4,6 **** *.o,ffd tree,ffd ! main,ff8 \ No newline at end of file --- 4,6 ---- *.o,ffd tree,ffd ! *,ff8 --- main.c DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:24
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Err_ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/OSLibSupport/Err_ Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Modules Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Err_/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 27 Nov 2002 22:10:57 -0000 1.3 --- .cvsignore 3 May 2004 15:03:24 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- *.o *.o,* + *.o32 o o32 --- NEW FILE: AMUmakefile --- # OSLibSupport.Err_.AMUmakefile # build OSLibSupport/Err_ under RISC OS #------------------------------------------------------ include Modules include ^.AMUmakefile/source #------------------------------------------------------ --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLibSupport/Err_/GNUmakefile # build OSLibSupport/Err_ under UNIX #------------------------------------------------------ include Modules include ../GNUmakefile.source #------------------------------------------------------ --- NEW FILE: Modules --- # OSLibSupport/Err_/Modules #------------------------------------------------------ TARGET := Nomem Oserror Reporterr DIR := Err_ ERR_TARGET := ${TARGET} ERR_DIR := ${DIR} GNUMODULES += $(addsuffix .o, $(addprefix ${ERR_DIR}/, ${ERR_TARGET})) GNUMODULES32 += $(addsuffix .o32, $(addprefix ${ERR_DIR}/, ${ERR_TARGET})) AMUMODULES += $(addprefix ${ERR_DIR}.o., ${ERR_TARGET}) AMUMODULES32 += $(addprefix ${ERR_DIR}.o32., ${ERR_TARGET}) #------------------------------------------------------ |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:21
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/IndexHelp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/IndexHelp Modified Files: .cvsignore IndexHelp.c Added Files: AMUmakefile GNUmakefile Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/IndexHelp/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 27 Nov 2002 22:11:01 -0000 1.2 --- .cvsignore 3 May 2004 15:03:34 -0000 1.3 *************** *** 1 **** --- 1,3 ---- o + IndexHelp + --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Tools/IndexHelp/Makefile,fe1 20040223 # ALL = ${TARGET} TARGET = IndexHelp DEFINES = VPATH = INCLUDES = OSLibSupport: OSLib: C: LIBS = OSLibSupport:o.${SUPPORT} OSLib:o.${OSLIB} C:o.Stubs MODULES = ${TARGET} #------------------------------------------------------------------------ .include ${MAKEFILEDIR}.^.AMUmakefile/source #------------------------------------------------------------------------ # Dynamic dependencies: --- NEW FILE: GNUmakefile --- # # Makefile for IndexHelp for UNIX. # TRACE ?= 0 #------------------------------------------------------------------------ #target-specific macros TARGET = IndexHelp MODULES = ${TARGET} os osgbpb osfile osfind x kernel unix INCLUDES = -I.. -I../support DEFINES = -DUNIX -DEXECUTE_ON_UNIX -D__swi VPATH = ../support ../oslib/unix #------------------------------------------------------------------------ # additional modules required if tracing TRACEMODULES = trace m osargs # all the general rules are in ../GNUmakefile.source include ../GNUmakefile.source --- !Clean,fd7 DELETED --- --- Makefile,fe1 DELETED --- Index: IndexHelp.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/IndexHelp/IndexHelp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IndexHelp.c 29 Dec 2003 11:40:21 -0000 1.5 --- IndexHelp.c 3 May 2004 15:03:34 -0000 1.6 *************** *** 37,40 **** --- 37,46 ---- #endif + #ifdef EXECUTE_ON_UNIX + #define DIR_SEP "/" + #else + #define DIR_SEP "." + #endif + //#define USE_STRONGHELP 0 /* set true to generate dest using StrongHelp filer calls */ *************** *** 55,59 **** /* From OSLibSupport */ ! #include "X.h" #include "trace.h" --- 61,65 ---- /* From OSLibSupport */ ! #include "x.h" #include "trace.h" *************** *** 162,172 **** "%s%s%s%s%s", src_path ? src_path : "", ! src_path? "." : "", dir ? dir : "", ! dir ? "." : "", file ); ! //tracef( "add_index: reading %s\n" _ temp ); ! source = fopen( temp, "r" ); if ( !source ) x_THROW_LAST_ERROR(); --- 168,179 ---- "%s%s%s%s%s", src_path ? src_path : "", ! src_path? DIR_SEP : "", dir ? dir : "", ! dir ? DIR_SEP : "", file ); ! ! tracef( "add_index: reading %s\n" _ temp ); ! source = fopen( temp, "r" ); if ( !source ) x_THROW_LAST_ERROR(); *************** *** 179,183 **** /* add to index */ *(temp+strlen(temp)-1) = '\0'; ! //tracef( "add_index: %s\n" _ temp ); index[ index_entries++ ] = qstrdup( temp ); --- 186,190 ---- /* add to index */ *(temp+strlen(temp)-1) = '\0'; ! tracef( "add_index: %s\n" _ temp ); index[ index_entries++ ] = qstrdup( temp ); *************** *** 188,192 **** { fclose( source ); ! //tracef( "exception in add_index\n" ); x_RETHROW( &x0 ); } --- 195,199 ---- { fclose( source ); ! tracef( "exception in add_index\n" ); x_RETHROW( &x0 ); } *************** *** 208,212 **** /* create an index file in the source dir */ ! sprintf( temp, "%s.%s", src_path, "!Root" ); if ( ( index_file = fopen( temp, "wb" ) ) == NULL ) x_THROW_LAST_ERROR(); --- 215,219 ---- /* create an index file in the source dir */ ! sprintf( temp, "%s"DIR_SEP"%s", src_path, "!Root" ); if ( ( index_file = fopen( temp, "wb" ) ) == NULL ) x_THROW_LAST_ERROR(); *************** *** 291,299 **** &read_count ); if( read_count != 0 ) { if( INFO -> obj_type == fileswitch_IS_FILE ) { ! /* index the file if it is not an earlier index */ if( stricmp( INFO->name, "!root" ) != 0 ) { --- 298,310 ---- &read_count ); + tracef( "osgbpb found %d entries: %s\n" _ read_count _ read_count ? INFO -> name : "" ); + if( read_count != 0 ) { if( INFO -> obj_type == fileswitch_IS_FILE ) { ! tracef( "%s is File\n" _ INFO -> name ); ! ! /* index the file if it is not an earlier index */ if( stricmp( INFO->name, "!root" ) != 0 ) { *************** *** 304,308 **** --- 315,325 ---- } } + else + { + } } + else + { + } } while( context != osgbpb_NO_MORE ); *************** *** 346,351 **** x_TRY( &x0 ) { - fprintf( stdout, "IndexHelp " VERSION " " __DATE__ " © Tony van der Hoff\n" ); - if( argc < 2 ) x_THROW( Error_syntax ); --- 363,366 ---- *************** *** 363,367 **** src_path = argv[1]; verbose = FALSE; ! name = strrchr( src_path, '.' ) + 1; for( i = 2; i < argc; i++ ) { --- 378,382 ---- src_path = argv[1]; verbose = FALSE; ! name = strrchr( src_path, DIR_SEP[0] ) + 1; for( i = 2; i < argc; i++ ) { *************** *** 375,382 **** --- 390,401 ---- { /* bad option found */ + tracef( "Bad Syntax\n" ); x_THROW( Error_syntax ); } } + if (verbose) + fprintf( stdout, "IndexHelp " VERSION " " __DATE__ " © Tony van der Hoff\n" ); + /* create supplementary index */ create_root( name ); --- !Make,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:20
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Task_ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/OSLibSupport/Task_ Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Make,fd7 Modules Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Task_/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 27 Nov 2002 22:10:57 -0000 1.3 --- .cvsignore 3 May 2004 15:03:25 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- *.o *.o,* + *.o32 o o32 --- NEW FILE: AMUmakefile --- # OSLibSupport.Task_.AMUmakefile # build OSLibSupport.Task under RISC OS #------------------------------------------------------ include Modules include ^.AMUmakefile/source --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- NEW FILE: Make,fd7 --- echo <sys$time> AMU -f <Obey$Dir>.AMUmakefile -desktop %0 echo <sys$time> --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLibSupport/Task_/GNUmakefile # build OSLibSupport/Task under UNIX #------------------------------------------------------ include Modules include ../GNUmakefile.source --- NEW FILE: Modules --- # OSLibSupport/Task_/Modules #------------------------------------------------------ TARGET := Taskgetname DIR := Task_ TASK_TARGET := ${TARGET} TASK_DIR := ${DIR} GNUMODULES += $(addsuffix .o, $(addprefix ${TASK_DIR}/, ${TASK_TARGET})) GNUMODULES32 += $(addsuffix .o32, $(addprefix ${TASK_DIR}/, ${TASK_TARGET})) AMUMODULES += $(addprefix ${TASK_DIR}.o., ${TASK_TARGET}) AMUMODULES32 += $(addprefix ${TASK_DIR}.o32., ${TASK_TARGET}) #------------------------------------------------------ |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:20
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Events_ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/OSLibSupport/Events_ Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Make,fd7 Modules Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/OSLibSupport/Events_/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 27 Nov 2002 22:10:57 -0000 1.3 --- .cvsignore 3 May 2004 15:03:25 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- *.o *.o,* + *.o32 o o32 --- NEW FILE: AMUmakefile --- # OSLibSupport.Events_.GNUmakefile # build OSLibSupport/Events_ under RISC OS #------------------------------------------------------ include Modules include ^.AMUmakefile/source #------------------------------------------------------ --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- NEW FILE: Make,fd7 --- echo <sys$time> AMU -f <Obey$Dir>.AMUmakefile -desktop %0 echo <sys$time> --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLibSupport/Events_/GNUmakefile # build OSLibSupport/Events_ under UNIX #------------------------------------------------------ include Modules include ../GNUmakefile.source #------------------------------------------------------ --- NEW FILE: Modules --- # OSLibSupport/Events_/Modules #------------------------------------------------------ TARGET := Tbevent Wimpevent Wimpmsg DIR := Events_ EVENTS_TARGET := ${TARGET} EVENTS_DIR := ${DIR} GNUMODULES += $(addsuffix .o, $(addprefix ${EVENTS_DIR}/, ${EVENTS_TARGET})) GNUMODULES32 += $(addsuffix .o32, $(addprefix ${EVENTS_DIR}/, ${EVENTS_TARGET})) AMUMODULES += $(addprefix ${EVENTS_DIR}.o., ${EVENTS_TARGET}) AMUMODULES32 += $(addprefix ${EVENTS_DIR}.o32., ${EVENTS_TARGET}) #------------------------------------------------------ |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source Modified Files: .cvsignore SetVarsRO4,feb Added Files: AMUmakefile AMUmakefile.inc Clean,fd7 GNUmakefile GNUmakefile.source Make,fd7 Removed Files: !CleanHelp,fd7 !CleanLib,fd7 !MakeAll,fd7 !MakeHelp,fd7 !MakeTest,fd7 Makefile,fe1 Makefile.inc,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 27 Nov 2002 22:10:58 -0000 1.5 --- .cvsignore 3 May 2004 15:03:26 -0000 1.6 *************** *** 1,5 **** --- 1,7 ---- contents HelpData + OSLib,3d6 *.o *.o,* o + *.list --- !CleanHelp,fd7 DELETED --- --- NEW FILE: GNUmakefile --- # # Makefile for SOURCES under GNU # #------------------------------------------------------------------------ #------------------------------------------------------------------------ # paths & directories SOURCEDIR = ${CURDIR} BINDIR = ${SOURCEDIR}/../Bin CROSSPATH = /home/riscos/cross #------------------------------------------------------------------------ # tools LIBFILE = ${CROSSPATH}/bin/libfile INDEXHELP = ${BINDIR}/IndexHelp BINDHELP = ${BINDIR}/BindHelp RM = rm -f RD = rm -fr #------------------------------------------------------------------------ #target-specific macros SOURCES = Computer Core Toolbox User OSLIB = OSLib.o OSLIB32 = OSLib32.o CSTRONG = OSLib,3d6 LIST = OSLib.list LIST32 = OSLib32.list #------------------------------------------------------------------------ #targets .PHONY: all cstrong Computer Core Toolbox User Test oslib libs clean all: oslib Test cstrong cstrong: ${CSTRONG} computer: Computer Computer: ;${MAKE} -C $@/oslib all core: Core Core: ;${MAKE} -C $@/oslib all toolbox: Toolbox Toolbox: ;${MAKE} -C $@/oslib all user: User User: ;${MAKE} -C $@/oslib all test: Test Test: ;${MAKE} -C $@ all oslib: ${MAKE} -C Computer/oslib oslib ${MAKE} -C Core/oslib oslib ${MAKE} -C Toolbox/oslib oslib ${MAKE} -C User/oslib oslib ${MAKE} list ${MAKE} list32 hdrs: ${MAKE} -C Computer/oslib hdrs ${MAKE} -C Core/oslib hdrs ${MAKE} -C Toolbox/oslib hdrs ${MAKE} -C User/oslib hdrs list: ${LIST} ${LIST}: ${OSLIB} ${LIBFILE} -s ${OSLIB} > ${LIST} list32: ${LIST32} ${LIST32}: ${OSLIB32} ${LIBFILE} -s ${OSLIB} > ${LIST32} libs: ${MAKE} -C Computer/oslib libs ${MAKE} -C Core/oslib libs ${MAKE} -C Toolbox/oslib libs ${MAKE} -C User/oslib libs ${CSTRONG}: ${MAKE} -C Computer/oslib cstrong ${MAKE} -C Core/oslib cstrong ${MAKE} -C Toolbox/oslib cstrong ${MAKE} -C User/oslib cstrong ${INDEXHELP} HelpData/action_ -p Action ${INDEXHELP} HelpData/class_ -p Class ${INDEXHELP} HelpData/error_ -p Error ${INDEXHELP} HelpData/message_ -p Message ${INDEXHELP} HelpData/service_ -p Service ${BINDHELP} HelpData $@ clean: ;$(foreach dir, ${SOURCES}, ${MAKE} -C ${dir}/oslib clean; ) ${MAKE} -C Test clean -${RM} OSLib.o OSLib32.o ${LIST} ${LIST32} ${CSTRONG} -${RD} HelpData cleanhelp: ${MAKE} -C Computer/oslib cleanhelp ${MAKE} -C Core/oslib cleanhelp ${MAKE} -C Toolbox/oslib cleanhelp ${MAKE} -C User/oslib cleanhelp ${RD} HelpData/* ${RM} ${CSTRONG} --- NEW FILE: GNUmakefile.source --- # # Makefile for to include in oslib source GNUmakefiles # # SORURCEDIR must be defined by the caller, and must # point to the top of the source tree. #define MALLOC_CHECK to enable malloc debugging hooks while running defmod #MALLOC_CHECK = MALLOC_CHECK_=1 #------------------------------------------------------------------------ # paths & directories BINDIR = ${SOURCEDIR}/../Bin CROSSPATH = /home/riscos/cross/bin #------------------------------------------------------------------------ # Source Directories SOURCES = Computer Core Toolbox User INCLUDES = Macros Types ${SOURCES} #------------------------------------------------------------------------ # tools ASMFLAGS = -objasm,-I..,-I${SOURCEDIR}/Types DEFMOD = ${BINDIR}/defmod -q REDUCEAOF = ${BINDIR}/reduceaof INDEXHELP = ${BINDIR}/IndexHelp BINDHELP = ${BINDIR}/BindHelp CP = cp -pu RM = rm -f DIFF = diff AS = ${CROSSPATH}/gcc -c -xassembler -Wa,${ASMFLAGS} CC = ${CROSSPATH}/gcc LINK = ${CROSSPATH}/gcc LIBFILE = ${CROSSPATH}/libfile #------------------------------------------------------------------------ # macros ALL = ${SWIMODULES} ${MODULES} ${CMODULES} HDRS = $(patsubst %, %.Hdr,${SWIMODULES} ${MODULES}) OBJASM = $(patsubst %, %.s,${SWIMODULES}) OBJASM32 = $(patsubst %, %.s32,${SWIMODULES}) LIBS = $(patsubst %, %.o,${SWIMODULES}) LIBS32 = $(patsubst %, %.o32,${SWIMODULES}) CHEADERS = $(patsubst %, %.h,${SWIMODULES} ${MODULES}) CSTRONG = $(patsubst %, %.help,${SWIMODULES} ${MODULES}) OBJS = $(patsubst %, %.o,${CMODULES}) OBJS32 = $(patsubst %, %.o32,${CMODULES}) FILES = ${LIBS} ${LIBS32} ${OBJASM} ${OBJASM32} ${HDRS} ${CHEADERS} #------------------------------------------------------------------------ # file locations BYTEWIDE = ${SOURCEDIR}/ByteWide HELPDATA = ${SOURCEDIR}/HelpData OSLIB = ${SOURCEDIR}/OSLib.o OSLIB32 = ${SOURCEDIR}/OSLib32.o UNIXLIB = ${CROSSPATH}/bin/arm-riscos-aof/3_3_0/apcs32/arch3/unixlib/unixlib.o #------------------------------------------------------------------------ #helper functions # convert arg to lower case tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) #------------------------------------------------------------------------ # Targets .PHONY: oslib all cstrong hdrs cheaders objasm objasm32 clean regression regression32 oslib: all all: libs libs32 objasm objasm32 hdrs cheaders objs objs32 libs: ${OSLIB} libs32: ${OSLIB32} cstrong: ${CSTRONG} hdrs: ${HDRS} cheaders: ${CHEADERS} objasm: ${OBJASM} objasm32: ${OBJASM32} objs: ${HDRS} ${OBJS} objs32: ${HDRS} ${OBJS32} clean: @- ${RM} -r l/* @- ${RM} ${FILES} ${LIBS} ${LIBS32} ${OBJS} ${OBJS32} ${CSTRONG} ViaFile @- ${RM} $(call tolower, ${CHEADERS}) cleanhelp: ;@-${RM} ${CSTRONG} regression: -@$(foreach TARGET, ${OBJASM}, \ echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ ${DIFF} -y --suppress-common-lines ${TARGET} 's; \ 0/$(basename, $(call tolower, ${TARGET} ) )'; ) regression32: -@$(foreach TARGET, ${OBJASM32}, \ echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ ${DIFF} -y --suppress-common-lines ${TARGET} 's32; \ 0/$(basename, $(call tolower, ${TARGET} ) )'; ) release_wide: ifndef RELEASEDIR error RELEASEDIR not defined endif @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi @if [ ! -d ${RELEASEDIR}/OSLib/oslib/h ]; \ then mkdir -p ${RELEASEDIR}/OSLib/oslib/h; fi @if [ ! -d ${RELEASEDIR}/OSLib/oslib/Hdr ]; \ then mkdir -p ${RELEASEDIR}/OSLib/oslib/Hdr; fi @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ ${RELEASEDIR}/OSLib/oslib/h/$(basename ${file} ); ) @$(foreach file, ${HDRS}, ${CP} ${file} \ ${RELEASEDIR}/OSLib/oslib/Hdr/$(basename ${file} ); ) release_deep: ifndef RELEASEDIR error RELEASEDIR not defined endif @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib ]; \ then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib; fi @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/h ]; \ then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/h; fi @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr ]; \ then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr; fi @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ ${RELEASEDIR}/OSLib/${TARGET}/oslib/h/$(basename ${file} ); ) @$(foreach file, ${HDRS}, ${CP} ${file} \ ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr/$(basename ${file} ); ) release_unix: ifndef RELEASEDIR error RELEASEDIR not defined endif @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ ${RELEASEDIR}/OSLib/oslib/${file}; ) @$(foreach file, ${HDRS}, ${CP} ${file} \ ${RELEASEDIR}/OSLib/oslib/${file}; ) #------------------------------------------------------------------------ # general rules: .SUFFIXES: .SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm .swi.s: ;@echo making $@ @${DEFMOD} -s -byte_wide ${BYTEWIDE} < $< > $@ .swi.s32: ;@echo making $@ @${DEFMOD} -s -byte_wide ${BYTEWIDE} -32bit < $< > $@ .swi.h++: ;@echo making $@ @${DEFMOD} -h++ < $< > $@ .swi.Hdr: ;@echo making $@ @${DEFMOD} -hdr < $< > $@ .swi.ch: ;@echo making $@ @${DEFMOD} -chelp < $< > $@ .swi.ah: ;@echo making $@ @${DEFMOD} -asmhelp < $< > $@ .swi.h: ;@echo making $@ @${DEFMOD} -h < $< > $(call tolower, $@) @touch $@ .swi.o: ;@echo making $@ @if [ ! -d l ]; then mkdir l; fi; @env PATH=${CROSSPATH}:${PATH} ${MALLOC_CHECK} \ ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} < $< @${REDUCEAOF} -via ViaFile @if [ ! -a ${OSLIB} ]; then ${LIBFILE} -c ${OSLIB}; fi; @-${LIBFILE} -d ${OSLIB} -v ViaFile @${LIBFILE} -i ${OSLIB} -v ViaFile @touch $@ @${RM} ViaFile @${RM} -r l/$* .swi.o32: ;@echo making $@ @if [ ! -d l ]; then mkdir l; fi; @env PATH=${CROSSPATH}:$PATH ${MALLOC_CHECK} \ ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} -32bit < $< @${REDUCEAOF} -via ViaFile @-if [ ! -a ${OSLIB32} ]; then ${LIBFILE} -c ${OSLIB32}; fi; @-${LIBFILE} -d ${OSLIB32} -v ViaFile @${LIBFILE} -i ${OSLIB32} -v ViaFile @touch $@ @${RM} ViaFile @${RM} -r l/$* .swi.help: ;@echo making $@ @if [ ! -d ${HELPDATA} ]; then mkdir ${HELPDATA}; fi; ${DEFMOD} -cstrong -o ${HELPDATA} < $< @touch $@ .asm.o: ;@echo making $@ @-${LIBFILE} -d ${OSLIB} $@ @${AS} -Wa,-apcs26 -o $@ $< .asm.o32: ;@echo making $@ @-${LIBFILE} -d ${OSLIB32} $@ @${AS} -Wa,-apcs32 -o $@ $< #------------------------------------------------------------------------ --- Makefile,fe1 DELETED --- --- NEW FILE: AMUmakefile.inc --- # !OSLib.Source.Makefile/inc # Include file for making lower-level OSLib projects # tools DEFMOD = do DefMod REDUCEAOF = ReduceAOF RM = rm -nq MD = cdir AS = do objasm -throwback TOLOWER = ToLower MAKE = amu -desktop LIBFILE = libfile ECHO = @echo $@ CP = copy # flags COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V # name rules HDRS = $(addprefix Hdr., ${SWIMODULES} ${MODULES}) OBJASM = $(addprefix s., ${SWIMODULES}) OBJASM32 = $(addprefix s32., ${SWIMODULES}) LIBS = $(addprefix o., ${SWIMODULES}) LIBS32 = $(addprefix o32., ${SWIMODULES}) CHEADERS = $(addprefix h., ${SWIMODULES} ${MODULES}) CSTRONG = $(addprefix help., ${SWIMODULES} ${MODULES}) OBJS = $(addprefix o., ${CMODULES}) OBJS32 = $(addprefix o32., ${CMODULES}) #------------------------------------------------------------------------ # file locations SOURCEDIR = <OSLib$SourceDir> BYTEWIDE = ${SOURCEDIR}.ByteWide HELPDATA = ${SOURCEDIR}.HelpData OSLIB = ${SOURCEDIR}.o.OSLib OSLIB32 = ${SOURCEDIR}.o.OSLib32 .PHONY: all oslib cstrong hdrs cheaders objasm objasm32 clean distclean cleanlib .PHONY: cleanfiles cleanhelp release_deeplib release_widelib release_help # final targets all: oslib oslib: libs libs32 objasm objasm32 hdrs cheaders ${ECHO} cstrong: ${CSTRONG} ${ECHO} hdrs: ${HDRS} ${ECHO} cheaders: ${CHEADERS} ${ECHO} objasm: ${OBJASM} ${ECHO} objasm32: ${OBJASM32} ${ECHO} clean: cleanfiles cleanlib cleanhelp ${ECHO} distclean: clean ${RM} $(addprefix s_0., ${SWIMODULES} ) ${RM} $(addprefix s32_0., ${SWIMODULES} ) ${RM} $(addprefix ${MAKEFILEDIR}., h Hdr l o o32 s s32 s_0 s32_0 help ) @echo cleanlib: ${RM} ${LIBS} ${RM} ${LIBS32} cleanfiles: ${RM} ${HDRS} ${RM} ${CHEADERS} ${RM} ${OBJASM} ${RM} ${OBJASM32} ${RM} ${OBJS} ${OBJS32} cleanhelp: ${RM} ${CSTRONG} ${RM} -r HelpData release: ifndef RELEASEDIR error Release Dir undefined endif -${CP} s s_0 ${COPYFLAGS} -${CP} s32 s32_0 ${COPYFLAGS} ${MD} ${RELEASEDIR} ${CP} Hdr ${RELEASEDIR}.Hdr ${COPYFLAGS} ${CP} h ${RELEASEDIR}.h ${COPYFLAGS} #------------------------------------------------------------------------ .SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm .asm.o: ;@${MD} o @Set OSLib$Output $@ ${AS} -I<OSLib$Path> -from $< -to <OSLib$Output> @IfThere $@ then stamp $@ else create $@ .asm.o32: ;@${MD} o @Set OSLib$Output $@ ${AS} -I<OSLib$Path> -Throwback -apcs 3/32bit -from $< -to <OSLib$Output> @IfThere $@ then stamp $@ else create $@ .swi.s: ;@${MD} s @Set OSLib$Output $@ ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} < $< > <OSLib$Output> @IfThere $@ then stamp $@ else create $@ .swi.s32: ;@${MD} s32 @Set OSLib$Output $@ ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} -32bit < $< > <OSLib$Output> @IfThere $@ then stamp $@ else create $@ .swi.h: ;@${MD} h @Set OSLib$Output $@ @${TOLOWER} OSLib$Output ${DEFMOD} -q -h < $< > <OSLib$Output> @IfThere $@ then stamp $@ else create $@ .swi.Hdr: ;@${MD} Hdr ${DEFMOD} -q -hdr < $< > $@ .swi.h++: ;${DEFMOD} -q -h++ < $< > $@ .swi.ch: ;${DEFMOD} -q -chelp < $< > $@ .swi.ah: ;${DEFMOD} -q -asmhelp < $< > $@ .swi.o: ;@${MD} ${SOURCEDIR}.o @${MD} l @${MD} o @IfThere ${OSLIB} then else ${LIBFILE} -c -o ${OSLIB} ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} < $< @${REDUCEAOF} -via ViaFile #@-${LIBFILE} -d ${OSLIB} l.$*.* ${LIBFILE} -i -o ${OSLIB} -v ViaFile @create $@ @delete ViaFile @Wipe l.$* ~C~FR~V @echo .swi.o32: ;@${MD} ${SOURCEDIR}.o @${MD} l @${MD} o32 @IfThere ${OSLIB32} then else ${LIBFILE} -c -o ${OSLIB32} ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} -32bit < $< @${REDUCEAOF} -via ViaFile #@-${LIBFILE} -d ${OSLIB32} l.$*.* ${LIBFILE} -i -o ${OSLIB32} -v ViaFile @create $@ @delete ViaFile @Wipe l.$* ~C~FR~V @echo .swi.help: ;@${MD} ${HELPDATA} @${MD} help ${ECHO} ${DEFMOD} -q -cstrong -o ${HELPDATA} < $< @IfThere $@ then stamp $@ else Create $@ --- NEW FILE: Clean,fd7 --- | OSLib.Source.Clean | AMU -f <Obey$Dir>.Makefile -desktop clean --- !MakeHelp,fd7 DELETED --- --- NEW FILE: Make,fd7 --- Echo <sys$Time> !OSLib.Source.AMUmakefile %0 | WIMPSlot -min 4096K if "<C$MODE>" = "32" then do AMU -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 if "<C$MODE>"<> "32" then do AMU -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 echo <Sys$Time> Done --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Source/AMUmakefile.inc 20040304 #=================================================================== # # AMUmakefile for SOURCES under RISC OS # #------------------------------------------------------------------------ # paths & directories DIR = ${MAKEFILEDIR} BINDIR = <OSLib$BinDir> #tools MAKE = amu -desktop LIBFILE = LibFile INDEXHELP = IndexHelp BINDHELP = BindHelp RM = rm -nq MD = cdir CP = copy COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V #------------------------------------------------------------------------ #target-specific macros SOURCES = Computer Core Toolbox User OSLIB = OSLib.o OSLIB32 = OSLib32.o CSTRONG = help.OSLib LIST = list.OSLib LIST32 = list.OSLib32 #------------------------------------------------------------------------ #targets .PHONY: all cstrong Computer computer Core core Toolbox toolbox User user \ Test test oslib libs clean all: oslib oslib: ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile oslib ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile oslib ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile oslib ${MAKE} -f ${DIR}.User.oslib.AMUmakefile oslib ${MAKE} -f ${DIR}.AMUmakefile ${LIST} ${MAKE} -f ${DIR}.AMUmakefile ${LIST32} computer: Computer Computer: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all core: Core Core: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all toolbox: Toolbox Toolbox: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all user: User User: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all #test: Test Test: ;${MAKE} -f ${DIR}.$@.AMUmakefile all APCS=${APCS} cstrong : ${CSTRONG} ${CSTRONG}: @-${RM} $@ @${MD} Helpdata @${MD} help @${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cstrong @${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cstrong @${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cstrong @${MAKE} -f ${DIR}.User.oslib.AMUmakefile cstrong ${INDEXHELP} ${DIR}.HelpData.action_ -p Action ${INDEXHELP} ${DIR}.HelpData.class_ -p Class ${INDEXHELP} ${DIR}.HelpData.error_ -p Error ${INDEXHELP} ${DIR}.HelpData.message_ -p Message ${INDEXHELP} ${DIR}.HelpData.service_ -p Service ${BINDHELP} ${DIR}.HelpData ${DIR}.$@ list: ${LIST} ${LIST}: ${OSLIB} ${MD} list ${LIBFILE} -s o.OSLib { > $@ } @SetType $@ text list32: ${LIST32} ${LIST32}: ${OSLIB32} ${MD} list ${LIBFILE} -s o.OSLib32 { > $@ } @SetType $@ text clean: cleanlib cleanhelp cleanfiles ${MAKE} -f ${DIR}.Test.AMUmakefile clean distclean: ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile distclean ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile distclean ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile distclean ${MAKE} -f ${DIR}.User.oslib.AMUmakefile distclean ${MAKE} -f ${DIR}.Test.AMUmakefile distclean ${RM} -r $(addprefix ${DIR}., o list help ) ${RM} -r $(addprefix ${DIR}., Helpdata ) cleanlib: ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanlib ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanlib ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanlib ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanlib ${RM} $(addprefix ${DIR}., o.OSLib o.OSLib32 ) ${RM} $(addprefix ${DIR}., ${LIST} ${LIST32} ) cleanfiles: ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanfiles ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanfiles ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanfiles ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanfiles cleanhelp: ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanhelp ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanhelp ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanhelp ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanhelp ${RM} -r ${DIR}.Helpdata ${RM} ${DIR}.${CSTRONG} release_widelib: ifndef RELEASEDIR @error Release Dir undefined endif ${MD} ${RELEASEDIR}.OSLib ${CP} SetVarsRO4 ${RELEASEDIR}.SetVars ${COPYFLAGS} ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} ${MAKE} -f ${DIR}.computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib ${MAKE} -f ${DIR}.core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib release_deeplib: ifndef RELEASEDIR @error Release Dir undefined endif ${MD} ${RELEASEDIR}.OSLib ${CP} SetVars ${RELEASEDIR}.OSLib.SetVars ${COPYFLAGS} ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} ${MD} ${RELEASEDIR}.OSLib.Computer ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Computer.oslib ${MD} ${RELEASEDIR}.OSLib.Core ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Core.oslib ${MD} ${RELEASEDIR}.OSLib.Macros ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Macros.oslib ${MD} ${RELEASEDIR}.OSLib.Toolbox ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Toolbox.oslib ${MD} ${RELEASEDIR}.OSLib.Types ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Types.oslib ${MD} ${RELEASEDIR}.OSLib.User ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.User.oslib release_help: ifndef RELEASEDIR @error Release Dir undefined endif ${MD} ${RELEASEDIR}.help ${CP} ${CSTRONG} ${RELEASEDIR}.help.* ${COPYFLAGS} #------------------------------------------------------------------------ # Dynamic dependencies: --- !CleanLib,fd7 DELETED --- Index: SetVarsRO4,feb =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/SetVarsRO4,feb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SetVarsRO4,feb 9 Mar 2002 18:19:35 -0000 1.2 --- SetVarsRO4,feb 3 May 2004 15:03:26 -0000 1.3 *************** *** 1,4 **** ! | OSLib.SetVarsRO4 20001120 ! | Sets the directory and path variables for OSLib when using the 'flat' directory structure | This need not actually be RO4, but could be held by any FS with > 77 files per directory. Set OSLib$Dir <Obey$Dir> --- 1,4 ---- ! | OSLib.SetVarsRO4 20040215 ! | Sets the directory and path variables for OSLib when using the 'wide' directory structure | This need not actually be RO4, but could be held by any FS with > 77 files per directory. Set OSLib$Dir <Obey$Dir> *************** *** 9,11 **** | The OSLibInclude: path is provided for backwards compatibility. ! Set OSLibInclude$Path <OSLib$Dir>.OSLib. --- 9,11 ---- | The OSLibInclude: path is provided for backwards compatibility. ! Set OSLibInclude$Path <OSLib$Dir>.oslib. --- !MakeTest,fd7 DELETED --- --- Makefile.inc,fe1 DELETED --- --- !MakeAll,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/BindHelp Modified Files: .cvsignore BindHelp.c Added Files: AMUmakefile GNUmakefile Make,fd7 Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 27 Nov 2002 22:11:00 -0000 1.2 --- .cvsignore 3 May 2004 15:03:31 -0000 1.3 *************** *** 1 **** --- 1,2 ---- o + BindHelp --- NEW FILE: AMUmakefile --- # # Makefile for BindHelp under RISC OS. # #------------------------------------------------------------------------ #target-specific macros TARGET = BindHelp ALL = ${TARGET} VPATH = INCLUDES = OSLibSupport: OSLib: C: DEFINES = LIBS = OSLibSupport:o.${SUPPORT} OSLib:o.${OSLib} C:o.Stubs MODULES = ${TARGET} # all the general rules are in ^.AMUmakefile/source include ${MAKEFILEDIR}.^.AMUmakefile/source --- !Make,fd7 DELETED --- --- NEW FILE: Make,fd7 --- Echo <Sys$Time> !OSLib.Tools.BindHelp.Make %0 WIMPSlot -min 1024K -max 1024K if "<C$MODE>" = "32" then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 if "<C$MODE>"<> "32" then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 Echo <Sys$Time> Done. --- !Clean,fd7 DELETED --- Index: BindHelp.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp/BindHelp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BindHelp.c 29 Dec 2003 11:40:20 -0000 1.6 --- BindHelp.c 3 May 2004 15:03:31 -0000 1.7 *************** *** 74,81 **** */ - #ifndef TRACE - #define TRACE 0 - #endif - #define USE_STRONGHELP 0 /* set true to generate dest using StrongHelp filer calls */ --- 74,77 ---- *************** *** 96,100 **** /* From OSLibSupport */ ! #include "X.h" #include "trace.h" --- 92,96 ---- /* From OSLibSupport */ ! #include "x.h" #include "trace.h" *************** *** 114,117 **** --- 110,122 ---- ( x ) = 0 + #define RO_DIR_SEP "." + #define UNIX_DIR_SEP "/" + + #ifdef EXECUTE_ON_UNIX + #define DIR_SEP UNIX_DIR_SEP + #else + #define DIR_SEP RO_DIR_SEP + #endif + /* data structures */ typedef struct *************** *** 172,176 **** /* globals */ static int index_entries; ! static char *index[ INDEX_SIZ ]; static char *src_path; static char *dst_path; --- 177,181 ---- /* globals */ static int index_entries; ! static char *man_index[ INDEX_SIZ ]; static char *src_path; static char *dst_path; *************** *** 211,215 **** int s; s = sizeof( dir_entry_header) + str_block_size( entry -> name ); ! // tracef( "dir_entry_size: %04x; %s\n" _ s _ entry->name ); return s; } --- 216,220 ---- int s; s = sizeof( dir_entry_header) + str_block_size( entry -> name ); ! tracef( "dir_entry_size: %04x; %s\n" _ s _ entry->name ); return s; } *************** *** 229,233 **** size += dir_entry_size( entry ); } ! // tracef( "dir_size: %04x\n" _ size ); return size; } --- 234,238 ---- size += dir_entry_size( entry ); } ! tracef( "dir_size: %04x\n" _ size ); return size; } *************** *** 281,285 **** cmp = stricmp( s0, s1 ); ! // tracef( "cmp (\"%s\" \"%s\") = %i\n" _ s0 _ s1 _ SGN(cmp) ); return cmp; } --- 286,290 ---- cmp = stricmp( s0, s1 ); ! tracef( "cmp (\"%s\" \"%s\") = %i\n" _ s0 _ s1 _ SGN(cmp) ); return cmp; } *************** *** 298,305 **** size = (size + 3 ) & ~3; if( ptr < 0 ) ptr = osargs_read_extw( handle ); - unwritten = osgbpb_write_atw( handle, buf, size, ptr ); if( unwritten != 0 ) --- 303,311 ---- size = (size + 3 ) & ~3; + tracef( "write_block size: %d; to %d\n" _ size _ ptr ); + if( ptr < 0 ) ptr = osargs_read_extw( handle ); unwritten = osgbpb_write_atw( handle, buf, size, ptr ); if( unwritten != 0 ) *************** *** 324,328 **** dir_list_entry *entry; ! //tracef( "add_obj %s\n" _ name ); entry = x_ALLOC( sizeof( dir_list_entry ) ); --- 330,334 ---- dir_list_entry *entry; ! tracef( "add_obj %s\n" _ name ); entry = x_ALLOC( sizeof( dir_list_entry ) ); *************** *** 429,433 **** header.length = entry -> size + sizeof( data_header ); ! //tracef( "write_dir_entry: offset: %08x; length: %08x; %s\n" \ _ offset \ _ header.length \ --- 435,439 ---- header.length = entry -> size + sizeof( data_header ); ! tracef( "write_dir_entry: offset: %08x; length: %08x; %s\n" \ _ offset \ _ header.length \ *************** *** 473,476 **** --- 479,483 ---- static byte *buf; char temp[ TEMP_MAX ]; + os_error err; #if !USE_STRONGHELP *************** *** 478,482 **** int offset = entry -> offset; ! //tracef( "write_data: offset %08x; %s\n" _ offset _ entry->filename ); /* write the data header */ --- 485,489 ---- int offset = entry -> offset; ! tracef( "write_data: offset %08x; %s\n" _ offset _ entry->filename ); /* write the data header */ *************** *** 493,497 **** fprintf( stdout, " page %s\n", entry -> filename ); ! sprintf( temp, "%s.%s", src_path, entry -> filename ); /* copy the data */ --- 500,504 ---- fprintf( stdout, " page %s\n", entry -> filename ); ! sprintf( temp, "%s"DIR_SEP"%s", src_path, entry -> filename ); /* copy the data */ *************** *** 507,516 **** memset( buf, data_block_size( entry ), 0 ); ! osfile_load_stamped_no_path( temp, buf, NULL, NULL, &size, NULL ); if( entry->size != size ) { x_LOCAL_ERROR( err_filesize, 1, "Filesize mismatch" ); ! fprintf( stderr, "\nwrite_data: file size passed: %d; read %d", entry->size, size ); x_THROW( err_filesize ); } --- 514,530 ---- memset( buf, data_block_size( entry ), 0 ); ! if ( osfile_load_stamped_no_path( temp, buf, NULL, NULL, &size, NULL ) ! != osfile_IS_FILE ! ) ! { ! err.errnum = 0; ! sprintf( err.errmess,"File not found: \"%s\"", temp ); ! x_THROW( &err ); ! } if( entry->size != size ) { x_LOCAL_ERROR( err_filesize, 1, "Filesize mismatch" ); ! tracef( "write_data: file size passed: %d; read %d\n" _ entry->size _ size ); x_THROW( err_filesize ); } *************** *** 521,525 **** #else handle = handle; ! sprintf( temp, "%s.%s", dst_path, entry -> filename ); osfile_save( temp, entry -> stamp_h, entry -> stamp_l, buf, buf + size ); #endif --- 535,539 ---- #else handle = handle; ! sprintf( temp, "%s"DIRSEP"%s", dst_path, entry -> filename ); osfile_save( temp, entry -> stamp_h, entry -> stamp_l, buf, buf + size ); #endif *************** *** 529,535 **** x_CATCH( &x0 ) { ! FREE( buf ); ! x_RETHROW( &x0 ); } return written; } --- 543,554 ---- x_CATCH( &x0 ) { ! tracef( "write_data: Exception caught: errno %d -- \"%s\"\n" \ ! _ x0.error -> errnum \ ! _ x0.error -> errmess ! ); ! FREE( buf ); ! x_RETHROW( &x0 ); } + tracef( "write_data: returning\n" ); return written; } *************** *** 566,570 **** #if !USE_STRONGHELP ! //tracef( "write_dir_list: writing dir at %08x; size %08x\n" _ offset+size _ dirsize ); size += write_block( handle, (byte*)&header, --- 585,589 ---- #if !USE_STRONGHELP ! tracef( "write_dir_list: writing dir at %08x; size %08x\n" _ offset+size _ dirsize ); size += write_block( handle, (byte*)&header, *************** *** 601,605 **** { /* recurse into any lower level dir */ ! //tracef( "write_dir_list: recurses\n" ); if( verbose ) fprintf( stdout, "Directory %s\n", entry -> name ); --- 620,624 ---- { /* recurse into any lower level dir */ ! tracef( "write_dir_list: recurses\n" ); if( verbose ) fprintf( stdout, "Directory %s\n", entry -> name ); *************** *** 631,635 **** #endif ! //tracef( "write_dir_list: returns %08x\n" _ size ); return size; } --- 650,654 ---- #endif ! tracef( "write_dir_list: returns %08x\n" _ size ); return size; } *************** *** 642,647 **** dir_list_entry *entry; ! while( *root != NULL ) { entry = *root; *root = entry -> next; --- 661,668 ---- dir_list_entry *entry; ! while( root && *root ) { + //tracef( "delete_dir_entry 0x%x\n" _ *root ); + entry = *root; *root = entry -> next; *************** *** 668,673 **** #if !USE_STRONGHELP dir_entry_header dir; char* name = "$"; ! offset = osargs_read_extw( handle ); --- 689,697 ---- #if !USE_STRONGHELP dir_entry_header dir; + #if 0 char* name = "$"; ! #else ! char name[4] = {'$',0,0,0}; ! #endif offset = osargs_read_extw( handle ); *************** *** 692,696 **** size = write_dir_list( handle, root, offset, pass ); ! //tracef( "write_file: wrote %08x bytes\n" _ size ); } --- 716,720 ---- size = write_dir_list( handle, root, offset, pass ); ! tracef( "write_file: wrote %08x bytes\n" _ size ); } *************** *** 711,715 **** #else file_header header; ! //tracef( "create_file - %s \n" _ name ); handle = osfind_openoutw( osfind_NO_PATH, --- 735,739 ---- #else file_header header; ! tracef( "create_file - %s \n" _ name ); handle = osfind_openoutw( osfind_NO_PATH, *************** *** 736,740 **** { for( ;index_entries > 0; index_entries-- ) ! free( index[ index_entries - 1 ] ); } --- 760,764 ---- { for( ;index_entries > 0; index_entries-- ) ! free( man_index[ index_entries - 1 ] ); } *************** *** 751,754 **** --- 775,779 ---- x_exception x0; time_t xtime; + char year[8]; if( verbose ) *************** *** 756,767 **** /* sort the index */ ! qsort( index, index_entries, sizeof( index[0] ), Cmp ); /* create an index file in the source dir */ ! sprintf( temp_name, "%s.%s", src_path, "!Root" ); if ( ( index_file = fopen( temp_name, "wb" ) ) == NULL ) x_THROW_LAST_ERROR(); ! //tracef( "file_index writing %s\n" _ temp_name ); x_TRY( &x0 ) { --- 781,792 ---- /* sort the index */ ! qsort( man_index, index_entries, sizeof( man_index[0] ), Cmp ); /* create an index file in the source dir */ ! sprintf( temp_name, "%s"DIR_SEP"%s", src_path, "!Root" ); if ( ( index_file = fopen( temp_name, "wb" ) ) == NULL ) x_THROW_LAST_ERROR(); ! tracef( "file_index writing %s\n" _ temp_name ); x_TRY( &x0 ) { *************** *** 786,790 **** { if ( ( size += fprintf( index_file, ! "<%s=>%s_>\n", index[i], index[i] ) ) < 0 --- 811,815 ---- { if ( ( size += fprintf( index_file, ! "<%s=>%s_>\n", man_index[i], man_index[i] ) ) < 0 *************** *** 795,798 **** --- 820,824 ---- time( &xtime ); strftime( temp, TEMP_MAX, "%d %b %Y", localtime( &xtime ) ); + strftime( year, 8, "%Y", localtime( &xtime ) ); if ( ( size += fprintf( index_file, "#EndTable\n" *************** *** 801,808 **** "#Align Centre\n" "OSLib by {*}Jonathan Coxhead{*}\n" ! "Copyright © Jonathan Coxhead and OSLib Maintainers 1995 - 2002\n" "StrongHelp Manual created %s by BindHelp\n" ! "<http://www.mk-net.demon.co.uk/oslib=>#url>\n" "<mailto:osl...@co...=>#url>\n", temp ) --- 827,836 ---- "#Align Centre\n" "OSLib by {*}Jonathan Coxhead{*}\n" ! "Copyright © Jonathan Coxhead and OSLib Maintainers " ! "1995 - %s\n" "StrongHelp Manual created %s by BindHelp\n" ! "<http://ro-oslib.sourceforge.net=>#url>\n" "<mailto:osl...@co...=>#url>\n", + year, temp ) *************** *** 858,868 **** "%s%s%s%s%s", src_path ? src_path : "", ! src_path ? "." : "", dir ? dir : "", ! dir ? "." : "", file ); ! //tracef( "add_index: reading %s\n" _ temp ); ! source = fopen( temp, "r" ); if ( !source ) x_THROW_LAST_ERROR(); --- 886,897 ---- "%s%s%s%s%s", src_path ? src_path : "", ! src_path ? DIR_SEP : "", dir ? dir : "", ! dir ? DIR_SEP : "", file ); ! ! tracef( "add_index: reading %s\n" _ temp ); ! source = fopen( temp, "r" ); if ( !source ) x_THROW_LAST_ERROR(); *************** *** 875,880 **** /* add to index */ *(temp+strlen(temp)-1) = '\0'; ! //tracef( "add_index: %s\n" _ temp ); ! index[ index_entries++ ] = qstrdup( temp ); /* tidy up */ --- 904,909 ---- /* add to index */ *(temp+strlen(temp)-1) = '\0'; ! tracef( "add_index: %s\n" _ temp ); ! man_index[ index_entries++ ] = qstrdup( temp ); /* tidy up */ *************** *** 884,888 **** { fclose( source ); ! //tracef( "exception in add_index\n" ); x_RETHROW( &x0 ); } --- 913,917 ---- { fclose( source ); ! tracef( "exception in add_index\n" ); x_RETHROW( &x0 ); } *************** *** 906,910 **** "%s%s%s", src_path, ! (dir && dir[0] != '\0') ? "." : "", dir ? dir : "" ); --- 935,939 ---- "%s%s%s", src_path, ! (dir && dir[0] != '\0') ? DIR_SEP : "", dir ? dir : "" ); *************** *** 915,919 **** int read_count; ! //tracef( "scan_dir: %s\n" _ source_dir ); context = osgbpb_dir_entries_info( source_dir, (osgbpb_info_list*)infolist, --- 944,948 ---- int read_count; ! tracef( "scan_dir: %s\n" _ source_dir ); context = osgbpb_dir_entries_info( source_dir, (osgbpb_info_list*)infolist, *************** *** 924,928 **** &read_count ); ! // //tracef( "scan_dir: context %d; read_count %d\n" _ context _ read_count ); if( read_count != 0 ) --- 953,957 ---- &read_count ); ! tracef( "scan_dir: context %d; read_count %d\n" _ context _ read_count ); if( read_count != 0 ) *************** *** 934,938 **** "%s%s%s", dir ? dir : "", ! (dir && dir[0] != '\0') ? "." : "", INFO -> name ); --- 963,967 ---- "%s%s%s", dir ? dir : "", ! (dir && dir[0] != '\0') ? DIR_SEP : "", INFO -> name ); *************** *** 942,946 **** /* sub-directory found - add to linked list, then recurse into it */ ! //tracef( "scan_dir - recursing into %s\n" _ INFO->name ); *root = dir_entry = add_dir( INFO->name, --- 971,975 ---- /* sub-directory found - add to linked list, then recurse into it */ ! tracef( "scan_dir - recursing into %s\n" _ INFO->name ); *root = dir_entry = add_dir( INFO->name, *************** *** 958,962 **** { /* page found */ ! // tracef( "scan_dir - found file: %s.%s \n" _ dir _ INFO->name ); *root = dir_entry = add_file( INFO->name, --- 987,991 ---- { /* page found */ ! tracef( "scan_dir - found file: %s"DIR_SEP"%s \n" _ dir _ INFO->name ); *root = dir_entry = add_file( INFO->name, *************** *** 980,984 **** while( context != osgbpb_NO_MORE ); ! //tracef( "scan_dir - returns\n" ); #undef INFO } --- 1009,1013 ---- while( context != osgbpb_NO_MORE ); ! tracef( "scan_dir - returns\n" ); #undef INFO } *************** *** 1007,1015 **** x_TRY( &x0 ) { - fprintf( stdout, "BindHelp " VERSION " "__DATE__ " © Tony van der Hoff\n" ); - #if USE_STRONGHELP - fprintf( stdout, "Using StrongHelp calls\n" ); - #endif - if( argc < 3 ) x_THROW( Error_syntax ); --- 1036,1039 ---- *************** *** 1031,1037 **** --- 1055,1071 ---- } + if( verbose ) + { + fprintf( stdout, "BindHelp " VERSION " "__DATE__ " © Tony van der Hoff\n" ); + #if USE_STRONGHELP + fprintf( stdout, "Using StrongHelp calls\n" ); + #endif + } + /* create destination manual and copy the source into it */ + tracef( "main: Creating file\n" ); handle = create_file( dst_path ); + tracef( "main: creating manual\n" ); x_TRY( &x1 ) { *************** *** 1039,1044 **** ** so it doesn't appear in the dir list */ ! sprintf( temp, "%s.!Root", src_path ); ! osfile_delete( temp, NULL, NULL, NULL, NULL ); /* scan the source dir to create the master index and directory list */ --- 1073,1079 ---- ** so it doesn't appear in the dir list */ ! sprintf( temp, "%s"DIR_SEP"!Root", src_path ); ! tracef( "deleting \"%s\"\n" _ temp ); ! xosfile_delete( temp, NULL, NULL, NULL, NULL, NULL ); /* scan the source dir to create the master index and directory list */ *************** *** 1064,1070 **** x_CATCH( &x1 ) { ! osfind_closew( handle ); osfile_delete( argv[2], NULL, NULL, NULL, NULL ); delete_dir_list( &dir_list_root ); x_RETHROW( &x1 ); } --- 1099,1110 ---- x_CATCH( &x1 ) { ! tracef( "Main: exception caught: 0x%x - %s\n" _ \ ! x1.error ? x1.error -> errnum : 0 _ \ ! x1.error ? x1.error -> errmess : "NULL" ); ! ! osfind_closew( handle ); osfile_delete( argv[2], NULL, NULL, NULL, NULL ); delete_dir_list( &dir_list_root ); + x_RETHROW( &x1 ); } --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # # Makefile for BindHelp for UNIX. # #------------------------------------------------------------------------ #target-specific macros TARGET = BindHelp MODULES = ${TARGET} os osgbpb osfile osargs osfind x kernel unix INCLUDES = -I.. -I../support DEFINES = -DUNIX -DEXECUTE_ON_UNIX -D__swi VPATH = ../support ../oslib/unix # additional modules required if tracing TRACEMODULES = trace m # all the general rules are in ../GNUmakefile.source include ../GNUmakefile.source |
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Computer/oslib Modified Files: .cvsignore ADFS.swi Added Files: AMUmakefile GNUmakefile Modules Removed Files: !Clean,fd7 !Make,fd7 !copysrc Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 29 Dec 2003 11:40:18 -0000 1.5 --- .cvsignore 3 May 2004 15:03:26 -0000 1.6 *************** *** 1,3 **** - l Hdr help --- 1,2 ---- *************** *** 16,21 **** *.o *.o,* *.o32,* *.s *.s32 ! tree,ffd \ No newline at end of file --- 15,22 ---- *.o *.o,* + *.o32 *.o32,* *.s *.s32 ! tree ! tree,ffd --- NEW FILE: AMUmakefile --- # OSLib.Source.Computer.oslib.Makefile TV 20031228 # Makefile for Computer/oslib under RISC OS # #include the module list include ${MAKEFILEDIR}.modules #include the global definitions afther the local ones # to allow the latter to be recognised include <OSLib$SourceDir>.AMUmakefile/inc # local targets .PHONY: computer libs libs32 computer: all @echo libs: ${LIBS} @echo libs32: ${LIBS32} @echo #------------------------------------------------------------------------ # Dynamic dependencies: Index: ADFS.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Computer/oslib/ADFS.swi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ADFS.swi 15 Dec 2002 11:35:33 -0000 1.2 --- ADFS.swi 3 May 2004 15:03:26 -0000 1.3 *************** *** 1,5 **** TITLE ADFS; AUTHOR "Jonathan Coxhead, jon...@do..., 21 Aug 1995"; ! NEEDS OS, FileCore; --- 1,5 ---- TITLE ADFS; AUTHOR "Jonathan Coxhead, jon...@do..., 21 Aug 1995"; ! NEEDS OS, FileCore; --- !Clean,fd7 DELETED --- --- !copysrc DELETED --- --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLib/Source/Computer/oslib/GNUmakefile TV 20040115 # Makefile for Computer/oslib under GNU # SOURCEDIR = ../.. TARGET = Computer include Modules include ${SOURCEDIR}/GNUmakefile.source #------------------------------------------------------------------------ .PHONY: ${OSLIB32} ${OSLIB} ${OSLIB}: ${LIBS} ${HDRS} ${OBJS} ${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} --- NEW FILE: Modules --- # OSLib.Source.Computer.oslib.Modules TV 20031228 # List of modules comprising Computer # for inclusion in Make files independant of platform # modules containing SWIs SWIMODULES += \ ADFS \ CD \ CDFS \ DeviceFS \ DOSFS \ Econet \ FileCore \ Filer \ FilerAction \ FileSwitch \ Free \ Freeway \ FSLock \ Joystick \ NetFS \ NetPrint \ NFS \ OSArgs \ OSFile \ OSFind \ OSFSControl \ OSGBPB \ OSSerialOp \ Parallel \ PipeFS \ RamFS \ Resolver \ ResourceFS \ SCSI \ SCSIFS \ ShareFS \ Socket \ SysLog # modules with no SWIs MODULES += \ CDFSFiler \ NetFiler # modules defined other than by SWI definition CMODULES += --- !Make,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib Modified Files: !Readme !Run,feb .cvsignore SetVars,feb Added Files: AMUmakefile GNUmakefile Make,fd7 Removed Files: !ArchiveAll,fd7 !CleanAll,fd7 !MakeAll,fd7 !MakeTree,fd7 !ReleaseAll,fd7 !StripDepends,fd7 MakeFile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/.cvsignore,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** .cvsignore 31 Dec 2003 14:42:39 -0000 1.7 --- .cvsignore 3 May 2004 15:03:22 -0000 1.8 *************** *** 1,5 **** Bin release - Submissions zips tree,ffd --- 1,4 ---- --- NEW FILE: GNUmakefile --- # # Makefile for OSLib for UNIX. # CROSSPATH = /home/riscos/cross/bin HELP = OSLib,3d6 #------------------------------------------------------------------------ #tools CP = cp -pu RM = rm -fr #------------------------------------------------------------------------ #macros ALL = Tools Source OSLibSupport #------------------------------------------------------------------------ #targets .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 tools: Tools Tools: ;${MAKE} -C $@ oslib: Tools Source Source: ;${MAKE} -C $@ support: OSLibSupport OSLibSupport: ;${MAKE} -C $@ cstrong: ;${MAKE} -C Source cstrong clean: ;$(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) distclean: clean ${RM} release Bin zips dist release: release_wide release_deep release_unix release_help release_support release_wide : release/wide release/wide: oslib ${MAKE} -C Source/Computer/oslib release_wide RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Core/oslib release_wide RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Toolbox/oslib release_wide RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/User/oslib release_wide RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Types/oslib release_wide RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Macros/oslib release_wide RELEASEDIR=${CURDIR}/$@ @if [ ! -d $@/OSLib/o ]; then mkdir -p $@/OSLib/o; fi @${CP} docs/ChangeLog $@/ @${CP} docs/Copying $@/ @${CP} docs/OSLib_API $@/ @${CP} docs/OSLib_readme $@/ @${CP} docs/WideFuncts $@/ @${CP} docs/Unix_Build $@/ @${CP} Source/SetVarsRO4,feb $@/OSLib/SetVars,feb @${CP} Source/OSLib.o $@/OSLib/o/OSLib,ffd @${CP} Source/OSLib32.o $@/OSLib/o/OSLib32,ffd release_deep : release/deep release/deep: oslib ${MAKE} -C Source/Computer/oslib release_deep RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Core/oslib release_deep RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Toolbox/oslib release_deep RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/User/oslib release_deep RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Types/oslib release_deep RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Macros/oslib release_deep RELEASEDIR=${CURDIR}/$@ @if [ ! -d $@/OSLib/o ]; then mkdir -p $@/OSLib/o; fi @${CP} docs/ChangeLog $@/ @${CP} docs/Copying $@/ @${CP} docs/OSLib_API $@/ @${CP} docs/OSLib_readme $@/ @${CP} docs/WideFuncts $@/ @${CP} docs/Unix_Build $@/ @${CP} Source/SetVars,feb $@/OSLib/SetVars,feb @${CP} Source/OSLib.o $@/OSLib/o/OSLib,ffd @${CP} Source/OSLib32.o $@/OSLib/o/OSLib32,ffd release_unix : release/unix release/unix: oslib ${MAKE} -C Source/Computer/oslib release_unix RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Core/oslib release_unix RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Toolbox/oslib release_unix RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/User/oslib release_unix RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Types/oslib release_unix RELEASEDIR=${CURDIR}/$@ ${MAKE} -C Source/Macros/oslib release_unix RELEASEDIR=${CURDIR}/$@ @if [ ! -d $@/OSLib ]; then mkdir -p $@/OSLib; fi @${CP} docs/ChangeLog $@/ @${CP} docs/Copying $@/ @${CP} docs/OSLib_API $@/ @${CP} docs/OSLib_readme $@/ @${CP} docs/WideFuncts $@/ @${CP} docs/Unix_Build $@/ @${CP} Source/SetVarsRO4,feb $@/OSLib/SetVars,feb @${CP} Source/OSLib.o $@/OSLib/OSLib.o @${CP} Source/OSLib32.o $@/OSLib/OSLib32.o release_help: release/help release/help: cstrong @if [ ! -d $@ ]; then mkdir -p $@; fi @${CP} Source/${HELP} $@/ release_support: release/OSLibSupport release/OSLibSupport: ;${MAKE} -C OSLibSupport release RELEASEDIR=${CURDIR}/$@ dist: dist_wide dist_deep dist_unix dist_help dist_support dist_wide: zips/wide 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; ${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 * #------------------------------------------------------------------------ Index: !Run,feb =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/!Run,feb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** !Run,feb 27 Nov 2002 22:10:56 -0000 1.8 --- !Run,feb 3 May 2004 15:03:22 -0000 1.9 *************** *** 1,3 **** ! | !OSLib.!Run TV 20021114 RMEnsure DDEUtils 0.0 RMLoad system:Modules.DDEUtils RMEnsure DDEUtils 0.0 Error You need DDEUtils to build OSLib --- 1,3 ---- ! | !OSLib.!Run TV 20040223 RMEnsure DDEUtils 0.0 RMLoad system:Modules.DDEUtils RMEnsure DDEUtils 0.0 Error You need DDEUtils to build OSLib --- NEW FILE: Make,fd7 --- | !OSLib.Make 20040304 Echo <sys$time> !OSLib.Make %0 SetEval OSLib$Slot 4*1024 do wimpslot -min <OSLib$Slot>K if "<C$MODE>" = "32" then Do AMU -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 if "<C$MODE>" <>"32" then Do AMU -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 Echo <sys$time> Done --- !CleanAll,fd7 DELETED --- --- !StripDepends,fd7 DELETED --- --- MakeFile,fe1 DELETED --- --- !MakeTree,fd7 DELETED --- --- !ArchiveAll,fd7 DELETED --- Index: SetVars,feb =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/SetVars,feb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SetVars,feb 12 Apr 2002 11:37:42 -0000 1.6 --- SetVars,feb 3 May 2004 15:03:22 -0000 1.7 *************** *** 1,3 **** ! | !OSLib.SetVars 20020314 | Set system variables for OSLib development | --- 1,3 ---- ! | !OSLib.SetVars 20040223 | Set system variables for OSLib development | *************** *** 7,14 **** Set OSLib$HelpDir <OSLib$HomeDir>.release.help Set OSLib$ToolsDir <OSLib$HomeDir>.Tools - Set OSLib$BinDir <OSLib$HomeDir>.Bin | Set OSLibSupport$Path <OSLib$SupportDir>. ! Set OSLibBin$Path <OSLib$BinDir>. | | use the development library for any compilations --- 7,16 ---- Set OSLib$HelpDir <OSLib$HomeDir>.release.help Set OSLib$ToolsDir <OSLib$HomeDir>.Tools | Set OSLibSupport$Path <OSLib$SupportDir>. ! ! If "<OSLibBin$Path>" = "" Then Set Run$Path <Run$Path>,OSLibBin: ! Set OSLib$BinDir <Obey$Dir>.Bin ! Set OSLibBin$Path <OSLib$BinDir>. | | use the development library for any compilations --- !ReleaseAll,fd7 DELETED --- --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/MakeFile,fe1 20031230 # DIR = ${MAKEFILEDIR} BIN = <OSLib$BinDir> TOOLS = <OSLib$ToolsDir> SOURCE = <OSLib$SourceDir> SUPPORT = <OSLib$SupportDir> HELP = <OSLib$HelpDir> RELEASEDIR = <OSLib$HomeDir>.release ifndef APCS $(error APCS mode is undefined) endif #tools RM = rm -nq MAKE = amu -desktop MD = cdir CP = copy COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V WIPEFLAGS = ~CF~R~V .PHONY: all release release_wide release_deep release_support release_help .PHONY: clean distclean dist_wide dist_deep dist_support dist_help all: ${MAKE} -f ${TOOLS}.AMUmakefile stage1 APCS=${APCS} ${MAKE} -f ${SOURCE}.AMUmakefile oslib APCS=${APCS} ${MAKE} -f ${SOURCE}.AMUmakefile test APCS=${APCS} ${MAKE} -f ${SUPPORT}.AMUmakefile all APCS=${APCS} ${MAKE} -f ${TOOLS}.AMUmakefile stage2 APCS=${APCS} ${MAKE} -f ${SOURCE}.AMUmakefile cstrong APCS=${APCS} ${MAKE} -f ${DIR}.AMUmakefile release release: release_wide release_deep release_help release_support release_wide: @${MD} ${RELEASEDIR} @${MD} ${RELEASEDIR}.wide ${CP} ${DIR}.docs.ChangeLog ${RELEASEDIR}.wide.* ${COPYFLAGS} ${CP} ${DIR}.docs.Copying ${RELEASEDIR}.wide.* ${COPYFLAGS} ${CP} ${DIR}.docs.OSLib_API ${RELEASEDIR}.wide.* ${COPYFLAGS} ${CP} ${DIR}.docs.OSLib_readme ${RELEASEDIR}.wide.* ${COPYFLAGS} ${CP} ${DIR}.docs.WideFuncts ${RELEASEDIR}.wide.* ${COPYFLAGS} ${MAKE} -f ${SOURCE}.AMUmakefile release_widelib RELEASEDIR=${RELEASEDIR}.wide release_deep: @${MD} ${RELEASEDIR} @${MD} ${RELEASEDIR}.deep ${CP} ${DIR}.docs.ChangeLog ${RELEASEDIR}.deep.* ${COPYFLAGS} ${CP} ${DIR}.docs.Copying ${RELEASEDIR}.deep.* ${COPYFLAGS} ${CP} ${DIR}.docs.OSLib_API ${RELEASEDIR}.deep.* ${COPYFLAGS} ${CP} ${DIR}.docs.OSLib_readme ${RELEASEDIR}.deep.* ${COPYFLAGS} ${CP} ${DIR}.docs.WideFuncts ${RELEASEDIR}.deep.* ${COPYFLAGS} ${MAKE} -f ${SOURCE}.AMUmakefile release_deeplib RELEASEDIR=${RELEASEDIR}.deep release_support: @${MD} ${RELEASEDIR} ${MAKE} -f ${SUPPORT}.AMUmakefile release RELEASEDIR=${RELEASEDIR} release_help: @${MD} ${RELEASEDIR} ${MAKE} -f ${SOURCE}.AMUmakefile release_help RELEASEDIR=${RELEASEDIR} clean: ${MAKE} -f ${SOURCE}.AMUmakefile clean ${MAKE} -f ${SUPPORT}.AMUmakefile clean ${MAKE} -f ${TOOLS}.AMUmakefile clean distclean: ${MAKE} -f ${SOURCE}.AMUmakefile distclean ${MAKE} -f ${SUPPORT}.AMUmakefile distclean ${MAKE} -f ${TOOLS}.AMUmakefile distclean ${RM} -r ${RELEASEDIR} ${RM} -r zips ${RM} -r ${BIN} dist: dist_wide dist_deep dist_help dist_support dist_wide: @.zips.OSLib_RO4/zip @.zips.OSLib_RO4/zip: release_wide ${MD} zips ${RM} $@ dir release.wide GCCBin:zip -9r ${MAKEFILEDIR}.$@ * back dist_deep: @.zips.OSLib/zip @.zips.OSLib/zip: release_deep ${MD} zips ${RM} $@ dir release.deep GCCBin:zip -9r ${MAKEFILEDIR}.$@ * back dist_support: @.zips.OSLibSupport/zip @.zips.OSLibSupport/zip: release_support ${MD} zips ${RM} $@ dir release.OSLibSupport GCCBin:zip -9r ${MAKEFILEDIR}.$@ * back dist_help: @.zips.OSLibHelp/zip @.zips.OSLibHelp/zip: release_help ${MD} zips ${RM} $@ dir release.help GCCBin:zip -9rI ${MAKEFILEDIR}.$@ * back Index: !Readme =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/!Readme,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** !Readme 26 Feb 2003 17:40:03 -0000 1.6 --- !Readme 3 May 2004 15:03:22 -0000 1.7 *************** *** 1,119 **** !OSLib.!Readme 20021121 ! ******************************************************************************** Introduction ------------ ! This is the OSLib source release. It contains everything you need to build (and modify) OSLib, its build tools, and OSLibSupport. It is available by CVS from http://ro-oslib.sourceforge.net. ! ******************************************************************************** ! Directory structure ! ------------------- ! NOTE: It is essential that the work directory can handle long file names; ! unpack the archive or checkout the repository into an appropriate RaFS, LongFiles, or XFiles directory, as appropriate, if you do not have RISC OS 4. ! The top level directory is called !OSLib (Under CVS the work directory is called OSLib, which contains !OSLib). Double-clicking on this causes a number ! of environment variables (all names are prefixed with 'OSLib$'), which are ! used during the build process. Any environment variables pointing to an ! installed OSLib are overwritten, so that !OSLib becomes the reference, and any builds use the development library contained herein. ! Within !OSLib, there are a number of subdirectories:OSLibSupport contains the ! sources to the OSLib Support library; Source contains the source to OSLib ! itself, together with some test applications; and Tools contains the sources to a number of tools required to build OSLib. ! Below these, OSLibSupport contains a subdirectory for each of the major ! components of the library, plus a 'h' directory containing the public ! headers; Source contains subdirectories for each of the four component areas ! of OSLib (to avoid more than 77 files per directory); it also contains a Test ! directory in which reside a number of test files which are executed during ! thye build process. Tools contains further subdirectories for each of the ! specialised tools used to build OSLib. Of these, DefMod (now at version 2) is ! the most important, translating the SWI definitions into assembler sources. ! YACC is required to interpret the DefMod language definition file, and is ! used to build DefMod. ReduceAOF removes redundant chunk headers form the AOF ! files before placing them in the library, thus minimising the size of the ! latter. IndexHelp and BindHelp are used to process the Help output from ! DefMod to create the StrongHelp manuals. Rm is a small file deletion utility, ! with the ability to process multiple arguments, and StripDepends is used to ! clean a Make file of all the (installation-specific) dynamic dependency ! information. Since some of these tools are themselves dependant upon OSLib, ! the build order is critical. ! Additional subdirectories are created during the build process. ! ******************************************************************************** ! Building OSLib under RISC OS ! ---------------------------- ! You'll need: ! 1. An (image) filing system capable of handling long file names. Many of the ! source files have names longer than 10 characters, and problems will arise if ! these are not preserved. ! 2. A Make utility. OSLib is currently built using Acorn's AMU, which is part ! of the C/C++ 5.0 package. It is quite likely that another (GNU) Make utility ! will work under RISC OS; but this has not (to my knowledge) been tried. The ! maintainers would be pleased to hear from anyone who succeeds with this. ! 3. An Assembler. Currently, DefMod, in its RISC OS incarnation, is hard-wired ! to call Acorn's ObjAsm, again part of Acorn's C/C++ package. I am not aware ! of any other assembler being successfully used; indeed this is unlikely ! without changes to DefMod. ! 4. A C compiler. Currently the tools and OSLibSupport are built using Norcroft C, but I know of no reason why GNU C should not be used. ! 5. SparkFS. This is only required if you need to build archives for distribution. ! ! ! The entire build process is divided into a number of sub-projects, each with ! its own make file. AMU is invoked as appropriate by a number of TaskObey ! files in each sub-project. ! ! To build OSLib "out of the box", you first need to build the directory tree, ! by double-clicking on !MakeTree. To then build the necessary tools, the ! library itself, the support library, and the StrongHelp manual, you it is ! only necessary to double-click on !MakeAll. Finally, if you are happy with ! this, you must double-click on !ReleaseAll to copy the appropriate files into ! the 'release' directory. On my StrongArm Risc PC the entire process takes ! just over two hours to complete; slightly longer over a network connection. ! To create a set of zip files for release, assuming !MakeAll has been ! successfully completed, double-click on !ArchiveOnly makes the zip archives, ! assuming !MakeAll has been successfully completed. !ArchiveSource creates an ! archive for the source release only. ! You're unlikely to need any of the !Archive TaskObeys, unless you're making ! rival releases. ! Finally, !CleanAll cleans the project and restores it to near virgin condition. ! No doubt I've got some of it wrong, and will be grateful for any comments and ! amendments. ! ******************************************************************************** ! Building OSLib under UNIX/Linux ! ------------------------------- ! It is possible to build OSLib under UNIX/Linux (I believe it is done at ! Pace), but lacking an appropriate platform myself, I am unable to attempt it, ! and therefore documenting the process is difficult. ! Hopefully, this paragraph can be filled out in the future. ! ******************************************************************************** ! Tony van der Hoff. ! mailto: <osl...@co...> \ No newline at end of file --- 1,129 ---- !OSLib.!Readme 20021121 ! ****************************************************************************** Introduction ------------ ! This is the OSLib source release. It contains everything you need to build (and modify) OSLib, its build tools, and OSLibSupport. It is available by CVS from http://ro-oslib.sourceforge.net. ! ! ***************************************************************************** ! Directory structure ! ------------------- ! NOTE: It is essential that the work directory can handle long file names; ! unpack the archive or checkout the repository into an appropriate RaFS, LongFiles, or XFiles directory, as appropriate, if you do not have RISC OS 4. ! The top level directory is called !OSLib (Under CVS the work directory is called OSLib, which contains !OSLib). Double-clicking on this causes a number ! of environment variables (all names are prefixed with 'OSLib$'), which are ! used during the build process. Any environment variables pointing to an ! installed OSLib are overwritten, so that !OSLib becomes the reference, and any builds use the development library contained herein. ! Within !OSLib, there are a number of subdirectories:OSLibSupport contains ! the sources to the OSLib Support library; Source contains the source to OSLib ! itself, together with some test applications; and Tools contains the sources to a number of tools required to build OSLib. ! Below these, OSLibSupport contains a subdirectory for each of the major ! components of the library, plus a 'h' directory containing the public headers ! (under UNIX, these are .h files); Source contains subdirectories for each of ! the four component areas of OSLib (to avoid more than 77 files per ! directory); it also contains a Test directory in which reside a number of ! test files which are executed during the build process. Tools contains ! further subdirectories for each of the specialised tools used to build OSLib. ! Of these, DefMod (now at version 2) is the most important, translating the ! SWI definitions into assembler sources. Bison is required to interpret the ! DefMod language definition file, and is used to build DefMod. ReduceAOF ! removes redundant chunk headers form the AOF files before placing them in the ! library, thus minimising the size of the latter. IndexHelp and BindHelp are ! used to process the Help output from DefMod to create the StrongHelp manuals. ! Rm is a small file deletion utility, with the ability to process multiple ! arguments, and StripDepends is used to clean a Make file of all the ! (installation-specific) dynamic dependency information. Since some of these ! tools are themselves dependant upon OSLib, the build order is critical. ! Additional subdirectories are created during the build process. ! ***************************************************************************** ! Building OSLib under RISC OS ! ---------------------------- ! You'll need: ! 1. An (image) filing system capable of handling long file names. Many of ! the source files have names longer than 10 characters, and problems will ! arise if these are not preserved. ! 2. A Make utility. OSLib is currently built using Acorn's AMU, which is ! part of the Castle's C/C++ 6.0 package. It is essential that at least that ! version is used, as the makefile structure uses the latest extensions. A ! current WIP is to produce a set of make files to build OSLib using the GCCSDK ! package under RISC OS; it is quite possible to do this, but currently you're ! on your own. ! 3. An Assembler. Currently, DefMod, in its RISC OS incarnation, is ! hard-wired to call Acorn's ObjAsm, again part of Acorn's C/C++ package. I am ! not aware of any other assembler being successfully used; indeed this is ! unlikely without changes to DefMod. ! 4. A C compiler. Currently the tools and OSLibSupport are built using Norcroft C, but I know of no reason why GNU C should not be used. ! The entire build process is divided into a number of sub-projects, each ! with its own make file, named AMUmakefile, to distinguish it from any other ! make system. ! To build OSLib "out of the box", under RISC OS, all that is necessary is to ! double-click on the 'Make' TaskObey, which will look after the entire build ! process and place a distributable OSLib in the 'release' sub-directory. There ! are 2 versions provided: "wide", which uses a wide directory structure ! suitable for RISC OS 4, or any file system capable of containing more than 77 ! files per directory; and "deep", which contains a file structure suitable for ! RISC OS 3. Directory "OSLibHelp" contains the StrongHelp manual, and ! directory "OSLibSupport" contains the optional support library. On my ! StrongArm Risc PC the entire process takes just over two hours to complete; ! somewhat longer over a network connection. ! For more experienced users, there are more targets in the AMUmakefile, ! which may be invoked by typing "make <target>" at the command line, with the ! default directory set appropriately. Of these, "Make distclean" is perhaps ! one of the more useful; it restores the directories to their condition at ! chaeckout. "Make dist" creates a set of zip files for distribution; for this ! you require a copy of infozip in the run path (I used to use SparkFS, but ! this has problems compressing such a large archive). ! No doubt I've got some of it wrong, and will be grateful for any comments ! and amendments. ! ***************************************************************************** ! 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. ! In a terminal, in the appropriate directory, type "Make all", and watch it ! all happen by magic. It all happens in 10 minutes on my 1.1 GHz Linux box; a ! vast improvement over the 2 hours or more under RISC OS. Again "make dist" ! and "make distclean" work very much as expected. Dig around inside the ! GNUmakefiles for other less-useful targets. ! Thanks are due to Druck, for supplying the initial "portable OSLib", upon ! which, with enhancements, the tools are built. ! ***************************************************************************** ! Tony van der Hoff. mailto: <osl...@co...> --- !MakeAll,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Core/oslib Modified Files: .cvsignore OSChangeDynamicAreaNoFail.asm OSReadVarValSize.asm Added Files: AMUmakefile GNUmakefile Make,fd7 Modules Removed Files: !Clean,fd7 !Make,fd7 !copysrc Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 29 Dec 2003 11:40:18 -0000 1.5 --- .cvsignore 3 May 2004 15:03:27 -0000 1.6 *************** *** 17,20 **** --- 17,21 ---- *.o *.o,* + *.o32 *.o32,* *.s --- !copysrc DELETED --- --- !Clean,fd7 DELETED --- --- NEW FILE: GNUmakefile --- # OSLib/Source/Core/oslib/GNUmakefile TV 20040119 # # SOURCEDIR = ../.. TARGET = Core include Modules include ${SOURCEDIR}/GNUmakefile.source #------------------------------------------------------------------------ #.PHONY: ${OSLIB32} ${OSLIB} REPLACE = \ l/OSHeap/0x00010.001.o \ l/OSHeap/0x00010x.001.o \ l/OS/0x00020.000.o \ l/OS/0x00020x.000.o \ l/OS/0x00020.001.o \ l/OS/0x00020x.001.o #------------------------------------------------------------------------ ${OSLIB}: ${LIBS} ${HDRS} ${OBJS} -${LIBFILE} -d ${OSLIB} ${REPLACE} ${LIBFILE} -i ${OSLIB} ${OBJS} ${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} -${LIBFILE} -d ${OSLIB32} ${REPLACE} ${LIBFILE} -i ${OSLIB32} ${OBJS32} #------------------------------------------------------------------------ #------------------------------------------------------------------------ --- NEW FILE: Modules --- #Source/Core/oslib/Modules # # modules containing SWIs SWIMODULES += \ BlendTable \ Buffer \ Cache \ ColourMap \ ColourTrans \ Debugger \ DMA \ FPEmulator \ HAL \ IIC \ InverseTable \ MessageTrans \ OS \ OSByte \ OSHeap \ OSModule \ OSReadSysInfo \ OSSpriteOp \ OSWord \ PCI \ Podule \ Portable \ ScreenBlanker \ ScreenModes \ ServiceInternational \ SharedCLibrary \ Sound \ Squash \ Territory # modules with no SWIs MODULES += \ Shell # modules defined other than by SWI definition CMODULES += \ OSChangeDynamicAreaNoFail \ OSHeapResizeNoFail \ OSReadVarValSize \ XOSChangeDynamicAreaNoFail \ XOSHeapResizeNoFail \ XOSReadVarValSize Index: OSReadVarValSize.asm =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/OSReadVarValSize.asm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OSReadVarValSize.asm 28 Mar 2004 10:34:00 -0000 1.6 --- OSReadVarValSize.asm 3 May 2004 15:03:27 -0000 1.7 *************** *** 1,91 **** ! ;os_read_var_val_size - return length of a variable ! ; Initial Release 23-Mar-99 Tony van der Hoff ! ! ;OSLib---efficient, type-safe, transparent, extensible, ! ; register-safe A P I coverage of RISC O S ! ; ! ; OSLib is free software; you can redistribute it and/or modify ! ;it under the terms of the GNU General Public Licence as published by ! ;the Free Software Foundation; either version 1, or (at your option) ! ;any later version. ! ; ! ; OSLib is distributed in the hope that it will be useful, ! ;but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ;GNU General Public License for more details. ! ; ! ; You should have received a copy of the GNU General Public Licence ! ;along with this programme; if not, write to the Free Software ! ;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. ! ! ; This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error ! ; when R2 bit 31 is set to read the variable length. The object code is patched into the ! ; library at build time by the MakeFile ! ! GET oslib/Types.Hdr ! ! EXPORT os_read_var_val_size ! ! AREA |SWI$$Code|, CODE, READONLY, PIC ! ! ; os_Read_var_val_size ! ; APCS Compliant ! ;Entry R0 (a1) -> name of a variable (may be wildcarded) ! ; R1 (a2) -> context pointer for wildcarded names ! ; R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) ! ; R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found ! ; R4 (v1) -> integer to contain variable type ! ;Exit R = updated context pointer ! ; ! ; C Prototype: ! ;extern int os_read_var_val_size ( ! ; char const *var, ! ; int context, ! ; os_var_type var_type, ! ; int *used, ! ; os_var_type *var_type_out); ! ! ; C prototype: int xos_read_var_val_size( char const *name, ! ; int *context, ! ; os_var_type var_type ! ; ); ! ; ! ; ! ! os_read_var_val_size ROUT ! STMFD SP!, {A4, V1} ! MOV R4, A3 ; variable type ! MOV R3, A2 ; context in ! MOV R2, #&80000000 ; check variable ! MOV R1, #0 ; unused ! SWI &20023 ; XOS_ReadVarVal ! BVC %90 ; no error ! ! ;Ignore error if RO 3 or later ! STMFD SP!, {R0, R2} ; keep results ! MOV R0, #129 ; Get OS version ! MOV R1, #0 ! MOV R2, #&FF ! SWI &6 ; OS_Byte ! LDMFD SP!, {R0, R2} ; restore state ! CMP R1, #&A3 ; test for RISC O S 3 ! SWILO &2B ; RO2 - call OS_GenerateError ! ! 90 LDR IP, [SP, #0] ; Result pointer ! TEQ IP, #0 ! STRNE R2, [IP] ; update result ! LDR IP, [SP, #8] ; var-type out pointer ! TEQ IP, #0 ! STRNE R4, [IP] ; update var type ! MOV R, R3 ; new context ! ! 99 ADD SP, SP, #4 ; flatten stack ! LDMFD SP!, {V1} ; restore state ! ! [ {CONFIG} = 32 ! MOV PC, LR ! | ! MOVS PC, LR ; exit ! ] ! ! END --- 1,91 ---- ! ;os_read_var_val_size - return length of a variable ! ; Initial Release 23-Mar-99 Tony van der Hoff ! ! ;OSLib---efficient, type-safe, transparent, extensible, ! ; register-safe A P I coverage of RISC O S ! ; ! ; OSLib is free software; you can redistribute it and/or modify ! ;it under the terms of the GNU General Public Licence as published by ! ;the Free Software Foundation; either version 1, or (at your option) ! ;any later version. ! ; ! ; OSLib is distributed in the hope that it will be useful, ! ;but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ;GNU General Public License for more details. ! ; ! ; You should have received a copy of the GNU General Public Licence ! ;along with this programme; if not, write to the Free Software ! ;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. ! ! ; This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error ! ; when R2 bit 31 is set to read the variable length. The object code is patched into the ! ; library at build time by the MakeFile ! ! GET oslib/Types.Hdr ! ! EXPORT os_read_var_val_size ! ! AREA |SWI$$Code|, CODE, READONLY, PIC ! ! ; os_Read_var_val_size ! ; APCS Compliant ! ;Entry R0 (a1) -> name of a variable (may be wildcarded) ! ; R1 (a2) -> context pointer for wildcarded names ! ; R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) ! ; R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found ! ; R4 (v1) -> integer to contain variable type ! ;Exit R = updated context pointer ! ; ! ; C Prototype: ! ;extern int os_read_var_val_size ( ! ; char const *var, ! ; int context, ! ; os_var_type var_type, ! ; int *used, ! ; os_var_type *var_type_out); ! ! ; C prototype: int xos_read_var_val_size( char const *name, ! ; int *context, ! ; os_var_type var_type ! ; ); ! ; ! ; ! ! os_read_var_val_size ROUT ! STMFD SP!, {A4, V1} ! MOV R4, A3 ; variable type ! MOV R3, A2 ; context in ! MOV R2, #&80000000 ; check variable ! MOV R1, #0 ; unused ! SWI &20023 ; XOS_ReadVarVal ! BVC %90 ; no error ! ! ;Ignore error if RO 3 or later ! STMFD SP!, {R0, R2} ; keep results ! MOV R0, #129 ; Get OS version ! MOV R1, #0 ! MOV R2, #&FF ! SWI &6 ; OS_Byte ! LDMFD SP!, {R0, R2} ; restore state ! CMP R1, #&A3 ; test for RISC O S 3 ! SWILO &2B ; RO2 - call OS_GenerateError ! ! 90 LDR IP, [SP, #0] ; Result pointer ! TEQ IP, #0 ! STRNE R2, [IP] ; update result ! LDR IP, [SP, #8] ; var-type out pointer ! TEQ IP, #0 ! STRNE R4, [IP] ; update var type ! MOV R, R3 ; new context ! ! 99 ADD SP, SP, #4 ; flatten stack ! LDMFD SP!, {V1} ; restore state ! ! [ {CONFIG} = 32 ! MOV PC, LR ! | ! MOVS PC, LR ; exit ! ] ! ! END Index: OSChangeDynamicAreaNoFail.asm =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OSChangeDynamicAreaNoFail.asm 28 Mar 2004 10:34:00 -0000 1.4 --- OSChangeDynamicAreaNoFail.asm 3 May 2004 15:03:27 -0000 1.5 *************** *** 2,6 **** ; os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if ; the change was only partially performed ! ; Initial Release 08-Nov-01 Tony van der Hoff ; Bug fix 21-Dec-01 TV --- 2,6 ---- ; os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if ; the change was only partially performed ! ; Initial Release 08-Nov-01 Tony van der Hoff ; Bug fix 21-Dec-01 TV --- NEW FILE: Make,fd7 --- | OSLib.Source.Core.oslib.!Make TV 20031228 | SetEval Make$Dir Obey$Dir SetEval OSLib$Slot 2*1024 Do WIMPSlot -min <OSLib$Slot>K Do WIMPSlot -max <OSLib$Slot>K AMU -D -f <Make$Dir>.Makefile -desktop %0 --- NEW FILE: AMUmakefile --- # OSLib.Source.Core.oslib.Makefile TV 20031228 # include ${MAKEFILEDIR}.Modules #include the global definitions afther the local ones # to allow the latter to be recognised include <OSLib$SourceDir>.AMUmakefile/inc # local targets .PHONY: core libs libs32 core: all @echo libs: ${OSLIB} @echo libs32: ${OSLIB32} @echo REPLACE = \ l.OSHeap.0x00010.o.001 \ l.OSHeap.0x00010x.o.001 \ l.OS.0x00020.o.000 \ l.OS.0x00020x.o.000 \ l.OS.0x00020.o.001 \ l.OS.0x00020x.o.001 ${OSLIB}: ${OBJS} ${LIBS} ${HDRS} -${LIBFILE} -d ${OSLIB} ${REPLACE} ${LIBFILE} -i -o ${OSLIB} ${OBJS} ${OSLIB32}: ${OBJS32} ${LIBS32} ${HDRS} -${LIBFILE} -d ${OSLIB32} ${REPLACE} ${LIBFILE} -i -o ${OSLIB32} ${OBJS32} --- !Make,fd7 DELETED --- --- Makefile,fe1 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/DefMod2/defmod/sources Modified Files: cheader.c cstrong.c defmod.y hdr.c objasm.c Log Message: merged Unix-Build back into trunk (20040503-1) Index: defmod.y =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/defmod.y,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** defmod.y 14 Jan 2004 12:29:55 -0000 1.3 --- defmod.y 3 May 2004 15:03:33 -0000 1.4 *************** *** 32,38 **** --- 32,40 ---- /*From CLib*/ #include <ctype.h> + #include <errno.h> #include <stddef.h> #include <stdlib.h> #include <string.h> + #include <kernel.h> #include <swis.h> *************** *** 179,184 **** { os_error *error; if ((error = lookup_insert (needses, $1, NULL)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 181,189 ---- { os_error *error; + tracef( "needs: Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (needses, $1, NULL)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 190,195 **** { os_error *error; if ((error = lookup_insert (needsatends, $1, NULL)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 195,203 ---- { os_error *error; + tracef( "needsatend: Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (needsatends, $1, NULL)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 201,204 **** --- 209,213 ---- ID EQUALS type COLON const DESCRIPTION_OPTION { os_error *error; + tracef( "const_defn\n"); def_c c = qalloc (sizeof *c); def_t t = qalloc (def_sizeof_TYPE ($3.tag)); *************** *** 209,214 **** c->description = EMPTY ($6)? NULL: qstrdup ($6); if ((error = lookup_insert (consts, $1, c)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 218,226 ---- c->description = EMPTY ($6)? NULL: qstrdup ($6); + tracef( "Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (consts, $1, c)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 221,226 **** def_c c; if ((error = lookup (consts, $1, (void **) &c)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 233,241 ---- def_c c; + tracef( "const: looking up: \"%s\"\n" _ $1 ); if ((error = lookup (consts, $1, (void **) &c)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 242,245 **** --- 257,261 ---- ID DESCRIPTION_OPTION { os_error *error; + tracef( "type_defn\n" ); def_t t = qalloc (def_sizeof_TYPE (def_TYPE_ABSTRACT)); *************** *** 249,254 **** t->description = EMPTY ($2)? NULL: qstrdup ($2); if ((error = lookup_insert (types, $1, t)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 265,273 ---- t->description = EMPTY ($2)? NULL: qstrdup ($2); + tracef( "Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (types, $1, t)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 256,259 **** --- 275,279 ---- ID EQUALS type DESCRIPTION_OPTION { os_error *error; + tracef( "type_defn\n" ); def_t t = qalloc (def_sizeof_TYPE ($3.tag)); *************** *** 261,266 **** t->description = EMPTY ($4)? NULL: qstrdup ($4); if ((error = lookup_insert (types, $1, t)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 281,289 ---- t->description = EMPTY ($4)? NULL: qstrdup ($4); + tracef( "Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (types, $1, t)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 274,280 **** def_t t; if ((error = lookup (types, $2, (void **) &t)) != NULL && error->errnum != os_GLOBAL_NO_ANY) ! { yyerror (error->errmess); YYERROR; } --- 297,306 ---- def_t t; + tracef( "base_type: looking up: \"%s\"\n" _ $2 ); if ((error = lookup (types, $2, (void **) &t)) != NULL && error->errnum != os_GLOBAL_NO_ANY) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 318,322 **** $$.value = def_VALUE_REGISTER; $$.description = NULL;} | REF type ! { def_t t = qalloc (def_sizeof_TYPE ($2.tag)); memcpy (t, &$2, def_sizeof_TYPE ($2.tag)); --- 344,350 ---- $$.value = def_VALUE_REGISTER; $$.description = NULL;} | REF type ! { ! tracef( "type\n" ); ! def_t t = qalloc (def_sizeof_TYPE ($2.tag)); memcpy (t, &$2, def_sizeof_TYPE ($2.tag)); *************** *** 345,349 **** $$.description = NULL; if ($2.tag != def_TYPE_VOID) ! { $$.data AS list.base = qalloc (def_sizeof_TYPE ($2.tag)); memcpy ($$.data AS list.base, &$2, def_sizeof_TYPE ($2.tag)); } --- 373,379 ---- $$.description = NULL; if ($2.tag != def_TYPE_VOID) ! { ! tracef( "type\n" ); ! $$.data AS list.base = qalloc (def_sizeof_TYPE ($2.tag)); memcpy ($$.data AS list.base, &$2, def_sizeof_TYPE ($2.tag)); } *************** *** 358,362 **** } | SUB const BUS type ! { def_t t = qalloc (def_sizeof_TYPE ($4.tag)); if ($4.value == def_VALUE_VARIABLE) --- 388,394 ---- } | SUB const BUS type ! { ! tracef( "type\n" ); ! def_t t = qalloc (def_sizeof_TYPE ($4.tag)); if ($4.value == def_VALUE_VARIABLE) *************** *** 379,385 **** def_t t; if ((error = lookup (types, $1, (void **) &t)) != NULL && error->errnum != os_GLOBAL_NO_ANY) ! { yyerror (error->errmess); YYERROR; } --- 411,420 ---- def_t t; + tracef( "type: looking up ID: \"%s\"\n" _ $1 ); if ((error = lookup (types, $1, (void **) &t)) != NULL && error->errnum != os_GLOBAL_NO_ANY) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 390,393 **** --- 425,429 ---- { /*have to make an optimistic assumption*/ $$.value = def_VALUE_REGISTER; + tracef( "type \"%s\" undefined\n" _ $1 ); if (Verbose && !Quiet) fprintf (stderr, "warning: type \"%s\" undefined at line " *************** *** 398,401 **** --- 434,439 ---- $$.description = NULL; strcpy ($$.data AS id, $1); + + tracef( "type: ID done\n" ); }; *************** *** 404,408 **** typed_var: type COLON ID DESCRIPTION_OPTION ! { $$ = $1; $$.name = qstrdup ($3); $$.description = EMPTY ($4)? NULL: qstrdup ($4); --- 442,448 ---- typed_var: type COLON ID DESCRIPTION_OPTION ! { ! tracef( "type\n" ); ! $$ = $1; $$.name = qstrdup ($3); $$.description = EMPTY ($4)? NULL: qstrdup ($4); *************** *** 410,414 **** toided_var: toid COLON ID DESCRIPTION_OPTION ! { $$ = $1; $$.name = qstrdup ($3); $$.description = EMPTY ($4)? NULL: qstrdup ($4); --- 450,456 ---- toided_var: toid COLON ID DESCRIPTION_OPTION ! { ! tracef( "type\n" ); ! $$ = $1; $$.name = qstrdup ($3); $$.description = EMPTY ($4)? NULL: qstrdup ($4); *************** *** 420,429 **** ID EQUALS swi { os_error *error; def_s s = qalloc (sizeof *s); *s = $3; if ((error = lookup_insert (swis, $1, s)) != NULL) ! { yyerror (error->errmess); YYERROR; } --- 462,475 ---- ID EQUALS swi { os_error *error; + tracef( "type\n" ); def_s s = qalloc (sizeof *s); *s = $3; + tracef( "Inserting \"%s\"\n" _ $1 ); if ((error = lookup_insert (swis, $1, s)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! yyerror (error->errmess); YYERROR; } *************** *** 447,452 **** entry_condition: REG CONTAINS typed_var ! { if ($3.value != def_VALUE_REGISTER) ! { yyerror ("type cannot occur in a register"); YYERROR; } --- 493,502 ---- entry_condition: REG CONTAINS typed_var ! { ! tracef( "entry_condition\n" ); ! if ($3.value != def_VALUE_REGISTER) ! { ! tracef( "Error: type cannot occur in a register\n" ); ! yyerror ("type cannot occur in a register"); YYERROR; } *************** *** 454,461 **** $$.i |= 1 << $1; $$.inputs [$1] = qalloc (def_sizeof_TYPE ($3.tag)); memcpy ($$.inputs [$1], &$3, def_sizeof_TYPE ($3.tag)); } | REG REFERENCES typed_var ! { $$ = Empty; $$.i |= 1 << $1; $$.ri |= 1 << $1; --- 504,515 ---- $$.i |= 1 << $1; $$.inputs [$1] = qalloc (def_sizeof_TYPE ($3.tag)); + tracef( "memcpy to 0x%x\n" _ $$.inputs [$1] ); memcpy ($$.inputs [$1], &$3, def_sizeof_TYPE ($3.tag)); + tracef( "done\n" ); } | REG REFERENCES typed_var ! { ! tracef( "entry_condition\n" ); ! $$ = Empty; $$.i |= 1 << $1; $$.ri |= 1 << $1; *************** *** 463,467 **** memcpy ($$.inputs [$1], &$3, def_sizeof_TYPE ($3.tag)); } | - /* REG CONSTANT NUM description_OPTION */ /* TV 990418 */ REG CONSTANT const description_OPTION { $$ = $4; --- 517,520 ---- *************** *** 473,477 **** } | REG DISJOINS typed_var ! { if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; --- 526,532 ---- } | REG DISJOINS typed_var ! { ! tracef( "entry_condition\n" ); ! if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; *************** *** 488,492 **** } | REG ADDS typed_var ! { if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; --- 543,549 ---- } | REG ADDS typed_var ! { ! tracef( "entry_condition\n" ); ! if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; *************** *** 499,503 **** } | REG EXCLUSIVELY_DISJOINS typed_var ! { if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; --- 556,562 ---- } | REG EXCLUSIVELY_DISJOINS typed_var ! { ! tracef( "entry_condition\n" ); ! if ($3.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; *************** *** 516,520 **** exit_condition: REG pling_OPTION CONTAINS typed_var ! { if ($4.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; --- 575,581 ---- exit_condition: REG pling_OPTION CONTAINS typed_var ! { ! tracef( "exit_condition\n" ); ! if ($4.value != def_VALUE_REGISTER) { yyerror ("type cannot occur in a register"); YYERROR; *************** *** 527,531 **** } | REG pling_OPTION REFERENCES typed_var ! { $$ = Empty; if ($2) $$.value = 1 << $1; $$.o |= 1 << $1; --- 588,594 ---- } | REG pling_OPTION REFERENCES typed_var ! { ! tracef( "exit_condition\n" ); ! $$ = Empty; if ($2) $$.value = 1 << $1; $$.o |= 1 << $1; *************** *** 568,573 **** TITLE: t i t l e ws {tracef ("TITLE\n");}; AUTHOR: a u t h o r ws {tracef ("AUTHOR\n");}; - /* TV 20021116 fix the 16 shift/reduce errors - NEEDS: n e e d s ws {tracef ("NEEDS\n");};*/ NEEDS: n e e d s ws_item_SEQUENCE {tracef ("NEEDS\n");}; NEEDSATEND: n e e d s a t e n d ws {tracef ("NEEDSATEND\n");}; --- 631,634 ---- *************** *** 961,971 **** /* perform a malloc with error checking */ void *qalloc (size_t t) ! { void *p; ! if ((p = malloc (t)) == NULL) ! { yyerror ("not enough memory for |qalloc()|"); exit (1); } return p; } --- 1022,1036 ---- /* perform a malloc with error checking */ void *qalloc (size_t t) ! { void *p = 0; ! //tracef( "qalloc(0x%x)\n" _ t ); ! p = malloc (t); ! if (!p) ! { ! yyerror ("not enough memory for |qalloc()|"); exit (1); } + //tracef( "qalloc returns 0x%x\n" _ p ); return p; } *************** *** 1031,1034 **** --- 1096,1112 ---- trace_initialise ("Trace$To"); + #if TRACE + { + int ii; + tracef( "Main:" ); + for ( ii = 0; ii<argc; ++ii ) + { + os_writec( ' ' ); + os_write0( argv[ii] ); + } + os_new_line(); + } + #endif + if ( (error = lookup_new (&needses, 16)) != NULL || (error = lookup_new (&needsatends, 16)) != NULL || *************** *** 1038,1042 **** (error = lookup_new (&main_byte_wide, 16)) != NULL ) ! goto finish; yydebug = 0; --- 1116,1123 ---- (error = lookup_new (&main_byte_wide, 16)) != NULL ) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! goto finish; ! } yydebug = 0; *************** *** 1108,1116 **** "\t-s\t\t" "ObjAsm source file\r"; ! if ((error = xos_pretty_print (helptext, NULL, NULL)) != NULL) ! goto finish; } else if (strcmp (argv [i], "-byte_wide") == 0) ! { /*Add the contents of the given file to the byte wide table.*/ char buffer [256], *cc; #ifdef EXECUTE_ON_UNIX --- 1189,1198 ---- "\t-s\t\t" "ObjAsm source file\r"; ! if ((error = xos_pretty_print (helptext, NULL, NULL)) != NULL) ! goto finish; } else if (strcmp (argv [i], "-byte_wide") == 0) ! { ! /*Add the contents of the given file to the byte wide table.*/ char buffer [256], *cc; #ifdef EXECUTE_ON_UNIX *************** *** 1119,1122 **** --- 1201,1205 ---- bits psr; int f; + bits psr; #endif enum {Copying, Skipping} state = Skipping; *************** *** 1124,1127 **** --- 1207,1212 ---- i++; + // tracef( "Main opening file: %s\n" _ argv[i] ); + #ifdef EXECUTE_ON_UNIX if ((f = fopen(argv[i],"r")) == NULL) { *************** *** 1142,1146 **** #ifdef EXECUTE_ON_UNIX *cc = c = getc(f); ! if (ferror(f)) { error = (os_error *)_kernel_last_oserror(); goto finish; --- 1227,1233 ---- #ifdef EXECUTE_ON_UNIX *cc = c = getc(f); ! if (ferror(f)) ! { ! // tracef( "Error reading character from input stream: %d\n" _ errno ); error = (os_error *)_kernel_last_oserror(); goto finish; *************** *** 1156,1159 **** --- 1243,1248 ---- #endif + // tracef( "State = %d\n" _ state ); + switch (state) { case Skipping: *************** *** 1169,1177 **** else { *cc = '\0'; ! if ((error = lookup_insert (main_byte_wide, buffer, (void *) 1)) != NULL) ! goto finish; ! cc = buffer; state = Skipping; --- 1258,1269 ---- else { *cc = '\0'; ! tracef( "Inserting \"%s\"\n" _ buffer ); if ((error = lookup_insert (main_byte_wide, buffer, (void *) 1)) != NULL) ! { ! tracef( "Error %s\n" _ error -> errmess ); ! goto finish; ! } ! tracef( "Done: \"%s\"\n" _ buffer ); cc = buffer; state = Skipping; *************** *** 1204,1216 **** if (option == None) ! { Parse_Error = TRUE; goto finish; } yyparse (); ! if (Parse_Error) goto finish; switch (option) { case Objasm: if ((error = objasm_output (stdout, Title, Author, needses, needsatends, consts, types, swis, /*separate?*/ FALSE, --- 1296,1316 ---- if (option == None) ! { ! tracef( "Parse error: No option\n" ); ! Parse_Error = TRUE; goto finish; } + tracef( "yyparse\n" ); yyparse (); ! if (Parse_Error) ! { ! tracef( "yyparse error\n" ); ! goto finish; ! } switch (option) { case Objasm: + tracef( "Objasm\n" ); if ((error = objasm_output (stdout, Title, Author, needses, needsatends, consts, types, swis, /*separate?*/ FALSE, *************** *** 1220,1223 **** --- 1320,1324 ---- case C_Header: + tracef( "C_Header\n" ); if ((error = cheader_output (stdout, Title, Author, needses, needsatends, consts, types, swis, /*C++?*/ FALSE)) != NULL) *************** *** 1226,1229 **** --- 1327,1331 ---- case C_Plus_Plus_Header: + tracef( "C_Plus_Plus_Header\n" ); if ((error = cheader_output (stdout, Title, Author, needses, needsatends, consts, types, swis, /*C++?*/ TRUE)) != NULL) *************** *** 1232,1235 **** --- 1334,1338 ---- case C_Help: + tracef( "C_Help\n" ); if ((error = chelp_output (stdout, Title, Author, needses, needsatends, consts, types, swis)) != NULL) *************** *** 1238,1241 **** --- 1341,1345 ---- case Asm_Help: + tracef( "Asm_Help\n" ); if ((error = asmhelp_output (stdout, Title, Author, needses, needsatends, consts, types, swis)) != NULL) *************** *** 1244,1247 **** --- 1348,1352 ---- case Library: + tracef( "Library\n" ); if (output != NULL) if ((error = objasm_output (SKIP, Title, Author, needses, *************** *** 1253,1256 **** --- 1358,1362 ---- case Hdr: + tracef( "Hdr\n" ); if ((error = hdr_output (stdout, Title, Author, needses, needsatends, consts, types, swis)) != NULL) *************** *** 1259,1262 **** --- 1365,1369 ---- case C_Strong: + tracef( "C_Strong\n" ); if (output != NULL) if ((error = cstrong_output (output, Title, Author, needses, *************** *** 1266,1270 **** default: ! break; } --- 1373,1378 ---- default: ! tracef( "default\n" ); ! break; } *************** *** 1287,1292 **** */ int yylex (void) ! { int c; return (c = getchar ()) == EOF? --- 1395,1402 ---- */ int yylex (void) ! { ! int c; + #if 0 return (c = getchar ()) == EOF? *************** *** 1308,1311 **** --- 1418,1448 ---- c ); + #else + c = getchar (); + if ( c == EOF ) c = 0; + + if ( Verbose /* && (c != 0) */ ) + { + if ( ' ' <= c && c <= '~' ) + fputc( c, stderr ); + else if ( c == '\n' ) + { + fputc ('\n', stderr); + fputc ('\r', stderr); + } + else + { + fputc ('\\', stderr); + fputc ('x', stderr); + fputc (UCHAR (c/0x10), stderr); + fputc (UCHAR (c%0x10), stderr); + } + } + + if ( c == 0 ) + tracef( "\nyylex: End of file\n" ); + + return c; + #endif } Index: objasm.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/objasm.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** objasm.c 14 Jan 2004 12:29:55 -0000 1.2 --- objasm.c 3 May 2004 15:03:33 -0000 1.3 *************** *** 21,24 **** --- 21,45 ---- */ + #undef ASSEMBLER + + #define OBJASM 1 + #define GCC 2 + #define ARMASM 3 + + #if (defined USE_OBJASM) && !(defined USE_GCC) && !(defined USE_ARMASM) + #define ASSEMBLER OBJASM + #elif !(defined USE_OBJASM) && (defined USE_GCC) && !(defined USE_ARMASM) + #define ASSEMBLER GCC + #elif !(defined USE_OBJASM) && !(defined USE_GCC) && (defined USE_ARMASM) + #define ASSEMBLER ARMASM + #endif + + #ifndef ASSEMBLER + #error Target Assembler Undefined + #endif + + #undef TRACE + #define TRACE 0 + /*From CLib*/ #include <ctype.h> *************** *** 45,56 **** #define MEM_FOR_OBJASM (1024*1024) - #if 0 - #ifdef EXECUTE_ON_UNIX - # define ASMCMD "armasm" - #else - # define ASMCMD "ObjAsm" - #endif - #endif - static char *Local; --- 66,69 ---- *************** *** 672,676 **** { if (!nonx) ! if ((rc = Emit1 (file, "BVS", "%99")) < 0) goto finish; --- 685,689 ---- { if (!nonx) ! if ((rc = Emit1 (file, "BVS", "%a99")) < 0) goto finish; *************** *** 1008,1012 **** #endif ! #ifndef EXECUTE_ON_UNIX if ((via_file = fopen ("ViaFile", "w+")) == NULL) { --- 1021,1025 ---- #endif ! //#ifndef EXECUTE_ON_UNIX if ((via_file = fopen ("ViaFile", "w+")) == NULL) { *************** *** 1015,1019 **** } done_fopen_via_file = TRUE; ! #endif context = 0; --- 1028,1032 ---- } done_fopen_via_file = TRUE; ! //#endif context = 0; *************** *** 1113,1129 **** done_fopen_object = FALSE; ! #if 0 ! if ((rc = sprintf (cmd, "ObjAsm -from %s.%s -to %s.%s " ! "-stamp -quit -apcs 3/%dbit/SWstackcheck", prefix_dir, ! name1, prefix_dir, name2, apcs32 ? 32 : 26)) ! < 0) ! goto finish; ! #elif 0 ! if ((rc = sprintf (cmd, ASMCMD " -from %s -to %s " ! "-stamp -quit -apcs 3/%dbit/SWstackcheck", name1, name2, apcs32 ? 32 : 26)) < 0) goto finish; ! #else ! if ((rc = sprintf (cmd, STR(ASMCMD) " -from %s -to %s " "-apcs 3/%dbit/SWstackcheck", name1, name2, apcs32 ? 32 : 26)) < 0) --- 1126,1144 ---- done_fopen_object = FALSE; ! #if ASSEMBLER == GCC ! if ((rc = sprintf( cmd, ! "gcc -c -xassembler -Wa,-objasm%s -o %s %s", ! apcs32 ? ",-apcs32,-target,SA110" : ",-apcs26", ! name2, name1)) < 0) ! goto finish; ! ! #elif ASSEMBLER == OBJASM ! if ((rc = sprintf (cmd, "ObjAsm -from %s -to %s " ! "-apcs 3/%dbit/SWstackcheck", name1, name2, apcs32 ? 32 : 26)) < 0) goto finish; ! ! #elif ASSEMBLER == ARMASM ! if ((rc = sprintf (cmd, "armasm -from %s -to %s " "-apcs 3/%dbit/SWstackcheck", name1, name2, apcs32 ? 32 : 26)) < 0) *************** *** 1133,1137 **** tracef ("%s ...\n" _ cmd); if (!Quiet) ! if ((rc = printf ("Assembling %s\n", name1)) < 0) goto finish; --- 1148,1152 ---- tracef ("%s ...\n" _ cmd); if (!Quiet) ! if ((rc = printf ("%s\n", cmd)) < 0) goto finish; Index: hdr.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/hdr.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** hdr.c 14 Jan 2004 12:29:55 -0000 1.4 --- hdr.c 3 May 2004 15:03:33 -0000 1.5 *************** *** 21,24 **** --- 21,27 ---- Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. */ + #ifndef TRACE + #define TRACE 0 + #endif #include <ctype.h> *************** *** 33,36 **** --- 36,40 ---- #include "lookup.h" + #include "trace.h" #include "def.h" *************** *** 157,160 **** --- 161,198 ---- } + /* Prints a declaration of |v| as an object of type |t|. + called by Emit_Decl + */ + static int Emit_Decl1 + ( + FILE *file, // output file + char *type, // object type + char *v, // object name + osbool top_level, // if true then equate, else assign storage + char *cs // number of elements in array + ) + { + int rc = 0; + + tracef( "Emit_Decl1: %s; %s; %s\n" _ v _ type _ top_level?"TRUE":"FALSE" ); + + if ( top_level ) + { + if ((rc = EmitD (file, "", "^", 0)) < 0) + goto finish; + if ((rc = EmitSS (file, "", "#", cs, type)) < 0) + goto finish; + if ((rc = EmitS (file, v, "*", "@")) < 0) + goto finish; + } + else + { + if ((rc = EmitSS (file, v, "#", cs, type)) < 0) + goto finish; + } + + finish: + return rc; + } /* Prints a declaration of |v| as an object of type |t|.*/ *************** *** 180,224 **** { case def_TYPE_INT: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Int")) < 0) goto finish; break; case def_TYPE_SHORT: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Short")) < 0) goto finish; break; case def_TYPE_BYTE: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Byte")) < 0) goto finish; break; case def_TYPE_CHAR: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Char")) < 0) goto finish; break; case def_TYPE_BITS: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bits")) < 0) goto finish; break; case def_TYPE_BYTES: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bytes")) < 0) goto finish; break; case def_TYPE_BOOL: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bool")) < 0) goto finish; break; case def_TYPE_REF: ! if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Ptr")) < 0) goto finish; break; ! case def_TYPE_STRING: case def_TYPE_ASM: case def_TYPE_DATA: case ! def_TYPE_VOID: if ((rc = EmitS (file, v, top_level? "*": "#", "Skip")) < 0) goto finish; --- 218,272 ---- { case def_TYPE_INT: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Int")) < 0) ! if (( rc = Emit_Decl1 ( file, "Int", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_SHORT: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Short")) < 0) ! if (( rc = Emit_Decl1 ( file, "Short", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_BYTE: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Byte")) < 0) ! if (( rc = Emit_Decl1 ( file, "Byte", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_CHAR: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Char")) < 0) ! if (( rc = Emit_Decl1 ( file, "Char", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_BITS: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bits")) < 0) ! if (( rc = Emit_Decl1 ( file, "Bits", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_BYTES: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bytes")) < 0) ! if (( rc = Emit_Decl1 ( file, "Bytes", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_BOOL: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Bool")) < 0) ! if (( rc = Emit_Decl1 ( file, "Bool", v, top_level, cs )) < 0 ) goto finish; break; case def_TYPE_REF: ! // if ((rc = EmitSS (file, v, top_level? "*": "#", cs, "Ptr")) < 0) ! if (( rc = Emit_Decl1 ( file, "Ptr", v, top_level, cs )) < 0 ) goto finish; break; ! case def_TYPE_STRING: ! case def_TYPE_ASM: ! case def_TYPE_DATA: ! case def_TYPE_VOID: if ((rc = EmitS (file, v, top_level? "*": "#", "Skip")) < 0) goto finish; *************** *** 250,253 **** --- 298,303 ---- goto finish; + tracef( "Emit_Decl: %s\n" _ v1 ); + if ((rc = Emit_Decl (file, t->data AS list.members [i], v1, FALSE, 0)) < 0) *************** *** 300,303 **** --- 350,354 ---- // recurse to declare each list member + tracef( "Emit_Decl: %s\n" _ v1 ); if ((rc = Emit_Decl (file, t->data AS list.members [i], v1, FALSE, 0)) < 0) goto finish; *************** *** 367,370 **** --- 418,422 ---- goto finish; + tracef( "Emit_Decl: %s\n" _ v1 ); if ((rc = Emit_Decl (file, t->data AS list.members [i], v1, FALSE, 0)) < 0) *************** *** 379,384 **** case def_TYPE_ROW: ! if ((rc = Emit_Decl (file, t->data AS row.base, v, ! FALSE, (count == 0? 1: count)*t->data AS row.count)) < 0) goto finish; break; --- 431,444 ---- case def_TYPE_ROW: ! tracef( "Emit_Decl: %s\n" _ v ); ! #if 0 ! if ((rc = Emit_Decl (file, t->data AS row.base, v, FALSE, ! (count == 0? 1: count)*t->data AS row.count ! )) < 0) ! #else ! if ((rc = Emit_Decl (file, t->data AS row.base, v, top_level, ! (count == 0? 1: count)*t->data AS row.count ! )) < 0) ! #endif goto finish; break; *************** *** 540,544 **** #ifdef EXECUTE_ON_UNIX ! if ((rc = sprintf (s, "\"GET oslib/Hdr/%s\"", name)) < 0) #else if ((rc = sprintf (s, "\"GET oslib.Hdr.%s\"", name)) < 0) --- 600,604 ---- #ifdef EXECUTE_ON_UNIX ! if ((rc = sprintf (s, "\"GET oslib/%s.Hdr\"", name)) < 0) #else if ((rc = sprintf (s, "\"GET oslib.Hdr.%s\"", name)) < 0) *************** *** 665,669 **** --- 725,733 ---- else { + #if 0 if ((rc = sprintf (v1, ":CHR: &%.2X", c->value)) < 0) + #else + if ((rc = sprintf (v1, "&%.2X", c->value)) < 0) + #endif goto finish; } *************** *** 718,721 **** --- 782,786 ---- { /* emit declaration of |type| for non-abstract type |t| */ + tracef( "Emit_Decl: %s\n" _ type ); if ((rc = Emit_Decl (file, t, type, TRUE, 0)) < 0) goto finish; Index: cheader.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/cheader.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cheader.c 14 Jan 2004 12:29:55 -0000 1.2 --- cheader.c 3 May 2004 15:03:33 -0000 1.3 *************** *** 27,33 **** #include <kernel.h> /* TV 980115 */ #include "oslib/types.h" #include "oslib/macros.h" - #include "oslib/os.h" #include "lookup.h" --- 27,33 ---- #include <kernel.h> /* TV 980115 */ + #include "oslib/os.h" #include "oslib/types.h" #include "oslib/macros.h" #include "lookup.h" Index: cstrong.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/sources/cstrong.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cstrong.c 14 Jan 2004 12:29:55 -0000 1.2 --- cstrong.c 3 May 2004 15:03:33 -0000 1.3 *************** *** 134,137 **** --- 134,148 ---- } + /****************************************************************/ + /* convert the string to lower case in situ + */ + static char* ToLower( char *string ) + { + char* p; + for ( p = string; *p != '\0'; ++p ) + *p = tolower( *p ); + + return string; + } /****************************************************************/ *************** *** 146,153 **** --- 157,174 ---- { char prefix[ FILENAME_MAX + 1 ]; + + #if 0 /* FILENAME_MAX is only 80 in C:stdio.h */ char data_name[ FILENAME_MAX + 1 ]; + #else + char data_name[ 256 ]; + #endif + FILE *help_data = NULL; char *suffix; + tracef( "open_file: path \"%s"\; name \"%s\"\n" \ + _ path_name _ name \ + ); + /* extract the module name prefix */ suffix = strchr( name, '_' ); *************** *** 155,172 **** if( suffix ) { ! strncat( prefix, name, suffix-name ); } /* ensure the directory exists */ sprintf( data_name, "%s" DIRSEP "%s" SEP, path_name, prefix ); ! tracef( "open_file - creating %s\n" _ data_name ); osfile_create_dir( data_name, 0 ); /* create the file */ sprintf( data_name, "%s" DIRSEP "%s" SEP DIRSEP "%s", path_name, prefix, ! suffix? suffix + 1 : name ); tracef( "open_file - opening %s\n" _ data_name ); --- 176,200 ---- if( suffix ) { ! strncat( prefix, name, suffix - name ); ! ToLower( prefix ); } /* ensure the directory exists */ sprintf( data_name, "%s" DIRSEP "%s" SEP, path_name, prefix ); ! tracef( "open_file - creating dir %s\n" _ data_name ); osfile_create_dir( data_name, 0 ); /* create the file */ + tracef( "path_name: %s\n" \ + "prefix: %s\n" \ + "suffix: %s\n" \ + "name: %s\n" \ + _ path_name _ prefix _ suffix _ name \ + ); sprintf( data_name, "%s" DIRSEP "%s" SEP DIRSEP "%s", path_name, prefix, ! suffix ? suffix + 1 : name ); tracef( "open_file - opening %s\n" _ data_name ); *************** *** 1644,1648 **** if( error ) ! fprintf( stderr, "DefMod CStrong: %d:", error -> errnum ); return error; --- 1672,1676 ---- if( error ) ! fprintf( stderr, "DefMod CStrong: 0x%8x ", error -> errnum ); return error; |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/ReduceAOF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/ReduceAOF Modified Files: .cvsignore reduceaof.c Added Files: AMUmakefile GNUmakefile Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/ReduceAOF/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 27 Nov 2002 22:11:01 -0000 1.2 --- .cvsignore 3 May 2004 15:03:35 -0000 1.3 *************** *** 1 **** --- 1,3 ---- o + reduceaof + --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Tools/ReduceAOF/Makefile,fe1 20031228 # TARGET = ReduceAOF ALL = ${TARGET} VPATH = @ <OSLib$SupportDir> INCLUDES = C: LIBS = C:o.Stubs MODULES = ${TARGET} .include ${MAKEFILEDIR}.^.AMUmakefile/source #------------------------------------------------------------------------ # Dynamic dependencies: Index: reduceaof.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/ReduceAOF/reduceaof.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** reduceaof.c 7 Mar 2002 16:04:28 -0000 1.1 --- reduceaof.c 3 May 2004 15:03:35 -0000 1.2 *************** *** 7,9 **** #include <stdio.h> #include <string.h> ! typedef struct { unsigned int ChunkFileId; unsigned int maxChunks; unsigned int numChunks; } ChunkFileHdr; typedef struct { unsigned char chunkId[8]; unsigned int fileOffset; unsigned int size; } ChunkEntryHdr; typedef struct { ChunkFileHdr CFH; ChunkEntryHdr *CEH; char **DAT; } ChunkInfoStr; static int bite(ChunkInfoStr *I, FILE *fp) { size_t m = fread(I->CEH, sizeof(*I->CEH), I->CFH.maxChunks, fp); if (m == I->CFH.maxChunks) { int n; for (n=0; n < I->CFH.maxChunks; ++n) { char name[9]; strncpy(name, (const char *) I->CEH[n].chunkId, 8); name[8]='\0'; I->DAT[n] = NULL; if ( I->CEH[n].fileOffset != 0 ) { I->DAT[n] = malloc(I->CEH[n].size); if (I->DAT[n] == NULL) { fprintf(stderr, "malloc() failed\n"); abort(); } fseek(fp, I->CEH[n].fileOffset, SEEK_SET); if (fread((I->DAT[n]), 1, I->CEH[n].size, fp) != I->CEH[n].size) { free(I->DAT[n]); I->DAT[n] = NULL; m--; } } } } return m == I->CFH.maxChunks; } static void strip(ChunkInfoStr *I) { unsigned int n; for (n=0; n < I->CFH.maxChunks; ++n) { char name[9]; strncpy(name, (const char *) I->CEH[n].chunkId, 8); name[8]='\0'; if ( I->DAT[n] != NULL && !strcmp(name, "OBJ_IDFN") ) { free(I->DAT[n]); I->DAT[n] = NULL; } } } static unsigned int brush(ChunkInfoStr *I) { unsigned int n, to = 0; for (n=0; n < I->CFH.maxChunks; ++n) { if (I->DAT[n] != NULL && to != n) { memcpy(&I->CEH[to], &I->CEH[n], sizeof(*I->CEH)); I->DAT[to] = I->DAT[n]; I->DAT[n] = NULL; } if (I->DAT[to] != NULL) to++; else { memcpy( I->CEH[n].chunkId, "SpareNow", 8); I->CEH[n].fileOffset = 0; I->CEH[n].size = 0; } } return to; } static void reorganise(ChunkInfoStr *I, unsigned int got) { unsigned int n, place; I->CFH.maxChunks = I->CFH.numChunks = got; place = sizeof(I->CFH) + sizeof(*I->CEH) * I->CFH.maxChunks; for (n=0; n < I->CFH.numChunks; ++n) { I->CEH[n].fileOffset = place; place += I->CEH[n].size + 3 & ~3; } } static int get_CFH(ChunkInfoStr *I, FILE *fp) { if (fread(&I->CFH, sizeof(I->CFH), 1, fp) != 1) return 0; return I->CFH.ChunkFileId == 0xC3CBC6C5; } static void operate(const char *fname) { FILE *fp; if ((fp = fopen(fname, "rb")) != NULL) { ChunkInfoStr CIS; if (get_CFH(&CIS, fp) != 0 && CIS.CFH.numChunks > 0) { CIS.CEH = malloc(sizeof(*CIS.CEH) * CIS.CFH.maxChunks); CIS.DAT = malloc(sizeof(char*) * CIS.CFH.maxChunks); if (!CIS.CEH || !CIS.DAT) { fprintf(stderr, "malloc() failed\n"); abort(); } if (bite(&CIS, fp) != 0) { int n; fclose(fp); fp = NULL; strip(&CIS); reorganise(&CIS, brush(&CIS)); fp = fopen(fname, "wb"); if (fp) { fwrite(&CIS.CFH, sizeof(CIS.CFH), 1, fp); fwrite(CIS.CEH, sizeof(*CIS.CEH), CIS.CFH.maxChunks, fp); for (n=0; n < CIS.CFH.maxChunks; ++n) { fseek(fp, CIS.CEH[n].fileOffset, SEEK_SET); fwrite((CIS.DAT[n]), sizeof(char), CIS.CEH[n].size, fp); } } else { fprintf(stderr, "Could not write %s\n", fname); exit(EXIT_FAILURE); } for (n=0; n < CIS.CFH.maxChunks; ++n) { free(CIS.DAT[n]); } } else { fprintf(stderr, "Error reading %s\n", fname); exit(EXIT_FAILURE); } free(CIS.CEH); } if (fp) { if (fclose(fp) != 0) { fprintf(stderr, "Error closing %s\n", fname); exit(EXIT_FAILURE); } } else { fprintf(stderr, "Wrong format %s\n", fname); exit(EXIT_FAILURE); } } else { fprintf(stderr, "Could not read %s\n", fname); exit(EXIT_FAILURE); } } static void plenty(const char *n) { FILE *fp; if ((fp = fopen(n, "r")) != NULL) { char s[256]; while (!feof(fp)) { if (fgets(s, sizeof(s), fp) != NULL) { char *t = strchr(s, '\n'); if (t != NULL) *t = '\0'; operate(s); } } fclose(fp); } else { fprintf(stderr, "Error reading %s\n", n); exit(EXIT_FAILURE); } } int main(int argc, char *argv[]) { int n, go = argc > 1; for (n = 1; n < argc; ++n) { if (!strcmp(argv[n], "-?") || !strcmp(argv[n], "-h") || !strcmp(argv[n], "-help")) go = 0; if (!strcmp(argv[n], "-via")) { if (argv[++n] == NULL) go = 0; } } if (go) for (n = 1; n < argc; ++n) { if (!strcmp(argv[n], "-via")) { plenty(argv[++n]); continue; } operate(argv[n]); } else { fprintf(stderr, "ReduceAOF " __DATE__ ". " "Copyright © Richard Sargeant, 1999.\n" "ReduceAOF comes with ABSOLUTELY NO WARRANTY.\n"); } return n == argc ? EXIT_SUCCESS : EXIT_FAILURE; } /* Just written for OSLib :-) mailto:os...@ar... */ --- 7,278 ---- #include <stdio.h> #include <string.h> ! ! typedef struct ! { ! unsigned int ChunkFileId; ! unsigned int maxChunks; ! unsigned int numChunks; ! } ChunkFileHdr; ! ! typedef struct ! { ! unsigned char chunkId[8]; ! unsigned int fileOffset; ! unsigned int size; ! } ChunkEntryHdr; ! ! typedef struct ! { ! ChunkFileHdr CFH; ! ChunkEntryHdr *CEH; ! char **DAT; ! } ChunkInfoStr; ! ! static int verbose; ! ! static int bite(ChunkInfoStr *I, FILE *fp) ! { ! size_t m = fread(I->CEH, sizeof(*I->CEH), I->CFH.maxChunks, fp); ! ! if (m == I->CFH.maxChunks) ! { ! int n; ! for (n=0; n < I->CFH.maxChunks; ++n) ! { ! char name[9]; ! strncpy(name, (const char *) I->CEH[n].chunkId, 8); ! name[8]='\0'; ! I->DAT[n] = NULL; ! ! if ( I->CEH[n].fileOffset != 0 ) ! { ! I->DAT[n] = malloc(I->CEH[n].size); ! if (I->DAT[n] == NULL) ! { ! fprintf(stderr, "malloc() failed\n"); ! abort(); ! } ! ! fseek(fp, I->CEH[n].fileOffset, SEEK_SET); ! if (fread((I->DAT[n]), 1, I->CEH[n].size, fp) != I->CEH[n].size) ! { ! free(I->DAT[n]); I->DAT[n] = NULL; m--; ! } ! } ! } ! } ! ! return m == I->CFH.maxChunks; ! } ! ! static void strip(ChunkInfoStr *I) ! { ! unsigned int n; ! for (n=0; n < I->CFH.maxChunks; ++n) ! { ! char name[9]; ! strncpy(name, (const char *) I->CEH[n].chunkId, 8); ! name[8]='\0'; ! ! if ( I->DAT[n] != NULL && !strcmp(name, "OBJ_IDFN") ) ! { ! free(I->DAT[n]); I->DAT[n] = NULL; ! } ! } ! } ! ! static unsigned int brush(ChunkInfoStr *I) ! { ! unsigned int n, to = 0; ! ! for (n=0; n < I->CFH.maxChunks; ++n) ! { ! if (I->DAT[n] != NULL && to != n) ! { ! memcpy(&I->CEH[to], &I->CEH[n], ! sizeof(*I->CEH)); I->DAT[to] = I->DAT[n]; ! I->DAT[n] = NULL; ! } ! ! if (I->DAT[to] != NULL) ! to++; ! else ! { ! memcpy( I->CEH[n].chunkId, "SpareNow", 8); ! I->CEH[n].fileOffset = 0; ! I->CEH[n].size = 0; ! } ! } return to; ! } ! ! static void reorganise(ChunkInfoStr *I, unsigned int got) ! { ! unsigned int n, place; ! I->CFH.maxChunks = I->CFH.numChunks = got; ! place = sizeof(I->CFH) + sizeof(*I->CEH) * I->CFH.maxChunks; ! ! for (n=0; n < I->CFH.numChunks; ++n) ! { ! I->CEH[n].fileOffset = place; ! place += (I->CEH[n].size + 3) & ~3; ! } ! } ! ! static int get_CFH(ChunkInfoStr *I, FILE *fp) ! { ! if (fread(&I->CFH, sizeof(I->CFH), 1, fp) != 1) ! return 0; ! ! return I->CFH.ChunkFileId == 0xC3CBC6C5; ! } ! ! static void operate(const char *fname) ! { ! FILE *fp; ! ! if (verbose) ! fprintf(stderr, "ReduceAOF %s \n", fname ); ! ! if ((fp = fopen(fname, "rb")) != NULL) ! { ! ChunkInfoStr CIS; ! ! if (get_CFH(&CIS, fp) != 0 && CIS.CFH.numChunks > 0) ! { ! CIS.CEH = malloc(sizeof(*CIS.CEH) * CIS.CFH.maxChunks); ! CIS.DAT = malloc(sizeof(char*) * CIS.CFH.maxChunks); ! ! if (!CIS.CEH || !CIS.DAT) ! { ! fprintf(stderr, "malloc() failed\n"); abort(); ! } ! ! if (bite(&CIS, fp) != 0) ! { ! int n; ! fclose(fp); ! fp = NULL; ! strip(&CIS); ! reorganise(&CIS, brush(&CIS)); ! ! fp = fopen(fname, "wb"); ! if (fp) ! { ! fwrite(&CIS.CFH, sizeof(CIS.CFH), 1, fp); ! fwrite(CIS.CEH, sizeof(*CIS.CEH), CIS.CFH.maxChunks, fp); ! ! for (n=0; n < CIS.CFH.maxChunks; ++n) ! { ! fseek(fp, CIS.CEH[n].fileOffset, SEEK_SET); ! fwrite((CIS.DAT[n]), sizeof(char), CIS.CEH[n].size, fp); ! } ! } ! else ! { ! fprintf(stderr, "Could not write %s\n", fname); ! exit(EXIT_FAILURE); ! } ! ! for (n=0; n < CIS.CFH.maxChunks; ++n) ! { ! free(CIS.DAT[n]); ! } ! } ! else ! { ! fprintf(stderr, "Error reading %s\n", fname); ! exit(EXIT_FAILURE); ! } ! ! free(CIS.CEH); ! } ! ! if (fp) ! { ! if (fclose(fp) != 0) ! { ! fprintf(stderr, "Error closing %s\n", fname); ! exit(EXIT_FAILURE); ! } ! } ! else ! { ! fprintf(stderr, "Wrong format %s\n", fname); ! exit(EXIT_FAILURE); ! } ! } ! else ! { ! fprintf(stderr, "Could not read %s\n", fname); ! exit(EXIT_FAILURE); ! } ! } ! ! static void plenty(const char *n) ! { ! FILE *fp; ! ! if ((fp = fopen(n, "r")) != NULL) ! { ! char s[256]; ! while (!feof(fp)) ! { ! if (fgets(s, sizeof(s), fp) != NULL) ! { ! char *t = strchr(s, '\n'); ! if (t != NULL) *t = '\0'; operate(s); ! } ! } ! fclose(fp); ! } ! else ! { ! fprintf(stderr, "Error reading %s\n", n); ! exit(EXIT_FAILURE); ! } ! } ! ! int main(int argc, char *argv[]) ! { ! int n, go = argc > 1; ! ! for (n = 1; n < argc; ++n) ! { ! if (!strcmp(argv[n], "-?") || !strcmp(argv[n], "-h") || !strcmp(argv[n], "-help")) ! go = 0; ! ! if (!strcmp(argv[n], "-via")) ! { ! if (argv[++n] == NULL) go = 0; ! } ! ! if ( !strcmp( argv[n], "-v" ) ) ! verbose = 1; ! } ! ! if (go) ! { ! for (n = 1; n < argc; ++n) ! { ! if (!strcmp(argv[n], "-via")) ! { ! plenty(argv[++n]); ! continue; ! } ! if ( *argv[n] != '-' ) ! operate(argv[n]); ! } ! } ! else ! { ! fprintf(stderr, "ReduceAOF " ! __DATE__ ! ". " ! "Copyright © Richard Sargeant, 1999.\n" ! "ReduceAOF comes with ABSOLUTELY NO WARRANTY.\n" ! ); ! } ! ! return n == argc ? EXIT_SUCCESS : EXIT_FAILURE; ! } /* Just written for OSLib :-) mailto:os...@ar... */ ! --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # # Makefile for ReduceAOF for UNIX. # TARGET = reduceaof MODULES = ${TARGET} # all the general rules are in ../GNUmakefile.source include ../GNUmakefile.source |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Test/Test Modified Files: .cvsignore Make,fd7 test.cc Added Files: AMUmakefile GNUmakefile mkhdr.c test.s Removed Files: Clean_All,fd7 Clean_cc,fd7 Make_cc,fd7 Make_cpp,fd7 Make_gcc,fd7 Make_gpp,fd7 Run_gcc,fd7 Run_gpp,fd7 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 27 Nov 2002 22:10:59 -0000 1.5 --- .cvsignore 3 May 2004 15:03:27 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + *,ff8 + h + Hdr bin o Index: test.cc =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test/test.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test.cc 28 Mar 2004 10:34:02 -0000 1.5 --- test.cc 3 May 2004 15:03:28 -0000 1.6 *************** *** 107,111 **** std:: #endif ! cout << text << "\n"; return 0; --- 107,111 ---- std:: #endif ! cout << text << "\n"; return 0; --- Make_cc,fd7 DELETED --- --- Clean_All,fd7 DELETED --- --- NEW FILE: GNUmakefile --- # Index: OSLib/!OsLib/Source/Test/Test/GNUmakefile 20040121 #=================================================================== #------------------------------------------------------------------------ # 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 include ${CONTENTS} #------------------------------------------------------------------------ # Targets: .PHONY: all clean TEST_C = test_c TEST_CPP = test_cpp TEST_S = test_s BIN_C = ${TEST_C},ff8 BIN_CPP = ${TEST_CPP},ff8 BIN_S = ${TEST_S},ff8 all: ${BIN_C} ${BIN_CPP} ${BIN_S} ${OSLIB_H}: ${CONTENTS} @echo ${MODULES} ${SWIMODULES} | \ tr '[A-Z]' '[a-z]' | \ sed 's/ /\n/g' | \ sed 's/.*/#include \"oslib\/&.h\"/g' \ > $@ ${OSLIB_HH}: ${CONTENTS} @echo $(sort ${MODULES} ${SWIMODULES} Types Macros) | \ sed 's/ /\n/g' | \ sed 's/.*/\tGET\toslib\/&.Hdr/g' \ > $@ ${TEST_S}.o: test.s ${OSLIB_HH} ${AS} -c $< -o $@ ${BIN_S}: ${TEST_S}.o ${OSLIB} ${LD} $^ -o $@ ${TEST_C}.o: test.c ${OSLIB_H} ${GCC} -c $< ${INCLUDES} -o $@ ${BIN_C}: ${TEST_C}.o ${OSLIB} ${LD} $^ -o $@ ${TEST_CPP}.o: test.cc ${OSLIB_H} ${GPP} -c $< ${INCLUDES} -o $@ ${BIN_CPP}: ${TEST_CPP}.o ${OSLIB} ${GPP} $^ -o $@ clean: ;-${RM} \ ${BIN_C} \ ${TEST_C}.o \ ${BIN_CPP} \ ${TEST_CPP}.o \ ${BIN_S} \ ${TEST_S}.o \ ${OSLIB_H} \ ${OSLIB_HH} --- NEW FILE: mkhdr.c --- /* mkhdr.c ** Make a header file out of a list of modules ** syntax: mkhdr [-c -s] <hdrfile> {<module> ...} */ #include <ctype.h> #include <stdio.h> #include <string.h> #include <time.h> //#define DEBUG typedef enum { mode_NONE, mode_C, mode_ASM, } mode_t; #define TMP_SIZ 64 static int ToLower( char *dest, const char *src, int max ) { int chars = 0; while ( (*src != '\0') && (chars < max) ) { *dest++ = (char)tolower( *src++ ); chars++; } *dest = '\0'; return chars; } int main (int argc, const char **argv) { int status = 0; mode_t mode = mode_NONE; FILE *hdr = 0; fprintf( stderr, "mkhdr " __DATE__ " ©Tony van der Hoff\n\n" ); if ( argc < 4 ) { fprintf( stderr, "Usage:\tmkhdr [options] hdrfile module1 module2 ... moduleN\n\n" "Options:\t-c:\tgenerate c-style header file\n" "\t\t-s:\tgenerate objasm-style header file\n" ); status = -1; } if ( status == 0 ) { #ifdef DEBUG fprintf( stderr, "Option: %s\n" "Output: %s\n" , argv[1] , argv[2] ); for ( int i = 3; i < argc; ++i ) { fprintf( stderr, "%s ", argv[i] ); } fputs( "\n",stderr ); #endif if ( strcmp( argv[1], "-s" ) == 0 ) mode = mode_ASM; else if ( strcmp( argv[1], "-c" ) == 0 ) mode = mode_C; if ( mode == mode_NONE ) { fprintf( stderr, "Error: invalid or no translation mode defined\n" ); status = -1; } } if (status == 0) { hdr = fopen( argv[2], "w" ); if ( hdr == 0 ) { fprintf( stderr, "Error: File %s failed to open\n", argv[2] ); status = -1; } else { } } if (status == 0) { time_t tim = time( 0 ); switch ( mode ) { case mode_C: fprintf( hdr, "/* %s - Generated by mkhdr [" __DATE__ "] on %s */\n", argv[2], ctime( &tim ) ); break; case mode_ASM: fprintf( hdr, ";%s - Generated by mkhdr [" __DATE__ "] on %s\n", argv[2], ctime( &tim ) ); break; } for ( int i = 3; i < argc; ++i ) { char temp[ TMP_SIZ ]; switch ( mode ) { case mode_C: ToLower( temp, argv[i], TMP_SIZ ); fprintf( hdr, "#include \"oslib/%s.h\"\n", temp ); break; case mode_ASM: fprintf( hdr, //"\tGET\toslib.Hdr.%s\n", "\tGET\toslib/%s.Hdr\n", argv[i] ); break; } /* end switch */ } /* end for */ switch ( mode ) { case mode_ASM: fprintf( hdr, "\tEND\n" ); break; } } /* status == 0 */ if ( hdr ) fclose( hdr ); return status; } --- Clean_cc,fd7 DELETED --- --- Make_cpp,fd7 DELETED --- --- Run_gpp,fd7 DELETED --- --- Make_gpp,fd7 DELETED --- Index: Make,fd7 =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/Test/Make,fd7,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Make,fd7 2 Dec 2002 18:28:11 -0000 1.4 --- Make,fd7 3 May 2004 15:03:28 -0000 1.5 *************** *** 3,7 **** Echo <sys$time> Building <Obey$Dir> Wimpslot 4000k ! if "<C$Mode>"= 32 then Do AMU -D -f <Obey$Dir>.Makefile -desktop alltargets DIR=<Obey$Dir> APCS=32 OSLib=32 ! if "<C$Mode>"<>32 then Do AMU -D -f <Obey$Dir>.Makefile -desktop alltargets DIR=<Obey$Dir> APCS=26 echo <sys$time> done \ No newline at end of file --- 3,7 ---- Echo <sys$time> Building <Obey$Dir> Wimpslot 4000k ! if "<C$Mode>"= 32 then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 ! if "<C$Mode>"<>32 then Do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 echo <sys$time> done \ No newline at end of file --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Source/Test/Test/AMUmakefile 20031230 #=================================================================== #------------------------------------------------------------------------ # paths & directories SOURCEDIR = <OSLib$SourceDir> #BINDIR = ${SOURCEDIR}/../Bin #------------------------------------------------------------------------ # Macros #------------------------------------------------------------------------ #target-specific macros SOURCES_0 = Computer Core Toolbox User SOURCES = ${SOURCES_0} Types Macros CONTENTS = $(addsuffix .oslib.Modules, $(addprefix ${SOURCEDIR}., ${SOURCES_0}) ) OSLIB = ${SOURCEDIR}.o.OSLib OSLIB32 = ${SOURCEDIR}.o.OSLib32 OSLIB_H = h.oslib OSLIB_HDR = Hdr.OSLib #LIBS_S = OSLibSupport:OSLibSupport.o #LIBS_OS = OSLib:o.OSLib #LIBS_GPP = -liostream #LIBS_C = C:o.stubs #LIBS_CPP = C:o.C++Lib C:o.Stubs ifeq (APCS,32) OS_LIB = ${OSLIB32} else OS_LIB = ${OSLIB} endif .include ${CONTENTS} #------------------------------------------------------------------------ # tools MAKE = amu -desktop APCS=${APCS} FLAGS_CC = fah #DEP = -depend !depend CC = cc -apcs 3/${APCS} ${DEP} -f${FLAGS_CC} -throwback CPP = c++ -apcs 3/${APCS} -c -throwback GCC = gcc -mthrowback GPP = gcc -xc++ -mthrowback AS = do objasm LD = Link RM = rm -nq MD = cdir STRIP = StripDepends CP = copy COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V #------------------------------------------------------------------------ # Targets: .PHONY: all clean TEST_C = test_c TEST_CPP = test_cpp TEST_S = test_s BIN_C = ${TEST_C} BIN_CPP = ${TEST_CPP} BIN_S = ${TEST_S} all: ${BIN_CPP} ${BIN_C} ${BIN_S} ${OSLIB_H}: ${CONTENTS} mkhdr ${MD} h @/${MAKEFILEDIR}.mkhdr -c $@ $(sort ${MODULES} ${SWIMODULES} Types Macros) ${OSLIB_HDR}: ${CONTENTS} mkhdr ${MD} Hdr @/${MAKEFILEDIR}.mkhdr -s $@ $(sort ${MODULES} ${SWIMODULES} Types Macros) mkhdr: mkhdr.c ${MD} o ${CC} -o $@ mkhdr.c ${TEST_S}.o: test.s ${OSLIB_HDR} ${MD} o ${AS} -c test.s -o $@ -I <OSLib$Path> ${BIN_S}: ${TEST_S}.o ${OS_LIB} ${LD} ${TEST_S}.o -o $@ /${MAKEFILEDIR}.$@ ${TEST_C}.o: test.c ${OSLIB_H} ${MD} o ${CC} -c test.c -IC:,OSLib: -o $@ ${BIN_C}: ${TEST_C}.o ${OS_LIB} ${LD} ${TEST_C}.o C:stubs.o ${OS_LIB} -o $@ /${MAKEFILEDIR}.$@ ${TEST_CPP}.o: cc.test ${OSLIB_H} ${MD} o ${CPP} -c cc.test -IC:,OSLib: -o $@ ${BIN_CPP}: ${TEST_CPP}.o ${OS_LIB} ${LD} -C++ $? C:C++Lib.o C:stubs.o -o $@ /${MAKEFILEDIR}.$@ clean: ;-${RM} \ ${BIN_C} \ o.${TEST_C} \ ${BIN_CPP} \ o.${TEST_CPP} \ ${BIN_S} \ o.${TEST_S} \ ${OSLIB_H} \ ${OSLIB_Hdr} \ mkhdr \ o.mkhdr distclean: clean ${RM} o Hdr h #------------------------------------------------------------------------ # Dynamic dependencies: --- Run_gcc,fd7 DELETED --- --- NEW FILE: test.s --- ;test assembler headers ; faffing about with directory name to get ObjAsm to behave properly GET ../Test/OSLib.Hdr ; gets all OSLib headers ; GET Hdr.OSLib ; alternative format for OBJASM EXPORT |entry| EXPORT |exit| AREA code, CODE ENTRY |entry| SWI XOS_GetEnv ; get the environment MOVVS pc, lr ; exit on error MOV sp, r1 ; set up a stack STMFD sp!, {lr} ; save the return address ADR R0, message ; write the message std out SWI OS_Write0 SWI OS_NewLine |exit| ldmfd sp!, {pc} ; return message = "Hello World from ObjAsm",0 END --- Make_gcc,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:18
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Test/readvarval Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Make,fd7 readvarval.c Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Test/readvarval/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 31 Dec 2003 14:42:39 -0000 1.4 --- .cvsignore 3 May 2004 15:03:29 -0000 1.5 *************** *** 4,5 **** --- 4,6 ---- *.o,ffd tree,ffd + main,ff8 \ No newline at end of file --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Source/Test/readvarval/AMUmakefile,fe1 #=================================================================== TARGET = readvarval OBJS = o.${TARGET} TRACEOBJS = DIR = ${MAKEFILEDIR} TRACE ?= 0 LIBS_C = C:o.stubs ifeq (${APCS},32) OS_LIB = OSLib:OSLib32.o else OS_Lib = OSLib:OSLib.o endif ifneq (${TRACE},0) OBJS += ${TRACEOBJS} endif ifndef APCS $(error APCS mode is undefined) endif #------------------------------------------------------------------------ #Tools LINK = Link CC = cc -apcs 3/${APCS} ${DEPEND} -c -f${FLAGS_CC} \ -throwback ${INC} $(addprefix -D, ${DEFINE}) ASM = objasm -throwback RM = rm -nq STRIP = stripdepends MD = cdir MAKE = AMU -desktop #------------------------------------------------------------------------ #Toolflags COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V INC = -IC:,OSLib: FLAGS_CC = fah DEFINE = #DEPEND = ifdef OUTPUT DEFINE += OUTPUT=${OUTPUT} endif #------------------------------------------------------------------------ .PHONY: all run clean distclean all: ${TARGET} ${TARGET}: ${OBJS} ${LIBS_C} ${OS_LIB} ${LINK} -output $@ ${OBJS} ${LIBS_C} ${OS_LIB} ${MAKE} ${MAKEFILEDIR}.AMUmakefile run run: ${TARGET} /${MAKEFILEDIR}.${TARGET} clean: ;${RM} ${OBJS} ${TARGET} distclean: clean -${STRIP} AMUmakefile ${RM} o #------------------------------------------------------------------------ #General rules .SUFFIXES: .o .c .c.o: ;${MD} o ${CC} $< -o $@ # Dynamic dependencies: --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- NEW FILE: Make,fd7 --- Echo <Sys$Time> Building <Obey$Dir> Wimpslot 4096k if "<C$Mode>"="32" then do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=32 OUTPUT=1 if "<C$Mode>"<>"32" then do AMU -D -f <Obey$Dir>.AMUmakefile -desktop %0 APCS=26 OUTPUT=1 echo <sys$time> done --- Makefile,fe1 DELETED --- --- NEW FILE: readvarval.c --- /* test.readVarVal.c Test os_read_var_val_size interface */ //#define DEBUG //#define OUTPUT //#define SHORT #ifndef OUTPUT #define OUTPUT 0 #endif #include <stdio.h> #include <stdlib.h> #include "oslib/os.h" int main() { int iSize; os_var_type xType; int iStat = 0; os_error *Error= 0; int Context = 0; int vartype_number = 0; int vartype_macro = 0; int vartype_string = 0; do { #ifdef DEBUG printf( "Read var val size; context = 0x%8x\n" _ Context ); #endif Error = xos_read_var_val_size( "*", Context, os_VARTYPE_STRING, &iSize, &Context, &xType ); if( !Error && iSize != 0 ) { #ifdef SHORT printf( "Found: %s (size %04x; type %x)\n", (char*)Context, ~iSize, (int) xType ); #else if ( xType == os_VARTYPE_STRING || xType == os_VARTYPE_NUMBER || xType == os_VARTYPE_MACRO ) { int iUsed; char* buf; iSize = (~iSize) + 1; buf = malloc( iSize ); Error = xos_read_var_val( (char*)Context, buf, iSize, 0, // Context, os_VARTYPE_STRING, &iUsed, 0, // &Context, &xType ); if( !Error ) { switch ( xType ) { case os_VARTYPE_NUMBER: ++vartype_number; break; case os_VARTYPE_MACRO: ++vartype_macro; break; case os_VARTYPE_STRING: ++vartype_string; break; } #if OUTPUT if( xType == os_VARTYPE_NUMBER ) { printf( "%s Size %3d: %s = %d\n", "Number; ", iSize, (char*)Context, (int) *buf ); } else { *(buf+iUsed) = '\0'; printf( "%s Size %3d: %s: %s\n", (xType == os_VARTYPE_MACRO) ? "Macro; " : (xType == os_VARTYPE_STRING) ? "String; " : "Unknown;", iSize, (char*)Context, buf ); } #endif } free( buf ); } #endif } } while( !Error && Context ); printf( "ReadVarVal found %d numbers; %d macros; %d strings \n", vartype_number, vartype_macro, vartype_string ); if( Error ) { printf( "\nError: %08x - %s\n", Error -> errnum, Error -> errmess ); iStat = -1; } return iStat; } --- NEW FILE: GNUmakefile --- # Index: OSLib/!OsLib/Source/Test/readvarval/GNUmakefile #=================================================================== #------------------------------------------------------------------------ # paths & directories SOURCEDIR = ../.. BINDIR = ${SOURCEDIR}/../Bin CROSSPATH = /home/riscos/cross/bin #------------------------------------------------------------------------ #target-specific macros TARGET = readvarval OBJS = ${TARGET}.o BIN = ${TARGET},ff8 OSLIB = ${SOURCEDIR}/OSLib.o OSLIB32 = ${SOURCEDIR}/OSLib32.o SOURCES = Computer Core Toolbox User Types Macros INCLUDES = $(addprefix -I${SOURCEDIR}/, ${SOURCES} ) #------------------------------------------------------------------------ #Tools GCC = ${CROSSPATH}/gcc LD = ${CROSSPATH}/gcc RM = rm -f #------------------------------------------------------------------------ #Toolflags #------------------------------------------------------------------------ # Targets .PHONY: all clean all: ${BIN} ${BIN}: ${OBJS} ${OSLIB32} ${LD} -o $@ $^ clean: -${RM} ${OBJS} ${BIN} #------------------------------------------------------------------------ #General rules .SUFFIXES: .o .c .c.o: ${GCC} -c ${INCLUDES} $< -o $@ |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:18
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/Rm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/Rm Modified Files: rm.c Added Files: AMUmakefile Make,fd7 Removed Files: !Clean,fd7 !Make,fd7 Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Tools/Rm/AMUakefile 20040308 # TARGET = rm ALL = ${TARGET} VPATH = INCLUDES = C: LIBS = C:o.Stubs MODULES = ${TARGET} .include ${MAKEFILEDIR}.^.AMUmakefile/source #------------------------------------------------------------------------ # Dynamic dependencies: --- !Clean,fd7 DELETED --- --- NEW FILE: Make,fd7 --- Echo <Sys$Time> !OSLib.Tools.rm.Make WIMPSlot -min 1024K -max 1024K if "<C$MODE>" = "32" then Do AMU -D -desktop -f <Obey$Dir>.AMUmakefile %0 APCS=32 if "<C$MODE>"<> "32" then Do AMU -D -desktop -f <Obey$Dir>.AMUmakefile %0 APCS=26 Echo <Sys$Time> Done. --- Makefile,fe1 DELETED --- Index: rm.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/Rm/rm.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rm.c 29 Dec 2003 11:40:21 -0000 1.1 --- rm.c 3 May 2004 15:03:35 -0000 1.2 *************** *** 1,67 **** /*rm - delete a lot of files*/ ! #define DEBUG 0 ! #define USE_OSLIB 0 /* define non-zero to build with OSLib */ ! #include <stdio.h> ! #if (defined USE_OSLIB) && USE_OSLIB ! #include "oslib/os.h" ! #include "oslib/osfile.h" ! #else ! #include "swis.h" ! #endif ! int main ! ( ! int argc, ! char *argv [] ! ) { ! int i, obj_type, rc = 0; - #if (defined USE_OSLIB) && USE_OSLIB - os_error *error; - #else - _kernel_oserror *error; - #endif ! for (i = 1; i != argc; ++i) { ! if ( ( error = ! #if (defined USE_OSLIB) && USE_OSLIB ! xosfile_delete (argv [i], &obj_type, NULL, NULL, NULL, NULL) ! #else ! _swix( OS_File, ! _IN(0) | _IN(1) | _OUT(0), ! 6, argv[i], &obj_type ! ) ! #endif ! ) != NULL) { ! fprintf (stderr, "rm: %s: %s\n", argv [i], error->errmess); ! rc = 1; ! continue; } ! #if (defined USE_OSLIB) && USE_OSLIB ! if (obj_type == osfile_NOT_FOUND) ! #else ! if (obj_type == 0) #endif { ! fprintf (stderr, "rm: %s\n", ! #if (defined USE_OSLIB) && USE_OSLIB ! xosfile_make_error (argv [i], obj_type) ! #else ! _swix( OS_File, ! _IN(0) | _IN(1) | _IN(2), ! 19, argv [i], obj_type ! ) ! #endif ! -> errmess ); rc = 1; } } --- 1,215 ---- /*rm - delete a lot of files*/ + #include <kernel.h> + #include <limits.h> + #include <stdio.h> + #include <string.h> + #include <swis.h> ! //#define DEBUG ! #define BUF_SIZ 256 ! static int rm( const char *object ); ! static int quiet; ! static int recurse; ! static int verbose; ! static int not_error; ! ! static void PrintHelp() { ! printf( "rm - remove a number of files\n" ! "Syntax: rm [-{hnqrv-}] file1 ... filen\n" ! "Options:\n" ! "\th - print this help text\n" ! "\tn - ignore \"not found\" errors\n" ! "\tq - be quiet\n" ! "\tr - recursively descend into subdirectories\n" ! "\tv - be verbose\n" ! "\t- - end of options; any subsequent \"-\" character is part of file name\n" ! ); ! } ! static void GetOpt( const char* arg ) ! { ! if ( *arg == '-' ) { ! while ( *(++arg) != '\0' ) { ! if ( *arg == 'q' ) quiet = 1; ! else if ( *arg == 'n' ) not_error = 1; ! else if ( *arg == 'r' ) recurse = 1; ! else if ( *arg == 'v' ) verbose = 1; ! else if ( *arg == 'h' ) PrintHelp(); } + } + } ! ! static void MakeError( const char *object, int obj_type ) ! { ! char* errmess = _swix( OS_File, ! _IN(0) | _IN(1) | _IN(2), ! 19, object, obj_type ! ) -> errmess; ! fprintf( stderr, "rm: %s\n", errmess ); ! } ! ! ! static void PrintError( const char* object, const _kernel_oserror *error ) ! { ! fprintf( stderr, ! "rm: %s: 0x%08x: %s\n", ! object, error -> errnum, error->errmess ! ); ! } ! ! ! static int rm_obj( const char *object ) ! { ! int rc = 0; ! _kernel_oserror* error = 0; ! ! if ( verbose ) ! printf( "rm: removing %s\n", object ); ! ! #if 1 ! error = _swix( OS_File, ! _IN(0) | _IN(1), ! 6, object ! ); #endif + if ( error ) + { + PrintError( object, error ); + rc = 1; + } + return rc; + } + + + static int rm_dir( const char *object ) + { + _kernel_oserror* error; + int rc = 0; + int i; + int context = 0; + + /* enumerate the directory and remove each file */ + do + { + int items; + char buf[ BUF_SIZ ]; + char name[ BUF_SIZ ]; + char* wildcard = "*"; + + error = _swix( OS_GBPB, + _IN(0) | _IN(1) | _IN(2) | _IN(3) | _IN(4) | _IN(5) | _IN(6) | + _OUT(3) | _OUT(4), + 9, object, buf, 100, context, BUF_SIZ, wildcard, + &items, &context + ); + if ( error ) { ! PrintError( object, error ); rc = 1; } + else + { + #ifdef DEBUG + printf( "%s contains %d items:\n", object, items ); + #endif + char *p = buf; + for ( i = 0; i < items; ++i ) + { + sprintf( name, "%s.%s", object, p ); + #ifdef DEBUG + printf( "\t%s\n", name ); + #endif + rm( name ); + p += strlen(p) + 1; + } + } + } + while ( rc == 0 && context >= 0); + + return rc; + } + + + static int rm( const char *object ) + { + _kernel_oserror *error; + int rc = 0; + int obj_type; + + /* get catalogue information */ + error = _swix( OS_File, + _IN(0) | _IN(1) | _OUT(0), + 17, object, &obj_type + ); + + if ( error != NULL) + { + PrintError( object, error ); + rc = 1; + } + else + { + if ( obj_type == 0 ) + { + /* not found */ + if ( !quiet ) + MakeError( object, obj_type ); + + if ( !not_error ) + rc = 1; + } + else if ( recurse && obj_type == 2 ) + { + /* directory found - delete recursively */ + rc = rm_dir( object ); + } + + /* try to delete the object */ + if (rc == 0) + rc = rm_obj( object ); + } + return rc; + } + + + extern int main( int argc, char *argv [] ) + { + int i; + int lastopt = INT_MAX; + int rc = 0; + + if ( argc == 1 ) PrintHelp(); + + /* check the options */ + for ( i = 1; (i < argc); ++i ) + { + if (argv[i][0] == '-') + { + if ( argv[i][1] == '-' ) + { + lastopt = i; + break; + } + else + GetOpt( argv[i] ); + } + } + + /* delete the objects */ + for (i = 1; i != argc; ++i) + { + if ( i > lastopt || argv[i][0] != '-' ) + { + rc |= rm( argv[i] ); + } } --- !Make,fd7 DELETED --- |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:18
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/User/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/User/oslib Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Modules Removed Files: !Clean,fd7 !Make,fd7 !copysrc Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/User/oslib/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** .cvsignore 31 Dec 2003 14:42:40 -0000 1.6 --- .cvsignore 3 May 2004 15:03:30 -0000 1.7 *************** *** 17,20 **** --- 17,21 ---- *.o *.o,* + *.o32 *.o32,* *.s --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Source/User/oslib/Makefile,fe1 20031228 # include ${MAKEFILEDIR}.Modules #include the global definitions afther the local ones # to allow the latter to be recognised include <OSLib$SourceDir>.AMUmakefile/inc # local targets .PHONY: user libs libs32 user: all @echo libs: ${LIBS} @echo libs32: ${LIBS32} @echo #------------------------------------------------------------------------ # Dynamic dependencies: --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- !copysrc DELETED --- --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLib/Source/User/oslib/GNUmakefile TV 20040120 # Makefile for User/oslib under GNU # SOURCEDIR = ../.. TARGET = User include Modules include ${SOURCEDIR}/GNUmakefile.source #------------------------------------------------------------------------ .PHONY: ${OSLIB32} ${OSLIB} ${OSLIB}: ${LIBS} ${HDRS} ${OBJS} ${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} --- NEW FILE: Modules --- # OSLib/Source/User/oslub/Modules # Module definition file for User Make # modules containing SWIs SWIMODULES += \ BASICTrans \ ColourPicker \ CompressJPEG \ ConvertPNG \ DragASprite \ Draw \ DrawFile \ Filter \ Font \ Hourglass \ ImageFileRender \ JPEG \ MimeMap \ PDriver \ PDumper \ Report \ TaskManager \ TaskWindow \ URI \ URL \ Wimp \ WimpExtend \ WimpReadSysInfo \ WimpSpriteOp \ Zipper \ ZLib # modules with no SWIs MODULES += \ Alarm \ Arcweb \ ExtEdit \ Help \ InetSuite \ MakePSFont \ OLE \ PlugIn \ RemotePrinterSupport \ StrongHelp \ Super # modules defined other than by SWI definition CMODULES += |
From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:18
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Toolbox/oslib Modified Files: .cvsignore Added Files: AMUmakefile GNUmakefile Modules Removed Files: !Clean,fd7 !Make,fd7 !copysrc Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Toolbox/oslib/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 31 Dec 2003 14:42:39 -0000 1.5 --- .cvsignore 3 May 2004 15:03:30 -0000 1.6 *************** *** 1,3 **** - l Hdr help --- 1,2 ---- *************** *** 16,19 **** --- 15,19 ---- *.o *.o,* + *.o32 *.o32,* *.s --- NEW FILE: AMUmakefile --- # Index: OSLib/!OsLib/Source/Toolbox/oslib/Makefile,fe1 20031228 include ${MAKEFILEDIR}.Modules #include the global definitions afther the local ones # to allow the latter to be recognised include <OSLib$SourceDir>.AMUmakefile/inc # local targets .PHONY: tbox libs libs32 tbox: all @echo libs: ${LIBS} @echo libs32: ${LIBS32} @echo #------------------------------------------------------------------------ # Dynamic dependencies: --- !Make,fd7 DELETED --- --- !Clean,fd7 DELETED --- --- !copysrc DELETED --- --- Makefile,fe1 DELETED --- --- NEW FILE: GNUmakefile --- # OSLib/Source/Toolbox/oslib/GNUmakefile TV 20040120 # Makefile for Computer/oslib under GNU # SOURCEDIR = ../.. TARGET = Toolbox include Modules include ${SOURCEDIR}/GNUmakefile.source #------------------------------------------------------------------------ .PHONY: ${OSLIB32} ${OSLIB} ${OSLIB}: ${LIBS} ${HDRS} ${OBJS} ${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} --- NEW FILE: Modules --- # OSLib/Source/Toolbox/oslib/Modules # Modules definition for Toolbox Make # modules containing SWIs SWIMODULES += \ ActionButton \ Button \ ColourDbox \ ColourMenu \ DCS \ DDEUtils \ DisplayField \ DragAnObject \ Draggable \ FileInfo \ FontDbox \ FontMenu \ FrontEnd \ Gadget \ Iconbar \ Menu \ NumberRange \ OptionButton \ PopUp \ PrintDbox \ ProgInfo \ Quit \ RadioButton \ SaveAs \ Scale \ Scrollbar \ ScrollList \ Slider \ StringSet \ TextArea \ TextGadgets \ ToolAction \ Toolbox \ Window \ WindowSupportExternal \ WritableField # modules with no SWIs MODULES += \ Adjuster \ FileDbox \ KeyboardShortcut \ Label \ LabelledBox \ ResEd # modules defined other than by SWI definition CMODULES += |