Move to the new build environment

This commit is contained in:
Jeremy Rand 2017-09-11 23:05:43 -04:00
parent 6079fe35cb
commit be0d47681c
120 changed files with 899 additions and 5534 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,94 +0,0 @@
#
# Make.engine
# By: Jeremy Rand
#
CALC_OBJS=abCalc.o abCStack.o abCMode.o abCError.o
EXPR_OBJS=expr/abCExpr.o expr/abCExpReal.o expr/abCExprInt.o
OPS_OBJS=ops/abCOp.o ops/abCOpAdd.o ops/abCOpSubtr.o ops/abCOpMult.o \
ops/abCOpDiv.o ops/abCOpPower.o ops/abCOpAnd.o ops/abCOpOr.o ops/abCOpXor.o \
ops/abCOpNot.o ops/abCOpBin.o ops/abCOpOct.o ops/abCOpDec.o ops/abCOpHex.o \
ops/abCOpStws.o ops/abCOpRcws.o ops/abCOpSl.o ops/abCOpRl.o ops/abCOpSr.o \
ops/abCOpRr.o ops/abCOpAsr.o ops/abCOpInv.o ops/abCOpChs.o ops/abCOpDrop.o \
ops/abCOpSwap.o ops/abCOpSin.o ops/abCOpCos.o ops/abCOpTan.o ops/abCOpAsin.o \
ops/abCOpAcos.o ops/abCOpAtan.o ops/abCOpSq.o ops/abCOpSqrt.o ops/abCOpPi.o \
ops/abCOpLog.o ops/abCOpAlog.o ops/abCOpLn.o ops/abCOpExp.o ops/abCOpSinh.o \
ops/abCOpCosh.o ops/abCOpTanh.o ops/abCOpClear.o ops/abCOpR2B.o \
ops/abCOpB2R.o
SHELL_OBJS=abCMain.o $(CALC_OBJS) $(EXPR_OBJS) $(OPS_OBJS)
NDA_OBJS=abCalcNDA.o $(CALC_OBJS) $(EXPR_OBJS) $(OPS_OBJS)
NDA_RES=abCalcNDA.r
abCMain.o: abCalc.h abCStack.h expr/abCExpr.h ops/abCOp.h abCError.h
abCalcNDA.o: abCalcNDA.defs abCalc.h abCStack.h abCError.h expr/abCExpr.h ops/abCOp.h
abCalcNDA.r: abCalcNDA.defs
abCalc.o: abCalc.h expr/abCExpr.h abCMode.h expr/abCExpReal.h expr/abCExprInt.h \
abCStack.h ops/abCOp.h abCError.h
abCStack.o: expr/abCExpr.h abCStack.h abCError.h
abCMode.o: abCMode.h expr/abCExpr.h
abCError.o: abCError.h
expr/abCExpr.o: expr/abCExpr.h
expr/abCExpReal.o: expr/abCExpr.h expr/abCExpReal.h
expr/abCExprInt.o: expr/abCExpr.h abCMode.h expr/abCExprInt.h
ops/abCOp.o: ops/abCOp.h abCError.h expr/abCExpr.h abCStack.h ops/abCOpAdd.h \
ops/abCOpSubtr.h ops/abCOpMult.h ops/abCOpDiv.h ops/abCOpPower.h \
ops/abCOpAnd.h ops/abCOpOr.h ops/abCOpXor.h ops/abCOpNot.h ops/abCOpBin.h \
ops/abCOpOct.h ops/abCOpDec.h ops/abCOpHex.h ops/abCOpStws.h ops/abCOpRcws.h \
ops/abCOpSl.h ops/abCOpRl.h ops/abCOpSr.h ops/abCOpRr.h ops/abCOpAsr.h \
ops/abCOpInv.h ops/abCOpChs.h ops/abCOpDrop.h ops/abCOpSwap.h ops/abCOpSin.h \
ops/abCOpCos.h ops/abCOpTan.h ops/abCOpAsin.h ops/abCOpAcos.h ops/abCOpAtan.h \
ops/abCOpSq.h ops/abCOpSqrt.h ops/abCOpPi.h ops/abCOpLog.h ops/abCOpAlog.h \
ops/abCOpLn.h ops/abCOpExp.h ops/abCOpSinh.h ops/abCOpCosh.h ops/abCOpTanh.h \
ops/abCOpClear.h
ops/abCOpAdd.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpAdd.h
ops/abCOpSubtr.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpSubtr.h
ops/abCOpMult.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpMult.h
ops/abCOpDiv.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpDiv.h
ops/abCOpPower.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h abCStack.h ops/abCOpPower.h
ops/abCOpAnd.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExprInt.h abCStack.h ops/abCOpAnd.h
ops/abCOpOr.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExprInt.h abCStack.h ops/abCOpOr.h
ops/abCOpXor.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExprInt.h abCStack.h ops/abCOpXor.h
ops/abCOpNot.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExprInt.h abCStack.h ops/abCOpNot.h
ops/abCOpBin.o: ops/abCOp.h abCMode.h ops/abCOpBin.h
ops/abCOpOct.o: ops/abCOp.h abCMode.h ops/abCOpOct.h
ops/abCOpDec.o: ops/abCOp.h abCMode.h ops/abCOpDec.h
ops/abCOpHex.o: ops/abCOp.h abCMode.h ops/abCOpHex.h
ops/abCOpStws.o: ops/abCOp.h abCMode.h abCStack.h expr/abCExpr.h abCError.h ops/abCOpStws.h
ops/abCOpRcws.o: ops/abCOp.h abCMode.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpRcws.h
ops/abCOpSl.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExprInt.h ops/abCOpSl.h
ops/abCOpRl.o: ops/abCOp.h abCMode.h abCError.h abCStack.h expr/abCExpr.h expr/abCExprInt.h ops/abCOpRl.h
ops/abCOpSr.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExprInt.h ops/abCOpSr.h
ops/abCOpRr.o: ops/abCOp.h abCMode.h abCError.h abCStack.h expr/abCExpr.h expr/abCExprInt.h ops/abCOpRr.h
ops/abCOpAsr.o: ops/abCOp.h abCMode.h abCError.h abCStack.h expr/abCExpr.h expr/abCExprInt.h ops/abCOpAsr.h
ops/abCOpInv.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpInv.h
ops/abCOpChs.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpChs.h
ops/abCOpDrop.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h ops/abCOpDrop.h
ops/abCOpSwap.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h ops/abCOpSwap.h
ops/abCOpSin.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpSin.h
ops/abCOpCos.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpCos.h
ops/abCOpTan.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpTan.h
ops/abCOpAsin.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAsin.h
ops/abCOpAcos.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAcos.h
ops/abCOpAtan.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAtan.h
ops/abCOpSq.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpSq.h
ops/abCOpSqrt.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpSqrt.h
ops/abCOpPi.o: ops/abCOp.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpPi.h
ops/abCOpLog.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpLog.h
ops/abCOpAlog.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAlog.h
ops/abCOpLn.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpLn.h
ops/abCOpExp.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpExp.h
ops/abCOpSinh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpSinh.h
ops/abCOpCosh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpCosh.h
ops/abCOpTanh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpTanh.h
ops/abCOpClear.o: ops/abCOp.h abCStack.h ops/abCOpClear.h
ops/abCOpR2B.o: ops/abCOp.h abCStack.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h ops/abCOpR2B.h
ops/abCOpB2R.o: ops/abCOp.h abCStack.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h ops/abCOpB2R.h

View File

@ -1,18 +0,0 @@
#
# Make.mac
# By: Jeremy Rand
#
NAME=abCalc
CFLAGS=-I.
all: $(NAME)
include Make.engine
$(NAME): $(SHELL_OBJS)
cc -o $(NAME) $(SHELL_OBJS)
clean:
rm -f $(NAME) $(SHELL_OBJS)

View File

@ -1,51 +0,0 @@
#
# Makefile
# By: Jeremy Rand
#
SHELL_NAME=abCalc
NDA_NAME=abCalcNDA
all: $(SHELL_NAME) $(NDA_NAME)
.INCLUDE: "Make.engine"
CFLAGS=-D ABCALC_GSOS
$(SHELL_NAME): $(SHELL_OBJS)
occ -o $(SHELL_NAME) $(SHELL_OBJS)
$(NDA_NAME): $(NDA_OBJS) $(NDA_NAME).r
cp -f $(NDA_NAME).r $(NDA_NAME)
occ -M -o $(NDA_NAME) $(NDA_OBJS) > $(NDA_NAME).map
chtyp -t nda $(NDA_NAME)
abCMain.o: abCMain.c
occ $(CFLAGS) -c -o $@ $<
$(NDA_NAME).o: $(NDA_NAME).c
occ $(CFLAGS) -c -o $@ $<
clean:
cp -p rm -f $(SHELL_NAME) $(SHELL_OBJS) $(SHELL_NAME).root
cp -p rm -f $(NDA_NAME) $(NDA_OBJS) $(NDA_NAME).r $(NDA_NAME).root
cp -p rm -f *.root
cp -p rm -f *.map
cp -p rm -f expr/*.root
cp -p rm -f ops/*.root
fixfiles:
tr '\\012' '\\015' < abCalcNDA.defs > /tmp/blah
cp -f /tmp/blah abCalcNDA.defs
tr '\\012' '\\015' < abCalcNDA.rez > /tmp/blah
cp -f /tmp/blah abCalcNDA.rez
chtyp -l CC *.c *.h *.defs
chtyp -l REZ *.rez
chtyp -l CC expr/*.c expr/*.h
chtyp -l CC ops/*.c ops/*.h
%.o: %.c
occ $(CFLAGS) -r -c -o $@ $<
%.r: %.rez
occ -o $@ $<

View File

@ -1,41 +0,0 @@
abCalc
======
The "Ass-Backward Calculator" for the Apple //GS - an RPN calculator NDA
The source can be built both from Mac OSX, resulting in a commandline binary which you can run on a Mac and from a //GS.
To build and execute on a Mac:
1. Make sure you have Xcode installed. If not, grab it from the Mac App store.
2. Execute "make -f Make.mac"
3. Run "./abCalc"
In theory, it should work on any POSIX platform like Linux, Solaris, etc but I have not tested it on any other platforms.
To build this on a //GS, you need a number of prerequisites:
1. Orca/C v2.0.1
2. GNO/ME v2.x
3. occ - the Orca/C wrapper
4. dmake
To build this on a //GS, the steps are:
1. Somehow copy the files to your //GS. Depending on whether you are using a real machine or an emulator, your
approach here may be different.
2. Find this line in your ORCACDefs/scrap.h file:
extern pascal void PutScrap(unsigned Longint, Word, Pointer) inline(0x0C16,dispatcher);
and change it to
extern pascal void PutScrap(LongWord, Word, Pointer) inline(0x0C16,dispatcher);
This is a bug in the headers which causes ORCA/C to generate the wrong output.
3. Once you have the files, you should first execute "dmake fixfiles". This makes sure all files have the right
file types.
4. Execute "dmake"
When done, you will have two binaries. The abCalc binary is a shell command you can use from GNO/ME:
![abCalc Shell Screenshot](/screenshots/abCalc.png "abCalc Shell Screenshot")
And abCalcNDA is a new desk accessory which you can use from within GS/OS applications:
![abCalc NDA Screenshot](/screenshots/abCalcNDA.png "abCalc NDA Screenshot")

View File

@ -1,75 +0,0 @@
/*
abCError.c
By: Jeremy Rand
*/
#include <stdio.h>
#include <stdlib.h>
#include "abCError.h"
static char *gErrorStrings[abCalcErrorTypeMax];
static abCalcErrorType gCurrErrorType = abCalcNoError;
static char *gCurrErrorOpName = NULL;
char gErrorBuffer[128];
void abCalcErrorInit(void)
{
gErrorStrings[abCalcNoError] = NULL;
gErrorStrings[abCalcSyntaxError] = "Syntax Error";
gErrorStrings[abCalcBadArgTypeError] = "Bad Argument Type";
gErrorStrings[abCalcBadArgValueError] = "Bad Argument Value";
gErrorStrings[abCalcTooFewArgsError] = "Too Few Arguments";
gErrorStrings[abCalcStackFullError] = "Stack Full";
gErrorStrings[abCalcInfiniteResultError] = "Infinite Result";
gErrorStrings[abCalcComplexResultError] = "Complex Result";
}
void abCalcRaiseError(abCalcErrorType type, char *opName)
{
if ((type < abCalcErrorTypeMin) ||
(type >= abCalcErrorTypeMax))
return;
if (gCurrErrorType == abCalcNoError) {
gCurrErrorType = type;
gCurrErrorOpName = opName;
}
}
char *abCalcGetError(void)
{
char *errorString;
if ((gCurrErrorType < abCalcErrorTypeMin) ||
(gCurrErrorType >= abCalcErrorTypeMax))
return NULL;
errorString = gErrorStrings[gCurrErrorType];
if (errorString == NULL)
return NULL;
if (gCurrErrorOpName != NULL) {
sprintf(gErrorBuffer, "%s Error: %s", gCurrErrorOpName, gErrorStrings[gCurrErrorType]);
} else {
sprintf(gErrorBuffer, "Error: %s", gErrorStrings[gCurrErrorType]);
}
return gErrorBuffer;
}
void abCalcClearError(void)
{
gCurrErrorType = abCalcNoError;
gCurrErrorOpName = NULL;
}

View File

@ -1,35 +0,0 @@
/*
abCError.h
By: Jeremy Rand
*/
#ifndef ABCERROR_H
#define ABCERROR_H
typedef enum abCalcErrorType {
abCalcErrorTypeMin = 0,
abCalcNoError,
abCalcSyntaxError,
abCalcBadArgTypeError,
abCalcBadArgValueError,
abCalcTooFewArgsError,
abCalcStackFullError,
abCalcInfiniteResultError,
abCalcComplexResultError,
abCalcErrorTypeMax
} abCalcErrorType;
void abCalcErrorInit(void);
void abCalcRaiseError(abCalcErrorType type, char *opName);
char *abCalcGetError(void);
void abCalcClearError(void);
#endif

View File

@ -1,77 +0,0 @@
/*
abCMain.c
By: Jeremy Rand
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "abCalc.h"
#include "abCStack.h"
#include "abCError.h"
#include "expr/abCExpr.h"
#include "ops/abCOp.h"
char gBuffer[AB_CALC_EXPR_STRING_MAX];
abCalcExpr gExpr;
int main(void)
{
int timeToQuit = 0;
int depth;
int item;
int len;
abCalcOp *op;
char *errorString;
abCalcInit();
while (!timeToQuit) {
printf("\n---------------------------\nStack:\n");
depth = abCalcStackNumItems();
if (depth == 0) {
printf(" Empty!\n");
} else {
for(item = depth - 1; item >= 0; item--) {
abCalcFormatExpr(abCalcStackExprAt(item), gBuffer);
printf(" %3d: %s\n", item + 1, gBuffer);
}
}
errorString = abCalcGetError();
if (errorString != NULL) {
printf("\n === %s ===\n", errorString);
abCalcClearError();
}
printf("> ");
if (fgets(gBuffer, sizeof(gBuffer), stdin) != NULL) {
len = strlen(gBuffer);
if ((gBuffer[len - 1] == '\r') ||
(gBuffer[len - 1] == '\n')) {
gBuffer[len - 1] = '\0';
}
op = abCalcOpLookup(gBuffer);
if (op != NULL) {
op->execute();
} else if (abCalcParseExpr(&gExpr, gBuffer) != NULL) {
abCalcStackExprPush(&gExpr);
} else {
abCalcRaiseError(abCalcSyntaxError, NULL);
}
} else {
timeToQuit = 1;
}
}
exit(0);
}

View File

@ -1,47 +0,0 @@
/*
abCMode.c
By: Jeremy Rand
*/
#include "abCMode.h"
static abCalcModeIntBase gBase = abCalcModeDecBase;
static int gIntWidth = AB_CALC_EXPR_MAX_INT_WIDTH;
void abCalcModeInit(void)
{
}
abCalcModeIntBase abCalcModeGetBase(void)
{
return gBase;
}
void abCalcModeSetBase(abCalcModeIntBase base)
{
if ((base >= abCalcModeIntBaseMin) &&
(base < abCalcModeIntBaseMax)) {
gBase = base;
}
}
int abCalcModeGetIntWidth(void)
{
return gIntWidth;
}
void abCalcModeSetIntWidth(int width)
{
if ((width > 0) &&
(width <= AB_CALC_EXPR_MAX_INT_WIDTH)) {
gIntWidth = width;
}
}

View File

@ -1,37 +0,0 @@
/*
abCMode.h
By: Jeremy Rand
*/
#ifndef ABCMODE_H
#define ABCMODE_H
#include "expr/abCExpr.h"
typedef enum abCalcModeIntBase
{
abCalcModeIntBaseMin = 0,
abCalcModeBinBase = 0,
abCalcModeOctBase,
abCalcModeDecBase,
abCalcModeHexBase,
abCalcModeIntBaseMax
} abCalcModeIntBase;
void abCalcModeInit(void);
abCalcModeIntBase abCalcModeGetBase(void);
void abCalcModeSetBase(abCalcModeIntBase base);
int abCalcModeGetIntWidth(void);
void abCalcModeSetIntWidth(int width);
#endif

View File

@ -1,103 +0,0 @@
/*
abCStack.c
By: Jeremy Rand
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "abCStack.h"
#include "abCError.h"
abCalcExpr gStack[AB_CALC_STACK_DEPTH];
static int gStackNumItems = 0;
void abCalcStackInit(void)
{
}
abCalcExpr *abCalcStackExprPush(abCalcExpr *expr)
{
abCalcExpr *result = NULL;
if (gStackNumItems >= AB_CALC_STACK_DEPTH) {
abCalcRaiseError(abCalcStackFullError, NULL);
return NULL;
}
if ((gStackNumItems < AB_CALC_STACK_DEPTH) &&
(expr != NULL)) {
result = &(gStack[gStackNumItems]);
memcpy(result, expr, sizeof(*expr));
gStackNumItems++;
}
return result;
}
abCalcExpr *abCalcStackExprPop(abCalcExpr *expr)
{
abCalcExpr *result = NULL;
if (gStackNumItems < 1)
return NULL;
gStackNumItems--;
if (expr != NULL) {
result = expr;
memcpy(expr, &(gStack[gStackNumItems]), sizeof(*expr));
}
return result;
}
int abCalcStackNumItems(void)
{
return gStackNumItems;
}
abCalcExpr *abCalcStackExprAt(int depth)
{
abCalcExpr *result = NULL;
if (depth < gStackNumItems) {
result = &(gStack[gStackNumItems - 1 - depth]);
}
return result;
}
char *abCalcStackExprStringAt(int depth, char *buffer, int addPrefix)
{
static char tmpBuffer[AB_CALC_EXPR_STRING_MAX];
if (buffer == NULL)
return NULL;
if (addPrefix) {
sprintf(buffer, "%3d: ", depth + 1);
} else {
buffer[0] = '\0';
}
if (depth < gStackNumItems) {
if (abCalcFormatExpr(&(gStack[gStackNumItems - 1 - depth]), tmpBuffer) != NULL) {
strcat(buffer, tmpBuffer);
}
}
return buffer;
}
void abCalcStackClear(void)
{
gStackNumItems = 0;
}

View File

@ -1,32 +0,0 @@
/*
abCStack.h
By: Jeremy Rand
*/
#ifndef ABCSTACK_H
#define ABCSTACK_H
#include "expr/abCExpr.h"
#define AB_CALC_STACK_DEPTH 128
void abCalcStackInit(void);
abCalcExpr *abCalcStackExprPush(abCalcExpr *expr);
abCalcExpr *abCalcStackExprPop(abCalcExpr *expr);
abCalcExpr *abCalcStackExprAt(int depth);
char *abCalcStackExprStringAt(int depth, char *buffer, int addPrefix);
int abCalcStackNumItems(void);
void abCalcStackClear(void);
#endif

View File

@ -1,32 +0,0 @@
/*
abCalc.c
By: Jeremy Rand
*/
#include "abCMode.h"
#include "abCStack.h"
#include "abCError.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
void abCalcInit(void)
{
abCalcExprInit();
abCalcExprRealInit();
abCalcExprIntInit();
abCalcModeInit();
abCalcStackInit();
abCalcOpInit();
abCalcErrorInit();
}

View File

@ -1,14 +0,0 @@
/*
abCalc.h
By: Jeremy Rand
*/
#ifndef ABCALC_H
#define ABCALC_H
void abCalcInit(void);
#endif

View File

@ -0,0 +1,671 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
9D1B83E51F677D78006AA28A /* nda.mk in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B83E41F677D78006AA28A /* nda.mk */; };
9D1B83E81F677D78006AA28A /* config.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83E71F677D78006AA28A /* config.txt */; };
9D1B83EA1F677D78006AA28A /* createDiskImage in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83E91F677D78006AA28A /* createDiskImage */; };
9D1B83EC1F677D78006AA28A /* head.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83EB1F677D78006AA28A /* head.mk */; };
9D1B83EE1F677D78006AA28A /* launchEmulator in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83ED1F677D78006AA28A /* launchEmulator */; };
9D1B83F01F677D78006AA28A /* orca-asm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83EF1F677D78006AA28A /* orca-asm */; };
9D1B83F21F677D78006AA28A /* orca-cc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83F11F677D78006AA28A /* orca-cc */; };
9D1B83F41F677D78006AA28A /* orca-macgen in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83F31F677D78006AA28A /* orca-macgen */; };
9D1B83F61F677D78006AA28A /* orca-rez in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83F51F677D78006AA28A /* orca-rez */; };
9D1B83F81F677D78006AA28A /* system601.2mg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83F71F677D78006AA28A /* system601.2mg */; };
9D1B83FA1F677D78006AA28A /* tail.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83F91F677D78006AA28A /* tail.mk */; };
9D1B83FD1F677D78006AA28A /* abCalc.xcscheme in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D1B83FC1F677D78006AA28A /* abCalc.xcscheme */; };
9D1B84131F677D9A006AA28A /* abCalc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B84061F677D9A006AA28A /* abCalc.c */; };
9D1B84161F677D9A006AA28A /* abCError.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B840C1F677D9A006AA28A /* abCError.c */; };
9D1B84181F677D9A006AA28A /* abCMode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B840F1F677D9A006AA28A /* abCMode.c */; };
9D1B84191F677D9A006AA28A /* abCStack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B84111F677D9A006AA28A /* abCStack.c */; };
9D1B841B1F677DAB006AA28A /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B841A1F677DAB006AA28A /* README.md */; };
9D1B84851F677E91006AA28A /* abCalcNDA.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B84821F677E91006AA28A /* abCalcNDA.c */; };
9D1B84861F677E91006AA28A /* abCalcNDA.h in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B84831F677E91006AA28A /* abCalcNDA.h */; };
9D1B84881F677EA1006AA28A /* abCMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B84871F677EA1006AA28A /* abCMain.c */; };
9D1B848D1F67810E006AA28A /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 9D1B848C1F67810E006AA28A /* Makefile */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9D1B83DA1F677D78006AA28A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
9D1B83F41F677D78006AA28A /* orca-macgen in CopyFiles */,
9D1B83F61F677D78006AA28A /* orca-rez in CopyFiles */,
9D1B83EE1F677D78006AA28A /* launchEmulator in CopyFiles */,
9D1B83FD1F677D78006AA28A /* abCalc.xcscheme in CopyFiles */,
9D1B83F21F677D78006AA28A /* orca-cc in CopyFiles */,
9D1B83FA1F677D78006AA28A /* tail.mk in CopyFiles */,
9D1B83EA1F677D78006AA28A /* createDiskImage in CopyFiles */,
9D1B83E81F677D78006AA28A /* config.txt in CopyFiles */,
9D1B83F01F677D78006AA28A /* orca-asm in CopyFiles */,
9D1B83EC1F677D78006AA28A /* head.mk in CopyFiles */,
9D1B83F81F677D78006AA28A /* system601.2mg in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
9D1B83DC1F677D78006AA28A /* doNotBuild */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = doNotBuild; sourceTree = BUILT_PRODUCTS_DIR; };
9D1B83E41F677D78006AA28A /* nda.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = nda.mk; sourceTree = "<group>"; };
9D1B83E71F677D78006AA28A /* config.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = config.txt; path = make/config.txt; sourceTree = "<group>"; };
9D1B83E91F677D78006AA28A /* createDiskImage */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = createDiskImage; path = make/createDiskImage; sourceTree = "<group>"; };
9D1B83EB1F677D78006AA28A /* head.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = head.mk; path = make/head.mk; sourceTree = "<group>"; };
9D1B83ED1F677D78006AA28A /* launchEmulator */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = launchEmulator; path = make/launchEmulator; sourceTree = "<group>"; };
9D1B83EF1F677D78006AA28A /* orca-asm */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "orca-asm"; path = "make/orca-asm"; sourceTree = "<group>"; };
9D1B83F11F677D78006AA28A /* orca-cc */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "orca-cc"; path = "make/orca-cc"; sourceTree = "<group>"; };
9D1B83F31F677D78006AA28A /* orca-macgen */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "orca-macgen"; path = "make/orca-macgen"; sourceTree = "<group>"; };
9D1B83F51F677D78006AA28A /* orca-rez */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "orca-rez"; path = "make/orca-rez"; sourceTree = "<group>"; };
9D1B83F71F677D78006AA28A /* system601.2mg */ = {isa = PBXFileReference; lastKnownFileType = file; name = system601.2mg; path = make/system601.2mg; sourceTree = "<group>"; };
9D1B83F91F677D78006AA28A /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = tail.mk; path = make/tail.mk; sourceTree = "<group>"; };
9D1B83FC1F677D78006AA28A /* abCalc.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = abCalc.xcscheme; path = abCalc.xcodeproj/xcshareddata/xcschemes/abCalc.xcscheme; sourceTree = SOURCE_ROOT; };
9D1B84061F677D9A006AA28A /* abCalc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abCalc.c; sourceTree = "<group>"; };
9D1B84071F677D9A006AA28A /* abCalc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abCalc.h; sourceTree = "<group>"; };
9D1B840C1F677D9A006AA28A /* abCError.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abCError.c; sourceTree = "<group>"; };
9D1B840D1F677D9A006AA28A /* abCError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abCError.h; sourceTree = "<group>"; };
9D1B840F1F677D9A006AA28A /* abCMode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abCMode.c; sourceTree = "<group>"; };
9D1B84101F677D9A006AA28A /* abCMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abCMode.h; sourceTree = "<group>"; };
9D1B84111F677D9A006AA28A /* abCStack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abCStack.c; sourceTree = "<group>"; };
9D1B84121F677D9A006AA28A /* abCStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abCStack.h; sourceTree = "<group>"; };
9D1B841A1F677DAB006AA28A /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
9D1B841D1F677DC6006AA28A /* abCExpr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCExpr.c; sourceTree = "<group>"; };
9D1B841E1F677DC6006AA28A /* abCExpr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCExpr.h; sourceTree = "<group>"; };
9D1B841F1F677DC6006AA28A /* abCExpReal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCExpReal.c; sourceTree = "<group>"; };
9D1B84201F677DC6006AA28A /* abCExpReal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCExpReal.h; sourceTree = "<group>"; };
9D1B84211F677DC6006AA28A /* abCExprInt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCExprInt.c; sourceTree = "<group>"; };
9D1B84221F677DC6006AA28A /* abCExprInt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCExprInt.h; sourceTree = "<group>"; };
9D1B84241F677DC6006AA28A /* abCOp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOp.c; sourceTree = "<group>"; };
9D1B84251F677DC6006AA28A /* abCOp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOp.h; sourceTree = "<group>"; };
9D1B84261F677DC6006AA28A /* abCOpAcos.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAcos.c; sourceTree = "<group>"; };
9D1B84271F677DC6006AA28A /* abCOpAcos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAcos.h; sourceTree = "<group>"; };
9D1B84281F677DC6006AA28A /* abCOpAdd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAdd.c; sourceTree = "<group>"; };
9D1B84291F677DC6006AA28A /* abCOpAdd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAdd.h; sourceTree = "<group>"; };
9D1B842A1F677DC6006AA28A /* abCOpAlog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAlog.c; sourceTree = "<group>"; };
9D1B842B1F677DC6006AA28A /* abCOpAlog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAlog.h; sourceTree = "<group>"; };
9D1B842C1F677DC6006AA28A /* abCOpAnd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAnd.c; sourceTree = "<group>"; };
9D1B842D1F677DC6006AA28A /* abCOpAnd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAnd.h; sourceTree = "<group>"; };
9D1B842E1F677DC6006AA28A /* abCOpAsin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAsin.c; sourceTree = "<group>"; };
9D1B842F1F677DC6006AA28A /* abCOpAsin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAsin.h; sourceTree = "<group>"; };
9D1B84301F677DC6006AA28A /* abCOpAsr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAsr.c; sourceTree = "<group>"; };
9D1B84311F677DC6006AA28A /* abCOpAsr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAsr.h; sourceTree = "<group>"; };
9D1B84321F677DC6006AA28A /* abCOpAtan.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpAtan.c; sourceTree = "<group>"; };
9D1B84331F677DC6006AA28A /* abCOpAtan.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpAtan.h; sourceTree = "<group>"; };
9D1B84341F677DC6006AA28A /* abCOpB2R.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpB2R.c; sourceTree = "<group>"; };
9D1B84351F677DC6006AA28A /* abCOpB2R.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpB2R.h; sourceTree = "<group>"; };
9D1B84361F677DC6006AA28A /* abCOpBin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpBin.c; sourceTree = "<group>"; };
9D1B84371F677DC6006AA28A /* abCOpBin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpBin.h; sourceTree = "<group>"; };
9D1B84381F677DC6006AA28A /* abCOpChs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpChs.c; sourceTree = "<group>"; };
9D1B84391F677DC6006AA28A /* abCOpChs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpChs.h; sourceTree = "<group>"; };
9D1B843A1F677DC6006AA28A /* abCOpClear.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpClear.c; sourceTree = "<group>"; };
9D1B843B1F677DC6006AA28A /* abCOpClear.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpClear.h; sourceTree = "<group>"; };
9D1B843C1F677DC6006AA28A /* abCOpCos.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpCos.c; sourceTree = "<group>"; };
9D1B843D1F677DC6006AA28A /* abCOpCos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpCos.h; sourceTree = "<group>"; };
9D1B843E1F677DC6006AA28A /* abCOpCosh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpCosh.c; sourceTree = "<group>"; };
9D1B843F1F677DC6006AA28A /* abCOpCosh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpCosh.h; sourceTree = "<group>"; };
9D1B84401F677DC6006AA28A /* abCOpDec.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpDec.c; sourceTree = "<group>"; };
9D1B84411F677DC6006AA28A /* abCOpDec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpDec.h; sourceTree = "<group>"; };
9D1B84421F677DC6006AA28A /* abCOpDiv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpDiv.c; sourceTree = "<group>"; };
9D1B84431F677DC6006AA28A /* abCOpDiv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpDiv.h; sourceTree = "<group>"; };
9D1B84441F677DC6006AA28A /* abCOpDrop.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpDrop.c; sourceTree = "<group>"; };
9D1B84451F677DC6006AA28A /* abCOpDrop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpDrop.h; sourceTree = "<group>"; };
9D1B84461F677DC6006AA28A /* abCOpExp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpExp.c; sourceTree = "<group>"; };
9D1B84471F677DC6006AA28A /* abCOpExp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpExp.h; sourceTree = "<group>"; };
9D1B84481F677DC6006AA28A /* abCOpHex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpHex.c; sourceTree = "<group>"; };
9D1B84491F677DC6006AA28A /* abCOpHex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpHex.h; sourceTree = "<group>"; };
9D1B844A1F677DC6006AA28A /* abCOpInv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpInv.c; sourceTree = "<group>"; };
9D1B844B1F677DC6006AA28A /* abCOpInv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpInv.h; sourceTree = "<group>"; };
9D1B844C1F677DC6006AA28A /* abCOpLn.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpLn.c; sourceTree = "<group>"; };
9D1B844D1F677DC6006AA28A /* abCOpLn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpLn.h; sourceTree = "<group>"; };
9D1B844E1F677DC6006AA28A /* abCOpLog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpLog.c; sourceTree = "<group>"; };
9D1B844F1F677DC6006AA28A /* abCOpLog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpLog.h; sourceTree = "<group>"; };
9D1B84501F677DC6006AA28A /* abCOpMult.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpMult.c; sourceTree = "<group>"; };
9D1B84511F677DC6006AA28A /* abCOpMult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpMult.h; sourceTree = "<group>"; };
9D1B84521F677DC6006AA28A /* abCOpNot.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpNot.c; sourceTree = "<group>"; };
9D1B84531F677DC6006AA28A /* abCOpNot.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpNot.h; sourceTree = "<group>"; };
9D1B84541F677DC6006AA28A /* abCOpOct.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpOct.c; sourceTree = "<group>"; };
9D1B84551F677DC6006AA28A /* abCOpOct.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpOct.h; sourceTree = "<group>"; };
9D1B84561F677DC6006AA28A /* abCOpOr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpOr.c; sourceTree = "<group>"; };
9D1B84571F677DC6006AA28A /* abCOpOr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpOr.h; sourceTree = "<group>"; };
9D1B84581F677DC6006AA28A /* abCOpPi.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpPi.c; sourceTree = "<group>"; };
9D1B84591F677DC6006AA28A /* abCOpPi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpPi.h; sourceTree = "<group>"; };
9D1B845A1F677DC6006AA28A /* abCOpPower.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpPower.c; sourceTree = "<group>"; };
9D1B845B1F677DC6006AA28A /* abCOpPower.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpPower.h; sourceTree = "<group>"; };
9D1B845C1F677DC6006AA28A /* abCOpR2B.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpR2B.c; sourceTree = "<group>"; };
9D1B845D1F677DC6006AA28A /* abCOpR2B.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpR2B.h; sourceTree = "<group>"; };
9D1B845E1F677DC6006AA28A /* abCOpRcws.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpRcws.c; sourceTree = "<group>"; };
9D1B845F1F677DC6006AA28A /* abCOpRcws.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpRcws.h; sourceTree = "<group>"; };
9D1B84601F677DC6006AA28A /* abCOpRl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpRl.c; sourceTree = "<group>"; };
9D1B84611F677DC6006AA28A /* abCOpRl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpRl.h; sourceTree = "<group>"; };
9D1B84621F677DC6006AA28A /* abCOpRr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpRr.c; sourceTree = "<group>"; };
9D1B84631F677DC6006AA28A /* abCOpRr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpRr.h; sourceTree = "<group>"; };
9D1B84641F677DC6006AA28A /* abCOpSin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSin.c; sourceTree = "<group>"; };
9D1B84651F677DC6006AA28A /* abCOpSin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSin.h; sourceTree = "<group>"; };
9D1B84661F677DC6006AA28A /* abCOpSinh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSinh.c; sourceTree = "<group>"; };
9D1B84671F677DC6006AA28A /* abCOpSinh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSinh.h; sourceTree = "<group>"; };
9D1B84681F677DC6006AA28A /* abCOpSl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSl.c; sourceTree = "<group>"; };
9D1B84691F677DC6006AA28A /* abCOpSl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSl.h; sourceTree = "<group>"; };
9D1B846A1F677DC6006AA28A /* abCOpSq.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSq.c; sourceTree = "<group>"; };
9D1B846B1F677DC6006AA28A /* abCOpSq.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSq.h; sourceTree = "<group>"; };
9D1B846C1F677DC6006AA28A /* abCOpSqrt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSqrt.c; sourceTree = "<group>"; };
9D1B846D1F677DC6006AA28A /* abCOpSqrt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSqrt.h; sourceTree = "<group>"; };
9D1B846E1F677DC6006AA28A /* abCOpSr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSr.c; sourceTree = "<group>"; };
9D1B846F1F677DC6006AA28A /* abCOpSr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSr.h; sourceTree = "<group>"; };
9D1B84701F677DC6006AA28A /* abCOpStws.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpStws.c; sourceTree = "<group>"; };
9D1B84711F677DC6006AA28A /* abCOpStws.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpStws.h; sourceTree = "<group>"; };
9D1B84721F677DC6006AA28A /* abCOpSubtr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSubtr.c; sourceTree = "<group>"; };
9D1B84731F677DC6006AA28A /* abCOpSubtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSubtr.h; sourceTree = "<group>"; };
9D1B84741F677DC6006AA28A /* abCOpSwap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpSwap.c; sourceTree = "<group>"; };
9D1B84751F677DC6006AA28A /* abCOpSwap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpSwap.h; sourceTree = "<group>"; };
9D1B84761F677DC6006AA28A /* abCOpTan.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpTan.c; sourceTree = "<group>"; };
9D1B84771F677DC6006AA28A /* abCOpTan.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpTan.h; sourceTree = "<group>"; };
9D1B84781F677DC6006AA28A /* abCOpTanh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpTanh.c; sourceTree = "<group>"; };
9D1B84791F677DC6006AA28A /* abCOpTanh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpTanh.h; sourceTree = "<group>"; };
9D1B847A1F677DC6006AA28A /* abCOpXor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = abCOpXor.c; sourceTree = "<group>"; };
9D1B847B1F677DC6006AA28A /* abCOpXor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = abCOpXor.h; sourceTree = "<group>"; };
9D1B847D1F677DC6006AA28A /* abCalc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = abCalc.png; sourceTree = "<group>"; };
9D1B847E1F677DC6006AA28A /* abCalcNDA.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = abCalcNDA.png; sourceTree = "<group>"; };
9D1B84821F677E91006AA28A /* abCalcNDA.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = abCalcNDA.c; path = NDA/abCalcNDA.c; sourceTree = "<group>"; };
9D1B84831F677E91006AA28A /* abCalcNDA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = abCalcNDA.h; path = NDA/abCalcNDA.h; sourceTree = "<group>"; };
9D1B84841F677E91006AA28A /* abCalcNDA.rez */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = abCalcNDA.rez; path = NDA/abCalcNDA.rez; sourceTree = "<group>"; };
9D1B84871F677EA1006AA28A /* abCMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = abCMain.c; path = Shell/abCMain.c; sourceTree = "<group>"; };
9D1B848A1F677FB0006AA28A /* abCalcHelp */ = {isa = PBXFileReference; lastKnownFileType = text; name = abCalcHelp; path = copydir/abCalcHelp; sourceTree = "<group>"; };
9D1B848B1F67808A006AA28A /* shell.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = shell.mk; sourceTree = "<group>"; };
9D1B848C1F67810E006AA28A /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9D1B83D91F677D78006AA28A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9D1B83D21F677D78006AA28A = {
isa = PBXGroup;
children = (
9D1B83DE1F677D78006AA28A /* abCalc */,
9D1B83DD1F677D78006AA28A /* Products */,
);
sourceTree = "<group>";
};
9D1B83DD1F677D78006AA28A /* Products */ = {
isa = PBXGroup;
children = (
9D1B83DC1F677D78006AA28A /* doNotBuild */,
);
name = Products;
sourceTree = "<group>";
};
9D1B83DE1F677D78006AA28A /* abCalc */ = {
isa = PBXGroup;
children = (
9D1B84061F677D9A006AA28A /* abCalc.c */,
9D1B84071F677D9A006AA28A /* abCalc.h */,
9D1B840C1F677D9A006AA28A /* abCError.c */,
9D1B840D1F677D9A006AA28A /* abCError.h */,
9D1B840F1F677D9A006AA28A /* abCMode.c */,
9D1B84101F677D9A006AA28A /* abCMode.h */,
9D1B84111F677D9A006AA28A /* abCStack.c */,
9D1B84121F677D9A006AA28A /* abCStack.h */,
9D1B848C1F67810E006AA28A /* Makefile */,
9D1B83E41F677D78006AA28A /* nda.mk */,
9D1B848B1F67808A006AA28A /* shell.mk */,
9D1B841A1F677DAB006AA28A /* README.md */,
9D1B84811F677E27006AA28A /* shell */,
9D1B847F1F677E14006AA28A /* nda */,
9D1B841C1F677DC6006AA28A /* expr */,
9D1B84231F677DC6006AA28A /* ops */,
9D1B847C1F677DC6006AA28A /* screenshots */,
9D1B84891F677F9F006AA28A /* copydir */,
9D1B83E61F677D78006AA28A /* make */,
9D1B83FB1F677D78006AA28A /* Supporting Files */,
);
path = abCalc;
sourceTree = "<group>";
};
9D1B83E61F677D78006AA28A /* make */ = {
isa = PBXGroup;
children = (
9D1B83E71F677D78006AA28A /* config.txt */,
9D1B83E91F677D78006AA28A /* createDiskImage */,
9D1B83EB1F677D78006AA28A /* head.mk */,
9D1B83ED1F677D78006AA28A /* launchEmulator */,
9D1B83EF1F677D78006AA28A /* orca-asm */,
9D1B83F11F677D78006AA28A /* orca-cc */,
9D1B83F31F677D78006AA28A /* orca-macgen */,
9D1B83F51F677D78006AA28A /* orca-rez */,
9D1B83F71F677D78006AA28A /* system601.2mg */,
9D1B83F91F677D78006AA28A /* tail.mk */,
);
name = make;
sourceTree = "<group>";
};
9D1B83FB1F677D78006AA28A /* Supporting Files */ = {
isa = PBXGroup;
children = (
9D1B83FC1F677D78006AA28A /* abCalc.xcscheme */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
9D1B841C1F677DC6006AA28A /* expr */ = {
isa = PBXGroup;
children = (
9D1B841D1F677DC6006AA28A /* abCExpr.c */,
9D1B841E1F677DC6006AA28A /* abCExpr.h */,
9D1B841F1F677DC6006AA28A /* abCExpReal.c */,
9D1B84201F677DC6006AA28A /* abCExpReal.h */,
9D1B84211F677DC6006AA28A /* abCExprInt.c */,
9D1B84221F677DC6006AA28A /* abCExprInt.h */,
);
path = expr;
sourceTree = "<group>";
};
9D1B84231F677DC6006AA28A /* ops */ = {
isa = PBXGroup;
children = (
9D1B84241F677DC6006AA28A /* abCOp.c */,
9D1B84251F677DC6006AA28A /* abCOp.h */,
9D1B84261F677DC6006AA28A /* abCOpAcos.c */,
9D1B84271F677DC6006AA28A /* abCOpAcos.h */,
9D1B84281F677DC6006AA28A /* abCOpAdd.c */,
9D1B84291F677DC6006AA28A /* abCOpAdd.h */,
9D1B842A1F677DC6006AA28A /* abCOpAlog.c */,
9D1B842B1F677DC6006AA28A /* abCOpAlog.h */,
9D1B842C1F677DC6006AA28A /* abCOpAnd.c */,
9D1B842D1F677DC6006AA28A /* abCOpAnd.h */,
9D1B842E1F677DC6006AA28A /* abCOpAsin.c */,
9D1B842F1F677DC6006AA28A /* abCOpAsin.h */,
9D1B84301F677DC6006AA28A /* abCOpAsr.c */,
9D1B84311F677DC6006AA28A /* abCOpAsr.h */,
9D1B84321F677DC6006AA28A /* abCOpAtan.c */,
9D1B84331F677DC6006AA28A /* abCOpAtan.h */,
9D1B84341F677DC6006AA28A /* abCOpB2R.c */,
9D1B84351F677DC6006AA28A /* abCOpB2R.h */,
9D1B84361F677DC6006AA28A /* abCOpBin.c */,
9D1B84371F677DC6006AA28A /* abCOpBin.h */,
9D1B84381F677DC6006AA28A /* abCOpChs.c */,
9D1B84391F677DC6006AA28A /* abCOpChs.h */,
9D1B843A1F677DC6006AA28A /* abCOpClear.c */,
9D1B843B1F677DC6006AA28A /* abCOpClear.h */,
9D1B843C1F677DC6006AA28A /* abCOpCos.c */,
9D1B843D1F677DC6006AA28A /* abCOpCos.h */,
9D1B843E1F677DC6006AA28A /* abCOpCosh.c */,
9D1B843F1F677DC6006AA28A /* abCOpCosh.h */,
9D1B84401F677DC6006AA28A /* abCOpDec.c */,
9D1B84411F677DC6006AA28A /* abCOpDec.h */,
9D1B84421F677DC6006AA28A /* abCOpDiv.c */,
9D1B84431F677DC6006AA28A /* abCOpDiv.h */,
9D1B84441F677DC6006AA28A /* abCOpDrop.c */,
9D1B84451F677DC6006AA28A /* abCOpDrop.h */,
9D1B84461F677DC6006AA28A /* abCOpExp.c */,
9D1B84471F677DC6006AA28A /* abCOpExp.h */,
9D1B84481F677DC6006AA28A /* abCOpHex.c */,
9D1B84491F677DC6006AA28A /* abCOpHex.h */,
9D1B844A1F677DC6006AA28A /* abCOpInv.c */,
9D1B844B1F677DC6006AA28A /* abCOpInv.h */,
9D1B844C1F677DC6006AA28A /* abCOpLn.c */,
9D1B844D1F677DC6006AA28A /* abCOpLn.h */,
9D1B844E1F677DC6006AA28A /* abCOpLog.c */,
9D1B844F1F677DC6006AA28A /* abCOpLog.h */,
9D1B84501F677DC6006AA28A /* abCOpMult.c */,
9D1B84511F677DC6006AA28A /* abCOpMult.h */,
9D1B84521F677DC6006AA28A /* abCOpNot.c */,
9D1B84531F677DC6006AA28A /* abCOpNot.h */,
9D1B84541F677DC6006AA28A /* abCOpOct.c */,
9D1B84551F677DC6006AA28A /* abCOpOct.h */,
9D1B84561F677DC6006AA28A /* abCOpOr.c */,
9D1B84571F677DC6006AA28A /* abCOpOr.h */,
9D1B84581F677DC6006AA28A /* abCOpPi.c */,
9D1B84591F677DC6006AA28A /* abCOpPi.h */,
9D1B845A1F677DC6006AA28A /* abCOpPower.c */,
9D1B845B1F677DC6006AA28A /* abCOpPower.h */,
9D1B845C1F677DC6006AA28A /* abCOpR2B.c */,
9D1B845D1F677DC6006AA28A /* abCOpR2B.h */,
9D1B845E1F677DC6006AA28A /* abCOpRcws.c */,
9D1B845F1F677DC6006AA28A /* abCOpRcws.h */,
9D1B84601F677DC6006AA28A /* abCOpRl.c */,
9D1B84611F677DC6006AA28A /* abCOpRl.h */,
9D1B84621F677DC6006AA28A /* abCOpRr.c */,
9D1B84631F677DC6006AA28A /* abCOpRr.h */,
9D1B84641F677DC6006AA28A /* abCOpSin.c */,
9D1B84651F677DC6006AA28A /* abCOpSin.h */,
9D1B84661F677DC6006AA28A /* abCOpSinh.c */,
9D1B84671F677DC6006AA28A /* abCOpSinh.h */,
9D1B84681F677DC6006AA28A /* abCOpSl.c */,
9D1B84691F677DC6006AA28A /* abCOpSl.h */,
9D1B846A1F677DC6006AA28A /* abCOpSq.c */,
9D1B846B1F677DC6006AA28A /* abCOpSq.h */,
9D1B846C1F677DC6006AA28A /* abCOpSqrt.c */,
9D1B846D1F677DC6006AA28A /* abCOpSqrt.h */,
9D1B846E1F677DC6006AA28A /* abCOpSr.c */,
9D1B846F1F677DC6006AA28A /* abCOpSr.h */,
9D1B84701F677DC6006AA28A /* abCOpStws.c */,
9D1B84711F677DC6006AA28A /* abCOpStws.h */,
9D1B84721F677DC6006AA28A /* abCOpSubtr.c */,
9D1B84731F677DC6006AA28A /* abCOpSubtr.h */,
9D1B84741F677DC6006AA28A /* abCOpSwap.c */,
9D1B84751F677DC6006AA28A /* abCOpSwap.h */,
9D1B84761F677DC6006AA28A /* abCOpTan.c */,
9D1B84771F677DC6006AA28A /* abCOpTan.h */,
9D1B84781F677DC6006AA28A /* abCOpTanh.c */,
9D1B84791F677DC6006AA28A /* abCOpTanh.h */,
9D1B847A1F677DC6006AA28A /* abCOpXor.c */,
9D1B847B1F677DC6006AA28A /* abCOpXor.h */,
);
path = ops;
sourceTree = "<group>";
};
9D1B847C1F677DC6006AA28A /* screenshots */ = {
isa = PBXGroup;
children = (
9D1B847D1F677DC6006AA28A /* abCalc.png */,
9D1B847E1F677DC6006AA28A /* abCalcNDA.png */,
);
path = screenshots;
sourceTree = "<group>";
};
9D1B847F1F677E14006AA28A /* nda */ = {
isa = PBXGroup;
children = (
9D1B84821F677E91006AA28A /* abCalcNDA.c */,
9D1B84831F677E91006AA28A /* abCalcNDA.h */,
9D1B84841F677E91006AA28A /* abCalcNDA.rez */,
);
name = nda;
sourceTree = "<group>";
};
9D1B84811F677E27006AA28A /* shell */ = {
isa = PBXGroup;
children = (
9D1B84871F677EA1006AA28A /* abCMain.c */,
);
name = shell;
sourceTree = "<group>";
};
9D1B84891F677F9F006AA28A /* copydir */ = {
isa = PBXGroup;
children = (
9D1B848A1F677FB0006AA28A /* abCalcHelp */,
);
name = copydir;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
9D1B83D71F677D78006AA28A /* abCalc */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "-C abCalc $(ACTION)";
buildConfigurationList = 9D1B84001F677D78006AA28A /* Build configuration list for PBXLegacyTarget "abCalc" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
dependencies = (
);
name = abCalc;
passBuildSettingsInEnvironment = 1;
productName = abCalc;
};
/* End PBXLegacyTarget section */
/* Begin PBXNativeTarget section */
9D1B83DB1F677D78006AA28A /* doNotBuild */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9D1B84031F677D78006AA28A /* Build configuration list for PBXNativeTarget "doNotBuild" */;
buildPhases = (
9D1B83D81F677D78006AA28A /* Sources */,
9D1B83D91F677D78006AA28A /* Frameworks */,
9D1B83DA1F677D78006AA28A /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = doNotBuild;
productName = doNotBuild;
productReference = 9D1B83DC1F677D78006AA28A /* doNotBuild */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
9D1B83D31F677D78006AA28A /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Jeremy Rand";
TargetAttributes = {
9D1B83D71F677D78006AA28A = {
CreatedOnToolsVersion = 8.3.3;
ProvisioningStyle = Automatic;
};
9D1B83DB1F677D78006AA28A = {
CreatedOnToolsVersion = 8.3.3;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 9D1B83D61F677D78006AA28A /* Build configuration list for PBXProject "abCalc" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 9D1B83D21F677D78006AA28A;
productRefGroup = 9D1B83DD1F677D78006AA28A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
9D1B83D71F677D78006AA28A /* abCalc */,
9D1B83DB1F677D78006AA28A /* doNotBuild */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
9D1B83D81F677D78006AA28A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9D1B84191F677D9A006AA28A /* abCStack.c in Sources */,
9D1B83E51F677D78006AA28A /* nda.mk in Sources */,
9D1B841B1F677DAB006AA28A /* README.md in Sources */,
9D1B848D1F67810E006AA28A /* Makefile in Sources */,
9D1B84161F677D9A006AA28A /* abCError.c in Sources */,
9D1B84851F677E91006AA28A /* abCalcNDA.c in Sources */,
9D1B84181F677D9A006AA28A /* abCMode.c in Sources */,
9D1B84861F677E91006AA28A /* abCalcNDA.h in Sources */,
9D1B84131F677D9A006AA28A /* abCalc.c in Sources */,
9D1B84881F677EA1006AA28A /* abCMain.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
9D1B83FE1F677D78006AA28A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
};
name = Debug;
};
9D1B83FF1F677D78006AA28A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = NO;
};
name = Release;
};
9D1B84011F677D78006AA28A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUGGING_SYMBOLS = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
9D1B84021F677D78006AA28A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
9D1B84041F677D78006AA28A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PREPROCESSOR_DEFINITIONS = (
"inline(X,Y)=\"\"\n",
"pascal=\"\"",
);
HEADER_SEARCH_PATHS = (
"$GOLDEN_GATE/Libraries/ORCACDefs\n",
"~/Library/GoldenGate/Libraries/ORCACDefs\n",
"/Library/GoldenGate/Libraries/ORCACDefs\n",
"~/GoldenGate/Libraries/ORCACDefs",
);
PRODUCT_NAME = doNotBuild;
};
name = Debug;
};
9D1B84051F677D78006AA28A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PREPROCESSOR_DEFINITIONS = (
"inline(X,Y)=\"\"\n",
"pascal=\"\"",
);
HEADER_SEARCH_PATHS = (
"$GOLDEN_GATE/Libraries/ORCACDefs\n",
"~/Library/GoldenGate/Libraries/ORCACDefs\n",
"/Library/GoldenGate/Libraries/ORCACDefs\n",
"~/GoldenGate/Libraries/ORCACDefs",
);
PRODUCT_NAME = doNotBuild;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9D1B83D61F677D78006AA28A /* Build configuration list for PBXProject "abCalc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9D1B83FE1F677D78006AA28A /* Debug */,
9D1B83FF1F677D78006AA28A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9D1B84001F677D78006AA28A /* Build configuration list for PBXLegacyTarget "abCalc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9D1B84011F677D78006AA28A /* Debug */,
9D1B84021F677D78006AA28A /* Release */,
);
defaultConfigurationIsVisible = 0;
};
9D1B84031F677D78006AA28A /* Build configuration list for PBXNativeTarget "doNotBuild" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9D1B84041F677D78006AA28A /* Debug */,
9D1B84051F677D78006AA28A /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 9D1B83D31F677D78006AA28A /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:abCalc.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "abCalc"
BlueprintName = "abCalc"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "/usr/bin/make">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "abCalc"
BlueprintName = "abCalc"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "-C"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "$PROJECT_DIR/abCalc"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "execute"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "abCalc"
BlueprintName = "abCalc"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D1B83DB1F677D78006AA28A"
BuildableName = "doNotBuild"
BlueprintName = "doNotBuild"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D1B83DB1F677D78006AA28A"
BuildableName = "doNotBuild"
BlueprintName = "doNotBuild"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D1B83DB1F677D78006AA28A"
BuildableName = "doNotBuild"
BlueprintName = "doNotBuild"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D1B83DB1F677D78006AA28A"
BuildableName = "doNotBuild"
BlueprintName = "doNotBuild"
ReferencedContainer = "container:abCalc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>abCalc.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>doNotBuild.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>9D1B83D71F677D78006AA28A</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>9D1B83DB1F677D78006AA28A</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

File diff suppressed because one or more lines are too long

View File

@ -1,764 +0,0 @@
/*
abCalcNDA.c
By: Jeremy Rand
*/
#pragma nda NDAOpen NDAClose NDAAction NDAInit -1 0xFFFF " abCalc\\H**"
#include <orca.h>
#include <GSOS.h>
#include <Locator.h>
#include <QuickDraw.h>
#include <Window.h>
#include <Desk.h>
#include <Resources.h>
#include <Memory.h>
#include <Loader.h>
#include <Control.h>
#include <Event.h>
#include <List.h>
#include <Sane.h>
#include <LineEdit.h>
#include <Scrap.h>
#include <string.h>
#include <stdlib.h>
#include "abCalcNDA.defs"
#include "abCalc.h"
#include "abCStack.h"
#include "abCError.h"
#include "expr/abCExpr.h"
#include "ops/abCOp.h"
#define MIN_STACK_ITEMS 4
void UpdateStack(void);
typedef struct listElement {
char *memPtr;
Byte memFlag;
} listElement;
static BOOLEAN gListStarted = FALSE;
static Handle gSANEDirectPage = NULL;
static BOOLEAN gCalcActive = FALSE;
static GrafPortPtr gCalcWinPtr = NULL;
static unsigned int gUserId;
static unsigned int gResourceId;
listElement *gOpList = NULL;
listElement gStackList[AB_CALC_STACK_DEPTH];
abCalcExpr gNDAExpr;
static Str255 gStrBuf;
static int gSelectedStackItem = -1;
char *gBuffer = NULL;
void NDAClose(void)
{
int i;
if (gCalcActive) {
CloseWindow(gCalcWinPtr);
gCalcWinPtr = NULL;
gCalcActive = FALSE;
}
if (gBuffer != NULL) {
free(gBuffer);
gBuffer = NULL;
}
if (gOpList != NULL) {
free(gOpList);
gOpList = NULL;
}
for (i = 0; i < AB_CALC_STACK_DEPTH; i++) {
if (gStackList[i].memPtr != NULL) {
free(gStackList[i].memPtr);
gStackList[i].memPtr = NULL;
}
}
CloseResourceFile(gResourceId);
ResourceShutDown();
}
void NDAInit(int code)
{
int i;
if (code) {
gCalcActive = FALSE;
gUserId = MMStartUp();
if (!ListStatus()) {
LoadOneTool(0x1c, 0);
ListStartUp();
gListStarted = TRUE;
}
if (!SANEStatus()) {
LoadOneTool(0x0a, 0);
gSANEDirectPage = NewHandle(256, gUserId,
attrBank | attrFixed | attrLocked | attrPage, NULL);
SANEStartUp((Word) *gSANEDirectPage);
}
abCalcInit();
for (i = 0; i < AB_CALC_STACK_DEPTH; i++) {
gStackList[i].memPtr = NULL;
}
} else {
if (gSANEDirectPage) {
SANEShutDown();
DisposeHandle(gSANEDirectPage);
UnloadOneTool(0x0a);
gSANEDirectPage = NULL;
}
if (gListStarted) {
ListShutDown();
UnloadOneTool(0x1c);
gListStarted = FALSE;
}
}
}
#pragma databank 1
void DrawContents(void)
{
PenNormal();
DrawControls(GetPort());
}
#pragma databank 0
GrafPortPtr NDAOpen(void)
{
Pointer pathToSelf;
unsigned int oldResourceApp;
LevelRecGS levelDCB;
unsigned int oldLevel;
SysPrefsRecGS prefsDCB;
unsigned int oldPrefs;
int numOps;
int i;
Handle opListCtl;
if (gCalcActive)
return NULL;
oldResourceApp = GetCurResourceApp();
ResourceStartUp(gUserId);
pathToSelf = LGetPathname2(gUserId, 1);
levelDCB.pCount = 2;
GetLevelGS(&levelDCB);
oldLevel = levelDCB.level;
levelDCB.level = 0;
SetLevelGS(&levelDCB);
prefsDCB.pCount = 1;
GetSysPrefsGS(&prefsDCB);
oldPrefs = prefsDCB.preferences;
prefsDCB.preferences = (prefsDCB.preferences & 0x1fff) | 0x8000;
SetSysPrefsGS(&prefsDCB);
gResourceId = OpenResourceFile(readEnable, NULL, pathToSelf);
gCalcWinPtr = NewWindow2("\p abCalc ", 0, DrawContents, NULL, refIsResource,
abCalcWinNum, rWindParam1);
SetSysWindow(gCalcWinPtr);
ShowWindow(gCalcWinPtr);
SelectWindow(gCalcWinPtr);
SetPort(gCalcWinPtr);
if (gOpList == NULL) {
numOps = abCalcOpNumOps();
gOpList = malloc(sizeof(*gOpList) * numOps);
for (i = 0; i < numOps; i++) {
gOpList[i].memPtr = abCalcOpNth(i)->name;
gOpList[i].memFlag = 0;
}
}
opListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcOpList);
NewList2(NULL, 1, (Ref)gOpList, 0, numOps, opListCtl);
UpdateStack();
gCalcActive = TRUE;
prefsDCB.preferences = oldPrefs;
SetSysPrefsGS(&prefsDCB);
levelDCB.level = oldLevel;
SetLevelGS(&levelDCB);
SetCurResourceApp(oldResourceApp);
return gCalcWinPtr;
}
void UpdateStack(void)
{
Handle stackListCtl;
int i;
int numToDisplay = abCalcStackNumItems();
if (numToDisplay < MIN_STACK_ITEMS) {
numToDisplay = MIN_STACK_ITEMS;
}
stackListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcStackList);
for (i = numToDisplay - 1; i >= 0; i--) {
if (gStackList[i].memPtr == NULL) {
gStackList[i].memPtr = malloc(AB_CALC_EXPR_STRING_MAX + 8);
}
abCalcStackExprStringAt(numToDisplay - i - 1, gStackList[i].memPtr,
TRUE);
gStackList[i].memFlag = 0;
}
NewList2(NULL, numToDisplay - 3, (Ref)gStackList, 0, numToDisplay, stackListCtl);
gSelectedStackItem = -1;
}
BOOLEAN ErrorRaised(void)
{
char *errorString = abCalcGetError();
if (errorString == NULL) {
return FALSE;
}
AlertWindow(awCString+awResource, (Pointer)&errorString, abCalcErrorAlert);
abCalcClearError();
return TRUE;
}
void PushCalcEntry(CtlRecHndl entryBox)
{
abCalcOp *op;
GetLETextByID(gCalcWinPtr, abCalcEntryBox, &gStrBuf);
if (gStrBuf.textLength > 0) {
gStrBuf.text[gStrBuf.textLength] = '\0';
op = abCalcOpLookup(gStrBuf.text);
if (op != NULL) {
op->execute();
} else if (abCalcParseExpr(&gNDAExpr, gStrBuf.text) != NULL) {
abCalcStackExprPush(&gNDAExpr);
} else {
LERecHndl leHandle;
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LESetSelect(0, gStrBuf.textLength, leHandle);
abCalcRaiseError(abCalcSyntaxError, NULL);
return;
}
gStrBuf.textLength = 0;
SetLETextByID(gCalcWinPtr, abCalcEntryBox, &gStrBuf);
}
}
void ExecCalcCmd(char *cmd)
{
abCalcOp *op = abCalcOpLookup(cmd);
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
PushCalcEntry(entryBox);
if ((!ErrorRaised()) &&
(op != NULL)) {
op->execute();
}
ErrorRaised();
UpdateStack();
}
void InsertChar(CtlRecHndl entryBox, char ch)
{
LERecHndl leHandle;
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LEDelete(leHandle);
LEInsert(&ch, 1, leHandle);
}
void ExecMinusButton(void)
{
int i;
char aChar;
BOOLEAN doCmd = FALSE;
BOOLEAN dotSeen = FALSE;
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
GetLETextByID(gCalcWinPtr, abCalcEntryBox, &gStrBuf);
if (gStrBuf.textLength > 0) {
doCmd = TRUE;
gStrBuf.text[gStrBuf.textLength] = '\0';
aChar = gStrBuf.text[gStrBuf.textLength - 1];
if (((aChar == 'e') ||
(aChar == 'E')) &&
(gStrBuf.textLength > 1)) {
doCmd = FALSE;
for (i = 0; i < gStrBuf.textLength - 1; i++) {
switch (gStrBuf.text[i]) {
case '-':
if (i != 0) {
doCmd = TRUE;
}
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
break;
case '.':
if (dotSeen) {
doCmd = TRUE;
} else {
dotSeen = TRUE;
}
break;
default:
doCmd = TRUE;
break;
}
if (doCmd)
break;
}
}
}
if (doCmd) {
ExecCalcCmd("-");
} else {
InsertChar(entryBox, '-');
}
return;
}
void HandleEntryBox(void)
{
Handle stackListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcStackList);
if (gSelectedStackItem != -1) {
ResetMember2(stackListCtl);
DrawMember2(gSelectedStackItem, stackListCtl);
gSelectedStackItem = -1;
}
}
void HandleStackClick(void)
{
Handle stackListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcStackList);
int nthOp;
int numStackItems = abCalcStackNumItems();
int numDisplayed = numStackItems;
int selectedStackItem = -1;
nthOp = NextMember2(0, stackListCtl);
if (nthOp == gSelectedStackItem) {
ResetMember2(stackListCtl);
DrawMember2(gSelectedStackItem, stackListCtl);
gSelectedStackItem = -1;
nthOp = NextMember2(0, stackListCtl);
}
if (nthOp == 0)
return;
if (numDisplayed < MIN_STACK_ITEMS)
numDisplayed = MIN_STACK_ITEMS;
selectedStackItem = numDisplayed + 1 - nthOp;
if (selectedStackItem > numStackItems) {
ResetMember2(stackListCtl);
DrawMember2(nthOp, stackListCtl);
gSelectedStackItem = -1;
} else {
gSelectedStackItem = nthOp;
}
}
void HandleOpClick(void)
{
Handle opListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcOpList);
int nthOp = ResetMember2(opListCtl);
abCalcOp *op;
if (nthOp > 0) {
nthOp--;
op = abCalcOpNth(nthOp);
if (op != NULL) {
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
PushCalcEntry(entryBox);
if (!ErrorRaised()) {
op->execute();
}
ErrorRaised();
UpdateStack();
}
DrawMember2(nthOp + 1, opListCtl);
}
}
void HandleControl(EventRecord *event)
{
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
SetPort(gCalcWinPtr);
switch (event->wmTaskData4) {
case abCalcBtn0:
InsertChar(entryBox, '0');
break;
case abCalcBtn1:
InsertChar(entryBox, '1');
break;
case abCalcBtn2:
InsertChar(entryBox, '2');
break;
case abCalcBtn3:
InsertChar(entryBox, '3');
break;
case abCalcBtn4:
InsertChar(entryBox, '4');
break;
case abCalcBtn5:
InsertChar(entryBox, '5');
break;
case abCalcBtn6:
InsertChar(entryBox, '6');
break;
case abCalcBtn7:
InsertChar(entryBox, '7');
break;
case abCalcBtn8:
InsertChar(entryBox, '8');
break;
case abCalcBtn9:
InsertChar(entryBox, '9');
break;
case abCalcBtnEnter:
PushCalcEntry(entryBox);
ErrorRaised();
UpdateStack();
break;
case abCalcBtnDot:
InsertChar(entryBox, '.');
break;
case abCalcBtnNum:
InsertChar(entryBox, '#');
break;
case abCalcBtnAdd:
ExecCalcCmd("+");
break;
case abCalcBtnSub:
ExecMinusButton();
break;
case abCalcBtnMult:
ExecCalcCmd("*");
break;
case abCalcBtnDiv:
ExecCalcCmd("/");
break;
case abCalcBtnPow:
ExecCalcCmd("^");
break;
case abCalcBtnA:
InsertChar(entryBox, 'A');
break;
case abCalcBtnB:
InsertChar(entryBox, 'B');
break;
case abCalcBtnC:
InsertChar(entryBox, 'C');
break;
case abCalcBtnD:
InsertChar(entryBox, 'D');
break;
case abCalcBtnE:
InsertChar(entryBox, 'E');
break;
case abCalcBtnF:
InsertChar(entryBox, 'F');
break;
case abCalcEntryBox:
HandleEntryBox();
break;
case abCalcStackList:
HandleStackClick();
break;
case abCalcOpList:
HandleOpClick();
break;
}
}
void DoCut(void)
{
LERecHndl leHandle;
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LECut(leHandle);
LEToScrap();
}
void DoCopy(void)
{
Handle stackListCtl = (Handle)GetCtlHandleFromID(gCalcWinPtr, abCalcStackList);
LERecHndl leHandle;
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
int numStackItems = abCalcStackNumItems();
int numDisplayed = numStackItems;
int selectedStackItem;
if (gSelectedStackItem == -1) {
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LECopy(leHandle);
LEToScrap();
return;
}
if (numDisplayed < MIN_STACK_ITEMS)
numDisplayed = MIN_STACK_ITEMS;
selectedStackItem = numDisplayed - gSelectedStackItem;
if (gBuffer == NULL) {
gBuffer = malloc(AB_CALC_EXPR_STRING_MAX);
}
if ((selectedStackItem >= 0) &&
(selectedStackItem < numStackItems) &&
(abCalcStackExprStringAt(selectedStackItem, gBuffer, FALSE) != NULL)) {
ZeroScrap();
PutScrap(strlen(gBuffer), textScrap, gBuffer);
}
SetPort(gCalcWinPtr);
ResetMember2(stackListCtl);
DrawMember2(gSelectedStackItem, stackListCtl);
gSelectedStackItem = -1;
}
void DoPaste(void)
{
LERecHndl leHandle;
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LEFromScrap();
LEPaste(leHandle);
}
void DoClear(void)
{
LERecHndl leHandle;
CtlRecHndl entryBox = GetCtlHandleFromID(gCalcWinPtr, abCalcEntryBox);
HLock((Handle)entryBox);
leHandle = (LERecHndl)(*entryBox)->ctlData;
HUnlock((Handle)entryBox);
LEDelete(leHandle);
}
void HandleMenu(int menuItem)
{
SetPort(gCalcWinPtr);
switch (menuItem) {
case cutAction:
DoCut();
break;
case copyAction:
DoCopy();
break;
case pasteAction:
DoPaste();
break;
case clearAction:
DoClear();
break;
default:
break;
}
}
void HandleKey(EventRecord *event)
{
BOOLEAN appleKeyPressed = ((event->modifiers & appleKey) != 0);
char key = (event->message & 0xff);
if (!appleKeyPressed)
return;
switch (key) {
case 'C':
case 'c':
DoCopy();
break;
case 'X':
case 'x':
DoCut();
break;
case 'V':
case 'v':
DoPaste();
break;
}
}
BOOLEAN NDAAction(EventRecord *sysEvent, int code)
{
int event;
static EventRecord localEvent;
unsigned int eventCode;
BOOLEAN result = FALSE;
switch (code) {
case runAction:
return result;
case eventAction:
BlockMove((Pointer)sysEvent, (Pointer)&localEvent, 16);
localEvent.wmTaskMask = 0x001FFFFF;
eventCode = TaskMasterDA(0, &localEvent);
switch(eventCode) {
case updateEvt:
BeginUpdate(gCalcWinPtr);
DrawContents();
EndUpdate(gCalcWinPtr);
break;
case wInControl:
HandleControl(&localEvent);
break;
case keyDownEvt:
case autoKeyEvt:
HandleKey(&localEvent);
break;
}
break;
case cutAction:
case copyAction:
case pasteAction:
case clearAction:
result = TRUE;
HandleMenu(code);
break;
}
return result;
}

View File

@ -1,115 +0,0 @@
/* */
/* abCalcNDA.defs */
/* By: Jeremy Rand */
/* */
#define abCalcWinNum 1001
#define abCalcLinedColors 1002
#define abCalcControlList 1003
#define abCalcBtn0 2001
#define abCalcBtn0Str 2002
#define abCalcBtn1 2003
#define abCalcBtn1Str 2004
#define abCalcBtn2 2005
#define abCalcBtn2Str 2006
#define abCalcBtn3 2007
#define abCalcBtn3Str 2008
#define abCalcBtn4 2009
#define abCalcBtn4Str 2010
#define abCalcBtn5 2011
#define abCalcBtn5Str 2012
#define abCalcBtn6 2013
#define abCalcBtn6Str 2014
#define abCalcBtn7 2015
#define abCalcBtn7Str 2016
#define abCalcBtn8 2017
#define abCalcBtn8Str 2018
#define abCalcBtn9 2019
#define abCalcBtn9Str 2020
#define abCalcBtnEnter 2021
#define abCalcBtnEnterStr 2022
#define abCalcBtnDot 2023
#define abCalcBtnDotStr 2024
#define abCalcBtnNum 2025
#define abCalcBtnNumStr 2026
#define abCalcBtnAdd 2027
#define abCalcBtnAddStr 2028
#define abCalcBtnSub 2029
#define abCalcBtnSubStr 2030
#define abCalcBtnMult 2031
#define abCalcBtnMultStr 2032
#define abCalcBtnDiv 2033
#define abCalcBtnDivStr 2034
#define abCalcBtnA 2035
#define abCalcBtnAStr 2036
#define abCalcBtnB 2037
#define abCalcBtnBStr 2038
#define abCalcBtnC 2039
#define abCalcBtnCStr 2040
#define abCalcBtnD 2041
#define abCalcBtnDStr 2042
#define abCalcBtnE 2043
#define abCalcBtnEStr 2044
#define abCalcBtnF 2045
#define abCalcBtnFStr 2046
#define abCalcBtnPow 2047
#define abCalcBtnPowStr 2048
#define abCalcEntryBox 3001
#define abCalcStackList 3002
#define abCalcOpList 3003
#define abCalcErrorAlert 4001
#define abCalcWinX 10
#define abCalcWinY 25
#define abCalcWinWidth 300
#define abCalcWinHeight 170
#define abCalcBtnSpaceX 5
#define abCalcBtnSpaceY 2
#define abCalcBtnWidth 39
#define abCalcBtnHeight 14
#define abCalcBtnRow0 abCalcWinHeight-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow1 abCalcBtnRow0-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow2 abCalcBtnRow1-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow3 abCalcBtnRow2-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow4 abCalcBtnRow3-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow5 abCalcBtnRow4-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow6 abCalcBtnRow5-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnRow7 abCalcBtnRow6-abCalcBtnSpaceY-abCalcBtnHeight
#define abCalcBtnCol0 abCalcBtnSpaceX
#define abCalcBtnCol1 abCalcBtnCol0+abCalcBtnSpaceX+abCalcBtnWidth
#define abCalcBtnCol2 abCalcBtnCol1+abCalcBtnSpaceX+abCalcBtnWidth
#define abCalcBtnCol3 abCalcBtnCol2+abCalcBtnSpaceX+abCalcBtnWidth
#define abCalcOpCol abCalcBtnCol3+abCalcBtnSpaceX+abCalcBtnWidth

View File

@ -1,462 +0,0 @@
/* */
/* abCalcNDA.h */
/* By: Jeremy Rand */
/* */
#include "types.rez"
#include "abCalcNda.defs"
resource rWindParam1 (abCalcWinNum) {
$C0A5, /* wFrameBits */
nil, /* wTitle */
0, /* wRefCon */
{0,0,0,0}, /* ZoomRect */
abCalcLinedColors, /* wColor ID */
{0,0}, /* Origin */
{0,0}, /* data size */
{0,0}, /* max height-width */
{0,0}, /* scroll ver hors */
{0,0}, /* page ver horiz */
0, /* winfoRefcon */
0, /* wInfoHeight */
{abCalcWinY,abCalcWinX,abCalcWinY+abCalcWinHeight,abCalcWinX+abCalcWinWidth}, /* wposition */
infront, /* wPlane */
abCalcControlList, /* wStorage */
$0809 /* wInVerb */
};
resource rWindColor (abCalcLinedColors) {
0x0000, /* frameColor */
0x0F00, /* titleColor */
0x020F, /* tbarColor */
0xF0F0, /* growColor */
0x00F0, /* infoColor */
};
resource rControlList (abCalcControlList) {
{
abCalcBtn0,
abCalcBtn1,
abCalcBtn2,
abCalcBtn3,
abCalcBtn4,
abCalcBtn5,
abCalcBtn6,
abCalcBtn7,
abCalcBtn8,
abCalcBtn9,
abCalcBtnEnter,
abCalcBtnDot,
abCalcBtnNum,
abCalcBtnAdd,
abCalcBtnSub,
abCalcBtnMult,
abCalcBtnDiv,
abCalcBtnPow,
abCalcBtnA,
abCalcBtnB,
abCalcBtnC,
abCalcBtnD,
abCalcBtnE,
abCalcBtnF,
abCalcEntryBox,
abCalcStackList,
abCalcOpList
}
};
resource rControlTemplate (abCalcBtn0) {
abCalcBtn0,
{abCalcBtnRow0, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn0Str,
0,
{"0","",0,0}
}};
};
resource rPString (abCalcBtn0Str, noCrossBank) { "0" };
resource rControlTemplate (abCalcBtnDot) {
abCalcBtnDot,
{abCalcBtnRow0, abCalcBtnCol1, abCalcBtnRow0+abCalcBtnHeight, abCalcBtnCol1+abCalcBtnWidth},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnDotStr,
0,
{".","",0,0}
}};
};
resource rPString (abCalcBtnDotStr, noCrossBank) { "." };
resource rControlTemplate (abCalcBtnNum) {
abCalcBtnNum,
{abCalcBtnRow0, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnNumStr,
0,
{"#","",0,0}
}};
};
resource rPString (abCalcBtnNumStr, noCrossBank) { "#" };
resource rControlTemplate (abCalcBtn1) {
abCalcBtn1,
{abCalcBtnRow1, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn1Str,
0,
{"1","",0,0}
}};
};
resource rPString (abCalcBtn1Str, noCrossBank) { "1" };
resource rControlTemplate (abCalcBtn2) {
abCalcBtn2,
{abCalcBtnRow1, abCalcBtnCol1, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn2Str,
0,
{"2","",0,0}
}};
};
resource rPString (abCalcBtn2Str, noCrossBank) { "2" };
resource rControlTemplate (abCalcBtn3) {
abCalcBtn3,
{abCalcBtnRow1, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn3Str,
0,
{"3","",0,0}
}};
};
resource rPString (abCalcBtn3Str, noCrossBank) { "3" };
resource rControlTemplate (abCalcBtn4) {
abCalcBtn4,
{abCalcBtnRow2, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn4Str,
0,
{"4","",0,0}
}};
};
resource rPString (abCalcBtn4Str, noCrossBank) { "4" };
resource rControlTemplate (abCalcBtn5) {
abCalcBtn5,
{abCalcBtnRow2, abCalcBtnCol1, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn5Str,
0,
{"5","",0,0}
}};
};
resource rPString (abCalcBtn5Str, noCrossBank) { "5" };
resource rControlTemplate (abCalcBtn6) {
abCalcBtn6,
{abCalcBtnRow2, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn6Str,
0,
{"6","",0,0}
}};
};
resource rPString (abCalcBtn6Str, noCrossBank) { "6" };
resource rControlTemplate (abCalcBtn7) {
abCalcBtn7,
{abCalcBtnRow3, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn7Str,
0,
{"7","",0,0}
}};
};
resource rPString (abCalcBtn7Str, noCrossBank) { "7" };
resource rControlTemplate (abCalcBtn8) {
abCalcBtn8,
{abCalcBtnRow3, abCalcBtnCol1, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn8Str,
0,
{"8","",0,0}
}};
};
resource rPString (abCalcBtn8Str, noCrossBank) { "8" };
resource rControlTemplate (abCalcBtn9) {
abCalcBtn9,
{abCalcBtnRow3, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtn9Str,
0,
{"9","",0,0}
}};
};
resource rPString (abCalcBtn9Str, noCrossBank) { "9" };
resource rControlTemplate (abCalcBtnEnter) {
abCalcBtnEnter,
{abCalcBtnRow4, abCalcBtnCol0, abCalcBtnRow4+abCalcBtnHeight, abCalcBtnCol2+abCalcBtnWidth},
SimpleButtonControl {{
$0003,
$3002,
0,
abCalcBtnEnterStr,
0,
{"\n","",0,0}
}};
};
resource rPString (abCalcBtnEnterStr, noCrossBank) { "Enter" };
resource rControlTemplate (abCalcBtnPow) {
abCalcBtnPow,
{abCalcBtnRow4, abCalcBtnCol3, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnPowStr,
0,
{"^","",0,0}
}};
};
resource rPString (abCalcBtnPowStr, noCrossBank) { "^" };
resource rControlTemplate (abCalcBtnAdd) {
abCalcBtnAdd,
{abCalcBtnRow0, abCalcBtnCol3, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnAddStr,
0,
{"+","",0,0}
}};
};
resource rPString (abCalcBtnAddStr, noCrossBank) { "+" };
resource rControlTemplate (abCalcBtnSub) {
abCalcBtnSub,
{abCalcBtnRow1, abCalcBtnCol3, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnSubStr,
0,
{"-","",0,0}
}};
};
resource rPString (abCalcBtnSubStr, noCrossBank) { "-" };
resource rControlTemplate (abCalcBtnMult) {
abCalcBtnMult,
{abCalcBtnRow2, abCalcBtnCol3, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnMultStr,
0,
{"*","",0,0}
}};
};
resource rPString (abCalcBtnMultStr, noCrossBank) { "x" };
resource rControlTemplate (abCalcBtnDiv) {
abCalcBtnDiv,
{abCalcBtnRow3, abCalcBtnCol3, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnDivStr,
0,
{"/","",0,0}
}};
};
resource rPString (abCalcBtnDivStr, noCrossBank) { "/" };
resource rControlTemplate (abCalcBtnA) {
abCalcBtnA,
{abCalcBtnRow5, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnAStr,
0,
{"A","",0,0}
}};
};
resource rPString (abCalcBtnAStr, noCrossBank) { "A" };
resource rControlTemplate (abCalcBtnB) {
abCalcBtnB,
{abCalcBtnRow5, abCalcBtnCol1, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnBStr,
0,
{"B","",0,0}
}};
};
resource rPString (abCalcBtnBStr, noCrossBank) { "B" };
resource rControlTemplate (abCalcBtnC) {
abCalcBtnC,
{abCalcBtnRow5, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnCStr,
0,
{"C","",0,0}
}};
};
resource rPString (abCalcBtnCStr, noCrossBank) { "C" };
resource rControlTemplate (abCalcBtnD) {
abCalcBtnD,
{abCalcBtnRow6, abCalcBtnCol0, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnDStr,
0,
{"D","",0,0}
}};
};
resource rPString (abCalcBtnDStr, noCrossBank) { "D" };
resource rControlTemplate (abCalcBtnE) {
abCalcBtnE,
{abCalcBtnRow6, abCalcBtnCol1, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnEStr,
0,
{"E","",0,0}
}};
};
resource rPString (abCalcBtnEStr, noCrossBank) { "E" };
resource rControlTemplate (abCalcBtnF) {
abCalcBtnF,
{abCalcBtnRow6, abCalcBtnCol2, 0, 0},
SimpleButtonControl {{
$0002,
$3002,
0,
abCalcBtnFStr,
0,
{"F","",0,0}
}};
};
resource rPString (abCalcBtnFStr, noCrossBank) { "F" };
resource rControlTemplate (abCalcStackList) {
abCalcStackList, /* control ID */
{1, abCalcBtnSpaceX, 41, abCalcWinWidth-abCalcBtnSpaceX}, /* control rect */
ListControl {{
$0000, /* flags */
$1400, /* more flags */
0, /* refcon */
0, /* list size */
4, /* List View */
$0007, /* List Type */
0, /* List Start */
10, /* ListMemHeight */
5, /* List Mem Size */
0, /* List Ref */
0 /* Color Ref */
}};
};
resource rControlTemplate (abCalcOpList) {
abCalcOpList, /* control ID */
{abCalcBtnRow7, abCalcOpCol, abCalcWinHeight-(3*abCalcBtnSpaceY), abCalcWinWidth-abCalcBtnSpaceX}, /* control rect */
ListControl {{
$0000, /* flags */
$1400, /* more flags */
0, /* refcon */
0, /* list size */
12, /* List View */
$0007, /* List Type */
0, /* List Start */
10, /* ListMemHeight */
5, /* List Mem Size */
0, /* List Ref */
0 /* Color Ref */
}};
};
resource rControlTemplate (abCalcEntryBox) {
abCalcEntryBox, /* control ID */
{abCalcBtnRow7, abCalcBtnCol0, abCalcBtnRow7+abCalcBtnHeight, abCalcBtnCol3+abCalcBtnWidth}, /* control rect */
editLineControl {{
$0000, /* flags */
$7000, /* more flags */
0, /* refcon */
34, /* Max size */
0 /* text Ref */
}};
};
resource rAlertString (abCalcErrorAlert) {
"23/"
"*0"
"/^#0\$00"
};

View File

@ -1,217 +0,0 @@
/*
abCExpReal.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "expr/abCExpr.h"
static abCalcExpr *abCalcExprRealParse(abCalcExpr *expr, char *buffer);
static char *abCalcExprRealFormat(abCalcExpr *expr, char *buffer);
static abCalcExprCallbacks gRealCallbacks = {
abCalcExprRealParse,
abCalcExprRealFormat
};
void abCalcExprRealInit(void)
{
abCalcRegisterExprType(abCalcExprTypeReal, &gRealCallbacks);
}
abCalcExpr *abCalcExprRealParse(abCalcExpr *expr, char *buffer)
{
int offset;
int expOffset = -1;
int periodOffset = -1;
int len;
int numOffset = -1;
/* First validate */
if (buffer == NULL)
return NULL;
if (expr == NULL)
return NULL;
len = strlen(buffer);
for (offset = 0; offset < len; offset++) {
switch (buffer[offset]) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
numOffset = offset;
break;
case '.':
if (periodOffset != -1)
return NULL;
if (expOffset != -1)
return NULL;
periodOffset = offset;
break;
case '-':
if (offset == 0)
break;
/* Fallthrough */
case '+':
if ((expOffset == -1) ||
((expOffset + 1) != offset))
return NULL;
break;
case 'e':
case 'E':
if (expOffset != -1)
return NULL;
expOffset = offset;
numOffset = -1;
break;
default:
return NULL;
}
}
if (numOffset == -1)
return NULL;
expr->type = abCalcExprTypeReal;
expr->u.real = atof(buffer);
return expr;
}
char *abCalcExprRealFormat(abCalcExpr *expr, char *buffer)
{
abCalcRealType exp;
abCalcRealType value;
static char format[16];
int numDecDigits;
int periodPos = -1;
int zerosStart = -1;
int spaceStart = -1;
int expPos = -1;
int len;
int i;
if (expr == NULL)
return NULL;
if (buffer == NULL)
return NULL;
if (expr->type != abCalcExprTypeReal)
return NULL;
value = expr->u.real;
if (value == 0.0) {
exp = 0.0;
} else {
exp = floor(log10(fabs(value)));
}
if (exp >= 0)
exp++;
if ((exp > 12) ||
(exp < -12)) {
strcpy(format, "%-25.11E");
} else if (exp <= -2) {
double shiftedValue = value * 1.0e12;
if (shiftedValue == floor(shiftedValue)) {
strcpy(format, "%-18.12f");
} else {
strcpy(format, "%-25.11E");
}
} else {
int numDecDigits = (int)(12 - exp);
if (numDecDigits > 12) {
numDecDigits = 12;
}
sprintf(format, "%%-28.%df", numDecDigits);
}
sprintf(buffer, format, value);
len = strlen(buffer);
for (i = 0; i < len; i++) {
switch (buffer[i]) {
case '.':
periodPos = i;
break;
case '0':
if (expPos != -1) {
break;
}
if ((periodPos != -1) &&
(zerosStart == -1)) {
if (periodPos == i - 1) {
zerosStart = periodPos;
} else {
zerosStart = i;
}
}
break;
case 'E':
expPos = i;
break;
case ' ':
spaceStart = i;
break;
default:
if (expPos == -1)
zerosStart = -1;
break;
}
if (spaceStart != -1)
break;
}
if (spaceStart != -1) {
buffer[spaceStart] = '\0';
len = spaceStart;
}
if (zerosStart != -1) {
if (expPos != -1) {
memmove(&buffer[zerosStart], &buffer[expPos], len - expPos + 1);
len = expPos - zerosStart;
}
else {
buffer[zerosStart] = '\0';
}
}
return buffer;
}
void abCalcExprRealSet(abCalcExpr *expr, abCalcRealType value)
{
if (expr == NULL)
return;
expr->type = abCalcExprTypeReal;
expr->u.real = value;
}

View File

@ -1,17 +0,0 @@
/*
abCExpReal.h
By: Jeremy Rand
*/
#ifndef ABCEXPREAL_H
#define ABCEXPREAL_H
struct abCalcExpr;
void abCalcExprRealInit(void);
void abCalcExprRealSet(struct abCalcExpr *expr, abCalcRealType value);
#endif

View File

@ -1,61 +0,0 @@
/*
abCExpr.c
By: Jeremy Rand
*/
#include <stdlib.h>
#include "expr/abCExpr.h"
static abCalcExprCallbacks *gCallbacks[abCalcExprTypeMax];
#define AB_CALC_EXPR_TYPE_INVALID(type) (((type) < abCalcExprTypeMin) || ((type) >= abCalcExprTypeMax))
void abCalcExprInit(void)
{
abCalcExprType type;
for (type = abCalcExprTypeMin; type < abCalcExprTypeMax; type++) {
gCallbacks[type] = NULL;
}
}
void abCalcRegisterExprType(abCalcExprType type, abCalcExprCallbacks *callbacks)
{
if (AB_CALC_EXPR_TYPE_INVALID(type))
return;
gCallbacks[type] = callbacks;
}
abCalcExpr *abCalcParseExpr(abCalcExpr *expr, char *buffer)
{
abCalcExpr *result = NULL;
abCalcExprType type;
for (type = abCalcExprTypeMin; type < abCalcExprTypeMax; type++) {
if (gCallbacks[type] != NULL) {
result = (gCallbacks[type]->parseExpr)(expr, buffer);
if (result != NULL)
return result;
}
}
return result;
}
char *abCalcFormatExpr(abCalcExpr *expr, char *buffer)
{
if (AB_CALC_EXPR_TYPE_INVALID(expr->type))
return NULL;
if (gCallbacks[expr->type] == NULL)
return NULL;
return (gCallbacks[expr->type]->formatExpr(expr, buffer));
}

View File

@ -1,51 +0,0 @@
/*
abCExpr.h
By: Jeremy Rand
*/
#ifndef ABCEXPR_H
#define ABCEXPR_H
typedef enum abCalcExprType {
abCalcExprTypeMin = 0,
abCalcExprTypeReal = 0,
abCalcExprTypeInt,
abCalcExprTypeMax
} abCalcExprType;
typedef double abCalcRealType;
typedef unsigned long abCalcIntType;
#define AB_CALC_EXPR_MAX_INT_WIDTH ((sizeof(abCalcIntType) * 8))
#define AB_CALC_EXPR_STRING_MAX (AB_CALC_EXPR_MAX_INT_WIDTH + 8)
typedef struct abCalcExpr {
abCalcExprType type;
union {
abCalcRealType real;
abCalcIntType integer;
} u;
} abCalcExpr;
typedef struct abCalcExprCallbacks {
abCalcExpr * (*parseExpr)(abCalcExpr *expr, char *buffer);
char * (*formatExpr)(abCalcExpr *expr, char *buffer);
} abCalcExprCallbacks;
void abCalcExprInit(void);
void abCalcRegisterExprType(abCalcExprType type, abCalcExprCallbacks *callbacks);
abCalcExpr *abCalcParseExpr(abCalcExpr *expr, char *buffer);
char *abCalcFormatExpr(abCalcExpr *expr, char *buffer);
#endif

View File

@ -1,272 +0,0 @@
/*
abCExprInt.c
By: Jeremy Rand
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "abCMode.h"
#include "expr/abCExpr.h"
static abCalcExpr *abCalcExprIntParse(abCalcExpr *expr, char *buffer);
static char *abCalcExprIntFormat(abCalcExpr *expr, char *buffer);
static abCalcExprCallbacks gIntCallbacks = {
abCalcExprIntParse,
abCalcExprIntFormat
};
void abCalcExprIntInit(void)
{
abCalcRegisterExprType(abCalcExprTypeInt, &gIntCallbacks);
}
abCalcExpr *abCalcExprIntParse(abCalcExpr *expr, char *buffer)
{
abCalcModeIntBase base = abCalcModeGetBase();
abCalcIntType value = 0;
int len;
int offset = 1;
if (buffer == NULL)
return NULL;
if (expr == NULL)
return NULL;
len = strlen(buffer);
if (len < 2)
return NULL;
if (buffer[0] == '$') {
base = abCalcModeHexBase;
} else if ((buffer[0] == '0') &&
(buffer[1] == 'x')) {
base = abCalcModeHexBase;
offset = 2;
} else if (buffer[0] != '#')
return NULL;
switch (base) {
case abCalcModeBinBase:
for ( ; offset < len; offset++) {
value <<= 1;
switch (buffer[offset]) {
case '1':
value++;
break;
case '0':
break;
default:
return NULL;
}
}
break;
case abCalcModeOctBase:
for ( ; offset < len; offset++) {
value <<= 3;
switch (buffer[offset]) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
value += (buffer[offset] - '0');;
break;
default:
return NULL;
}
}
break;
case abCalcModeDecBase:
for ( ; offset < len; offset++) {
value *= 10;
switch (buffer[offset]) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
value += (buffer[offset] - '0');;
break;
default:
return NULL;
}
}
break;
case abCalcModeHexBase:
for ( ; offset < len; offset++) {
value <<= 4;
switch (buffer[offset]) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
value += (buffer[offset] - '0');;
break;
case 'a':
case 'A':
value += 10;
break;
case 'b':
case 'B':
value += 11;
break;
case 'c':
case 'C':
value += 12;
break;
case 'd':
case 'D':
value += 13;
break;
case 'e':
case 'E':
value += 14;
break;
case 'f':
case 'F':
value += 15;
break;
default:
return NULL;
}
}
break;
default:
return NULL;
}
expr->type = abCalcExprTypeInt;
expr->u.integer = value;
return expr;
}
char *abCalcExprIntFormat(abCalcExpr *expr, char *buffer)
{
abCalcModeIntBase base = abCalcModeGetBase();
int width = abCalcModeGetIntWidth();
abCalcIntType value;
char *ptr;
int gotFirstOne;
int i;
if (expr == NULL)
return NULL;
if (buffer == NULL)
return NULL;
if (expr->type != abCalcExprTypeInt)
return NULL;
value = expr->u.integer;
if (width < AB_CALC_EXPR_MAX_INT_WIDTH) {
value &= ((1l << width) - 1);
}
switch (base) {
case abCalcModeBinBase:
gotFirstOne = 0;
ptr = buffer;
*ptr = '#';
ptr++;
for (i = width - 1; i >= 0; i--) {
if ((value >> i) & 1) {
*ptr = '1';
ptr++;
gotFirstOne = 1;
} else {
if (gotFirstOne) {
*ptr = '0';
ptr++;
}
}
}
if (!gotFirstOne) {
*ptr = '0';
ptr++;
}
*ptr = ' ';
ptr++;
*ptr = 'b';
ptr++;
*ptr = '\0';
break;
case abCalcModeOctBase:
sprintf(buffer, "#%lo o", value);
break;
case abCalcModeDecBase:
sprintf(buffer, "#%lu d", value);
break;
case abCalcModeHexBase:
sprintf(buffer, "#%lX h", value);
break;
default:
return NULL;
}
return buffer;
}
void abCalcExprIntSet(abCalcExpr *expr, abCalcIntType value)
{
int width;
if (expr == NULL)
return;
width = abCalcModeGetIntWidth();
expr->type = abCalcExprTypeInt;
expr->u.integer = value;
if (width < AB_CALC_EXPR_MAX_INT_WIDTH) {
expr->u.integer &= ((1l << width) - 1);
}
}

View File

@ -1,19 +0,0 @@
/*
abCExprInt.h
By: Jeremy Rand
*/
#ifndef ABCEXPRINT_H
#define ABCEXPRINT_H
struct abCalcExpr;
void abCalcExprIntInit(void);
void abCalcExprIntSet(struct abCalcExpr *expr, abCalcIntType value);
#endif

View File

@ -1,177 +0,0 @@
/*
abCOp.c
By: Jeremy Rand
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "ops/abCOp.h"
#include "ops/abCOpAdd.h"
#include "ops/abCOpSubtr.h"
#include "ops/abCOpMult.h"
#include "ops/abCOpDiv.h"
#include "ops/abCOpChs.h"
#include "ops/abCOpInv.h"
#include "ops/abCOpSq.h"
#include "ops/abCOpSqrt.h"
#include "ops/abCOpPower.h"
#include "ops/abCOpDrop.h"
#include "ops/abCOpSwap.h"
#include "ops/abCOpClear.h"
#include "ops/abCOpPi.h"
#include "ops/abCOpSin.h"
#include "ops/abCOpCos.h"
#include "ops/abCOpTan.h"
#include "ops/abCOpAsin.h"
#include "ops/abCOpAcos.h"
#include "ops/abCOpAtan.h"
#include "ops/abCOpLog.h"
#include "ops/abCOpAlog.h"
#include "ops/abCOpLn.h"
#include "ops/abCOpExp.h"
#include "ops/abCOpSinh.h"
#include "ops/abCOpCosh.h"
#include "ops/abCOpTanh.h"
#include "ops/abCOpR2B.h"
#include "ops/abCOpB2R.h"
#include "ops/abCOpAnd.h"
#include "ops/abCOpOr.h"
#include "ops/abCOpXor.h"
#include "ops/abCOpNot.h"
#include "ops/abCOpSl.h"
#include "ops/abCOpRl.h"
#include "ops/abCOpSr.h"
#include "ops/abCOpRr.h"
#include "ops/abCOpAsr.h"
#include "ops/abCOpBin.h"
#include "ops/abCOpOct.h"
#include "ops/abCOpDec.h"
#include "ops/abCOpHex.h"
#include "ops/abCOpStws.h"
#include "ops/abCOpRcws.h"
#define AB_CALC_MAX_OPS 128
abCalcOp gOps[AB_CALC_MAX_OPS];
static int gNumOps = 0;
void abCalcOpInit(void)
{
gNumOps = 0;
memset(gOps, 0, sizeof(gOps));
abCalcOpAddInit();
abCalcOpSubtrInit();
abCalcOpMultInit();
abCalcOpDivInit();
abCalcOpChsInit();
abCalcOpInvInit();
abCalcOpSqInit();
abCalcOpSqrtInit();
abCalcOpPowerInit();
abCalcOpDropInit();
abCalcOpSwapInit();
abCalcOpClearInit();
abCalcOpPiInit();
abCalcOpSinInit();
abCalcOpCosInit();
abCalcOpTanInit();
abCalcOpAsinInit();
abCalcOpAcosInit();
abCalcOpAtanInit();
abCalcOpLogInit();
abCalcOpAlogInit();
abCalcOpLnInit();
abCalcOpExpInit();
abCalcOpSinhInit();
abCalcOpCoshInit();
abCalcOpTanhInit();
abCalcOpR2BInit();
abCalcOpB2RInit();
abCalcOpAndInit();
abCalcOpOrInit();
abCalcOpXorInit();
abCalcOpNotInit();
abCalcOpSlInit();
abCalcOpRlInit();
abCalcOpSrInit();
abCalcOpRrInit();
abCalcOpAsrInit();
abCalcOpBinInit();
abCalcOpOctInit();
abCalcOpDecInit();
abCalcOpHexInit();
abCalcOpStwsInit();
abCalcOpRcwsInit();
}
void abCalcOpRegister(char *name, void (*execute)(void))
{
if (gNumOps >= AB_CALC_MAX_OPS) {
fprintf(stderr, "Operation registration overflow");
return;
}
gOps[gNumOps].name = name;
gOps[gNumOps].execute = execute;
gNumOps++;
}
abCalcOp *abCalcOpLookup(char *name)
{
int i;
for (i = 0; i < gNumOps; i++) {
#ifdef ABCALC_GSOS
if (stricmp(gOps[i].name, name) == 0) {
#else
if (strcasecmp(gOps[i].name, name) == 0) {
#endif
return &gOps[i];
}
}
return NULL;
}
abCalcOp *abCalcOpNth(int n)
{
if ((n < 0) ||
(n >= gNumOps))
return NULL;
return &gOps[n];
}
int abCalcOpNumOps(void)
{
return gNumOps;
}

View File

@ -1,44 +0,0 @@
/*
abCOp.h
By: Jeremy Rand
*/
#ifndef ABCOP_H
#define ABCOP_H
#define AB_CALC_OP_ONE_ARG(opName) \
abCalcExpr *expr; \
if (abCalcStackNumItems() < 1) { \
abCalcRaiseError(abCalcTooFewArgsError, opName); \
return; \
} \
expr = abCalcStackExprAt(0);
#define AB_CALC_OP_TWO_ARGS(opName) \
abCalcExpr *expr1, *expr2; \
if (abCalcStackNumItems() < 2) { \
abCalcRaiseError(abCalcTooFewArgsError, opName); \
return; \
} \
expr1 = abCalcStackExprAt(0); \
expr2 = abCalcStackExprAt(1);
typedef struct abCalcOp {
char *name;
void (*execute)(void);
} abCalcOp;
void abCalcOpInit(void);
void abCalcOpRegister(char *name, void (*execute)(void));
abCalcOp *abCalcOpLookup(char *name);
abCalcOp *abCalcOpNth(int n);
int abCalcOpNumOps(void);
#endif

View File

@ -1,52 +0,0 @@
/*
abCOpAcos.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAcos.h"
#define ACOS_NAME "ACOS"
static void acosExecute(void);
void abCalcOpAcosInit(void)
{
abCalcOpRegister(ACOS_NAME, acosExecute);
}
void acosExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ACOS_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ACOS_NAME);
return;
}
if ((expr->u.real < -1.0) ||
(expr->u.real > 1.0)) {
abCalcRaiseError(abCalcComplexResultError, ACOS_NAME);
return;
}
abCalcExprRealSet(&result, acos(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAcos.h
By: Jeremy Rand
*/
#ifndef ABCOPACOS_H
#define ABCOPACOS_H
void abCalcOpAcosInit(void);
#endif

View File

@ -1,69 +0,0 @@
/*
abCOpAdd.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpAdd.h"
#define ADD_NAME "+"
static void addExecute(void);
void abCalcOpAddInit(void)
{
abCalcOpRegister(ADD_NAME, addExecute);
}
void addExecute(void)
{
abCalcExpr result;
char expr1Real = 0;
char expr2Real = 0;
AB_CALC_OP_TWO_ARGS(ADD_NAME);
if (expr1->type == abCalcExprTypeReal) {
expr1Real = 1;
} else if (expr1->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, ADD_NAME);
return;
}
if (expr2->type == abCalcExprTypeReal) {
expr2Real = 1;
} else if (expr2->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, ADD_NAME);
return;
}
if ((expr1Real) && (expr2Real)) {
abCalcExprRealSet(&result, expr2->u.real + expr1->u.real);
} else {
if (expr1Real) {
abCalcExprIntSet(&result, expr2->u.integer + (abCalcIntType)expr1->u.real);
} else if (expr2Real) {
abCalcExprIntSet(&result, (abCalcIntType)expr2->u.real + expr1->u.integer);
} else {
abCalcExprIntSet(&result, expr2->u.integer + expr1->u.integer);
}
}
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAdd.h
By: Jeremy Rand
*/
#ifndef ABCOPADD_H
#define ABCOPADD_H
void abCalcOpAddInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpAlog.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAlog.h"
#define ALOG_NAME "ALOG"
static void alogExecute(void);
void abCalcOpAlogInit(void)
{
abCalcOpRegister(ALOG_NAME, alogExecute);
}
void alogExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ALOG_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ALOG_NAME);
return;
}
abCalcExprRealSet(&result, pow(10.0, expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAlog.h
By: Jeremy Rand
*/
#ifndef ABCOPALOG_H
#define ABCOPALOG_H
void abCalcOpAlogInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpAnd.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpAnd.h"
#define AND_NAME "AND"
static void andExecute(void);
void abCalcOpAndInit(void)
{
abCalcOpRegister(AND_NAME, andExecute);
}
void andExecute(void)
{
abCalcExpr result;
AB_CALC_OP_TWO_ARGS(AND_NAME);
if (expr1->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, AND_NAME);
return;
}
if (expr2->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, AND_NAME);
return;
}
abCalcExprIntSet(&result, expr2->u.integer & expr1->u.integer);
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAnd.h
By: Jeremy Rand
*/
#ifndef ABCOPAND_H
#define ABCOPAND_H
void abCalcOpAndInit(void);
#endif

View File

@ -1,52 +0,0 @@
/*
abCOpAsin.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAsin.h"
#define ASIN_NAME "ASIN"
static void asinExecute(void);
void abCalcOpAsinInit(void)
{
abCalcOpRegister(ASIN_NAME, asinExecute);
}
void asinExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ASIN_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ASIN_NAME);
return;
}
if ((expr->u.real < -1.0) ||
(expr->u.real > 1.0)) {
abCalcRaiseError(abCalcComplexResultError, ASIN_NAME);
return;
}
abCalcExprRealSet(&result, asin(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAsin.h
By: Jeremy Rand
*/
#ifndef ABCOPASIN_H
#define ABCOPASIN_H
void abCalcOpAsinInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpAsr.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCMode.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpAsr.h"
#define ASR_NAME "ASR"
static void asrExecute(void);
void abCalcOpAsrInit(void)
{
abCalcOpRegister(ASR_NAME, asrExecute);
}
void asrExecute(void)
{
abCalcExpr result;
int width;
abCalcIntType upperBit;
AB_CALC_OP_ONE_ARG(ASR_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, ASR_NAME);
return;
}
width = abCalcModeGetIntWidth();
upperBit = (expr->u.integer & (1 << (width - 1)));
abCalcExprIntSet(&result, ((expr->u.integer >> 1) | upperBit));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAsr.h
By: Jeremy Rand
*/
#ifndef ABCOPASR_H
#define ABCOPASR_H
void abCalcOpAsrInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpAtan.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAtan.h"
#define ATAN_NAME "ATAN"
static void atanExecute(void);
void abCalcOpAtanInit(void)
{
abCalcOpRegister(ATAN_NAME, atanExecute);
}
void atanExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ATAN_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ATAN_NAME);
return;
}
abCalcExprRealSet(&result, atan(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAtan.h
By: Jeremy Rand
*/
#ifndef ABCOPATAN_H
#define ABCOPATAN_H
void abCalcOpAtanInit(void);
#endif

View File

@ -1,48 +0,0 @@
/*
abCOpB2R.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpB2R.h"
#define B2R_NAME "B2R"
static void b2rExecute(void);
void abCalcOpB2RInit(void)
{
abCalcOpRegister(B2R_NAME, b2rExecute);
}
void b2rExecute(void)
{
abCalcExpr result;
int width;
int topBit;
AB_CALC_OP_ONE_ARG(B2R_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, B2R_NAME);
return;
}
abCalcExprRealSet(&result, (abCalcRealType)expr->u.integer);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpB2R.h
By: Jeremy Rand
*/
#ifndef ABCOPB2R_H
#define ABCOPB2R_H
void abCalcOpB2RInit(void);
#endif

View File

@ -1,30 +0,0 @@
/*
abCOpBin.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCMode.h"
#include "ops/abCOp.h"
#include "ops/abCOpBin.h"
#define BIN_NAME "BIN"
static void binExecute(void);
void abCalcOpBinInit(void)
{
abCalcOpRegister(BIN_NAME, binExecute);
}
void binExecute(void)
{
abCalcModeSetBase(abCalcModeBinBase);
}

View File

@ -1,14 +0,0 @@
/*
abCOpBin.h
By: Jeremy Rand
*/
#ifndef ABCOPBIN_H
#define ABCOPBIN_H
void abCalcOpBinInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpChs.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpChs.h"
#define CHS_NAME "CHS"
static void chsExecute(void);
void abCalcOpChsInit(void)
{
abCalcOpRegister(CHS_NAME, chsExecute);
}
void chsExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(CHS_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, CHS_NAME);
return;
}
abCalcExprRealSet(&result, -1.0 * expr->u.real);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpChs.h
By: Jeremy Rand
*/
#ifndef ABCOPCHS_H
#define ABCOPCHS_H
void abCalcOpChsInit(void);
#endif

View File

@ -1,31 +0,0 @@
/*
abCOpClear.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCStack.h"
#include "ops/abCOp.h"
#include "ops/abCOpClear.h"
#define CLEAR_NAME "CLEAR"
static void clearExecute(void);
void abCalcOpClearInit(void)
{
abCalcOpRegister(CLEAR_NAME, clearExecute);
}
void clearExecute(void)
{
abCalcStackClear();
}

View File

@ -1,14 +0,0 @@
/*
abCOpClean.h
By: Jeremy Rand
*/
#ifndef ABCOPCLEAR_H
#define ABCOPCLEAR_H
void abCalcOpClearInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpCos.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpCos.h"
#define COS_NAME "COS"
static void cosExecute(void);
void abCalcOpCosInit(void)
{
abCalcOpRegister(COS_NAME, cosExecute);
}
void cosExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(COS_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, COS_NAME);
return;
}
abCalcExprRealSet(&result, cos(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpCos.h
By: Jeremy Rand
*/
#ifndef ABCOPCOS_H
#define ABCOPCOS_H
void abCalcOpCosInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpCosh.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpCosh.h"
#define COSH_NAME "COSH"
static void coshExecute(void);
void abCalcOpCoshInit(void)
{
abCalcOpRegister(COSH_NAME, coshExecute);
}
void coshExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(COSH_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, COSH_NAME);
return;
}
abCalcExprRealSet(&result, cosh(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpCosh.h
By: Jeremy Rand
*/
#ifndef ABCOPCOSH_H
#define ABCOPCOSH_H
void abCalcOpCoshInit(void);
#endif

View File

@ -1,30 +0,0 @@
/*
abCOpDec.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCMode.h"
#include "ops/abCOp.h"
#include "ops/abCOpDec.h"
#define DEC_NAME "DEC"
static void decExecute(void);
void abCalcOpDecInit(void)
{
abCalcOpRegister(DEC_NAME, decExecute);
}
void decExecute(void)
{
abCalcModeSetBase(abCalcModeDecBase);
}

View File

@ -1,14 +0,0 @@
/*
abCOpDec.h
By: Jeremy Rand
*/
#ifndef ABCOPDEC_H
#define ABCOPDEC_H
void abCalcOpDecInit(void);
#endif

View File

@ -1,77 +0,0 @@
/*
abCOpDiv.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpDiv.h"
#define DIV_NAME "/"
static void divExecute(void);
void abCalcOpDivInit(void)
{
abCalcOpRegister(DIV_NAME, divExecute);
}
void divExecute(void)
{
abCalcExpr result;
char expr1Real = 0;
char expr2Real = 0;
AB_CALC_OP_TWO_ARGS(DIV_NAME);
if (expr1->type == abCalcExprTypeReal) {
expr1Real = 1;
if (expr1->u.real == 0.0) {
abCalcRaiseError(abCalcInfiniteResultError, DIV_NAME);
return;
}
} else if (expr1->type == abCalcExprTypeInt) {
if (expr1->u.integer == 0l) {
abCalcRaiseError(abCalcInfiniteResultError, DIV_NAME);
return;
}
} else {
abCalcRaiseError(abCalcBadArgTypeError, DIV_NAME);
return;
}
if (expr2->type == abCalcExprTypeReal) {
expr2Real = 1;
} else if (expr2->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, DIV_NAME);
return;
}
if ((expr1Real) && (expr2Real)) {
abCalcExprRealSet(&result, expr2->u.real / expr1->u.real);
} else {
if (expr1Real) {
abCalcExprIntSet(&result, expr2->u.integer / (abCalcIntType)expr1->u.real);
} else if (expr2Real) {
abCalcExprIntSet(&result, (abCalcIntType)expr2->u.real / expr1->u.integer);
} else {
abCalcExprIntSet(&result, expr2->u.integer / expr1->u.integer);
}
}
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpDiv.h
By: Jeremy Rand
*/
#ifndef ABCOPDIV_H
#define ABCOPDIV_H
void abCalcOpDivInit(void);
#endif

View File

@ -1,36 +0,0 @@
/*
abCOpDrop.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "ops/abCOp.h"
#include "ops/abCOpDrop.h"
#define DROP_NAME "DROP"
static void dropExecute(void);
void abCalcOpDropInit(void)
{
abCalcOpRegister(DROP_NAME, dropExecute);
}
void dropExecute(void)
{
AB_CALC_OP_ONE_ARG(DROP_NAME);
abCalcStackExprPop(NULL);
}

View File

@ -1,14 +0,0 @@
/*
abCOpDrop.h
By: Jeremy Rand
*/
#ifndef ABCOPDROP_H
#define ABCOPDROP_H
void abCalcOpDropInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpExp.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpExp.h"
#define EXP_NAME "EXP"
static void expExecute(void);
void abCalcOpExpInit(void)
{
abCalcOpRegister(EXP_NAME, expExecute);
}
void expExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(EXP_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, EXP_NAME);
return;
}
abCalcExprRealSet(&result, exp(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpExp.h
By: Jeremy Rand
*/
#ifndef ABCOPEXP_H
#define ABCOPEXP_H
void abCalcOpExpInit(void);
#endif

View File

@ -1,30 +0,0 @@
/*
abCOpHex.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCMode.h"
#include "ops/abCOp.h"
#include "ops/abCOpHex.h"
#define HEX_NAME "HEX"
static void hexExecute(void);
void abCalcOpHexInit(void)
{
abCalcOpRegister(HEX_NAME, hexExecute);
}
void hexExecute(void)
{
abCalcModeSetBase(abCalcModeHexBase);
}

View File

@ -1,14 +0,0 @@
/*
abCOpHex.h
By: Jeremy Rand
*/
#ifndef ABCOPHEX_H
#define ABCOPHEX_H
void abCalcOpHexInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpInv.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpInv.h"
#define INV_NAME "INV"
static void invExecute(void);
void abCalcOpInvInit(void)
{
abCalcOpRegister(INV_NAME, invExecute);
}
void invExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(INV_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, INV_NAME);
return;
}
if (expr->u.real == 0.0) {
abCalcRaiseError(abCalcInfiniteResultError, INV_NAME);
return;
}
abCalcExprRealSet(&result, 1.0 / expr->u.real);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpInv.h
By: Jeremy Rand
*/
#ifndef ABCOPINV_H
#define ABCOPINV_H
void abCalcOpInvInit(void);
#endif

View File

@ -1,55 +0,0 @@
/*
abCOpLn.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpLn.h"
#define LN_NAME "LN"
static void lnExecute(void);
void abCalcOpLnInit(void)
{
abCalcOpRegister(LN_NAME, lnExecute);
}
void lnExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(LN_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, LN_NAME);
return;
}
if (expr->u.real == 0.0) {
abCalcRaiseError(abCalcInfiniteResultError, LN_NAME);
return;
}
if (expr->u.real < 0.0) {
abCalcRaiseError(abCalcComplexResultError, LN_NAME);
return;
}
abCalcExprRealSet(&result, log(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpLn.h
By: Jeremy Rand
*/
#ifndef ABCOPLN_H
#define ABCOPLN_H
void abCalcOpLnInit(void);
#endif

View File

@ -1,55 +0,0 @@
/*
abCOpLog.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpLog.h"
#define LOG_NAME "LOG"
static void logExecute(void);
void abCalcOpLogInit(void)
{
abCalcOpRegister(LOG_NAME, logExecute);
}
void logExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(LOG_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, LOG_NAME);
return;
}
if (expr->u.real == 0.0) {
abCalcRaiseError(abCalcInfiniteResultError, LOG_NAME);
return;
}
if (expr->u.real < 0.0) {
abCalcRaiseError(abCalcComplexResultError, LOG_NAME);
return;
}
abCalcExprRealSet(&result, log10(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpLog.h
By: Jeremy Rand
*/
#ifndef ABCOPLOG_H
#define ABCOPLOG_H
void abCalcOpLogInit(void);
#endif

View File

@ -1,68 +0,0 @@
/*
abCOpMult.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpMult.h"
#define MUL_NAME "*"
static void multExecute(void);
void abCalcOpMultInit(void)
{
abCalcOpRegister(MUL_NAME, multExecute);
}
void multExecute(void)
{
abCalcExpr result;
char expr1Real = 0;
char expr2Real = 0;
AB_CALC_OP_TWO_ARGS(MUL_NAME);
if (expr1->type == abCalcExprTypeReal) {
expr1Real = 1;
} else if (expr1->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, MUL_NAME);
return;
}
if (expr2->type == abCalcExprTypeReal) {
expr2Real = 1;
} else if (expr2->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, MUL_NAME);
return;
}
if ((expr1Real) && (expr2Real)) {
abCalcExprRealSet(&result, expr2->u.real * expr1->u.real);
} else {
if (expr1Real) {
abCalcExprIntSet(&result, expr2->u.integer * (abCalcIntType)expr1->u.real);
} else if (expr2Real) {
abCalcExprIntSet(&result, (abCalcIntType)expr2->u.real * expr1->u.integer);
} else {
abCalcExprIntSet(&result, expr2->u.integer * expr1->u.integer);
}
}
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpMult.h
By: Jeremy Rand
*/
#ifndef ABCOPMULT_H
#define ABCOPMULT_H
void abCalcOpMultInit(void);
#endif

View File

@ -1,45 +0,0 @@
/*
abCOpNot.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpNot.h"
#define NOT_NAME "NOT"
static void notExecute(void);
void abCalcOpNotInit(void)
{
abCalcOpRegister(NOT_NAME, notExecute);
}
void notExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(NOT_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, NOT_NAME);
return;
}
abCalcExprIntSet(&result, ~(expr->u.integer));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpNot.h
By: Jeremy Rand
*/
#ifndef ABCOPNOT_H
#define ABCOPNOT_H
void abCalcOpNotInit(void);
#endif

View File

@ -1,30 +0,0 @@
/*
abCOpOct.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCMode.h"
#include "ops/abCOp.h"
#include "ops/abCOpOct.h"
#define OCT_NAME "OCT"
static void octExecute(void);
void abCalcOpOctInit(void)
{
abCalcOpRegister(OCT_NAME, octExecute);
}
void octExecute(void)
{
abCalcModeSetBase(abCalcModeOctBase);
}

View File

@ -1,14 +0,0 @@
/*
abCOpOct.h
By: Jeremy Rand
*/
#ifndef ABCOPOCT_H
#define ABCOPOCT_H
void abCalcOpOctInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpOr.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpOr.h"
#define OR_NAME "OR"
static void orExecute(void);
void abCalcOpOrInit(void)
{
abCalcOpRegister(OR_NAME, orExecute);
}
void orExecute(void)
{
abCalcExpr result;
AB_CALC_OP_TWO_ARGS(OR_NAME);
if (expr1->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, OR_NAME);
return;
}
if (expr2->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, OR_NAME);
return;
}
abCalcExprIntSet(&result, expr2->u.integer | expr1->u.integer);
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpOr.h
By: Jeremy Rand
*/
#ifndef ABCOPOR_H
#define ABCOPOR_H
void abCalcOpOrInit(void);
#endif

View File

@ -1,42 +0,0 @@
/*
abCOpPi.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpPi.h"
#define PI_NAME "PI"
static void piExecute(void);
void abCalcOpPiInit(void)
{
abCalcOpRegister(PI_NAME, piExecute);
}
void piExecute(void)
{
abCalcExpr result;
#ifdef ABCALC_GSOS
abCalcExprRealSet(&result, 2.0 * asin(1.0));
#else
abCalcExprRealSet(&result, M_PI);
#endif
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpPi.h
By: Jeremy Rand
*/
#ifndef ABCOPPI_H
#define ABCOPPI_H
void abCalcOpPiInit(void);
#endif

View File

@ -1,73 +0,0 @@
/*
abCOpPower.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpPower.h"
#define POWER_NAME "^"
static void powerExecute(void);
void abCalcOpPowerInit(void)
{
abCalcOpRegister(POWER_NAME, powerExecute);
}
void powerExecute(void)
{
abCalcExpr result;
double integral;
AB_CALC_OP_TWO_ARGS(POWER_NAME);
if (expr1->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, POWER_NAME);
return;
}
if (expr2->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, POWER_NAME);
return;
}
if (expr2->u.real == 0.0) {
if (expr1->u.real < 0.0) {
abCalcRaiseError(abCalcInfiniteResultError, POWER_NAME);
return;
}
if (expr1->u.real == 0.0) {
abCalcExprRealSet(&result, 1.0);
} else {
abCalcExprRealSet(&result, 0.0);
}
} else {
if (expr2->u.real < 0.0) {
modf(expr1->u.real, &integral);
if (expr1->u.real != integral) {
abCalcRaiseError(abCalcComplexResultError, POWER_NAME);
return;
}
}
abCalcExprRealSet(&result, pow(expr2->u.real, expr1->u.real));
}
abCalcStackExprPop(NULL);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpPower.h
By: Jeremy Rand
*/
#ifndef ABCOPPOWER_H
#define ABCOPPOWER_H
void abCalcOpPowerInit(void);
#endif

View File

@ -1,48 +0,0 @@
/*
abCOpR2B.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpR2B.h"
#define R2B_NAME "R2B"
static void r2bExecute(void);
void abCalcOpR2BInit(void)
{
abCalcOpRegister(R2B_NAME, r2bExecute);
}
void r2bExecute(void)
{
abCalcExpr result;
int width;
int topBit;
AB_CALC_OP_ONE_ARG(R2B_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, R2B_NAME);
return;
}
abCalcExprIntSet(&result, (abCalcIntType)expr->u.real);
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpR2B.h
By: Jeremy Rand
*/
#ifndef ABCOPR2B_H
#define ABCOPR2B_H
void abCalcOpR2BInit(void);
#endif

View File

@ -1,38 +0,0 @@
/*
abCOpRcws.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCStack.h"
#include "abCMode.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpRcws.h"
#define RCWS_NAME "RCWS"
static void rcwsExecute(void);
void abCalcOpRcwsInit(void)
{
abCalcOpRegister(RCWS_NAME, rcwsExecute);
}
void rcwsExecute(void)
{
abCalcExpr result;
abCalcExprRealSet(&result, (abCalcRealType)abCalcModeGetIntWidth());
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpRcws.h
By: Jeremy Rand
*/
#ifndef ABCOPRCWS_H
#define ABCOPRCWS_H
void abCalcOpRcwsInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpRl.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCMode.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpRl.h"
#define RL_NAME "RL"
static void rlExecute(void);
void abCalcOpRlInit(void)
{
abCalcOpRegister(RL_NAME, rlExecute);
}
void rlExecute(void)
{
abCalcExpr result;
int width;
int topBit;
AB_CALC_OP_ONE_ARG(RL_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, RL_NAME);
return;
}
width = abCalcModeGetIntWidth();
topBit = ((expr->u.integer >> (width - 1)) & 1);
abCalcExprIntSet(&result, ((expr->u.integer << 1) | topBit));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpRl.h
By: Jeremy Rand
*/
#ifndef ABCOPRL_H
#define ABCOPRL_H
void abCalcOpRlInit(void);
#endif

View File

@ -1,51 +0,0 @@
/*
abCOpRr.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCMode.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpRr.h"
#define RR_NAME "RR"
static void rrExecute(void);
void abCalcOpRrInit(void)
{
abCalcOpRegister(RR_NAME, rrExecute);
}
void rrExecute(void)
{
abCalcExpr result;
int width;
abCalcIntType bottomBit;
AB_CALC_OP_ONE_ARG(RR_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, RR_NAME);
return;
}
width = abCalcModeGetIntWidth();
bottomBit = (expr->u.integer & 1);
abCalcExprIntSet(&result, ((expr->u.integer >> 1) | (bottomBit << (width - 1))));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpRr.h
By: Jeremy Rand
*/
#ifndef ABCOPRR_H
#define ABCOPRR_H
void abCalcOpRrInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpSin.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpSin.h"
#define SIN_NAME "SIN"
static void sinExecute(void);
void abCalcOpSinInit(void)
{
abCalcOpRegister(SIN_NAME, sinExecute);
}
void sinExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(SIN_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, SIN_NAME);
return;
}
abCalcExprRealSet(&result, sin(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpSin.h
By: Jeremy Rand
*/
#ifndef ABCOPSIN_H
#define ABCOPSIN_H
void abCalcOpSinInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpSinh.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpSinh.h"
#define SINH_NAME "SINH"
static void sinhExecute(void);
void abCalcOpSinhInit(void)
{
abCalcOpRegister(SINH_NAME, sinhExecute);
}
void sinhExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(SINH_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, SINH_NAME);
return;
}
abCalcExprRealSet(&result, sinh(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpSinh.h
By: Jeremy Rand
*/
#ifndef ABCOPSINH_H
#define ABCOPSINH_H
void abCalcOpSinhInit(void);
#endif

View File

@ -1,45 +0,0 @@
/*
abCOpSl.c
By: Jeremy Rand
*/
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExprInt.h"
#include "ops/abCOp.h"
#include "ops/abCOpSl.h"
#define SL_NAME "SL"
static void slExecute(void);
void abCalcOpSlInit(void)
{
abCalcOpRegister(SL_NAME, slExecute);
}
void slExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(SL_NAME);
if (expr->type != abCalcExprTypeInt) {
abCalcRaiseError(abCalcBadArgTypeError, SL_NAME);
return;
}
abCalcExprIntSet(&result, (expr->u.integer << 1));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpSl.h
By: Jeremy Rand
*/
#ifndef ABCOPSL_H
#define ABCOPSL_H
void abCalcOpSlInit(void);
#endif

Some files were not shown because too many files have changed in this diff Show More