From 35fd44dad514cee88cf9dae77943e6e37b8f0492 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Fri, 5 May 2000 17:20:24 +0000 Subject: [PATCH] 20000505-19:21 GMT+1 --- harbour/source/vm/borinit.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/harbour/source/vm/borinit.c b/harbour/source/vm/borinit.c index b55bb34237..3a6d6e0d82 100644 --- a/harbour/source/vm/borinit.c +++ b/harbour/source/vm/borinit.c @@ -1,3 +1,5 @@ +#pragma option -a1 /* byte alignment */ + /* * $Id$ * @@ -33,8 +35,9 @@ typedef struct { - char c1, c2; - void ( * pInitFunc )( void ); + char calltype; + char priority; + void ( * pFunc )( void ); } HB_BORINITSYMBOL, * HB_PBORINITSYMBOL; extern HB_BORINITSYMBOL hb_BorFirstSymbol, hb_BorLastSymbol; @@ -44,5 +47,11 @@ void hb_vmProcessBorlandInitSegment( void ) HB_PBORINITSYMBOL pFirst = &hb_BorFirstSymbol; while( pFirst < ( &hb_BorLastSymbol - 1 ) ) - ( pFirst++ )->pInitFunc(); + { + ( pFirst++ )->pFunc(); + + while( * ( ( char * ) pFirst ) == 0 ) /* specially for Borland _INIT_ */ + ( ( char * ) pFirst )++; /* segment alignment */ + ( ( char * ) pFirst )--; + } } \ No newline at end of file