From: Jos v.d.V. <jo...@us...> - 2005-12-26 14:54:54
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7837/apps/Player4 Modified Files: Catalog.f PLAYER4.F Log Message: Jos: Improved the import of files. Filenames with more than one dot will not be cutoff any more. Made an auto-crash-recovery for the catalog. Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** PLAYER4.F 29 Nov 2005 17:12:08 -0000 1.32 --- PLAYER4.F 26 Dec 2005 14:54:44 -0000 1.33 *************** *** 229,233 **** SetParent: ViewForm catalog-exist? ! if map-config-file map-database MciDebug? if database-mhndl #records-in-database . ." records, " --- 229,239 ---- SetParent: ViewForm catalog-exist? ! if map-config-file map-database vadr-config ExitFailed- c@ ! if MciDebug? ! if cr ." REBUILD " ! then ! generate-index-file ! then ! true vadr-config ExitFailed- c! MciDebug? if database-mhndl #records-in-database . ." records, " *************** *** 262,265 **** --- 268,272 ---- unmap-database unmap-configuration + false vadr-config ExitFailed- c! bye 0 ;M *************** *** 557,559 **** PLAYER4 [then] ! --- 564,566 ---- PLAYER4 [then] ! Index: Catalog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Catalog.f,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Catalog.f 3 Dec 2005 12:31:50 -0000 1.21 --- Catalog.f 26 Dec 2005 14:54:44 -0000 1.22 *************** *** 43,46 **** --- 43,47 ---- BYTE l_Filename- BYTE l_Record- + BYTE ExitFailed- ;struct *************** *** 190,195 **** ; ! : generate-index-file ! unmap-database map-database-file database-mhndl #records-in-database create-index-file --- 191,195 ---- ; ! : _generate-index-file ( - ) map-database-file database-mhndl #records-in-database create-index-file *************** *** 197,200 **** --- 197,202 ---- rebuild-index-hdrs ; + + : generate-index-file ( - ) unmap-database _generate-index-file ; \ ==== Part that depends on a record definition *************** *** 425,433 **** struct, InlineRecord RecordDef FileSize ! ! >r dup r@ + r@ ascii \ -scan 2dup r@ swap - swap 1+ dup rot \ adr Title ! dup>r ascii . scan nip r> swap - dup \ count Title struct, InlineRecord RecordDef Cnt_Title c! struct, InlineRecord RecordDef Title swap cmove \ move Title ! >r 1- dup r> ascii \ -scan >r 2dup - >r 1+ r@ struct, InlineRecord RecordDef Cnt_Album c! --- 427,436 ---- struct, InlineRecord RecordDef FileSize ! ! >r dup r@ + 1- dup r@ ascii \ -scan \ adr Title ! rot over ascii . -scan \ count Title ! drop 2 pick 1+ 2dup - dup \ 0< if cr .s ." file" abort then dup struct, InlineRecord RecordDef Cnt_Title c! struct, InlineRecord RecordDef Title swap cmove \ move Title ! drop >r 1- dup r> ascii \ -scan >r 2dup - >r 1+ r@ struct, InlineRecord RecordDef Cnt_Album c! *************** *** 495,499 **** database$ count file-exist? and \ database-mhndl map-file-open? or ! DataBaseFilled? and [defined] MciDebug? [if] MciDebug? --- 498,506 ---- database$ count file-exist? and \ database-mhndl map-file-open? or ! DataBaseFilled? and dup ! if index$ count file-exist? not ! if _generate-index-file ! then ! then [defined] MciDebug? [if] MciDebug? *************** *** 501,505 **** then [then] ! ; \ -------------------------------------------------------------------------- \ add a directory tree to the catalog --- 508,513 ---- then [then] ! ; ! \ -------------------------------------------------------------------------- \ add a directory tree to the catalog *************** *** 508,515 **** : select_tree ( - path count file-spec count flag-subdir ) ! vadr-config PathMediaFiles count s" *.*" true ; ! : proc_fileinfo_sdir ( wHndl - wHndl ) name-buf count add-file ; --- 516,526 ---- : select_tree ( - path count file-spec count flag-subdir ) ! vadr-config PathMediaFiles dup 0= ! if drop s" \" ! else count ! then s" *.wma" true ; ! : proc_fileinfo_sdir ( - ) name-buf count add-file ; *************** *** 534,537 **** --- 545,550 ---- ; + \ s" F:\Data\geript" s" *.*" true sdir .s + \ -------------------------------------------------------------------------- \ search in the catalog |