From: Tony v. d. H. <to...@us...> - 2004-09-22 14:45:02
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17276/!OsLib/Tools/BindHelp Modified Files: BindHelp.c Log Message: Tools/BindHelp fixed to correctly set file types in StrongHelp image under UNIX (2004-0922-1, Stefan Bellon) Index: BindHelp.c =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/BindHelp/BindHelp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BindHelp.c 3 May 2004 15:03:31 -0000 1.7 --- BindHelp.c 22 Sep 2004 14:44:52 -0000 1.8 *************** *** 27,33 **** ** 20011212 TV V1.00 Original release ** 20010130 TV V1.01 Fixes calls to *printf with null pointers (Timothy Baldwin) */ ! #define VERSION "V1.01" /* Calling Syntax: --- 27,34 ---- ** 20011212 TV V1.00 Original release ** 20010130 TV V1.01 Fixes calls to *printf with null pointers (Timothy Baldwin) + ** 20040922 TV V1.10 fixes bug where file types were incorrectly set under UNIX */ ! #define VERSION "V1.10" /* Calling Syntax: *************** *** 989,992 **** --- 990,1014 ---- tracef( "scan_dir - found file: %s"DIR_SEP"%s \n" _ dir _ INFO->name ); + #if defined EXECUTE_ON_UNIX + /* V1.10 */ + /* Under RISC OS, the file type information is available in the info block; + // not so under UNIX. It is important, as searchable (using F1) files are typed + // "text", and non-searchable files are typed "data". + // Fortunately, in this case, an alternative distinguishing feature is that + // the (non-searchable) index files are named "!Root", or have file names starting with "_", + // so under Unix we use this clue to set the file type. + */ + if( (INFO -> name[0] == '_') || (stricmp( INFO->name, "!Root" ) == 0) ) + { + INFO->load_addr = 0xFFFFFD00u; + INFO->exec_addr = 0; + } + else + { + INFO->load_addr = 0xFFFFFF00u; + INFO->exec_addr = 0; + } + #endif + *root = dir_entry = add_file( INFO->name, INFO->size, |