diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cbeec0a175..6e3b383272 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-10 18:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbcom.ch + * Changed functions names to use proper camelcasing so that + they also hold true for C level API. + + * include/hbsocket.ch + + Readded .prg level function names to address array constant + comment. + + Added 'this is also used in C file' comment. + + * contrib/hbsms/hbsms.prg + ! Fixed COM port reading function after last update. + I finally restored original defaulting logic (instead of + FETCHCHARS() method) which by default waits for 64 bytes + and 5 seconds. Pls check me. + 2010-06-10 19:12 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/examples/httpsrv/uhttpd.prg * harbour/examples/uhttpd2/umain.prg diff --git a/harbour/contrib/hbsms/hbsms.prg b/harbour/contrib/hbsms/hbsms.prg index 1dfd9ae43b..ea6aa47754 100644 --- a/harbour/contrib/hbsms/hbsms.prg +++ b/harbour/contrib/hbsms/hbsms.prg @@ -64,7 +64,17 @@ STATIC FUNCTION port_send( h, s ) RETURN hb_comSend( h, s ) STATIC FUNCTION port_rece( h, n, t ) - LOCAL cString := iif( ISNUMBER( n ), Space( n ), "" ) + LOCAL cString + + IF ! ISNUMBER( n ) + n := 64 + ENDIF + + IF ! ISNUMBER( t ) + t := 5 + ENDIF + + cString := Space( n ) hb_comRecv( h, @cString,, t ) diff --git a/harbour/include/hbcom.ch b/harbour/include/hbcom.ch index e29cd089fe..918ab8346f 100644 --- a/harbour/include/hbcom.ch +++ b/harbour/include/hbcom.ch @@ -55,19 +55,19 @@ #ifndef HB_COM_CH_ #define HB_COM_CH_ -/* HB_COMFLUSH() modes */ +/* hb_comFlush() modes */ #define HB_COM_IFLUSH 1 #define HB_COM_OFLUSH 2 #define HB_COM_IOFLUSH 3 -/* HB_COMMCR() parameters */ +/* hb_comMCR() parameters */ #define HB_COM_MCR_DTR 0x01 /* Data terminal ready (DTR) TIOCM_DTR */ #define HB_COM_MCR_RTS 0x02 /* Request to send (RTS) TIOCM_RTS */ #define HB_COM_MCR_OUT1 0x04 /* OUT 1 TIOCM_OUT1 */ #define HB_COM_MCR_OUT2 0x08 /* OUT 2 TIOCM_OUT2 */ #define HB_COM_MCR_LOOP 0x10 /* LOOP TIOCM_LOOP */ -/* HB_COMMSR() parameters */ +/* hb_comMSR() parameters */ #define HB_COM_MSR_DELTA_CTS 0x01 /* DELTA ready to send (DCTS) */ #define HB_COM_MSR_DELTA_DSR 0x02 /* DELTA data terminal ready (DDSR) */ #define HB_COM_MSR_TERI 0x04 /* Trailing edge RING (TERI) */ @@ -77,7 +77,7 @@ #define HB_COM_MSR_RI 0x40 /* RING indicator (RI) TIOCM_RI */ #define HB_COM_MSR_DCD 0x80 /* Data carrier detected (DCD) TIOCM_CD */ -/* HB_COMLSR() parameters */ +/* hb_comLSR() parameters */ #define HB_COM_LSR_DATA_READY 0x01 /* Data ready */ #define HB_COM_LSR_OVERRUN_ERR 0x02 /* Overflow error */ #define HB_COM_LSR_PARITY_ERR 0x04 /* Parity error */ @@ -86,7 +86,7 @@ #define HB_COM_LSR_TRANS_HOLD_EMPTY 0x20 /* Transmission holder register empty */ #define HB_COM_LSR_TRANS_EMPTY 0x40 /* TX shift register empty */ -/* HB_COMFLOWCONTROL() parameters */ +/* hb_comFlowControl() parameters */ #define HB_COM_FLOW_IRTSCTS 0x01 #define HB_COM_FLOW_ORTSCTS 0x02 #define HB_COM_FLOW_IDTRDSR 0x04 @@ -95,7 +95,7 @@ #define HB_COM_FLOW_XOFF 0x20 /* XON/XOFF on input */ #define HB_COM_FLOW_XON 0x40 /* XON/XOFF on output */ -/* HB_COMFLOWSET() parameters */ +/* hb_comFlowSet() parameters */ #define HB_COM_FL_OOFF 0x01 #define HB_COM_FL_OON 0x02 #define HB_COM_FL_IOFF 0x04 @@ -105,7 +105,7 @@ #define HB_COM_FL_DTRDSR 0x40 #define HB_COM_FL_DCD 0x80 -/* HB_COMOUTPUTSTATE() return values */ +/* hb_comOutputState() return values */ #define HB_COM_TX_CTS 0x01 #define HB_COM_TX_DSR 0x02 #define HB_COM_TX_DCD 0x04 @@ -113,10 +113,10 @@ #define HB_COM_TX_EMPTY 0x10 #define HB_COM_TX_RFLUSH 0x20 -/* HB_COMINPUTSTATE() return values */ +/* hb_comInputState() return values */ #define HB_COM_RX_XOFF 0x01 -/* HB_COMGETERROR() return values */ +/* hb_comGetError() return values */ #define HB_COM_ERR_WRONGPORT 1 #define HB_COM_ERR_CLOSED 2 #define HB_COM_ERR_TIMEOUT 3 diff --git a/harbour/include/hbsocket.ch b/harbour/include/hbsocket.ch index fcc274a9ef..cf76fadfd1 100644 --- a/harbour/include/hbsocket.ch +++ b/harbour/include/hbsocket.ch @@ -50,6 +50,8 @@ * */ +/* NOTE: This file is also used by C code. */ + #ifndef HB_SOCKET_CH_ #define HB_SOCKET_CH_ @@ -204,7 +206,8 @@ #define HB_SOCKET_IFINFO_HWADDR 8 /* hardware address */ #define HB_SOCKET_IFINFO_LEN 8 -/* Socket address array indexes */ +/* Socket address array indexes used in + HB_SOCKETGETSOCKNAME(), HB_SOCKETGETPEERNAME() return values */ #define HB_SOCKET_ADINFO_FAMILY 1 #define HB_SOCKET_ADINFO_ADDRESS 2 /* HB_SOCKET_AF_INET, HB_SOCKET_AF_INET6 */ #define HB_SOCKET_ADINFO_PATH 2 /* HB_SOCKET_AF_LOCAL */