From 88102cafead4e6654f1a2c7c49ae0afe9a3a08e9 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Thu, 25 Jul 2013 11:50:12 -0500 Subject: [PATCH] Make operation lookups case insensitive on both platforms --- Makefile | 4 +++- ops/.abCOp.c.swp | Bin 0 -> 12288 bytes ops/abCOp.c | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 ops/.abCOp.c.swp diff --git a/Makefile b/Makefile index 32d1399..27d4ad0 100644 --- a/Makefile +++ b/Makefile @@ -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 $< diff --git a/ops/.abCOp.c.swp b/ops/.abCOp.c.swp new file mode 100644 index 0000000000000000000000000000000000000000..9dc7471612ab3a173c7c6d61fdc05555ce4ff801 GIT binary patch literal 12288 zcmeI2O>Epm6vrnV5MQMgAmCJntrYgFyW8|Y#U>G(1eKOewyf1qlva^rkCSQqC4VF- zQOgw$6oj}S4n+b)1!p8Um8Nh&0U-egBq&H6;DiLHQV9wEGi#^a#ZG%I8cV;}^WMBS zGk?F?O_W(^%pRJikJt7ST)PNq&;I%BX65)$e2|cnf$o~ZeuK;LZ06{0&Gro4-lp#v znXo?P8L`9MD6F@9-)57Z$=$`?^GID^nAB~f?)jm3?D#cfn}o`x6i^D>oC0xV?LDxA z>>t_J5CMA%kJ9_^J9=}ms+UqgDWDWk3Md7X0!jg;fKosy@V`(X@`uQaSjlb4YL=7x z(7-)us+&?kDWDWk3Md7X0!jg;fKosypcGIFCa1Oi-LU0_+fhn*TJP7`|i;&;I*WfGgCD;V7gV(@GPy@Tc!{8zC z*PYN0d!_svtSrd@H^hguiy)C0ek{J2JeISz`H=cw_C98)RdJ1 zN&%&SQa~xNy#lB43kIRM0v5%AOJ|O@+f95y;_BJ^pF}I^IlS2M!#RGUN%k<;aXv zc|y9L2uZ3+r74rhB_*~KHMYi#IARz$dCKY}@}Y;g{YT!OpuH%_KrKJOG%bi|vLL9^ zLdR!;9&yiw_KO_a_8Q&_3oP4PEtGn(Lil7>bbJi@%u9i$TgT=*M>HY9I$80!Nz)Z~ zWi}REx8^F9J&NUIEv2Gpmr7ewY{eR@;USkt#bof*u0`4Qr`cLo_bFy%nL9?5WuD+} zYL+h|9kdk&sa*(|n!A}+Ez{byvodIz))_BzcE`NT%$-bY%Qe#h`<8OVTV2 zxPFb(v7I>?EnbK+^R&$VfgR?AERx%_N*h%g@)wwA$#x0vcA#YB6l6)DBEkrTXi%}I z(z+A7FSVzyfy(_dP>%TAz&T0mWA3uSQlcF?xN~yONA_#D7+jO zYA?rw^2_m{0&_elLgC4p1L`m*sGH}|@*G_|CzY1xKw0L5pfYnjojeEXQ-ox#QkG~= zK2&LrM-*y~OV(}PncNd5e2bLpa>I&EIC1I;dYA>wIYqnTG{3MRt2|g=FH`a_D$}5s literal 0 HcmV?d00001 diff --git a/ops/abCOp.c b/ops/abCOp.c index 6dd01b2..0299dcb 100644 --- a/ops/abCOp.c +++ b/ops/abCOp.c @@ -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]; } }