From 7c8c973980dfac21eb67e637dc856c96e9339dd2 Mon Sep 17 00:00:00 2001 From: Luiz Rafael Culik Date: Sun, 25 Jun 2000 01:11:36 +0000 Subject: [PATCH] See changelog 2000-06-24 22:10 GMT -3 --- harbour/contrib/hbzlib/doc/zip.txt | 8 ++- harbour/contrib/hbzlib/makefile.bc | 6 +- harbour/contrib/hbzlib/test.prg | 27 +++++---- harbour/contrib/samples/makefile.bc | 94 +++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 15 deletions(-) create mode 100644 harbour/contrib/samples/makefile.bc diff --git a/harbour/contrib/hbzlib/doc/zip.txt b/harbour/contrib/hbzlib/doc/zip.txt index 1c1082c88b..159b49b414 100644 --- a/harbour/contrib/hbzlib/doc/zip.txt +++ b/harbour/contrib/hbzlib/doc/zip.txt @@ -48,10 +48,14 @@ * 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,{|cFile|,qout(cFile)}) + * 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) + * aGauge := GaugeNew( 5, 5, 7,40 , "W/B", "W+/B" ,'²') + * GaugeDisplay( aGauge ) + * Hb_ZIPFILE('test33.zip',afiles,8,{|nPos,cFile| GaugeUpdate(aGauge,nPos/nLen)}) * Return Nil * $STATUS$ * R diff --git a/harbour/contrib/hbzlib/makefile.bc b/harbour/contrib/hbzlib/makefile.bc index 6fd4088c9e..275ff7e4c6 100644 --- a/harbour/contrib/hbzlib/makefile.bc +++ b/harbour/contrib/hbzlib/makefile.bc @@ -30,6 +30,7 @@ RDD_LIB = $(LIB_DIR)\rdd.lib RTL_LIB = $(LIB_DIR)\rtl.lib VM_LIB = $(LIB_DIR)\vm.lib GTWIN_LIB = $(LIB_DIR)\gtwin.lib +SAMPLES_LIB = $(LIB_DIR)\samples.lib HB_GT_LIB = $(GTWIN_LIB) # This is needed, otherwise the libs may overflow when # debug info is requested with -v -y @@ -109,9 +110,10 @@ $(ZLIB_BOR_LIB) : $(ZLIB_BOR_LIB_OBJ) $(ZLIB_EXE) : $(ZLIB_EXE_OBJS) echo. $(CFLAGS) > make.tmp - echo. -e$(ZLIB_EXE) >> make.tmp + echo. -M -e$(ZLIB_EXE) >> make.tmp echo. -I$(INCLUDE_DIR) >> make.tmp - echo. $(OBJ_DIR)\test.obj >> make.tmp + echo. $(OBJ_DIR)\test.obj >> make.tmp + echo. $(SAMPLES_LIB) >> make.tmp echo. $(ZLIB_LIB) >> make.tmp echo. $(ZLIB_BOR_LIB) >> make.tmp echo. $(PP_LIB) >> make.tmp diff --git a/harbour/contrib/hbzlib/test.prg b/harbour/contrib/hbzlib/test.prg index 20dce416b5..8ec28ec8b8 100644 --- a/harbour/contrib/hbzlib/test.prg +++ b/harbour/contrib/hbzlib/test.prg @@ -1,14 +1,19 @@ +#define B_BOXLINES "ÚÄ¿³ÙÄÀ³" Function Main() -/* -HB_ZIPFILE('test.zip','zip.h',,{|cFile| qout(cFile)}) -HB_ZIPFILE('test2.zip','zip.h') -*/ -Hb_ZIPFILE('test12.zip',{'.\test.prg','.\zlib.h','.\zip.h','..\..\obj\b32\test.obj'},8,{|cfile| qout(cfile)}) -/* -erase zip.h -? 'unzipping file' -hb_unzipfile('test.zip') -*/ -hb_unzipfile('test12.zip',{|cFile| qout(cFile)}) +local aDir:=Directory("*.h") +local afiles:={} +Local x +local nLen +local aGauge +CLS +For x:=1 to len(aDir) + aadd(afiles,adir[x,1]) + +next +nLen=len(afiles) +aGauge := GaugeNew( 5, 5, 7,40 , "W/B", "W+/B" ,'²') +GaugeDisplay( aGauge ) +Hb_ZIPFILE('test12.zip',afiles,8,{|nPos,cFile| GaugeUpdate(aGauge,nPos/nLen)}) +Hb_ZIPFILE('test22.zip',afiles,8,{|nPos,cFile| qout(cFile)}) return nil diff --git a/harbour/contrib/samples/makefile.bc b/harbour/contrib/samples/makefile.bc new file mode 100644 index 0000000000..fce60d3172 --- /dev/null +++ b/harbour/contrib/samples/makefile.bc @@ -0,0 +1,94 @@ +# +# $Id$ +# + +# +# Makefile for Samples library for Borland C/C++ 3.x, 4.x, 5.x compilers +# + + +CC = bcc32 +IL = implib +ID = impdef +# NOTE: Using TASM for some reason, this should be normally TASM32. +# I'll leave it to TASM until a better solution is found +AS = tasm + +BIN_DIR = ..\..\bin\b32 +OBJ_DIR = ..\..\obj\b32 +LIB_DIR = ..\..\lib\b32 + +# This is needed, otherwise the libs may overflow when +# debug info is requested with -v -y +ARFLAGS = /P32 + + +!if !$d(BCC_NOOPTIM) +CFLAGS = -O2 $(CFLAGS) +!endif + +# +# Directory macros. These should never have to change. +# + +INCLUDE_DIR = ..\..\include +SAMPLES_DIR = . +CFLAGS = -I$(INCLUDE_DIR) -d $(C_USR) $(CFLAGS) +CLIBFLAGS =$(CFLAGS) +HARBOUR_EXE = $(BIN_DIR)\harbour.exe +HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w -es2 -gc0 $(PRG_USR) $(HARBOURFLAGS) +LDFLAGS = $(LDFLAGS) + +# +# Macros to access our library names +# + +SAMPLES_LIB = $(LIB_DIR)\samples.lib +SAMPLES_LIB_OBJS = \ + $(OBJ_DIR)\environ.obj \ + $(OBJ_DIR)\date.obj \ + $(OBJ_DIR)\dbf.obj \ + $(OBJ_DIR)\gauge.obj \ + $(OBJ_DIR)\num.obj \ + $(OBJ_DIR)\stack.obj \ + $(OBJ_DIR)\status.obj \ + $(OBJ_DIR)\time.obj + +all: \ + $(SAMPLES_LIB) + +$(SAMPLES_LIB) = $(SAMPLES_LIB_OBJS) + +$(SAMPLES_LIB) : $(SAMPLES_LIB_OBJS) + +$(OBJ_DIR)\environ.obj : $(SAMPLES_DIR)\environ.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\date.obj : $(SAMPLES_DIR)\date.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\dbf.obj : $(SAMPLES_DIR)\dbf.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\gauge.obj : $(SAMPLES_DIR)\gauge.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\num.obj : $(SAMPLES_DIR)\num.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\stack.obj : $(SAMPLES_DIR)\stack.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\status.obj : $(SAMPLES_DIR)\status.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\time.obj : $(SAMPLES_DIR)\time.c + $(CC) -c $(CLIBFLAGS) -o$@ $** + tlib $(SAMPLES_LIB) $(ARFLAGS) -+$@,,