From 75e90cbfa9d06e40b26ffb03ad5acd2cf01bfa53 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 15 Nov 2009 04:31:21 +0000 Subject: [PATCH] 2009-11-15 05:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbsms/Makefile ! Fixed dependency on tpathy headers. * contrib/hbsms/hbsms.prg * contrib/hbsms/hbsms.hbc - Deleted implementation based on hbwin com port support. --- harbour/ChangeLog | 8 ++++++ harbour/contrib/hbsms/Makefile | 2 ++ harbour/contrib/hbsms/hbsms.hbc | 1 - harbour/contrib/hbsms/hbsms.prg | 44 +-------------------------------- 4 files changed, 11 insertions(+), 44 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 62654cde78..a3d10a9d78 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-15 05:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbsms/Makefile + ! Fixed dependency on tpathy headers. + + * contrib/hbsms/hbsms.prg + * contrib/hbsms/hbsms.hbc + - Deleted implementation based on hbwin com port support. + 2009-11-15 05:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/compiler/genc.c * src/compiler/gencc.c diff --git a/harbour/contrib/hbsms/Makefile b/harbour/contrib/hbsms/Makefile index 07de5c545b..5dd88230a3 100644 --- a/harbour/contrib/hbsms/Makefile +++ b/harbour/contrib/hbsms/Makefile @@ -11,4 +11,6 @@ LIBNAME := hbsms PRG_SOURCES := \ hbsms.prg \ +HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbtpathy + include $(TOP)$(ROOT)config/lib.mk diff --git a/harbour/contrib/hbsms/hbsms.hbc b/harbour/contrib/hbsms/hbsms.hbc index d7a3c42397..6ce12d5242 100644 --- a/harbour/contrib/hbsms/hbsms.hbc +++ b/harbour/contrib/hbsms/hbsms.hbc @@ -7,4 +7,3 @@ incpaths=. libs=hbsms libs=../hbtpathy/hbtpathy.hbc -#{allwin}libs=../hbwin/hbwin.hbc diff --git a/harbour/contrib/hbsms/hbsms.prg b/harbour/contrib/hbsms/hbsms.prg index 8f069f8f28..2d8b94bac4 100644 --- a/harbour/contrib/hbsms/hbsms.prg +++ b/harbour/contrib/hbsms/hbsms.prg @@ -71,39 +71,15 @@ #include "common.ch" -#if ! defined( HB_HAS_TELEPATHY ) .AND. ; - ( defined( __PLATFORM__UNIX ) .OR. ; - defined( __PLATFORM__OS2 ) ) - #define HB_HAS_TELEPATHY -#endif - -#if defined( HB_HAS_TELEPATHY ) - #include "telepath.ch" -#elif defined( __PLATFORM__WINDOWS ) - #include "hbwin.ch" -#endif +#include "telepath.ch" STATIC FUNCTION port_send( h, s, t ) -#if defined( HB_HAS_TELEPATHY ) RETURN tp_send( h, s, t ) -#elif defined( __PLATFORM__WINDOWS ) - HB_SYMBOL_UNUSED( t ) - RETURN win_ComWrite( h, s ) -#else - RETURN 0 -#endif STATIC FUNCTION port_rece( h, n, t ) DEFAULT n TO 64 DEFAULT t TO 0.2 -#if defined( HB_HAS_TELEPATHY ) RETURN tp_recv( h, n, t ) -#elif defined( __PLATFORM__WINDOWS ) - hb_idleSleep( t ) - RETURN win_ComRecv( h, n ) -#else - RETURN 0 -#endif FUNCTION sms_Send( cPort, cPhoneNo, cText, lNotification, cPIN ) LOCAL smsctx @@ -142,22 +118,10 @@ FUNCTION sms_ReceiveAll( cPort, cPIN ) FUNCTION smsctx_New( cPort ) LOCAL smsctx[ _SMSCTX_MAX_ ] -#if defined( HB_HAS_TELEPATHY ) smsctx[ _SMSCTX_xHnd ] := 1 IF tp_open( smsctx[ _SMSCTX_xHnd ], NIL, NIL, 9600, 8, "N", 1, cPort ) == 0 RETURN smsctx ENDIF -#elif defined( __PLATFORM__WINDOWS ) - IF !( Upper( Left( cPort, 3 ) ) == "COM" ) - RETURN NIL - ENDIF - - smsctx[ _SMSCTX_xHnd ] := Val( SubStr( cPort, 4 ) ) - 1 - - IF win_ComOpen( smsctx[ _SMSCTX_xHnd ], CBR_9600, NOPARITY, 8, ONESTOPBIT ) != -1 - RETURN smsctx - ENDIF -#endif RETURN NIL @@ -264,13 +228,7 @@ FUNCTION smsctx_Close( smsctx ) RETURN .F. ENDIF -#if defined( HB_HAS_TELEPATHY ) RETURN tp_close( smsctx[ _SMSCTX_xHnd ] ) == 0 -#elif defined( __PLATFORM__WINDOWS ) - RETURN win_ComClose( smsctx[ _SMSCTX_xHnd ] ) -#else - RETURN .F. -#endif STATIC FUNCTION StripCR( cString ) RETURN StrTran( cString, Chr( 13 ) )