return rpn_stack[rpn_sp];
} else {
print("rpn: stack underflow\n");
- rpn_error = TRUE;
+ rpn_error = true;
return "";
}
}
++rpn_sp;
} else {
print("rpn: stack overflow\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
}
string rpn_get()
return rpn_stack[rpn_sp - 1];
} else {
print("rpn: empty stack\n");
- rpn_error = TRUE;
+ rpn_error = true;
return "";
}
}
rpn_stack[rpn_sp - 1] = s;
} else {
print("rpn: empty stack\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
}
if(argc >= 2)
{
rpn_sp = 0;
- rpn_error = FALSE;
+ rpn_error = false;
for(rpnpos = 1; rpnpos < argc; ++rpnpos)
{
rpncmd = argv(rpnpos);
else
{
print("rpn: empty cvar name for 'def'\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
} else if(rpncmd == "defs" || rpncmd == "@") {
s = "";
else
{
print("rpn: empty cvar name for 'defs'\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
} else if(rpncmd == "load") {
rpn_set(cvar_string(rpn_get()));
} else if(rpncmd == "rand") {
rpn_setf(ceil(random() * rpn_getf()) - 1);
} else if(rpncmd == "crc16") {
- rpn_setf(crc16(FALSE, rpn_get()));
+ rpn_setf(crc16(false, rpn_get()));
} else if(rpncmd == "put") {
s2 = rpn_pop();
if (!rpn_error)
i = stof(db_get(rpn_db, "stack.pos"));
if(!j)
{
- rpn_error = TRUE;
+ rpn_error = true;
print("rpn: empty database\n");
} else {
--j;
if(i < 0 || i >= j)
{
print("rpn: database cursor out of bounds\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
if(!rpn_error)
{
j = stof(db_get(rpn_db, "stack.pointer"));
if(!j)
{
- rpn_error = TRUE;
+ rpn_error = true;
print("rpn: empty database, cannot move cursor\n");
}
if(!rpn_error)
if(i < 0 || i >= j)
{
print("rpn: database cursor destination out of bounds\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
if(!rpn_error)
{
if (!fexists(s))
{
print("rpn: ERROR: ", s, " does not exist!\n");
- rpn_error = TRUE;
+ rpn_error = true;
}
}
} else if(rpncmd == "fexists") {
rpn_setf(0);
}
} else if(rpncmd == "localtime") {
- rpn_set(strftime(TRUE, rpn_get()));
+ rpn_set(strftime(true, rpn_get()));
} else if(rpncmd == "gmtime") {
- rpn_set(strftime(FALSE, rpn_get()));
+ rpn_set(strftime(false, rpn_get()));
} else if(rpncmd == "time") {
rpn_pushf(time);
} else if(rpncmd == "digest") {