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 --- |