Make operation lookups case insensitive on both platforms

This commit is contained in:
Jeremy Rand 2013-07-25 11:50:12 -05:00
parent e77709f015
commit 88102cafea
3 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,8 @@ all: $(NAME)
.INCLUDE: "Make.engine"
CFLAGS=-D ABCALC_GSOS
$(NAME): fixtype $(OBJS)
occ -o $(NAME) $(OBJS)
@ -19,4 +21,4 @@ fixtype:
chtyp -l CC ops/*.c ops/*.h
%.o: %.c
occ -c $<
occ $(CFLAGS) -c $<

BIN
ops/.abCOp.c.swp Normal file

Binary file not shown.

View File

@ -92,7 +92,11 @@ abCalcOp *abCalcOpLookup(char *name)
int i;
for (i = 0; i < gNumOps; i++) {
if (strcmp(gOps[i].name, name) == 0) {
#ifdef ABCALC_GSOS
if (stricmp(gOps[i].name, name) == 0) {
#else
if (strcasecmp(gOps[i].name, name) == 0) {
#endif
return &gOps[i];
}
}