Hi Miguel,

Yes, with the extra lines, the logic is complete,
and it should work.

The problem is that these lines were not added
to Harbour.

Brgds,
Viktor

On 2008.07.02., at 12:08, Miguel Angel Marchuet wrote:

Przemyslaw Czerpak escribió:
On Wed, 02 Jul 2008, Szakáts Viktor wrote:
HB_EXIT_FUNC() is indeed used by the compiler to mark
EXIT PROC/FUNCs as such, but it's part of a broader logic.
Used like this - by itself -, it never gets executed.
It was actually reported by all compilers as unused static
function, which it was.
[ I wouldn't be surprised if HB_EXIT_FUNC() wouldn't be called
in xhb either, but I didn't check. ]
Yes. Neither Harbour not xHarbour execute HB_EXIT_FUNC() and/or
HB_INIT_FUNC() automatically. HB_EXIT_FUNC/HB_INIT_FUNC are only
macros to define special unique names for compiler but they not
cause that anything will be executed.
The HB_EXIT_FUNC removed from hbziparch library from the beginning
was dummy code never executed in both project.


False i test it at xharbour with OutputDebugString and is executed at end of application

I this is because has the next lines:

#define __PRG_SOURCE__ (char*) "zip.c"
#ifdef HB_PCODE_VER
#  undef HB_PRG_PCODE_VER
#  define HB_PRG_PCODE_VER HB_PCODE_VER
#endif

HB_INIT_SYMBOLS_BEGIN( hbzip_CLEANUP )
{ (char*) "HBZIPCLEANUP$", {HB_FS_EXIT | HB_FS_LOCAL}, {HB_EXIT_FUNCNAME( HBZIPCLEANUP )}, &ModuleFakeDyn }
HB_INIT_SYMBOLS_END( hbzip_CLEANUP )

#if defined(HB_PRAGMA_STARTUP)
  #pragma startup hbzip_CLEANUP
#elif defined(HB_MSC_STARTUP)
  #if _MSC_VER >= 1010
     #pragma data_seg( ".CRT$XIY" )
     #pragma comment( linker, "/Merge:.CRT=.data" )
  #else
     #pragma data_seg( "XIY" )
  #endif
  static HB_$INITSYM hb_vm_auto_SymbolInit_INIT = hbzip_CLEANUP;
  #pragma data_seg()
#endif

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to