2012-10-22 01:51 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbct/ctmath.c
* contrib/hbct/ctstr.c
* contrib/hbct/ctstrfil.c
* contrib/hbct/ctstrfil.h
* contrib/hbct/ctwin.c
* contrib/hbct/dattime3.c
* contrib/hbct/token1.c
* contrib/hbct/token2.c
* renamed statics to have s_/sc_ prefix
* changed int to HB_FATTR for file attributes
* contrib/hbct/tests/datetime.prg
+ implemented TODO now allowing to select language
* contrib/hbsms/sms.prg
+ added links regarding sending in unicode
* extras/httpsrv/uhttpd.prg
! fixed a TOFIX
This commit is contained in:
@@ -16,6 +16,27 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-10-22 01:51 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/hbct/ctmath.c
|
||||
* contrib/hbct/ctstr.c
|
||||
* contrib/hbct/ctstrfil.c
|
||||
* contrib/hbct/ctstrfil.h
|
||||
* contrib/hbct/ctwin.c
|
||||
* contrib/hbct/dattime3.c
|
||||
* contrib/hbct/token1.c
|
||||
* contrib/hbct/token2.c
|
||||
* renamed statics to have s_/sc_ prefix
|
||||
* changed int to HB_FATTR for file attributes
|
||||
|
||||
* contrib/hbct/tests/datetime.prg
|
||||
+ implemented TODO now allowing to select language
|
||||
|
||||
* contrib/hbsms/sms.prg
|
||||
+ added links regarding sending in unicode
|
||||
|
||||
* extras/httpsrv/uhttpd.prg
|
||||
! fixed a TOFIX
|
||||
|
||||
2012-10-21 15:42 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/hbnf/aredit.prg
|
||||
! deleted code that never worked right, and it's a
|
||||
|
||||
@@ -73,18 +73,18 @@ int ct_math_exit( void )
|
||||
/* ---------------- */
|
||||
/* math precision */
|
||||
/* ---------------- */
|
||||
static int s_ct_precision = 16; /* TODO: make this thread safe */
|
||||
static int s_iPrecision = 16; /* TODO: make this thread safe */
|
||||
|
||||
void ct_setprecision( int iPrecision )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setprecision (%i)", iPrecision ) );
|
||||
s_ct_precision = iPrecision;
|
||||
s_iPrecision = iPrecision;
|
||||
}
|
||||
|
||||
int ct_getprecision( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getprecision()" ) );
|
||||
return s_ct_precision;
|
||||
return s_iPrecision;
|
||||
}
|
||||
|
||||
HB_FUNC( SETPREC )
|
||||
|
||||
@@ -276,18 +276,18 @@ const char * ct_at_charset_backward( const char * pcString, HB_SIZE sStrLen,
|
||||
* CSETREF() stuff
|
||||
*/
|
||||
|
||||
static int siRefSwitch = 0; /* TODO: make this tread safe */
|
||||
static int s_iRefSwitch = 0; /* TODO: make this tread safe */
|
||||
|
||||
void ct_setref( int iNewSwitch )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setref(%i)", iNewSwitch ) );
|
||||
siRefSwitch = iNewSwitch;
|
||||
s_iRefSwitch = iNewSwitch;
|
||||
}
|
||||
|
||||
int ct_getref( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getref()" ) );
|
||||
return siRefSwitch;
|
||||
return s_iRefSwitch;
|
||||
}
|
||||
|
||||
HB_FUNC( CSETREF )
|
||||
@@ -314,18 +314,18 @@ HB_FUNC( CSETREF )
|
||||
* CSETATMUPA() stuff
|
||||
*/
|
||||
|
||||
static int siAtMupaSwitch = 0; /* TODO: make this tread safe */
|
||||
static int s_iAtMupaSwitch = 0; /* TODO: make this tread safe */
|
||||
|
||||
void ct_setatmupa( int iNewSwitch )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setatmupa(%i)", iNewSwitch ) );
|
||||
siAtMupaSwitch = iNewSwitch;
|
||||
s_iAtMupaSwitch = iNewSwitch;
|
||||
}
|
||||
|
||||
int ct_getatmupa( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getatmupa()" ) );
|
||||
return siAtMupaSwitch;
|
||||
return s_iAtMupaSwitch;
|
||||
}
|
||||
|
||||
HB_FUNC( CSETATMUPA )
|
||||
@@ -352,31 +352,31 @@ HB_FUNC( CSETATMUPA )
|
||||
* SETATLIKE() stuff
|
||||
*/
|
||||
|
||||
static int siAtLikeMode = 0; /* TODO: make this tread safe */
|
||||
static char scAtLikeChar = '?'; /* TODO: make this tread safe */
|
||||
static int s_iAtLikeMode = 0; /* TODO: make this tread safe */
|
||||
static char s_cAtLikeChar = '?'; /* TODO: make this tread safe */
|
||||
|
||||
void ct_setatlike( int iNewMode )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setatlike(%i)", iNewMode ) );
|
||||
siAtLikeMode = iNewMode;
|
||||
s_iAtLikeMode = iNewMode;
|
||||
}
|
||||
|
||||
int ct_getatlike( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getatlike()" ) );
|
||||
return siAtLikeMode;
|
||||
return s_iAtLikeMode;
|
||||
}
|
||||
|
||||
void ct_setatlikechar( char cNewChar )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setatlikechar(\'%c\')", cNewChar ) );
|
||||
scAtLikeChar = cNewChar;
|
||||
s_cAtLikeChar = cNewChar;
|
||||
}
|
||||
|
||||
char ct_getatlikechar( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getatlikechar()" ) );
|
||||
return scAtLikeChar;
|
||||
return s_cAtLikeChar;
|
||||
}
|
||||
|
||||
HB_FUNC( SETATLIKE )
|
||||
|
||||
@@ -58,27 +58,27 @@
|
||||
|
||||
#include "ctstrfil.h"
|
||||
|
||||
static int s_iFileAttr = HB_FA_NORMAL;
|
||||
static HB_FATTR s_nFileAttr = HB_FA_NORMAL;
|
||||
static HB_BOOL s_bSafety = HB_FALSE;
|
||||
|
||||
void ct_setfcreate( int iFileAttr )
|
||||
void ct_setfcreate( HB_FATTR nFileAttr )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setfcreate(%i)", iFileAttr ) );
|
||||
s_iFileAttr = iFileAttr;
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_setfcreate(%u)", nFileAttr ) );
|
||||
s_nFileAttr = nFileAttr;
|
||||
}
|
||||
|
||||
int ct_getfcreate( void )
|
||||
HB_FATTR ct_getfcreate( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ct_getfcreate()" ) );
|
||||
return s_iFileAttr;
|
||||
return s_nFileAttr;
|
||||
}
|
||||
|
||||
HB_FUNC( SETFCREATE )
|
||||
{
|
||||
hb_retni( ct_getfcreate() );
|
||||
hb_retnl( ct_getfcreate() );
|
||||
|
||||
if( HB_ISNUM( 1 ) )
|
||||
ct_setfcreate( hb_parni( 1 ) );
|
||||
ct_setfcreate( hb_parnl( 1 ) );
|
||||
}
|
||||
|
||||
void ct_setsafety( HB_BOOL bSafety )
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
extern int ct_getfcreate( void );
|
||||
extern void ct_setfcreate( int iFileAttr );
|
||||
extern HB_FATTR ct_getfcreate( void );
|
||||
extern void ct_setfcreate( HB_FATTR nFileAttr );
|
||||
|
||||
extern HB_BOOL ct_getsafety( void );
|
||||
extern void ct_setsafety( HB_BOOL bSafety );
|
||||
|
||||
@@ -168,7 +168,7 @@ typedef struct
|
||||
|
||||
} HB_GTCTW, * PHB_GTCTW;
|
||||
|
||||
static const HB_WCHAR s_szFrameW[] = HB_B_SINGLE_W;
|
||||
static const HB_WCHAR sc_szFrameW[] = HB_B_SINGLE_W;
|
||||
|
||||
static int hb_ctw_CalcShadowWidth( int iRows, int iCols )
|
||||
{
|
||||
@@ -2200,7 +2200,7 @@ static int hb_ctw_gt_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions,
|
||||
|
||||
iPrevWnd = hb_ctw_CurrentWindow( pCTW );
|
||||
iWnd = hb_ctw_CreateWindow( pCTW, iTop, iLeft, iBottom, iRight, HB_TRUE, iClrNorm, HB_TRUE );
|
||||
hb_ctw_AddWindowBox( pCTW, iWnd, s_szFrameW, iClrNorm );
|
||||
hb_ctw_AddWindowBox( pCTW, iWnd, sc_szFrameW, iClrNorm );
|
||||
HB_GTSELF_SETCURSORSTYLE( pGT, SC_NONE );
|
||||
ulLast = 0;
|
||||
i = 0;
|
||||
|
||||
@@ -90,7 +90,7 @@ static HB_BOOL _hb_timeValid( const char * szTime, HB_SIZE nLen, int * piDecode
|
||||
|
||||
if( nLen == 2 || nLen == 5 || nLen == 8 || nLen == 11 )
|
||||
{
|
||||
static const int s_iMax[] = { 23, 59, 59, 99 };
|
||||
static const int sc_iMax[] = { 23, 59, 59, 99 };
|
||||
int i, iVal;
|
||||
HB_SIZE ul;
|
||||
|
||||
@@ -103,7 +103,7 @@ static HB_BOOL _hb_timeValid( const char * szTime, HB_SIZE nLen, int * piDecode
|
||||
for( ul = 0, i = 0; fValid && ul < nLen; ul += 3, ++i )
|
||||
{
|
||||
iVal = 10 * ( szTime[ ul ] - '0' ) + ( szTime[ ul + 1 ] - '0' );
|
||||
fValid = iVal <= s_iMax[ i ];
|
||||
fValid = iVal <= sc_iMax[ i ];
|
||||
if( piDecode )
|
||||
piDecode[ i ] = iVal;
|
||||
}
|
||||
|
||||
@@ -56,17 +56,15 @@
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
|
||||
// TODO: add language module request(s) and an achoice to select different lang modules
|
||||
#include "hbextlng.ch"
|
||||
|
||||
//:
|
||||
PROCEDURE Main( cLang )
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
//:
|
||||
LOCAL cScr
|
||||
LOCAL nchoice
|
||||
LOCAL c := .T.
|
||||
LOCAL farr := { "addmonth( ddate ) Add a month to ddate ", ;
|
||||
LOCAL farr := { ;
|
||||
"addmonth( ddate ) Add a month to ddate ", ;
|
||||
"bom() Beginning of month ", ;
|
||||
"boq() Returns first date of qtr", ;
|
||||
"boy() Beginning of year ", ;
|
||||
@@ -91,7 +89,11 @@ PROCEDURE Main()
|
||||
SET DATE ANSI
|
||||
SET CENTURY ON
|
||||
|
||||
cls
|
||||
IF HB_ISSTRING( cLang )
|
||||
hb_langSelect( cLang )
|
||||
ENDIF
|
||||
|
||||
CLS
|
||||
|
||||
DO WHILE c
|
||||
cScr := SaveScreen( 4, 5, 21, 66 )
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
#include "ct.h"
|
||||
|
||||
/* static const data */
|
||||
static const char * s_pcSeparatorStr =
|
||||
static const char * sc_pcSeparatorStr =
|
||||
"\x00" "\x09" "\x0A" "\x0C" "\x1A" "\x20" "\x8A" "\x8C" ",.;:!\?/\\<>()#&%+-*";
|
||||
static const HB_SIZE s_sSeparatorStrLen = 26;
|
||||
static const HB_SIZE sc_sSeparatorStrLen = 26;
|
||||
|
||||
/* static data */
|
||||
/* even if these are chars, variable must be int, since we need an extra -1 */
|
||||
@@ -118,8 +118,8 @@ static void do_token1( int iSwitch )
|
||||
pcSeparatorStr = hb_parc( 2 );
|
||||
else
|
||||
{
|
||||
pcSeparatorStr = ( const char * ) s_pcSeparatorStr;
|
||||
sSeparatorStrLen = s_sSeparatorStrLen;
|
||||
pcSeparatorStr = sc_pcSeparatorStr;
|
||||
sSeparatorStrLen = sc_sSeparatorStrLen;
|
||||
}
|
||||
|
||||
/* token counter */
|
||||
|
||||
@@ -209,9 +209,9 @@ static void sTokEnvDel( TOKEN_ENVIRONMENT env )
|
||||
/* ================= */
|
||||
|
||||
/* static data */
|
||||
static const char * spcSeparatorStr =
|
||||
static const char * sc_spcSeparatorStr =
|
||||
"\x00" "\x09" "\x0A" "\x0C" "\x1A" "\x20" "\x8A" "\x8C" ",.;:!\?/\\<>()#&%+-*";
|
||||
static const HB_SIZE ssSeparatorStrLen = 26;
|
||||
static const HB_SIZE sc_sSeparatorStrLen = 26;
|
||||
|
||||
/* TODO: make thread safe */
|
||||
static TOKEN_ENVIRONMENT s_sTokenEnvironment = NULL;
|
||||
@@ -262,8 +262,8 @@ HB_FUNC( TOKENINIT )
|
||||
pcSeparatorStr = hb_parc( 2 );
|
||||
else
|
||||
{
|
||||
pcSeparatorStr = ( const char * ) spcSeparatorStr;
|
||||
sSeparatorStrLen = ssSeparatorStrLen;
|
||||
pcSeparatorStr = sc_spcSeparatorStr;
|
||||
sSeparatorStrLen = sc_sSeparatorStrLen;
|
||||
}
|
||||
|
||||
/* skip width */
|
||||
|
||||
@@ -54,8 +54,11 @@
|
||||
/* TODO: - Receive support */
|
||||
|
||||
/* NOTE: Source of information:
|
||||
http://www.smssolutions.net/tutorials/gsm/sendsmsat/
|
||||
http://www.smssolutions.net/tutorials/gsm/receivesmsat/
|
||||
http://www.developershome.com/sms/sendSmsByAtCommands.asp
|
||||
http://www.developershome.com/sms/readSmsByAtCommands.asp
|
||||
http://www.dreamfabric.com/sms/
|
||||
[vszakats] */
|
||||
|
||||
STATIC FUNCTION port_send( h, s )
|
||||
|
||||
@@ -1799,7 +1799,7 @@ STATIC PROCEDURE defineServer( hSocket )
|
||||
_SERVER[ "SERVER_SOFTWARE" ] := APP_NAME + " " + APP_VERSION + " (" + OS() + ")"
|
||||
_SERVER[ "SERVER_SIGNATURE" ] := "<address>" + _SERVER[ "SERVER_SOFTWARE" ] + " Server at " + _SERVER[ "SERVER_NAME" ] + " Port " + _SERVER[ "SERVER_PORT" ] + "</address>"
|
||||
_SERVER[ "DOCUMENT_ROOT" ] := s_cDocumentRoot
|
||||
_SERVER[ "SERVER_ADMIN" ] := "root@localhost" // TOFIX: put real user
|
||||
_SERVER[ "SERVER_ADMIN" ] := hb_UserName() + "@" + NetName()
|
||||
_SERVER[ "SCRIPT_FILENAME" ] := NIL
|
||||
_SERVER[ "GATEWAY_INTERFACE" ] := "CGI/1.1"
|
||||
_SERVER[ "SCRIPT_URL" ] := NIL
|
||||
|
||||
Reference in New Issue
Block a user