From b818ca898e67d0a84dbea3a2d4d7461ee91df8d8 Mon Sep 17 00:00:00 2001 From: Patrick Mast Date: Mon, 31 Jul 2000 09:40:23 +0000 Subject: [PATCH] 2000-07-31 11:23 CET Patrick Mast * contrib/hbzlib/doc/zip.txt * Changes and corrections. --- harbour/ChangeLog | 4 +++ harbour/contrib/hbzlib/doc/zip.txt | 55 ++++++++++++++++++------------ 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b9f8f36432..21cb20819e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2000-07-31 11:23 CET Patrick Mast + * contrib/hbzlib/doc/zip.txt + * Changes and corrections. + 20000731-09:18 GMT+2 Maurilio Longo * source/macro/macroslx.c + added missing id tag diff --git a/harbour/contrib/hbzlib/doc/zip.txt b/harbour/contrib/hbzlib/doc/zip.txt index ce75949ff5..8e364f6f0a 100644 --- a/harbour/contrib/hbzlib/doc/zip.txt +++ b/harbour/contrib/hbzlib/doc/zip.txt @@ -12,10 +12,10 @@ * $ARGUMENTS$ * Name of the zip file * - * Name of a file to Compress ,Drive and/or path + * Name of a file to Compress, Drive and/or path * can be used * - * An array containing files to compress,Drive and/or path + * An array containing files to compress, Drive and/or path * can be used * * Compression level ranging from 0 to 9 @@ -24,38 +24,42 @@ * * Toggle to overwite the file if exists * $RETURNS$ - * .T. if file was create,otherwise .f. + * .t. if file was create, otherwise .f. * $DESCRIPTION$ - * This function create a zip file named . If the extension - * is ommited , .ZIP will be assumed. If the second parameter is a - * character string, this file will be added to the zip file.If the - * second parameter is an array,all files names contained in + * This function creates a zip file named . If the extension + * is ommited, .ZIP will be assumed. If the second parameter is a + * character string, this file will be added to the zip file. If the + * second parameter is an array, all file names contained in * will be compressed. * * If is used, it detemines the compression type where 0 means - * No compression and 9 means best compression. + * no compression and 9 means best compression. * * If is used, every time the file is opened to compress it - * will do the action specified. + * will evaluate bBlock. Parameters of bBlock are cFile and nPos. * * If is used , it toggles to overwrite or not the existing - * file.Default is to overwrite the file. + * file. Default is to overwrite the file. * $EXAMPLES$ * FUNCTION MAIN() + * * IF HB_ZIPFILE( "TEST.ZIP","TEST.PRG") * qout("File was successly create") * ENDIF + * * IF HB_ZIPFILE( "TEST1.ZIP",{"TEST.PRG","c:\windows\win.ini"}) * qout("File was successly create") * ENDIF + * * IF HB_ZIPFILE( "TEST2.ZIP",{"TEST.PRG","c:\windows\win.ini"},8,{|nPos,cFile|,qout(cFile)}) * qout("File was successly create") * ENDIF - * aFiles:={"TEST.PRG","c:\windows\win.ini"} - * nLen=len(afiles) + * + * aFiles := {"TEST.PRG","c:\windows\win.ini"} + * nLen := Len(afiles) * aGauge := GaugeNew( 5, 5, 7,40 , "W/B", "W+/B" ,'²') * GaugeDisplay( aGauge ) - * Hb_ZIPFILE('test33.zip',afiles,8,{|nPos,cFile| GaugeUpdate(aGauge,nPos/nLen)}) + * Hb_ZIPFILE('test33.zip',aFiles,8,{|cFile,nPos| GaugeUpdate(aGauge,nPos/nLen)}) * Return Nil * $STATUS$ * R @@ -87,19 +91,21 @@ * Toggle to create directory if needed * * $RETURNS$ - * .T. if all file was successfuly restored,otherwise .f. + * .t. if all file was successfuly restored, otherwise .f. * $DESCRIPTION$ * This function restores all files contained inside the . - * If the extension is ommited ,.ZIP will be assumed. If a file already - * exists, it wlllbe overwriten. + * If the extension is ommited, .ZIP will be assumed. If a file already + * exists, it wlll be overwriten. * * If is used, every time the file is opened to compress it - * will do the action specified. + * will evaluate bBlock. Parameters of bBlock are cFile and nPos. * $EXAMPLES$ * FUNCTION MAIN() + * * IF HB_UNZIPFILE( "TEST.ZIP") * qout("File was successly create") * ENDIF + * * IF HB_ZIPFILE( "TEST2.ZIP",{|cFile|,qout(cFile)}) * qout("File was successly create") * ENDIF @@ -124,7 +130,7 @@ * $CATEGORY$ * ZIP FUNCTION * $ONELINER$ - * Gets the number of files + * Gets the number of files that are in the zipfile * $SYNTAX$ * HB_GETUNZIPFILE( ) ---> nNumber * $ARGUMENTS$ @@ -133,26 +139,31 @@ * The number of files contained inside the zipfile * $DESCRIPTION$ * This function returns the number of files that is stored in the zipfile. - * The propurse for this function is to use in conjuntion with the + * The purpose for this function is to use in conjuntion with the * HB_UNZIPFILE() function, so you can use returned result in the code * block. See example below. * $EXAMPLES$ * FUNCTION MAIN() * Local nFiles :=HB_GETUNZIPFILE('test.zip') + * * if nFiles >0 * ? "This files Contains ",nfiles * endif + * * Return Nil * * Here is an example of How to use HB_GETUNZIPFILE() in conjunction * with HB_UNZIPFILE() + * * Function Main() * Local aGauge,nLen + * * aGauge := GaugeNew( 5, 5, 7,40 , "W/B", "W+/B" ,'²') * GaugeDisplay( aGauge ) - * nlen:=HB_GETUNZIPFILE('test22') - * hb_UNZIPFILE('test22',{|cFile,nPos| GaugeUpdate(aGauge,nPos/nLen),qout(cFile)},.T.) - * return Nil + * nLen := HB_GETUNZIPFILE('test22') + * hb_UNZIPFILE('test22',{|cFile,nPos| GaugeUpdate(aGauge,nPos/nLen),qout(cFile)},.t.) + * + * Return Nil * $STATUS$ * R * $COMPLIANCE$