From b3f502204751b017002bcb77b95b971b459c363d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 3 Jun 2011 22:13:35 +0000 Subject: [PATCH] 2011-06-04 00:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbplist + contrib/hboslib + contrib/hboslib/core.prg + contrib/hboslib/hboslib.hbx + contrib/hboslib/hboslib.hbp + contrib/hboslib/hboslib.hbc + added OSLib emulation lib for Harbour see docs here: http://www.davep.org/clipper/OSLib/ --- harbour/ChangeLog | 12 +++- harbour/contrib/hboslib/core.prg | 101 ++++++++++++++++++++++++++++ harbour/contrib/hboslib/hboslib.hbc | 7 ++ harbour/contrib/hboslib/hboslib.hbp | 16 +++++ harbour/contrib/hboslib/hboslib.hbx | 46 +++++++++++++ harbour/contrib/hbplist | 1 + 6 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 harbour/contrib/hboslib/core.prg create mode 100644 harbour/contrib/hboslib/hboslib.hbc create mode 100644 harbour/contrib/hboslib/hboslib.hbp create mode 100644 harbour/contrib/hboslib/hboslib.hbx diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 10f4469dc8..fbe7d0f7a1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-06-04 00:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbplist + + contrib/hboslib + + contrib/hboslib/core.prg + + contrib/hboslib/hboslib.hbx + + contrib/hboslib/hboslib.hbp + + contrib/hboslib/hboslib.hbc + + added OSLib emulation lib for Harbour + see docs here: http://www.davep.org/clipper/OSLib/ + 2011-06-03 13:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idebrowse.prg % Set vertical scrollbars of XbpBrowse() class to honor thumb @@ -34,7 +44,7 @@ * contrib/rddads/tests/testmg.prg ! use hb_libpostfix() * contrib/hbide/idemain.prg - ! use hb_libpostfix() which fixes loading rddads on non-win + ! use hb_libpostfix() which fixes loading rddads on non-win systems (untested, I can't wait for HBQT build to finish) 2011-06-03 14:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) diff --git a/harbour/contrib/hboslib/core.prg b/harbour/contrib/hboslib/core.prg new file mode 100644 index 0000000000..80f7323b35 --- /dev/null +++ b/harbour/contrib/hboslib/core.prg @@ -0,0 +1,101 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * OSLib emulation for Harbour + * http://www.davep.org/clipper/OSLib/ + * + * Copyright 2011 Viktor Szakats (harbour.01 syenar.hu) + * www - http://harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "hbgtinfo.ch" + +FUNCTION OL_95AppTitle( cValue ) + RETURN hb_gtInfo( HB_GTI_WINTITLE, cValue ) + +FUNCTION OL_95VMTitle( cValue ) + RETURN hb_gtInfo( HB_GTI_WINTITLE, cValue ) + +FUNCTION OL_AutoYield() + RETURN .T. + +FUNCTION OL_IsMSWin() + RETURN hb_osIsWinNT() .OR. hb_osIsWin9x() + +FUNCTION OL_IsNT() + RETURN hb_osIsWinNT() + +FUNCTION OL_IsOS2() +#if defined( __PLATFORM__OS2 ) + RETURN .T. +#else + RETURN .F. /* TODO: detect OS/2 in MS-DOS builds */ +#endif + +FUNCTION OL_IsOS2Win() + RETURN hb_gtInfo( HB_GTI_ISFULLSCREEN ) + +FUNCTION OL_OsVerMaj() + RETURN iif( hb_osIsWin9x(), 7, 5 ) + +FUNCTION OL_OsVerMin() + RETURN iif( hb_osIsWin9x(), 1, 0 ) + +FUNCTION OL_WinCBCopy() + RETURN hb_gtInfo( HB_GTI_CLIPBOARDDATA ) + +FUNCTION OL_WinCBPaste( cText ) + IF hb_isString( cText ) + hb_gtInfo( HB_GTI_CLIPBOARDDATA, cText ) + RETURN .T. + ENDIF + RETURN .F. + +FUNCTION OL_WinFullScreen() + RETURN hb_gtInfo( HB_GTI_ISFULLSCREEN, .T. ) + +FUNCTION OL_Yield() + RETURN hb_releaseCPU() diff --git a/harbour/contrib/hboslib/hboslib.hbc b/harbour/contrib/hboslib/hboslib.hbc new file mode 100644 index 0000000000..1e7989e430 --- /dev/null +++ b/harbour/contrib/hboslib/hboslib.hbc @@ -0,0 +1,7 @@ +# +# $Id$ +# + +incpaths=. + +libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} diff --git a/harbour/contrib/hboslib/hboslib.hbp b/harbour/contrib/hboslib/hboslib.hbp new file mode 100644 index 0000000000..1b79feb939 --- /dev/null +++ b/harbour/contrib/hboslib/hboslib.hbp @@ -0,0 +1,16 @@ +# +# $Id$ +# + +-hblib +-inc + +-o${hb_name} + +-w3 -es2 + +-instfile=inc:hboslib.hbx + +hboslib.hbx + +core.prg diff --git a/harbour/contrib/hboslib/hboslib.hbx b/harbour/contrib/hboslib/hboslib.hbx new file mode 100644 index 0000000000..d0eedafc76 --- /dev/null +++ b/harbour/contrib/hboslib/hboslib.hbx @@ -0,0 +1,46 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* NOTE: You can add manual override which functions to include or */ +/* exclude from automatically generated EXTERNAL/DYNAMIC list. */ +/* Syntax: // HB_FUNC_INCLUDE */ +/* // HB_FUNC_EXCLUDE */ +/* -------------------------------------------------------------------- */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated code below. DO NOT EDIT! */ +/* Regenerate using hbmk2 '-hbx=' option. */ +/* -------------------------------------------------------------------- */ + +#ifndef __HBEXTERN_CH__HBOSLIB__ +#define __HBEXTERN_CH__HBOSLIB__ + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBOSLIB__ANNOUNCE ) + ANNOUNCE __HBEXTERN__HBOSLIB__ +#endif + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBOSLIB__REQUEST ) + #command DYNAMIC => EXTERNAL +#endif + +DYNAMIC OL_95APPTITLE +DYNAMIC OL_95VMTITLE +DYNAMIC OL_AUTOYIELD +DYNAMIC OL_ISMSWIN +DYNAMIC OL_ISNT +DYNAMIC OL_ISOS2 +DYNAMIC OL_ISOS2WIN +DYNAMIC OL_OSVERMAJ +DYNAMIC OL_OSVERMIN +DYNAMIC OL_WINCBCOPY +DYNAMIC OL_WINCBPASTE +DYNAMIC OL_WINFULLSCREEN +DYNAMIC OL_YIELD + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBOSLIB__REQUEST ) + #uncommand DYNAMIC => EXTERNAL +#endif + +#endif diff --git a/harbour/contrib/hbplist b/harbour/contrib/hbplist index 2d5a8aa6d3..a8291f885d 100644 --- a/harbour/contrib/hbplist +++ b/harbour/contrib/hbplist @@ -38,6 +38,7 @@ hbnetio/hbnetio.hbp hbnetio/utils/hbnetio/hbnetio.hbp hbnf/hbnf.hbp hbodbc/hbodbc.hbp +hboslib/hboslib.hbp hbpgsql/hbpgsql.hbp hbqt/hbqt_all.hbp hbrun/hbrun.hbp