Thursday, March 31, 2011

Harbour/xharbour Diff : 8/57 - DETACHED LOCALS AND REFERENCES by Przemyslaw Czerpak

When local variables are used in codeblocks then it's possible that
the codeblocks will exist after leaving the function when they were
created. It's potentially very serious problem which have to be resolved
to avoid internal VM structure corruption. In Clipper, Harbour and
xHarbour special mechanism is used in such situation. Local variables
are "detached" from VM stack so they are still accessible after leaving
the function, f.e.:
      proc make_cb()
         local n := 123
         return {|| ++n  }
We call such variables "detached locals".
Here there are two important differences between Clipper and [x]Harbour.
In Clipper variables are detached when function exits (returns) and it
does not know which variables were used but simply detach whole local
variable frame from VM stack. It's very important to know that because
it can be source of serious memory problems in OS like DOS.
This simple code illustrates it:

      // link using RTLINK and run with //e:0 //swapk:0
      // repeat test second time with additional non empty parameter 
      #define N_LOOPS 15
      #xcommand FREE MEMORY => ? 'free memory: ' + ;
                                 AllTrim( Str( Memory( 104 ) ) )
      proc main( x )
         local n, a
         a := array( N_LOOPS )
         FREE MEMORY
         for n := 1 to N_LOOPS
            a[n] := f( x )
            FREE MEMORY
         next
      return
      func f(x)
         local cb, tmp, ref
         tmp := space( 60000 )
         if empty( x )
            cb := {|| .t. }
         else
            cb := {|| ref }
         endif
      return cb

If you execute above program with non empty parameter then 'tmp' variable
is detached with codeblock which uses 'ref' variable and not released as
long as codeblock is still accessible. It means that in few iterations
all memory are allocated and program crashes. Clipper's programmers should
know that and be careful when use detached local and if necessary clear
explicitly other local variables before returning from the function by
setting NIL to them.
In Harbour and xHarbour only variables explicitly used in codeblocks
are detached and detaching is done when codeblock is created and original
local variables are replaced by references. It is possible because Harbour
and xHarbour support multilevel references chains so it works correctly
also for local parameters passed be reference from parent functions.
In Clipper only one level references are supported what creates second
important differences. When Clipper detaches frame with local parameters
then it has to unreference all existing references breaking them. This code
illustrates it:

      proc main()
         local cb, n := 100
         mk_block( @cb, @n )
         ? "after detaching:"
         ? eval( cb ), n
      return
      proc mk_block( cb, n )
         n := 100
         cb := {|| ++n }
         ? "before detaching:"
         ? eval( cb ), n
      return

Above code compiled by Clipper shows:

      before detaching:
             101        101
      after detaching:
             102        101

so after detaching the references to 'n' variable is broken and codeblocks
access his own copy of this variables.
In Harbour it works correctly so the results are correct and it shows:

      before detaching:
             101        101
      after detaching:
             102        102

In xHarbour ( for unknown to me reasons ) Clipper bug is explicitly emulated
though it was possible to fix it because xHarbour inherited from Harbour
the same early detaching mechanism with multilevel references so just like
in Clipper xHarbour programmers have to carefully watch for possibly broken
references by detached locals and add workarounds for it if necessary.

Wednesday, March 30, 2011

Harbour/xharbour Diff : 7/57 - PASSING OBJECT VARIABLES BY REFERENCEby Przemyslaw Czerpak

Both compilers support passing object variables by reference though this functionality in xHarbour 
is limited to pure instance or class variables only and does not work for SETGET methods. 
In Harbour it works correctly.
 
This code illustrates the problem:

      proc main()
         local oBrw := tbrowseNew()
         ? oBrw:autoLite
         oBrw:autoLite := !oBrw:autoLite
         ?? "=>", oBrw:autoLite
         p( @oBrw:autoLite )
         ?? "=>", oBrw:autoLite

      proc p( x )
         x := !x

Harbour prints:
      .T.=> .F.=> .T.
but xHarbour prints:
      .T.=> .F.=> .F.
without generating any compile or run time errors.

Monday, March 21, 2011

HMG.3.0.36 is now Compatible with HB 2.1rc2

CCH : Thanx to Rathi from the HMG Forum, HMG 3.0.36 can now be compiled with Harbour 2.1 rc2
Code:
- HMG 3.0.36 (Test) 2011/03/19 Changelog:
   - Built using latest Harbour Nightly Build (2011/03/16)
   - Following Modifications done on official HMG 3.0.35
     * Edit in \hmg\source\c_media.c - Replace line no. 144 with the following:
     //    hwnd=MCIWndCreate((HWND) hb_parnl(1),NULL,Style,hb_parc(2));
     * Edit in \hmg\source\h_init.prg - Replace line no. 628 with the following:
         _HMG_SYSDATA [ 306 ] := ( EMPTY( CreateMutex( , .T., strtran(GetProgramFileName(),'\','_') ) ) .OR. (HMGGetLastError() > 0) )
     * Edit in \hmg\source\c_winapimisc.c - Replace line no. 416 to 419 with the following:
      HB_FUNC ( HMGGETLASTERROR )
      {
        hb_retnl( (LONG) GetLastError() ) ;
      }
     * Edit in \hmg\source\h_windows.prg. Replace line no 5588 with the following:
            uResult := CallDll32 ( "IsAppThemed" , "UXTHEME.DLL"  )
   - Changed HMG Build system to hbmk2 by adapting HMG 4 and latest Harbour method.
   - Changed HMG Build Application System by adapting HMG 4. Please make use of newbuild.bat in samples folder or buildapp.bat in hmg main folder.   

Sunday, March 20, 2011

Tutorial QT & Harbour Rev. [964] (new link)

CCH : From the harbour-Developers Forum

Hi
The rev. [964] of the tutorial is available at:
http://www.gruppoeratostene.com/harbour/hbqt-tutorial.htm

Regards
Giovanni Di Maria


P.S.
There is a VERY IMPORTANT topic at page 78, about a functional form
created by QT Creator.
Giovanni

Friday, March 18, 2011

Harbour/xharbour Diff : 6/57 - PASSING ARRAY AND HASH ITEMS BY REFERENCE by Przemyslaw Czerpak

### PASSING ARRAY AND HASH ITEMS BY REFERENCE ###
=======================================================
Harbour supports passing array and hash items by reference, f.e.:
proc main()
local aVal := { "abc", "klm", "xyz" }, ;
hVal := { "qwe"=>"123", "asd"=>"456", "zxc"=>"789" }
? aVal[1], aVal[2], aVal[3], hVal["qwe"], hVal["asd"], hVal["zxc"]
p( @aVal[2], @hVal["asd"] )
? aVal[1], aVal[2], aVal[3], hVal["qwe"], hVal["asd"], hVal["zxc"]

proc p( p1, p2 )
p1 := '[1]'
p2 := '[2]'

Compiled by Harbour above code shows:
abc klm xyz 123 456 789
abc [1] xyz 123 [2] 789

In xHarbour only passing array items by reference works but does not work
passing hash items by reference though it does not generate either
compile time or run time errors so the above code can be compiled and
executed but it shows:
abc klm xyz 123 456 789
abc [1] xyz 123 456 789

HMGS-IDE 1.0.7.1 Released on 16th March 2011

CCH : From the HMG Extended Forum

Hi All,

The updated HMGS-IDE 1.0.7.1 binary and sources are published
at the following URL:
http://www.hmgextended.com/files/HMGS-IDE/ide.zip

Whatsnew:
2011-03-16: version 1.0.7.1
*Fixed: problem at creating a new report. Bug was reported by Sudip
*Fixed: problem at deleting the all reports.

You can update this build via clicking 'Update' menuitem in the main
menu 'Help'.

--
Kind Regards,
Grigory Filatov
[MiniGUI Team]

Harbour MiniGUI 1.9 Extended Edition (Build 94) Released on 15th March 2011

CCH: From the HMG Extended Forum

Hi All,

The Harbour MiniGUI 1.9 Extended Edition (Build 94) setup is published at the following URL:

http://hmgextended.com/files/CONTRIB/hmg-1.9-94-setup.zip

There is the following changelog for this build:

2011/03/15: Build 94 (HMG 1.9 Extended Edition) Published.
* Fixed: The 'OnChange' event fired by mouse click in the celled GRID without
changing of the cell. It exists in the official version too.
Contributed by Grigory Filatov
(see demo2.prg in folder \samples\Basic\Grid_7)
* Fixed: The Radiogroup executes 'OnChange' event by mouse click when it's value
is not changed. It exists in the official version too.
Contributed by Grigory Filatov
(see demo1.prg in folder \samples\Basic\RadioGroup)
* Fixed: Minor correction of RadioGroup SetFocus behaviour.
Contributed by Grigory Filatov
* Enhanced: RadioGroup accepts now a zero value. This is usefully when we want
init a radiogroup without default value.
When we assign a value greater or smaller than radiogroup elements amount,
the previous value will be mainted and not display the runtime error.
Based upon a contribution by Eduardo Fernandes
(see demo3.prg in folder \samples\Basic\RadioGroup)
* Enhanced: DATEPICKER control supports a new clause RANGE dRangeMin, dRangeMax.
You can set/get these properties at runtime:
- function syntax:
SetProperty ( Form, DatePick, 'RangeMin', dData )
GetProperty ( Form, DatePick, 'RangeMax' ) --> dData
- pseudo-OOP syntax:
Form.DatePick.RangeMin := dData
Form.DatePick.RangeMax --> dData
You can erase date range at runtime via:
Form.DatePick.RangeMin := 0
Form.DatePick.RangeMax := 0
Requested by Anibal Villalobos Guillen .
Based upon a code by Alfredo Franceschetti .
Contributed by Grigory Filatov
(see demo2.prg in folder \samples\Basic\DatePicker)
* Changed: Minor improvements in the functions InputBox() and InputWindow().
Suggested by Honorio A. S. Almeida .
Contributed by Grigory Filatov
(see demo in folder \samples\Basic\InputBox)
* Changed: The internal function Random() is defined as pseudo-function now.
It is a wrapper for the Harbour function hb_RandomInt().
Contributed by Grigory Filatov
* Changed: The WinAPI constants from h_msgbox.prg are moved to header file i_winuser.ch.
Contributed by Grigory Filatov
(see i_winuser.ch in folder Include\)
* Updated: RichEditBox control:
- Modified: RichEdit Dll v.4.1 unicode support at WinXP SP1 or later.
Based upon a contribution by Janusz Pora .
- Added: unloading RichEdit Dll at program exit.
Contributed by Grigory Filatov .
* Updated: PropGrid library source code (see in folder \Source\PropGrid):
- Fixed: C-code cleaning for warnings with BCC.
Contributed by Grigory Filatov
* Updated: PropSheet library source code (see in folder \Source\PropSheet):
- Fixed: C-code cleaning for warnings with BCC.
Contributed by Grigory Filatov
* Updated: Adaptation FiveWin Class TSBrowse 9.0 in HMG:
- Fixed: Font assigning at inplace editing in btnbox, combo, datepicker and getbox.
- Fixed: Missing Alias qualification in the SetDbf method.
Contributed by Igor Nazarov.
- Changed: Function OrdScope() was used for index based filters.
Contributed by Janusz Pora
* Updated: Harbour Compiler 2.1.0rc2 (SVN 2011-03-11 13:41):
* Updated: most important differences between Harbour and xHarbour
(see xhb-diff.txt in folder \harbour\doc)
Contributed by Grigory Filatov
(look at ReadMe.txt in folder \harbour)
* Updated: HMGS-IDE v.1.0.7. Project Manager and Two-Way Visual Form Designer.
Contributed by Walter Formigoni
(look for what's new at changelog.txt in folder \Ide)
* New: 'Display Structure' sample.
Based upon a contribution by Marcos Antonio Gambeta
(see in folder \samples\Basic\DISPLAY_STRUCTURE)
* New: 'HMG Radiogroup' sample. Borrowed from HMG 4 project.
Adapted by Grigory Filatov
(see demo1.prg in folder \samples\Basic\RadioGroup)
* New: 'TsBrowse Incremental search' sample.
Based upon a contribution by Igor Nazarov
(see in folder \samples\Advanced\Tsb_filter)
* Updated: MsgEdit sample:
- Changed: function hb_GetImageSize() was used instead of XImage.dll.
Based on code contributed by Andi Jahja
(see in folder \samples\Basic\MsgEdit)

This release of MiniGUI is considered stable and ready for production use.

Your comments/feedback are welcome!

--
Best Regards,
Grigory Filatov
[MiniGUI Team]

Sunday, March 13, 2011

How to create libminigui.a with MingW32 by Walter Formigoni

As requested by me to Walter for a step-by-step approach on the above :-

1-download and install Mingw32. if you use hmg from Roberto, Mingw32 is

already instaled in c:\hmg\mingw

2-compile harbour with Mingw32. if you use hmg from Roberto, Mingw32 is

already instaled in c:\hmg\harbour

some libs of contrib are not created. verify if these libs are

essencial and compile them too.

3-in c:\minigui\source create makefile.gcc

4-create folder c:\minigui\obj (if not exist)


//begin makefile.gcc

HRB_DIR = c:/hmg/harbour

INC_DIR = c:/minigui/include

OBJ_DIR = c:/minigui/obj

LIB_DIR = c:/minigui/lib

SRC_DIR = c:/minigui/source

CFLAGS = -Wall -mno-cygwin -O3


all: \

$(LIB_DIR)/libminigui.a \


$(LIB_DIR)/libminigui.a : \

$(OBJ_DIR)/h_media.o \

$(OBJ_DIR)/h_browse.o \

$(OBJ_DIR)/h_DIALOG.o \

$(OBJ_DIR)/h_error.o \

$(OBJ_DIR)/h_ipaddress.o \

$(OBJ_DIR)/h_monthcal.o \

$(OBJ_DIR)/h_help.o \

$(OBJ_DIR)/h_status.o \

$(OBJ_DIR)/h_tree.o \

$(OBJ_DIR)/h_toolbar.o \

$(OBJ_DIR)/errorsys.o \

$(OBJ_DIR)/h_init.o \

$(OBJ_DIR)/h_winapimisc.o \

$(OBJ_DIR)/h_slider.o \

$(OBJ_DIR)/h_button.o \

$(OBJ_DIR)/h_checkbox.o \

$(OBJ_DIR)/h_combo.o \

$(OBJ_DIR)/h_controlmisc.o \

$(OBJ_DIR)/h_datepicker.o \

$(OBJ_DIR)/h_editbox.o \

$(OBJ_DIR)/h_grid.o \

$(OBJ_DIR)/h_windows.o \

$(OBJ_DIR)/h_image.o \

$(OBJ_DIR)/h_label.o \

$(OBJ_DIR)/h_listbox.o \

$(OBJ_DIR)/h_menu.o \

$(OBJ_DIR)/h_msgbox.o \

$(OBJ_DIR)/h_frame.o \

$(OBJ_DIR)/h_progressbar.o \

$(OBJ_DIR)/h_radio.o \

$(OBJ_DIR)/h_spinner.o \

$(OBJ_DIR)/h_tab.o \

$(OBJ_DIR)/h_textbox.o \

$(OBJ_DIR)/h_timer.o \

$(OBJ_DIR)/h_font.o \

$(OBJ_DIR)/h_hotkey.o \

$(OBJ_DIR)/h_richeditbox.o \

$(OBJ_DIR)/h_BTNTEXTBOX.o \

$(OBJ_DIR)/h_CURSOR.o \

$(OBJ_DIR)/h_DRAW.o \

$(OBJ_DIR)/h_EDIT_EX.o \

$(OBJ_DIR)/h_EVENTS.o \

$(OBJ_DIR)/h_FOLDER.o \

$(OBJ_DIR)/h_GETBOX.o \

$(OBJ_DIR)/h_GRAPH.o \

$(OBJ_DIR)/h_GRADIENT.o \

$(OBJ_DIR)/h_HOTKEYBOX.o \

$(OBJ_DIR)/h_HYPERLINK.o \

$(OBJ_DIR)/h_IMAGELIST.o \

$(OBJ_DIR)/h_REPORT.o \

$(OBJ_DIR)/h_REGISTRY.o \

$(OBJ_DIR)/h_SCRSAVER.o \

$(OBJ_DIR)/h_SOCKET.o \

$(OBJ_DIR)/h_WBRUSH.o \

$(OBJ_DIR)/h_WINDOWSMDI.o \

$(OBJ_DIR)/h_WINPROP.o \

$(OBJ_DIR)/h_dialogs.o \

$(OBJ_DIR)/h_pager.o \

$(OBJ_DIR)/c_media.o \

$(OBJ_DIR)/c_DIALOG.o \

$(OBJ_DIR)/c_ipaddress.o \

$(OBJ_DIR)/c_monthcal.o \

$(OBJ_DIR)/c_help.o \

$(OBJ_DIR)/c_status.o \

$(OBJ_DIR)/c_tree.o \

$(OBJ_DIR)/c_toolbar.o \

$(OBJ_DIR)/c_button.o \

$(OBJ_DIR)/c_checkbox.o \

$(OBJ_DIR)/c_combo.o \

$(OBJ_DIR)/c_controlmisc.o \

$(OBJ_DIR)/c_datepicker.o \

$(OBJ_DIR)/c_resource.o \

$(OBJ_DIR)/c_font.o \

$(OBJ_DIR)/c_richeditbox.o \

$(OBJ_DIR)/c_editbox.o \

$(OBJ_DIR)/c_dialogs.o \

$(OBJ_DIR)/c_grid.o \

$(OBJ_DIR)/c_windows.o \

$(OBJ_DIR)/c_image.o \

$(OBJ_DIR)/c_label.o \

$(OBJ_DIR)/c_listbox.o \

$(OBJ_DIR)/c_menu.o \

$(OBJ_DIR)/c_msgbox.o \

$(OBJ_DIR)/c_frame.o \

$(OBJ_DIR)/c_progressbar.o \

$(OBJ_DIR)/c_radio.o \

$(OBJ_DIR)/c_slider.o \

$(OBJ_DIR)/c_spinner.o \

$(OBJ_DIR)/c_tab.o \

$(OBJ_DIR)/c_textbox.o \

$(OBJ_DIR)/c_timer.o \

$(OBJ_DIR)/c_winapimisc.o \

$(OBJ_DIR)/c_hotkey.o \

$(OBJ_DIR)/c_browse.o \

$(OBJ_DIR)/c_BITMAP.o \

$(OBJ_DIR)/c_BTNTEXTBOX.o \

$(OBJ_DIR)/c_CURSOR.o \

$(OBJ_DIR)/c_FOLDER.o \

$(OBJ_DIR)/c_GETBOX.o \

$(OBJ_DIR)/c_GRAPH.o \

$(OBJ_DIR)/c_HOTKEYBOX.o \

$(OBJ_DIR)/c_IMAGELIST.o \

$(OBJ_DIR)/c_REGISTRY.o \

$(OBJ_DIR)/c_HYPERLINK.o \

$(OBJ_DIR)/c_WINDOWSMDI.o \

$(OBJ_DIR)/c_WINPROP.o \

$(OBJ_DIR)/c_WINXP.o \

$(OBJ_DIR)/c_pager.o \


ar rc $@ $^


$(OBJ_DIR)/c_media.o : $(SRC_DIR)/c_media.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_DIALOG.o : $(SRC_DIR)/c_DIALOG.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_ipaddress.o : $(SRC_DIR)/c_ipaddress.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_monthcal.o : $(SRC_DIR)/c_monthcal.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_help.o : $(SRC_DIR)/c_help.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_status.o : $(SRC_DIR)/c_status.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_tree.o : $(SRC_DIR)/c_tree.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_toolbar.o : $(SRC_DIR)/c_toolbar.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_button.o : $(SRC_DIR)/c_button.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_checkbox.o : $(SRC_DIR)/c_checkbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_combo.o : $(SRC_DIR)/c_combo.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_controlmisc.o : $(SRC_DIR)/c_controlmisc.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_datepicker.o : $(SRC_DIR)/c_datepicker.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_resource.o : $(SRC_DIR)/c_resource.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_font.o : $(SRC_DIR)/c_font.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_richeditbox.o : $(SRC_DIR)/c_richeditbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_editbox.o : $(SRC_DIR)/c_editbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_dialogs.o : $(SRC_DIR)/c_dialogs.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_grid.o : $(SRC_DIR)/c_grid.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_windows.o : $(SRC_DIR)/c_windows.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_image.o : $(SRC_DIR)/c_image.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_label.o : $(SRC_DIR)/c_label.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_listbox.o : $(SRC_DIR)/c_listbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_menu.o : $(SRC_DIR)/c_menu.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_msgbox.o : $(SRC_DIR)/c_msgbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_frame.o : $(SRC_DIR)/c_frame.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_progressbar.o : $(SRC_DIR)/c_progressbar.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_radio.o : $(SRC_DIR)/c_radio.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_slider.o : $(SRC_DIR)/c_slider.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_spinner.o : $(SRC_DIR)/c_spinner.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_tab.o : $(SRC_DIR)/c_tab.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_textbox.o : $(SRC_DIR)/c_textbox.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_timer.o : $(SRC_DIR)/c_timer.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_winapimisc.o : $(SRC_DIR)/c_winapimisc.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_hotkey.o : $(SRC_DIR)/c_hotkey.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_browse.o : $(SRC_DIR)/c_browse.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_BITMAP.o : $(SRC_DIR)/c_BITMAP.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_BTNTEXTBOX.o : $(SRC_DIR)/c_BTNTEXTBOX.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_CURSOR.o : $(SRC_DIR)/c_CURSOR.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_FOLDER.o : $(SRC_DIR)/c_FOLDER.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_GETBOX.o : $(SRC_DIR)/c_GETBOX.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_GRAPH.o : $(SRC_DIR)/c_GRAPH.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_HOTKEYBOX.o : $(SRC_DIR)/c_HOTKEYBOX.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_IMAGELIST.o : $(SRC_DIR)/c_IMAGELIST.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_REGISTRY.o : $(SRC_DIR)/c_REGISTRY.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_HYPERLINK.o : $(SRC_DIR)/c_HYPERLINK.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_WINDOWSMDI.o : $(SRC_DIR)/c_WINDOWSMDI.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_WINPROP.o : $(SRC_DIR)/c_WINPROP.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_WINXP.o : $(SRC_DIR)/c_WINXP.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^

$(OBJ_DIR)/c_pager.o : $(SRC_DIR)/c_pager.c

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^


$(OBJ_DIR)/h_media.o : $(OBJ_DIR)/h_media.c

$(OBJ_DIR)/h_DIALOG.o : $(OBJ_DIR)/h_DIALOG.c

$(OBJ_DIR)/h_browse.o : $(OBJ_DIR)/h_browse.c

$(OBJ_DIR)/h_error.o : $(OBJ_DIR)/h_error.c

$(OBJ_DIR)/h_ipaddress.o : $(OBJ_DIR)/h_ipaddress.c

$(OBJ_DIR)/h_monthcal.o : $(OBJ_DIR)/h_monthcal.c

$(OBJ_DIR)/h_help.o : $(OBJ_DIR)/h_help.c

$(OBJ_DIR)/h_status.o : $(OBJ_DIR)/h_status.c

$(OBJ_DIR)/h_tree.o : $(OBJ_DIR)/h_tree.c

$(OBJ_DIR)/h_toolbar.o : $(OBJ_DIR)/h_toolbar.c

$(OBJ_DIR)/errorsys.o : $(OBJ_DIR)/errorsys.c

$(OBJ_DIR)/h_init.o : $(OBJ_DIR)/h_init.c

$(OBJ_DIR)/h_winapimisc.o : $(OBJ_DIR)/h_winapimisc.c

$(OBJ_DIR)/h_slider.o : $(OBJ_DIR)/h_slider.c

$(OBJ_DIR)/h_button.o : $(OBJ_DIR)/h_button.c

$(OBJ_DIR)/h_checkbox.o : $(OBJ_DIR)/h_checkbox.c

$(OBJ_DIR)/h_combo.o : $(OBJ_DIR)/h_combo.c

$(OBJ_DIR)/h_controlmisc.o : $(OBJ_DIR)/h_controlmisc.c

$(OBJ_DIR)/h_datepicker.o : $(OBJ_DIR)/h_datepicker.c

$(OBJ_DIR)/h_editbox.o : $(OBJ_DIR)/h_editbox.c

$(OBJ_DIR)/h_dialogs.o : $(OBJ_DIR)/h_dialogs.c

$(OBJ_DIR)/h_pager.o : $(OBJ_DIR)/h_pager.c

$(OBJ_DIR)/h_grid.o : $(OBJ_DIR)/h_grid.c

$(OBJ_DIR)/h_windows.o : $(OBJ_DIR)/h_windows.c

$(OBJ_DIR)/h_image.o : $(OBJ_DIR)/h_image.c

$(OBJ_DIR)/h_label.o : $(OBJ_DIR)/h_label.c

$(OBJ_DIR)/h_listbox.o : $(OBJ_DIR)/h_listbox.c

$(OBJ_DIR)/h_menu.o : $(OBJ_DIR)/h_menu.c

$(OBJ_DIR)/h_msgbox.o : $(OBJ_DIR)/h_msgbox.c

$(OBJ_DIR)/h_frame.o : $(OBJ_DIR)/h_frame.c

$(OBJ_DIR)/h_progressbar.o : $(OBJ_DIR)/h_progressbar.c

$(OBJ_DIR)/h_radio.o : $(OBJ_DIR)/h_radio.c

$(OBJ_DIR)/h_spinner.o : $(OBJ_DIR)/h_spinner.c

$(OBJ_DIR)/h_tab.o : $(OBJ_DIR)/h_tab.c

$(OBJ_DIR)/h_textbox.o : $(OBJ_DIR)/h_textbox.c

$(OBJ_DIR)/h_timer.o : $(OBJ_DIR)/h_timer.c

$(OBJ_DIR)/h_font.o : $(OBJ_DIR)/h_font.c

$(OBJ_DIR)/h_hotkey.o : $(OBJ_DIR)/h_hotkey.c

$(OBJ_DIR)/h_richeditbox.o : $(OBJ_DIR)/h_richeditbox.c

$(OBJ_DIR)/h_BTNTEXTBOX.o : $(OBJ_DIR)/h_BTNTEXTBOX.c

$(OBJ_DIR)/h_CURSOR.o : $(OBJ_DIR)/h_CURSOR.c

$(OBJ_DIR)/h_DRAW.o : $(OBJ_DIR)/h_DRAW.c

$(OBJ_DIR)/h_EDIT.o : $(OBJ_DIR)/h_EDIT.c

$(OBJ_DIR)/h_EDIT_EX.o : $(OBJ_DIR)/h_EDIT_EX.c

$(OBJ_DIR)/h_EVENTS.o : $(OBJ_DIR)/h_EVENTS.c

$(OBJ_DIR)/h_FOLDER.o : $(OBJ_DIR)/h_FOLDER.c

$(OBJ_DIR)/h_GETBOX.o : $(OBJ_DIR)/h_GETBOX.c

$(OBJ_DIR)/h_GRAPH.o : $(OBJ_DIR)/h_GRAPH.c

$(OBJ_DIR)/h_GRADIENT.o : $(OBJ_DIR)/h_GRADIENT.c

$(OBJ_DIR)/h_HOTKEYBOX.o : $(OBJ_DIR)/h_HOTKEYBOX.c

$(OBJ_DIR)/h_HYPERLINK.o : $(OBJ_DIR)/h_HYPERLINK.c

$(OBJ_DIR)/h_IMAGELIST.o : $(OBJ_DIR)/h_IMAGELIST.c

$(OBJ_DIR)/h_REGISTRY.o : $(OBJ_DIR)/h_REGISTRY.c

$(OBJ_DIR)/h_REPORT.o : $(OBJ_DIR)/h_REPORT.c

$(OBJ_DIR)/h_SCRSAVER.o : $(OBJ_DIR)/h_SCRSAVER.c

$(OBJ_DIR)/h_SOCKET.o : $(OBJ_DIR)/h_SOCKET.c

$(OBJ_DIR)/h_WBRUSH.o : $(OBJ_DIR)/h_WBRUSH.c

$(OBJ_DIR)/h_WINDOWSMDI.o : $(OBJ_DIR)/h_WINDOWSMDI.c

$(OBJ_DIR)/h_WINPROP.o : $(OBJ_DIR)/h_WINPROP.c


$(OBJ_DIR)/h_media.c : $(SRC_DIR)/h_media.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_DIALOG.c : $(SRC_DIR)/h_DIALOG.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_browse.c : $(SRC_DIR)/h_browse.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_error.c : $(SRC_DIR)/h_error.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_ipaddress.c : $(SRC_DIR)/h_ipaddress.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_monthcal.c : $(SRC_DIR)/h_monthcal.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_help.c : $(SRC_DIR)/h_help.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_status.c : $(SRC_DIR)/h_status.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_tree.c : $(SRC_DIR)/h_tree.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_toolbar.c : $(SRC_DIR)/h_toolbar.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/errorsys.c : $(SRC_DIR)/errorsys.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_init.c : $(SRC_DIR)/h_init.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_winapimisc.c : $(SRC_DIR)/h_winapimisc.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_slider.c : $(SRC_DIR)/h_slider.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_button.c : $(SRC_DIR)/h_button.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_checkbox.c : $(SRC_DIR)/h_checkbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_combo.c : $(SRC_DIR)/h_combo.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_controlmisc.c : $(SRC_DIR)/h_controlmisc.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_datepicker.c : $(SRC_DIR)/h_datepicker.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_editbox.c : $(SRC_DIR)/h_editbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_dialogs.c : $(SRC_DIR)/h_dialogs.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_grid.c : $(SRC_DIR)/h_grid.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_windows.c : $(SRC_DIR)/h_windows.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_image.c : $(SRC_DIR)/h_image.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_label.c : $(SRC_DIR)/h_label.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_listbox.c : $(SRC_DIR)/h_listbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_menu.c : $(SRC_DIR)/h_menu.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_msgbox.c : $(SRC_DIR)/h_msgbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_frame.c : $(SRC_DIR)/h_frame.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_progressbar.c : $(SRC_DIR)/h_progressbar.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_radio.c : $(SRC_DIR)/h_radio.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_spinner.c : $(SRC_DIR)/h_spinner.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_tab.c : $(SRC_DIR)/h_tab.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_textbox.c : $(SRC_DIR)/h_textbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_timer.c : $(SRC_DIR)/h_timer.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_font.c : $(SRC_DIR)/h_font.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_hotkey.c : $(SRC_DIR)/h_hotkey.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_richeditbox.c : $(SRC_DIR)/h_richeditbox.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_BTNTEXTBOX.c : $(SRC_DIR)/h_BTNTEXTBOX.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_CURSOR.c : $(SRC_DIR)/h_CURSOR.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_DRAW.c : $(SRC_DIR)/h_DRAW.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_EDIT.c : $(SRC_DIR)/h_EDIT.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_EDIT_EX.c : $(SRC_DIR)/h_EDIT_EX.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_EVENTS.c : $(SRC_DIR)/h_EVENTS.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_FOLDER.c : $(SRC_DIR)/h_FOLDER.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_GETBOX.c : $(SRC_DIR)/h_GETBOX.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_GRAPH.c : $(SRC_DIR)/h_GRAPH.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_GRADIENT.c : $(SRC_DIR)/h_GRADIENT.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_HOTKEYBOX.c : $(SRC_DIR)/h_HOTKEYBOX.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_HYPERLINK.c : $(SRC_DIR)/h_HYPERLINK.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_IMAGELIST.c : $(SRC_DIR)/h_IMAGELIST.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_REGISTRY.c : $(SRC_DIR)/h_REGISTRY.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_REPORT.c : $(SRC_DIR)/h_REPORT.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_SCRSAVER.c : $(SRC_DIR)/h_SCRSAVER.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_SOCKET.c : $(SRC_DIR)/h_SOCKET.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_WBRUSH.c : $(SRC_DIR)/h_WBRUSH.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_WINDOWSMDI.c : $(SRC_DIR)/h_WINDOWSMDI.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_WINPROP.c : $(SRC_DIR)/h_WINPROP.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^

$(OBJ_DIR)/h_pager.c : $(SRC_DIR)/h_pager.prg

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^


.prg.c:

$(HRB_DIR)/bin\harbour.exe $^ -n -I$(HRB_DIR)/include

-i$(INC_DIR) -d__WINDOWS__ -o$@ $^


.c.o:

gcc $(CFLAGS) -c -I$(INC_DIR) -I$(HRB_DIR)/include -o $@ $^


//end makefile.gcc


5-create makelib.bat


//begin makelib.bat

@echo off


set PATH=c:\hmg\mingw\bin


if "%1" == "clean" goto CLEAN

if "%1" == "CLEAN" goto CLEAN


:BUILD


mingw32-make.exe -f makefile.gcc

if errorlevel 1 goto BUILD_ERR


:BUILD_OK


goto EXIT


:BUILD_ERR


goto EXIT


:CLEAN

del lib\*.a

del lib\*.bak

del obj\*.o

del obj\*.c


goto EXIT


:EXIT

//end makelib.bat


Kind regards

Walter Formigoni

Does a Smaller EXE size equates to Better Execution Speed ?

Recently, I had discovered that an EXE created by Minigui+Harbour 2.1 was 800K smaller than an EXE created with HMG+Harbour 2.0. A series of discussion with Viktor and Grigory Filatov confirmed that the smaller EXE was due to the usage of Borland C Compiler by Minigui as compared with MingW32. But it does not end here :-)

Viktor as well as Gustavo of the Minigui forum convinced me that a smaller EXE does not mean faster execution.

1) Gustavo Asborno
Hi Chee Chong Hwa, The size difference between HMG and Miniguide be only the compiler, HMG uses Mingw, which creates larger exes, but is superior in speed, while loading windows.

2) Gustavo Asborno
Hi CCH, I mean in the execution, for example if we have a window with many controls in an ABM my case, there are 98 in a Textbox Tab, at the beginningof the ABM and the controls are going dabdole Enabled: =. F. Borland is avisual effect of this work with Mingw this is not reflected, the load is instantaneous.

3) Viktor
Yes, bcc produces smaller but much slower exes. bcc is by far the slowest of all Windows C compilers.

4)CCH: BTW, don't you think that is a paradox that a smaller EXE executes slower  than a bigger EXE ;-)

Viktor :
It may be surprising at first, but this is a classic optimization problem. In most C compilers you
must chose between size and speed (and there is usually some balanced optimum in between).

F.e.:
 FOR tmp := 1 TO 5
    ? tmp
 NEXT
is smaller, but slower than this:
 ? 1
 ? 2
 ? 3
 ? 4
 ? 5

This is called loop unrolling optimization, and just one of the many possibilities.

5. CCH :So it is not only a launch time issue but execution throughout the app ?

Viktor : 
It's execution speed.

[ Raw launch time is mainly influenced by other things, like storage
medium, number of .dll dependencies, exe compression. Plus of
course any application level init code, which is affected by execution
speed. ]

So, it would appear that it may be worthwhile to try recompiling the mingui.lib using MIngW32 :-)

So the next article would be to let Walter Formigoni to teach us how to do so

Thursday, March 10, 2011

Harbour (2.1) and QT Classes (4.7) - Tutorial by Giovanni Di Maria

As per the harbour developers list, the latest Harbour (2.1) and QT Classes (4.7) - Tutorial by Giovanni Di Maria is now available for download at
http://www.gruppoeratostene.com/harbour/ht.htm

This tutorial is a brief, continuously updated, of the use of the classes QT with Harbour language.
It is specifically written for beginners that initially encountered some difficulties in using these classes, however, extremely powerful and efficient.

The approach of the tutorial is different from other guides that are online. It simply focuses a single class or single object, so you do not get lost in the maze of the vast files of examples provided with the product.

This will easily learn to manage and plan their individual class, as needed, and, finally, to put "together" the whole.

Giovanni Di Maria
email: calimero22@yahoo.it

Wednesday, March 9, 2011

Harbour/xharbour Diff (5/57) - REFERENCES TO VARIABLES STORED IN ARRAYS by Przemyslaw Czerpak

In xHarbour the behavior of references stored in array is reverted in
comparison to Clipper or Harbour.
In Clipper and Harbour VM executing code like:
         aVal[ 1 ] := 100
clears unconditionally 1-st item in aVal array and assigns to it value 100.
xHarbour checks if aVal[ 1 ] is an reference and in such case it resolves
the reference and then assign 100 to the destination item.
On access Clipper and Harbour VM executing code like:
         x := aVal[ 1 ]
copy to x the exact value stored in aVal[ 1 ]. xHarbour checks is aVal[ 1 ]
is an reference and in such case it resolves the reference and then copy to x
the value of reference destination item.
It can be seen in code like:
      proc main
         local p1 := "A", p2 := "B", p3 := "C"
         ? p1, p2, p3
         p( { @p1, p2, @p3 } )
         ? p1, p2, p3

      proc p( aParams )
         local x1, x2, x3

         x1 := aParams[ 1 ]
         x2 := aParams[ 2 ]
         x3 := aParams[ 3 ]

         x1 := lower( x1 ) + "1"
         x2 := lower( x2 ) + "2"
         x3 := lower( x3 ) + "3"

Harbour and Clipper shows:
      A B C
      a1 B c3
but xHarbour:
      A B C
      A B C

It's not Clipper compatible so in some cases it may cause portability
problems. F.e. code like above was used in Clipper as workaround for
limited number of parameters (32 in Clipper). But it allows to directly
assign items of arrays returned by hb_aParams() and updating corresponding
variables passed by references (see functions with variable number of
parameters below).
Anyhow the fact that xHarbour does not have '...' operator which can
respect existing references in passed parameters and does not support
named parameters in functions with variable number of parameters causes
that reverted references introduce limitation, f.e. it's not possible
to make code like:
   func f( ... )
      local aParams := hb_aParams()
      if len( aParams ) == 1
         return f1( aParams[ 1 ] )
      elseif len( aParams ) == 2
         return f2( aParams[ 1 ], aParams[ 2 ] )
      elseif len( aParams ) >= 3
         return f3( aParams[ 1 ], aParams[ 2 ], aParams[ 3 ] )
      endif
   return 0

which will respect references in parameters passed to f() function.

HMGS-IDE 1.0.7 Released on 9th March 2011

CCH: From the HMG Extended Forum

Hi All,

The updated HMGS-IDE 1.0.7 binary and sources are published
at the following URL:
http://www.hmgextended.com/files/HMGS-IDE/ide.zip

Whatsnew by Walter Formigoni:
2011-03-07: version 1.0.7
*Added: in menu delete special control DROPDOWN MENU.
*Added : in controlorder option to show or not Label control. Requested by Sudip <sudipb001@gmail.com>
*Changed: in loadform of control TSBROWSE with complete fields.
*Added: copy controls. Requested by Sudip <sudipb001@gmail.com>
*Changed : in controls , selecting a control will be copied to form until is unchecked by DeSelect button.

You can update this build via clicking 'Update' menuitem in the main
menu 'Help'.

--
Kind Regards,
Grigory Filatov
[MiniGUI Team]

Monday, March 7, 2011

Habour 2.1 now supports Alert() mapped to MessageBox()

Great news ! In scanning the ChangeLog dated 22nd Feb 2011 that came with HB2.1, i found this gem


2011-01-10 20:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtgui/gtgui.c


+ added basic support for redirecting ALERT() to MessageBox() in
MS-Windows GTGUI builds. Please remember that MessageBox() supports
only few predefined buttons so it's not possible to show all user
options. Anyhow it should be enough to present error messages
generated by default error handler.


I am sure you know what this means to Clipper programmers migrating their codes to Harbour :-)

Just tested Alert() as in :-

nchoice := Alert( 'Print or Display &mreptname', { 'PRINT', 'DISPLAY', 'CANCEL' } )

Observations
============
1. Can handle up to 3 buttons. If a 4th button is added to the array of choices, only 1 button will show up

2. No Window title
3. No Icon

Adding MsgInfo() Functionality to a Harbour app

CCH : Assuming that you want a simple Alert() replacement and do not want to add harbour-compatible libs such as gtWVG, HMG or Minigui, you may want to check out this piece of code by Vailton Renato posted recently on the harbour-users Google group.

/*
* An MsgInfo() implementation using hbwin library.
* 06/03/2011 - 21:56:45
*
* COMPILE: hbmk2 msginfo1.prg -run -lhbwin
*/
#include "hbwin.ch"

FUNCTION MAIN()
? MsgInfo( "This is a single test" )
RETURN nil

FUNCTION MSGINFO( cText, cTitle )
RETURN WAPI_MESSAGEBOX( 0, cText, cTitle, WIN_MB_ICONQUESTION )

Regards,
Vailton Renato

Friday, March 4, 2011

Harbour/xharbour Diff (4/57) - HASH ARRAYS by Przemyslaw Czerpak

Both compilers have support for hash arrays. They are similar to normal arrays but also allow to use non integer values as indexes like string, date, non integer number or pointer (in Harbour) items.

They can be created using => for list of keys and values enclosed
inside {}, f.e.:
hVal := { "ABC" => 123.45, ;
100.1 => date(), ;
100.2 => 10, ;
100 => 5, ;
date()-1 => .t. }
and then items can be accessed using [] operator, f.e.:
? hVal[ "ABC" ] // 123.45
? hVal[ 100 ] // 5
? hVal[ date()-1 ] // .t.
? hVal[ 100.2 ] // 10
? hVal[ 100.1 ] // date()

By default hash items in both compiler support automatic adding new elements
on assign operation. It can be disabled using one of hash item functions.
Harbour has additional extension which allows to enable autoadd with default
values also for access operation and reference operator. It also supports
well passing hash array items by reference and has some other minor
extensions.

xHarbour does not support autoadd on access or reference operations and
passing hash array items by reference does not work (see passing array and
hash item by reference).

Both compilers have set of functions to make different operations on hash
arrays which give similar functionality. In Harbour they use HB_H prefix
(f.e. HB_HSCAN()) in xHarbour H prefix (f.e. HSCAN())

xHarbour has additional functionality which can be enabled for each hash
array using HSetAACompatibility() function. It's an index where is stored
information about the order in which items were added to hash array and
set of functions with HAA prefix to operate on hash array items using this
index instead of real position in hash array, i.e. HAAGETVALUEAT() which
works like HGETVALUEAT().

In Harbour such functionality also exists and it's enabled by HB_HKEEPORDER() function but the internal implementation is completely different. Harbour does not emulate associative arrays by special index which keeps assign order but it uses real natural order in hash array. It means that associative array indexes are equal to regular hash indexes so it does not need any translation between them and Harbour users can use regular hash array functions for associative array indexes. So separated functions for accessing by other index are not necessary. The Harbour implementation is also more efficient because it does not introduce linear index updated each time new key is added to hash array.

Harbour emulates HAA*() xHarbour functions in XHB library but only for
compatibility with existing xHarbour code.

HMGS-IDE 1.0.6.2 Released on 4th March 2011

CCH: From the HMG Extended Forum

Hi All,

The updated HMGS-IDE 1.0.6.2 binary and sources are published
at the following URL:
http://www.hmgextended.com/files/HMGS-IDE/ide.zip

Whatsnew:
2011-03-03: version 1.0.6.2
*Added : ON DROPFILES event management. Requested by Jaroslav Janik . Contribution by Grigory Filatov

You can update this build via clicking 'Update' menuitem in the main
menu 'Help'.

--
Kind Regards,
Grigory Filatov

Wednesday, March 2, 2011

Harbour/xharbour Diff (3/57) - EXTENDED CODEBLOCKS by Przemyslaw Czerpak

Both compilers support compile time extended codeblocks which allow to use statements but with a little bit different syntax. Harbour uses standard Clipper codeblock delimiters {}, f.e.:

      ? eval( { | p1, p2, p3 |
                ? p1, p2, p3
                return p1 + p2 + p3
              }, 1, 2, 3 )

and xHarbour <>, f.e.:
      ? eval( < | p1, p2, p3 |
                ? p1, p2, p3
                return p1 + p2 + p3
              >, 1, 2, 3 )

In Harbour extended codeblocks works like nested functions and support all functions attributes, f.e. they can have own static variables or other declarations which are local to extended codeblocks only and do not effect upper function body.

In xHarbour the compiler was not fully updated for such functionality and extended codeblocks were added to existing compiler structures what causes that not all language constructs work in extended codeblocks and creates a set of very serious compiler bugs, f.e., like in this code with syntax errors but which is compiled by xHarbour without even single warning giving unexpected results at runtime:

      #ifndef __XHARBOUR__
         #xtranslate \<|[]| => {||
         #xcommand > [<*x*>]       => } 
      #endif
      proc main()
         local cb, i
         for i:=1 to 5
            cb := <| p |
                     ? p
                     exit
                     return p * 10
                  >
            ?? eval( cb, i )
         next
      return

It's possible to create many other similar examples which are mostly caused by missing in the compiler infrastructure for nested functions support.

This can be fixed if someone invest some time to clean xHarbour compiler.

Tuesday, March 1, 2011

Harbour/xharbour Diff (2/57) -NEW LANGUAGE STATEMENTS by Przemyslaw Czerpak

1. FOR EACH 
 
Harbour support all xHarbour functionality and it offers also additional
   features which are not available in xHarbour.
   a) it allows to iterate more then one variable
         FOR EACH a, b, c IN aVal, cVal, hVal
            ? a, b, c
         NEXT
   b) it allows to set descending order by DESCEND flag, f.e.:
         FOR EACH a, v IN aVal, cVal DESCEND
            ? a, b
         NEXT
   c) it has native support for hashes:
         FOR EACH x IN { "ABC" => 123, "ASD" => 456, "ZXC" => 789 }
            ? x, "@", x:__enumKey()
         NEXT
   d) it allows to assign string items, f.e.:
         s := "abcdefghijk"
         FOR EACH c IN @s
            IF c $ "aei"
               c := UPPER( c )
            ENDIF
         NEXT
         ? s      // AbcdEfghIjk
   e) it gives OOP interface to control enumerator variables what
      is very important when more then one variable is iterated or
      when FOR EACH is called recursively, f.e.:
         hVal := { "ABC" => 123, "ASD" => 456, "ZXC" => 789 }
         FOR EACH x IN hVal
            ? x:__enumIndex(), ":", x:__enumKey(), "=>", x:__enumValue(), ;
              "=>", x:__enumBase()[ x:__enumKey() ]
         NEXT
   f) it gives very flexible OOP mechanism to overload FOR EACH behavior
      for user define objects adding to above enumerator methods also
      __enumStart(), __enumStop(), __enumSkip() methods what allows to
      implement many different enumeration algorithms depending on used
      data
   g) it does not have any hardcoded limitations for recursive calls
      (it's limited only by available memory and HVM stack size), f.e.:
         proc main()
            p( 0 )
         return
         proc p( n )
            local s := "a", x
            ? n
            if n < 1000
               for each x in s
                  p( n + 1 )
               next
            endif
         return
   In xHarbour there is function HB_ENUMINDEX() which is supported by
   Harbour in XHB library.

2. WITH OBJECT / END[WITH]3. SWITCH / [ CASE / [EXIT] / ... ] OTHERWISE / END[SWITCH]4. BEGIN SEQUENCE [ WITH  ]
   In Harbour it does not have any hardcoded limitations for recursive
   calls (it's limited only by available memory and HVM stack size), f.e.:
      proc main()
         p( 0 )
      return
      proc p( n )
         ? n
         if n < 1000
            with object n
               p( n + 1 )
            end
         endif
      return
   It also uses OOP interface just like FOR EACH, so it's possible to
   use :__withObject() to access / assign current WITH OBJECT value.
   In xHarbour there are functions HB_QWITH(), HB_WITHOBJECTCOUNTER()
   and HB_RESETWITH() which are supported by Harbour in XHB library.


   In Harbour it uses jump table with predefined values what gives
   significant speed improvement in comparison to sequential PCODE
   evaluation just like in DO CASE statements.
   In xHarbour SWITCH does not use such jump table and generated
   PCODE is similar to the one used for DO CASE or IF / ELSEIF
   and only the main switch value calculation is optimized and
   reused for all statements so speed improvement is relatively
   small.
   In xHarbour instead of OTHERWISE the DEFAULT clause is used.
   As SWITCH values Harbour supports integer numbers and strings, f.e.:
      switch x
         case 1         ; [...]
         case 10002     ; [...]
         case "data"    ; [...]
         otherwise      ; [...]
      endswitch
   xHarbour supports only integer numbers and one character length strings
   like "A", "!", "x", " ", ...


   [ RECOVER [ USING  ] ]
   [ ALWAYS ]
   END SEQUENCE

   It's unique to Harbour. In xHarbour limited version of above statement
   exists as:
      TRY
      [ CATCH [] ]
      [ FINALLY ]
      END
   TRY gives exactly the same functionality as:
      BEGIN SEQUENCE WITH { |e| break(e) }

With the exception to SWITCH implementation, in all other statements
described above, xHarbour causes performance reduction in PCODE evaluation
even if user does not use them at all. In Harbour they are implemented in
different way which does not cause any overhead and slowness for other code. 
 
More at http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/trunk/harbour/doc/xhb-diff.txt

Welcome to Clipper... Clipper... Clipper


In 1997, then using Delphi 3, I had already created 32-bits Windows applications for HRIS, ERP and CRM. In 2007, using Ruby on Rails, an AJAX powered CRM site running on Apache & MySQL was created and I am now using Visual Studio .Net 2008 to create web-based projects and Delphi 7 for Win32 applications using SQL2005 & DBFCDX.

So, why then am I reviving the Original Clipper... Clipper... Clipper via a Blog as CA-Clipper is a programming language for the DOS world ? Believe it or not, there are still some clients using my mission-critical CA-Clipper applications for DOS installed in the late 80's and up to the mid 90's. This is testimony to CA-Clipper's robustness as a language :-)

With the widespread introduction of Windows 7 64-bits as the standard O/S for new Windows based PCs & Notebooks, CA-Clipper EXE simply will not work and it has become imperative for Clipper programmers to migrate immediately to Harbour to build 32/64 bits EXEs

Since 28th January 2009, this blog has been read by 134,389 (10/3/11 - 39,277) unique visitors (of which 45,151 (10/3/11 - 13,929) are returning visitors) from 103 countries and 1,574 cities & towns in Europe (37; 764 cities), North America (3; 373 cities) , Central America & Caribeans (6; 13 cities), South America(10; 226 cities), Africa & Middle-East (12; 44 cities) , Asia-Pacific (21; 175 cities). So, obviously Clipper is Alive & Well : -)


TIA & Enjoy ! (10th October 2012, 11:05; 13th November 2015)


Original Welcome Page for Clipper... Clipper... Clipper

This is the original Welcome Page for Clipper... Clipper... Clipper, which I am republishing for historical and sentimental reasons. The only changes that I have made was to fix all the broken links. BTW, the counter from counter.digits.com is still working :-)

Welcome to Chee Chong Hwa's Malaysian WWW web site which is dedicated to Clipperheads throughout the world.

This site started out as a teeny-weeny section of Who the heck is Chee Chong Hwa ? and has graduated into a full blown web site of more than 140 pages (actually hundreds of A4 size pages) ! This is due to its growing popularity and tremendous encouragements from visiting Clipperheads from 100 countries worldwide, from North America, Central America, Caribbean, South America, Europe, Middle-East, Africa and Asia-Pacific. Thanx Clipperheads, you all made this happen !


What is Clipper ?

You may ask, what is this Clipper stuff ? Could Clipper be something to do with sailing as it is the name of a very fast sailing American ship in the 19th century ?

Well, Clipper or to be precise, CA-Clipper is the premier PC-Software development tool for DOS. It was first developed by Nantucket Corporation initially as a compiler for dBase3+ programs. Since then, CA-Clipper has evolved away from its x-base roots with the introduction of lexical scoping & pre-defined objects like TBrowse. As at today, the most stable version ofClipper is 5.2e while the latest version, 5.3a was introduced on 21 May 1996.

As at 11th November, 1996, an unofficial 5.3a fixes file was made available by Jo French. See the About CA-Clipper 5.3a section for more details. BTW, Jo French uploaded the revised 5.3a fixes file on 20th November, 1996.

Latest News

The latest news is that CA has finally released the long-awaited 5.3b patch on 21 May, 1997.

For 5.3b users, you must a take a look at Jo French's comments on unfixed bugs in 5.3b.

BTW, have you used Click ? If you're a serious Clipperprogrammer and need an excellent code formatter, Click is a natural choice. How to get it ? Simple, access Phil Barnett's site via my Cool Clipper Sites.

32-bits Clipper for Windows ?

Have you tried Xbase ++ ? Well, I have and compared to Delphi (my current Windows programming tool of choice), I'm still sticking to Delphi.

Anyway, you should visit the Alaska Home Page. Give it a chance and then draw your own conclusions !.

The Harbour Project

Is this the future of Xbase ? Take a look at at the Harbour Project

You are Visitor # ...

According to counter.digits.com, you are visitor since 3 June 1996.

If you like or dislike what you see on this website, please drop me a line by clicking the email button at the bottom of this page or better still, by filling out the form in my guest book. If you are not sure what to write,click here to take a look at what other Clipperheads have to say.