Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@ stamp-h1
#Makefile.am
#Makefile.in
#missing

/apg
/apg_dbg
/cppdemo
/cppdemo_dbg
/demo
/demo_dbg
/megaco
/megaco_dbg
/sip
/sip_dbg
/wide
/wide_dbg
6 changes: 2 additions & 4 deletions ApgLib/Apg.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,10 @@ void vDefaultAlertHandler(unsigned int uiLine, const char* cpFile);
// TOOLS
//////////////////////////////////////////////////////////////////////////
// non-ANSI minimum/maximum macros
#undef min
#undef max
/** minimum macro - defined here because it is non-ANSI. */
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define apg_min(a,b) (((a) < (b)) ? (a) : (b))
/** maximum macro - defined here because it is non-ANSI. */
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define apg_max(a,b) (((a) > (b)) ? (a) : (b))

// stricmp is non-ANSI - not all CRTs support it
/** Case-insensitive: compares two strings.
Expand Down
2 changes: 1 addition & 1 deletion ApgLib/Memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void* vpMemRealloc(void* vpCtx, void* vpData, apg_uint uiBytes){
spNewCell->uiSize = uiBytes;

// copy the data from old allocation to new
uiCopy = min(uiBytes, spOldCell->uiSize);
uiCopy = apg_min(uiBytes, spOldCell->uiSize);
vpDst = (void*)(spNewCell + 1);
vpSrc = (void*)(spOldCell + 1);
memcpy(vpDst, vpSrc, uiCopy);
Expand Down
2 changes: 1 addition & 1 deletion ApgUtilities/Utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ const char* cpBoolean2String(apg_uint uiBool){
static apg_uint uiIndent(apg_uint uiIndent, char* cpBuffer, apg_uint uiBufferLen){
apg_uint i, uiLen = 0;
if(cpBuffer && uiBufferLen){
uiLen = min(uiIndent, uiBufferLen);
uiLen = apg_min(uiIndent, uiBufferLen);
cpBuffer[0] = 0;
for(i = 0; i < uiLen; i++){
strcat(cpBuffer, " ");
Expand Down
2 changes: 1 addition & 1 deletion CppDemo/CppDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// The largest integer refers only to the grammar's data. Other Parser integer's may,
// and likely will, have larger requirements. Parser may fail unpredictably.

static unsigned long int ulData[163] = {
static signed long int ulData[163] = {
1, 1, 1304, 10, 111, 117, 20, 4, 122, 34, 156, 7, 24, 4, 28, 3, 52, 1, 59, 9, 54,
46, 51, 0, 1, 2, 4, 5, 3, 44, 10, 4, 10, 0, 0, 7, 4, 85, 5, 23, 5, 1, 7, 1, 5, 101,
4, 29, 4, 2, 8, 1, 0, 0, 0, 15, 7, 0, 0, 41, 3, 57, 27, 0, 4, 0, 10, 3, 57, 5, -1,
Expand Down
2 changes: 1 addition & 1 deletion Generator/Generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ static void vToUpper(char* cpString, char* cpToUpper, G_UINT uiLen){
GASSERT(cpToUpper);
GASSERT(uiLen);
uiLen++;
uiLen = min(uiLen, (G_UINT)(strlen(cpString)+1));
uiLen = apg_min(uiLen, (G_UINT)(strlen(cpString)+1));
char* cpEnd = cpString + uiLen - 1;
for(; cpString < cpEnd; cpString++, cpToUpper++){
if(!isalnum(*cpString)){*cpToUpper = '_';}
Expand Down
2 changes: 1 addition & 1 deletion MEGACO/MEGACO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// The largest integer refers only to the grammar's data. Other Parser integer's may,
// and likely will, have larger requirements. Parser may fail unpredictably.

static unsigned long int ulData[24541] = {
static signed long int ulData[24541] = {
1, 2, 196328, 1, 255, 26647, 20, 4, 17982, 5194, 23176, 1365, 24, 1457, 1481, 359,
0, 0, 4353, 1947, 54, 46, 51, 0, 4, 5, 1, 2, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17,
20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 36, 37, 40, 41, 42, 43, 44, 53, 54,
Expand Down
Loading