touched up some source files for borland and msvc.

added more options to bakefile description
This commit is contained in:
2012-12-13 13:07:16 +00:00
parent 7337bf12b8
commit eb944bbf95
38 changed files with 4031 additions and 169 deletions

View File

@ -25,7 +25,6 @@
QSE_BEGIN_NAMESPACE(QSE)
/////////////////////////////////
StdMmgr StdMmgr::DFL;
void* StdMmgr::allocMem (size_t n)
{
@ -42,6 +41,12 @@ void StdMmgr::freeMem (void* ptr)
return ::free (ptr);
}
StdMmgr* StdMmgr::getDFL ()
{
static StdMmgr DFL;
return &DFL;
}
/////////////////////////////////
QSE_END_NAMESPACE(QSE)
/////////////////////////////////

View File

@ -111,6 +111,9 @@ static int path_exists (glob_t* g, const qse_char_t* name)
#if defined(_WIN32)
/* ------------------------------------------------------------------- */
#if !defined(INVALID_FILE_ATTRIBUTES)
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
return (GetFileAttributes(name) != INVALID_FILE_ATTRIBUTES)? 1: 0;
/* ------------------------------------------------------------------- */

View File

@ -159,8 +159,7 @@ int qse_lda_getscale (lda_t* lda)
void qse_lda_setscale (lda_t* lda, int scale)
{
QSE_ASSERTX (scale > 0 && scale <= QSE_TYPE_MAX(qse_byte_t),
"The scale should be larger than 0 and less than or "
"equal to the maximum value that the qse_byte_t type can hold");
"The scale should be larger than 0 and less than or equal to the maximum value that the qse_byte_t type can hold");
if (scale <= 0) scale = 1;
if (scale > QSE_TYPE_MAX(qse_byte_t)) scale = QSE_TYPE_MAX(qse_byte_t);

View File

@ -26,6 +26,8 @@
# include <winsock2.h>
# include <ws2tcpip.h> /* sockaddr_in6 */
# include <windows.h>
# pragma library("ws2_32.lib") /* watcom */
# pragma comment(lib,"ws2_32.lib") /* msvc and borland */
#elif defined(__OS2__)
# include <types.h>
# include <sys/socket.h>

View File

@ -1154,8 +1154,7 @@ static void freegroupstack (group_t* gs, qse_mmgr_t* mmgr)
{
QSE_ASSERT (gs != QSE_NULL);
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
freegroupstackmembers (gs, mmgr);
}
@ -1165,8 +1164,7 @@ static void refupgroupstack (group_t* gs)
if (gs != QSE_NULL)
{
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
gs->occ++;
}
}
@ -1176,8 +1174,7 @@ static void refdowngroupstack (group_t* gs, qse_mmgr_t* mmgr)
if (gs != QSE_NULL)
{
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
if (--gs->occ <= 0)
{
freegroupstack (gs, mmgr);
@ -1219,8 +1216,7 @@ static group_t* dupgroupstack (exec_t* e, group_t* gs)
QSE_ASSERT (gs != QSE_NULL);
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
head = dupgroupstackmembers (e, gs);
if (head == QSE_NULL) return QSE_NULL;
@ -1315,8 +1311,7 @@ static group_t* dupgroupstackpop (exec_t* e, group_t* gs)
QSE_ASSERT (gs != QSE_NULL);
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
QSE_ASSERTX (gs->next != QSE_NULL && gs->next->next != QSE_NULL,
"dupgroupstackpop() needs at least two data elements");
@ -1344,8 +1339,7 @@ static group_t* groupstackpop (exec_t* e, group_t* gs)
QSE_ASSERT (gs != QSE_NULL);
QSE_ASSERTX (gs->node == QSE_NULL,
"The head of a group stack must point to QSE_NULL for "
"management purpose.");
"The head of a group stack must point to QSE_NULL for management purpose.");
QSE_ASSERTX (gs->next != QSE_NULL && gs->next->next != QSE_NULL,
"groupstackpop() needs at least two data elements");
@ -1541,8 +1535,7 @@ warpback:
occ = top->occ;
node = top->node;
QSE_ASSERTX (node == curcand->u.ge.group,
"The GROUP node in the group stack must be the "
"one pairing up with the GROUPEND node."
"The GROUP node in the group stack must be the one pairing up with the GROUPEND node."
);
if (occ >= node->occ.min)
@ -1687,11 +1680,7 @@ static int charset_matched (exec_t* e, qse_rex_node_t* node, qse_char_t c)
default:
{
QSE_ASSERTX (0,
"SHOUL NEVER HAPPEN - membership code "
"for a character set must be one of "
"QSE_REX_CSET_CHAR, "
"QSE_REX_CSET_RANGE, "
"QSE_REX_CSET_CLASS");
"SHOUL NEVER HAPPEN - membership code for a character set must be one of QSE_REX_CSET_CHAR, QSE_REX_CSET_RANGE, QSE_REX_CSET_CLASS");
/* return no match if this part is reached.
* however, something is totally wrong if it
@ -1794,14 +1783,7 @@ static qse_lda_walk_t walk_cands_for_match (
default:
{
QSE_ASSERTX (0,
"SHOULD NEVER HAPPEN - node ID must be"
"one of QSE_REX_NODE_BOL, "
"QSE_REX_NODE_EOL, "
"QSE_REX_NODE_ANY, "
"QSE_REX_NODE_CHAR, "
"QSE_REX_NODE_CSET, "
"QSE_REX_NODE_NOP");
"SHOULD NEVER HAPPEN - node ID must be one of QSE_REX_NODE_BOL, QSE_REX_NODE_EOL, QSE_REX_NODE_ANY, QSE_REX_NODE_CHAR, QSE_REX_NODE_CSET, QSE_REX_NODE_NOP");
break;
}
}

View File

@ -22,6 +22,9 @@
#include "mem.h"
#if defined(_WIN64)
# if !defined(_WIN32_WINNT)
# define _WIN32_WINNT 0x0400
# endif
# include <windows.h>
#else
# include <setjmp.h>