20000415-15:07 GMT+1 Victor Szakats <info@szelvesz.hu>
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
20000415-15:07 GMT+1 Victor Szakats <info@szelvesz.hu>
|
||||
|
||||
* source/rtl/net.c
|
||||
+ NETNAME() now works with BCC16 (and any other real mode DOS compiler for
|
||||
that matter).
|
||||
- Commented out for DJGPP. I leave this for someone who has the nerve
|
||||
to tweak it for PM.
|
||||
|
||||
* bin/bld.bat
|
||||
* bin/bld.cmd
|
||||
! Fix for bcc16 HB_GT_LIB selection.
|
||||
|
||||
20000415-13:01 GMT+1 Victor Szakats <info@szelvesz.hu>
|
||||
|
||||
* bin/bld.bat
|
||||
|
||||
@@ -115,7 +115,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB=
|
||||
echo debug.lib >> build.tmp
|
||||
echo vm.lib >> build.tmp
|
||||
echo rtl.lib >> build.tmp
|
||||
echo gtdos.lib >> build.tmp
|
||||
echo %HB_GT_LIB%.lib >> build.tmp
|
||||
echo lang.lib >> build.tmp
|
||||
echo rdd.lib >> build.tmp
|
||||
echo macro.lib >> build.tmp
|
||||
|
||||
@@ -115,7 +115,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB=
|
||||
echo debug.lib >> build.tmp
|
||||
echo vm.lib >> build.tmp
|
||||
echo rtl.lib >> build.tmp
|
||||
echo gtdos.lib >> build.tmp
|
||||
echo %HB_GT_LIB%.lib >> build.tmp
|
||||
echo lang.lib >> build.tmp
|
||||
echo rdd.lib >> build.tmp
|
||||
echo macro.lib >> build.tmp
|
||||
|
||||
@@ -38,26 +38,36 @@
|
||||
#include "hbapi.h"
|
||||
|
||||
/* TODO: Implement NETNAME() for other platforms */
|
||||
|
||||
/* NOTE: Clipper will only return a maximum of 15 bytes from this function.
|
||||
And it will be padded with spaces. Harbour does the same in the
|
||||
DOS platform.
|
||||
[vszakats] */
|
||||
|
||||
HB_FUNC( NETNAME )
|
||||
{
|
||||
#if defined(HB_OS_DOS)
|
||||
|
||||
#define LP_SEG( lp ) ( ( unsigned )( ( unsigned )( lp ) >> 16 ) )
|
||||
#define LP_OFF( lp ) ( ( unsigned )( lp ) )
|
||||
|
||||
{
|
||||
char szValue[ 16 ];
|
||||
union REGS regs;
|
||||
struct SREGS sregs;
|
||||
|
||||
regs.x.ax = 0x5E00;
|
||||
regs.x.dx = LP_OFF( szValue );
|
||||
sregs.ds = LP_SEG( szValue );
|
||||
|
||||
HB_DOS_INT86X( 0x21, ®s, ®s, &sregs );
|
||||
#if defined(__DJGPP__)
|
||||
{
|
||||
/* TODO: Add support for protected mode */
|
||||
szValue[ 0 ] = '\0';
|
||||
}
|
||||
#else
|
||||
{
|
||||
struct SREGS sregs;
|
||||
|
||||
regs.x.dx = FP_OFF( szValue );
|
||||
sregs.ds = FP_SEG( szValue );
|
||||
|
||||
HB_DOS_INT86X( 0x21, ®s, ®s, &sregs );
|
||||
}
|
||||
#endif
|
||||
|
||||
hb_retc( regs.h.ch == 0 ? "" : szValue );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user