From e7d65ce8cd4c0b3b58de3b4921ece2c90aa7fa43 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 18 May 2012 14:49:44 +0000 Subject: [PATCH] 2012-05-18 16:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbcom.ch * harbour/src/rtl/hbcom.c + added two new errors: HB_COM_ERR_ACCESS, HB_COM_ERR_NOCOM --- harbour/ChangeLog | 5 +++++ harbour/include/hbcom.ch | 2 ++ harbour/src/rtl/hbcom.c | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 11157ee757..6fd0e4c02b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-18 16:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/include/hbcom.ch + * harbour/src/rtl/hbcom.c + + added two new errors: HB_COM_ERR_ACCESS, HB_COM_ERR_NOCOM + 2012-05-17 14:07 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hb ! Fix to last fix. diff --git a/harbour/include/hbcom.ch b/harbour/include/hbcom.ch index d3318968bb..9e7455a3ff 100644 --- a/harbour/include/hbcom.ch +++ b/harbour/include/hbcom.ch @@ -127,5 +127,7 @@ #define HB_COM_ERR_ALREADYOPEN 8 #define HB_COM_ERR_IO 9 #define HB_COM_ERR_PIPE 10 +#define HB_COM_ERR_ACCESS 11 +#define HB_COM_ERR_NOCOM 12 #endif /* HB_COM_CH_ */ diff --git a/harbour/src/rtl/hbcom.c b/harbour/src/rtl/hbcom.c index 52b1b95105..c2a72310ba 100644 --- a/harbour/src/rtl/hbcom.c +++ b/harbour/src/rtl/hbcom.c @@ -322,6 +322,12 @@ static void hb_comSetOsError( PHB_COM pCom, HB_BOOL fError ) case EAGAIN: pCom->error = HB_COM_ERR_TIMEOUT; break; + case EACCES: + pCom->error = HB_COM_ERR_ACCESS; + break; + case ENOTTY: + pCom->error = HB_COM_ERR_NOCOM; + break; default: pCom->error = HB_COM_ERR_OTHER; break;