From 4216901871798182a3574865d6aa4f3ff3130a54 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 24 Aug 2017 16:49:49 -0700 Subject: [PATCH] Rename everything --- src/AST/{boolean.c => boolean.cc} | 2 +- src/AST/{element.c => element.cc} | 0 src/AST/{function.c => function.cc} | 0 src/AST/{mutableset.c => mutableset.cc} | 0 src/AST/{order.c => order.cc} | 0 src/AST/{predicate.c => predicate.cc} | 4 ++-- src/AST/{rewriter.c => rewriter.cc} | 0 src/AST/{set.c => set.cc} | 0 src/AST/{table.c => table.cc} | 0 src/AST/{tableentry.c => tableentry.cc} | 0 src/Backend/{cnfexpr.c => cnfexpr.cc} | 20 +++++++++---------- src/Backend/{constraint.c => constraint.cc} | 8 ++++---- src/Backend/{inc_solver.c => inc_solver.cc} | 0 .../{orderelement.c => orderelement.cc} | 0 src/Backend/{orderpair.c => orderpair.cc} | 0 .../{satelemencoder.c => satelemencoder.cc} | 2 +- src/Backend/{satencoder.c => satencoder.cc} | 2 +- ...satfuncopencoder.c => satfuncopencoder.cc} | 0 ...ctableencoder.c => satfunctableencoder.cc} | 0 .../{satorderencoder.c => satorderencoder.cc} | 0 .../{sattranslator.c => sattranslator.cc} | 0 src/Collections/{structs.c => structs.cc} | 0 .../{elementencoding.c => elementencoding.cc} | 4 ++-- ...functionencoding.c => functionencoding.cc} | 0 .../{naiveencoder.c => naiveencoder.cc} | 0 src/Encoders/{orderedge.c => orderedge.cc} | 0 .../{orderencoder.c => orderencoder.cc} | 0 .../{orderencoding.c => orderencoding.cc} | 0 src/Encoders/{ordergraph.c => ordergraph.cc} | 2 +- src/Encoders/{ordernode.c => ordernode.cc} | 0 ...rityassignment.c => polarityassignment.cc} | 4 ++-- src/Makefile | 10 +++++----- src/Test/Makefile | 4 ++-- ...straintstest.c => buildconstraintstest.cc} | 0 src/Test/{cnftest.c => cnftest.cc} | 0 ...elemequalsattest.c => elemequalsattest.cc} | 0 ...equalunsattest.c => elemequalunsattest.cc} | 0 ...funcencodingtest.c => funcencodingtest.cc} | 0 src/Test/{logicopstest.c => logicopstest.cc} | 0 .../{ltelemconsttest.c => ltelemconsttest.cc} | 0 .../{ordergraphtest.c => ordergraphtest.cc} | 0 src/Test/{ordertest.c => ordertest.cc} | 0 ...uncencodetest.c => tablefuncencodetest.cc} | 0 ...cencodetest.c => tablepredicencodetest.cc} | 0 src/Tuner/{tunable.c => tunable.cc} | 2 +- src/{common.c => common.cc} | 0 src/{csolver.c => csolver.cc} | 0 47 files changed, 32 insertions(+), 32 deletions(-) rename src/AST/{boolean.c => boolean.cc} (97%) rename src/AST/{element.c => element.cc} (100%) rename src/AST/{function.c => function.cc} (100%) rename src/AST/{mutableset.c => mutableset.cc} (100%) rename src/AST/{order.c => order.cc} (100%) rename src/AST/{predicate.c => predicate.cc} (87%) rename src/AST/{rewriter.c => rewriter.cc} (100%) rename src/AST/{set.c => set.cc} (100%) rename src/AST/{table.c => table.cc} (100%) rename src/AST/{tableentry.c => tableentry.cc} (100%) rename src/Backend/{cnfexpr.c => cnfexpr.cc} (95%) rename src/Backend/{constraint.c => constraint.cc} (99%) rename src/Backend/{inc_solver.c => inc_solver.cc} (100%) rename src/Backend/{orderelement.c => orderelement.cc} (100%) rename src/Backend/{orderpair.c => orderpair.cc} (100%) rename src/Backend/{satelemencoder.c => satelemencoder.cc} (98%) rename src/Backend/{satencoder.c => satencoder.cc} (98%) rename src/Backend/{satfuncopencoder.c => satfuncopencoder.cc} (100%) rename src/Backend/{satfunctableencoder.c => satfunctableencoder.cc} (100%) rename src/Backend/{satorderencoder.c => satorderencoder.cc} (100%) rename src/Backend/{sattranslator.c => sattranslator.cc} (100%) rename src/Collections/{structs.c => structs.cc} (100%) rename src/Encoders/{elementencoding.c => elementencoding.cc} (88%) rename src/Encoders/{functionencoding.c => functionencoding.cc} (100%) rename src/Encoders/{naiveencoder.c => naiveencoder.cc} (100%) rename src/Encoders/{orderedge.c => orderedge.cc} (100%) rename src/Encoders/{orderencoder.c => orderencoder.cc} (100%) rename src/Encoders/{orderencoding.c => orderencoding.cc} (100%) rename src/Encoders/{ordergraph.c => ordergraph.cc} (99%) rename src/Encoders/{ordernode.c => ordernode.cc} (100%) rename src/Encoders/{polarityassignment.c => polarityassignment.cc} (97%) rename src/Test/{buildconstraintstest.c => buildconstraintstest.cc} (100%) rename src/Test/{cnftest.c => cnftest.cc} (100%) rename src/Test/{elemequalsattest.c => elemequalsattest.cc} (100%) rename src/Test/{elemequalunsattest.c => elemequalunsattest.cc} (100%) rename src/Test/{funcencodingtest.c => funcencodingtest.cc} (100%) rename src/Test/{logicopstest.c => logicopstest.cc} (100%) rename src/Test/{ltelemconsttest.c => ltelemconsttest.cc} (100%) rename src/Test/{ordergraphtest.c => ordergraphtest.cc} (100%) rename src/Test/{ordertest.c => ordertest.cc} (100%) rename src/Test/{tablefuncencodetest.c => tablefuncencodetest.cc} (100%) rename src/Test/{tablepredicencodetest.c => tablepredicencodetest.cc} (100%) rename src/Tuner/{tunable.c => tunable.cc} (88%) rename src/{common.c => common.cc} (100%) rename src/{csolver.c => csolver.cc} (100%) diff --git a/src/AST/boolean.c b/src/AST/boolean.cc similarity index 97% rename from src/AST/boolean.c rename to src/AST/boolean.cc index 2987217..256ab5a 100644 --- a/src/AST/boolean.c +++ b/src/AST/boolean.cc @@ -46,7 +46,7 @@ Boolean *allocBooleanPredicate(Predicate *predicate, Element **inputs, uint numI } Boolean *allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean **array, uint asize) { - BooleanLogic *This = ourmalloc(sizeof(BooleanLogic)); + BooleanLogic *This = (BooleanLogic *) ourmalloc(sizeof(BooleanLogic)); GETBOOLEANTYPE(This) = LOGICOP; GETBOOLEANVALUE(This) = BV_UNDEFINED; GETBOOLEANPOLARITY(This) = P_UNDEFINED; diff --git a/src/AST/element.c b/src/AST/element.cc similarity index 100% rename from src/AST/element.c rename to src/AST/element.cc diff --git a/src/AST/function.c b/src/AST/function.cc similarity index 100% rename from src/AST/function.c rename to src/AST/function.cc diff --git a/src/AST/mutableset.c b/src/AST/mutableset.cc similarity index 100% rename from src/AST/mutableset.c rename to src/AST/mutableset.cc diff --git a/src/AST/order.c b/src/AST/order.cc similarity index 100% rename from src/AST/order.c rename to src/AST/order.cc diff --git a/src/AST/predicate.c b/src/AST/predicate.cc similarity index 87% rename from src/AST/predicate.c rename to src/AST/predicate.cc index 0e0238a..dfc8596 100644 --- a/src/AST/predicate.c +++ b/src/AST/predicate.cc @@ -4,7 +4,7 @@ #include "table.h" Predicate *allocPredicateOperator(CompOp op, Set **domain, uint numDomain) { - PredicateOperator *This = ourmalloc(sizeof(PredicateOperator)); + PredicateOperator *This = (PredicateOperator *)ourmalloc(sizeof(PredicateOperator)); GETPREDICATETYPE(This) = OPERATORPRED; initArrayInitSet(&This->domains, domain, numDomain); This->op = op; @@ -13,7 +13,7 @@ Predicate *allocPredicateOperator(CompOp op, Set **domain, uint numDomain) { Predicate *allocPredicateTable(Table *table, UndefinedBehavior undefBehavior) { ASSERT(table->range == NULL); - PredicateTable *This = ourmalloc(sizeof(PredicateTable)); + PredicateTable *This = (PredicateTable *) ourmalloc(sizeof(PredicateTable)); GETPREDICATETYPE(This) = TABLEPRED; This->table = table; This->undefinedbehavior = undefBehavior; diff --git a/src/AST/rewriter.c b/src/AST/rewriter.cc similarity index 100% rename from src/AST/rewriter.c rename to src/AST/rewriter.cc diff --git a/src/AST/set.c b/src/AST/set.cc similarity index 100% rename from src/AST/set.c rename to src/AST/set.cc diff --git a/src/AST/table.c b/src/AST/table.cc similarity index 100% rename from src/AST/table.c rename to src/AST/table.cc diff --git a/src/AST/tableentry.c b/src/AST/tableentry.cc similarity index 100% rename from src/AST/tableentry.c rename to src/AST/tableentry.cc diff --git a/src/Backend/cnfexpr.c b/src/Backend/cnfexpr.cc similarity index 95% rename from src/Backend/cnfexpr.c rename to src/Backend/cnfexpr.cc index ae1104f..1aa6cf0 100644 --- a/src/Backend/cnfexpr.c +++ b/src/Backend/cnfexpr.cc @@ -43,7 +43,7 @@ VectorImpl(LitVector, LitVector *, 4) static inline uint boundedSize(uint x) { return (x > MERGESIZE) ? MERGESIZE : x; } LitVector *allocLitVector() { - LitVector *This = ourmalloc(sizeof(LitVector)); + LitVector *This = (LitVector *)ourmalloc(sizeof(LitVector)); initLitVector(This); return This; } @@ -51,14 +51,14 @@ LitVector *allocLitVector() { void initLitVector(LitVector *This) { This->size = 0; This->capacity = LITCAPACITY; - This->literals = ourmalloc(This->capacity * sizeof(Literal)); + This->literals = (Literal *)ourmalloc(This->capacity * sizeof(Literal)); } LitVector *cloneLitVector(LitVector *orig) { - LitVector *This = ourmalloc(sizeof(LitVector)); + LitVector *This = (LitVector *)ourmalloc(sizeof(LitVector)); This->size = orig->size; This->capacity = orig->capacity; - This->literals = ourmalloc(This->capacity * sizeof(Literal)); + This->literals = (Literal *)ourmalloc(This->capacity * sizeof(Literal)); memcpy(This->literals, orig->literals, sizeof(Literal) * This->size); return This; } @@ -102,7 +102,7 @@ void addLiteralLitVector(LitVector *This, Literal l) { } if ((++This->size) >= This->capacity) { This->capacity <<= 1; - This->literals = ourrealloc(This->literals, This->capacity * sizeof(Literal)); + This->literals = (Literal *) ourrealloc(This->literals, This->capacity * sizeof(Literal)); } if (vec_size < MERGESIZE) { @@ -114,7 +114,7 @@ void addLiteralLitVector(LitVector *This, Literal l) { } CNFExpr *allocCNFExprBool(bool isTrue) { - CNFExpr *This = ourmalloc(sizeof(CNFExpr)); + CNFExpr *This = (CNFExpr *)ourmalloc(sizeof(CNFExpr)); This->litSize = 0; This->isTrue = isTrue; initVectorLitVector(&This->clauses, 2); @@ -123,7 +123,7 @@ CNFExpr *allocCNFExprBool(bool isTrue) { } CNFExpr *allocCNFExprLiteral(Literal l) { - CNFExpr *This = ourmalloc(sizeof(CNFExpr)); + CNFExpr *This = (CNFExpr *)ourmalloc(sizeof(CNFExpr)); This->litSize = 1; This->isTrue = false; initVectorLitVector(&This->clauses, 2); @@ -290,8 +290,8 @@ void disjoinCNFLit(CNFExpr *This, Literal l) { #define MERGETHRESHOLD 2 LitVector *mergeLitVectors(LitVector *This, LitVector *expr) { uint maxsize = This->size + expr->size + MERGETHRESHOLD; - LitVector *merged = ourmalloc(sizeof(LitVector)); - merged->literals = ourmalloc(sizeof(Literal) * maxsize); + LitVector *merged = (LitVector *)ourmalloc(sizeof(LitVector)); + merged->literals = (Literal *)ourmalloc(sizeof(Literal) * maxsize); merged->capacity = maxsize; uint thisSize = boundedSize(This->size); uint exprSize = boundedSize(expr->size); @@ -372,7 +372,7 @@ void disjoinCNFExpr(CNFExpr *This, CNFExpr *expr, bool destroy) { /** Handle the full cross product */ uint mergeIndex = 0; uint newCapacity = getClauseSizeCNF(This) * getClauseSizeCNF(expr); - LitVector **mergeArray = ourmalloc(newCapacity * sizeof(LitVector *)); + LitVector **mergeArray = (LitVector **)ourmalloc(newCapacity * sizeof(LitVector *)); uint singleIndex = 0; /** First do the singleton, clause pairs */ for (uint i = 0; i < getSizeLitVector(&This->singletons); i++) { diff --git a/src/Backend/constraint.c b/src/Backend/constraint.cc similarity index 99% rename from src/Backend/constraint.c rename to src/Backend/constraint.cc index c7cac98..a339988 100644 --- a/src/Backend/constraint.c +++ b/src/Backend/constraint.cc @@ -48,11 +48,11 @@ Edge E_NULL = {(Node *)NULL}; CNF *createCNF() { - CNF *cnf = ourmalloc(sizeof(CNF)); + CNF *cnf = (CNF *) ourmalloc(sizeof(CNF)); cnf->varcount = 1; cnf->capacity = DEFAULT_CNF_ARRAY_SIZE; cnf->mask = cnf->capacity - 1; - cnf->node_array = ourcalloc(1, sizeof(Node *) * cnf->capacity); + cnf->node_array = (Node **) ourcalloc(1, sizeof(Node *) * cnf->capacity); cnf->size = 0; cnf->maxsize = (uint)(((double)cnf->capacity) * LOAD_FACTOR); cnf->enableMatching = true; @@ -77,7 +77,7 @@ void deleteCNF(CNF *cnf) { void resizeCNF(CNF *cnf, uint newCapacity) { Node **old_array = cnf->node_array; - Node **new_array = ourcalloc(1, sizeof(Node *) * newCapacity); + Node **new_array = (Node **) ourcalloc(1, sizeof(Node *) * newCapacity); uint oldCapacity = cnf->capacity; uint newMask = newCapacity - 1; for (uint i = 0; i < oldCapacity; i++) { @@ -362,7 +362,7 @@ void countConstraint(CNF *cnf, VectorEdge *stack, Edge eroot) { if (getExpanded(n, polarity)) { if (n->flags.type == NodeType_IFF || n->flags.type == NodeType_ITE) { - Edge pExp = {n->ptrAnnot[polarity]}; + Edge pExp = {(Node *)n->ptrAnnot[polarity]}; getNodePtrFromEdge(pExp)->intAnnot[0]++; } else { n->intAnnot[polarity]++; diff --git a/src/Backend/inc_solver.c b/src/Backend/inc_solver.cc similarity index 100% rename from src/Backend/inc_solver.c rename to src/Backend/inc_solver.cc diff --git a/src/Backend/orderelement.c b/src/Backend/orderelement.cc similarity index 100% rename from src/Backend/orderelement.c rename to src/Backend/orderelement.cc diff --git a/src/Backend/orderpair.c b/src/Backend/orderpair.cc similarity index 100% rename from src/Backend/orderpair.c rename to src/Backend/orderpair.cc diff --git a/src/Backend/satelemencoder.c b/src/Backend/satelemencoder.cc similarity index 98% rename from src/Backend/satelemencoder.c rename to src/Backend/satelemencoder.cc index 5beae4f..5aaa162 100644 --- a/src/Backend/satelemencoder.c +++ b/src/Backend/satelemencoder.cc @@ -88,7 +88,7 @@ Edge getElementValueBinaryValueConstraint(SATEncoder *This, Element *element, ui void allocElementConstraintVariables(ElementEncoding *This, uint numVars) { This->numVars = numVars; - This->variables = ourmalloc(sizeof(Edge) * numVars); + This->variables = (Edge *)ourmalloc(sizeof(Edge) * numVars); } void generateBinaryValueEncodingVars(SATEncoder *This, ElementEncoding *encoding) { diff --git a/src/Backend/satencoder.c b/src/Backend/satencoder.cc similarity index 98% rename from src/Backend/satencoder.c rename to src/Backend/satencoder.cc index f5362b8..73998a6 100644 --- a/src/Backend/satencoder.c +++ b/src/Backend/satencoder.cc @@ -16,7 +16,7 @@ //TODO: Should handle sharing of AST Nodes without recoding them a second time SATEncoder *allocSATEncoder(CSolver *solver) { - SATEncoder *This = ourmalloc(sizeof (SATEncoder)); + SATEncoder *This = (SATEncoder *)ourmalloc(sizeof (SATEncoder)); This->solver = solver; This->varcount = 1; This->cnf = createCNF(); diff --git a/src/Backend/satfuncopencoder.c b/src/Backend/satfuncopencoder.cc similarity index 100% rename from src/Backend/satfuncopencoder.c rename to src/Backend/satfuncopencoder.cc diff --git a/src/Backend/satfunctableencoder.c b/src/Backend/satfunctableencoder.cc similarity index 100% rename from src/Backend/satfunctableencoder.c rename to src/Backend/satfunctableencoder.cc diff --git a/src/Backend/satorderencoder.c b/src/Backend/satorderencoder.cc similarity index 100% rename from src/Backend/satorderencoder.c rename to src/Backend/satorderencoder.cc diff --git a/src/Backend/sattranslator.c b/src/Backend/sattranslator.cc similarity index 100% rename from src/Backend/sattranslator.c rename to src/Backend/sattranslator.cc diff --git a/src/Collections/structs.c b/src/Collections/structs.cc similarity index 100% rename from src/Collections/structs.c rename to src/Collections/structs.cc diff --git a/src/Encoders/elementencoding.c b/src/Encoders/elementencoding.cc similarity index 88% rename from src/Encoders/elementencoding.c rename to src/Encoders/elementencoding.cc index 1b0c6b8..dde2692 100644 --- a/src/Encoders/elementencoding.c +++ b/src/Encoders/elementencoding.cc @@ -24,13 +24,13 @@ void deleteElementEncoding(ElementEncoding *This) { } void allocEncodingArrayElement(ElementEncoding *This, uint size) { - This->encodingArray = ourcalloc(1, sizeof(uint64_t) * size); + This->encodingArray = (uint64_t *) ourcalloc(1, sizeof(uint64_t) * size); This->encArraySize = size; } void allocInUseArrayElement(ElementEncoding *This, uint size) { uint bytes = ((size + ((1 << 9) - 1)) >> 6) & ~7;//Depends on size of inUseArray - This->inUseArray = ourcalloc(1, bytes); + This->inUseArray = (uint64_t *) ourcalloc(1, bytes); } void setElementEncodingType(ElementEncoding *This, ElementEncodingType type) { diff --git a/src/Encoders/functionencoding.c b/src/Encoders/functionencoding.cc similarity index 100% rename from src/Encoders/functionencoding.c rename to src/Encoders/functionencoding.cc diff --git a/src/Encoders/naiveencoder.c b/src/Encoders/naiveencoder.cc similarity index 100% rename from src/Encoders/naiveencoder.c rename to src/Encoders/naiveencoder.cc diff --git a/src/Encoders/orderedge.c b/src/Encoders/orderedge.cc similarity index 100% rename from src/Encoders/orderedge.c rename to src/Encoders/orderedge.cc diff --git a/src/Encoders/orderencoder.c b/src/Encoders/orderencoder.cc similarity index 100% rename from src/Encoders/orderencoder.c rename to src/Encoders/orderencoder.cc diff --git a/src/Encoders/orderencoding.c b/src/Encoders/orderencoding.cc similarity index 100% rename from src/Encoders/orderencoding.c rename to src/Encoders/orderencoding.cc diff --git a/src/Encoders/ordergraph.c b/src/Encoders/ordergraph.cc similarity index 99% rename from src/Encoders/ordergraph.c rename to src/Encoders/ordergraph.cc index 32e1350..a6728d6 100644 --- a/src/Encoders/ordergraph.c +++ b/src/Encoders/ordergraph.cc @@ -121,7 +121,7 @@ OrderNode *getOrderNodeFromOrderGraph(OrderGraph *graph, uint64_t id) { } OrderNode *lookupOrderNodeFromOrderGraph(OrderGraph *graph, uint64_t id) { - OrderNode node = {id, NULL, NULL, 0, 0}; + OrderNode node = {id, NULL, NULL, NOTVISITED, 0}; OrderNode *tmp = getHashSetOrderNode(graph->nodes, &node); return tmp; } diff --git a/src/Encoders/ordernode.c b/src/Encoders/ordernode.cc similarity index 100% rename from src/Encoders/ordernode.c rename to src/Encoders/ordernode.cc diff --git a/src/Encoders/polarityassignment.c b/src/Encoders/polarityassignment.cc similarity index 97% rename from src/Encoders/polarityassignment.c rename to src/Encoders/polarityassignment.cc index 3e41380..77d2a06 100644 --- a/src/Encoders/polarityassignment.c +++ b/src/Encoders/polarityassignment.cc @@ -13,11 +13,11 @@ void computePolarities(CSolver *This) { } void updatePolarity(Boolean *This, Polarity polarity) { - This->polarity |= polarity; + This->polarity = (Polarity) (This->polarity | polarity); } void updateMustValue(Boolean *This, BooleanValue value) { - This->boolVal |= value; + This->boolVal = (BooleanValue) (This->boolVal | value); } void computePolarityAndBooleanValue(Boolean *This) { diff --git a/src/Makefile b/src/Makefile index 007705d..7a45513 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,11 +4,11 @@ PHONY += directories MKDIR_P = mkdir -p OBJ_DIR = bin -C_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard Tuner/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.c) +CPP_SOURCES := $(wildcard *.cc) $(wildcard AST/*.cc) $(wildcard Tuner/*.cc) $(wildcard Collections/*.cc) $(wildcard Backend/*.cc) $(wildcard Encoders/*.cc) HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard Tuner/*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h) -OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o) +OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) CFLAGS := -Wall -g -O0 CFLAGS += -IAST -ICollections -IBackend -I. -IEncoders -ITuner @@ -48,7 +48,7 @@ docs: $(C_SOURCES) $(HEADERS) ${OBJ_DIR}/$(LIB_SO): $(OBJECTS) $(CC) -g $(SHARED) -o ${OBJ_DIR}/$(LIB_SO) $+ $(LDFLAGS) -${OBJ_DIR}/%.o: %.c +${OBJ_DIR}/%.o: %.cc $(CC) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable -include $(OBJECTS:%=$OBJ_DIR/.%.d) @@ -67,10 +67,10 @@ tags: ctags -R tabbing: - uncrustify -c C.cfg --no-backup *.c */*.c + uncrustify -c C.cfg --no-backup *.cc */*.cc uncrustify -c C.cfg --no-backup *.h */*.h wc: - wc */*.c */*.h *.c *.h + wc */*.cc */*.h *.cc *.h .PHONY: $(PHONY) diff --git a/src/Test/Makefile b/src/Test/Makefile index be27d60..2c24d58 100644 --- a/src/Test/Makefile +++ b/src/Test/Makefile @@ -1,6 +1,6 @@ BASE := .. -OBJECTS := $(patsubst %.c, ../bin/%, $(wildcard *.c)) +OBJECTS := $(patsubst %.cc, ../bin/%, $(wildcard *.cc)) include $(BASE)/common.mk @@ -12,7 +12,7 @@ all: $(OBJECTS) ../bin/run.sh -include $(DEPS) -../bin/%: %.c +../bin/%: %.cc $(CC) -MMD -MF $(@D)/.$(@F).d -o ../bin/$@ $< $(CPPFLAGS) -L$(BASE)/bin/ -l_cons_comp ../bin/run.sh: run.sh diff --git a/src/Test/buildconstraintstest.c b/src/Test/buildconstraintstest.cc similarity index 100% rename from src/Test/buildconstraintstest.c rename to src/Test/buildconstraintstest.cc diff --git a/src/Test/cnftest.c b/src/Test/cnftest.cc similarity index 100% rename from src/Test/cnftest.c rename to src/Test/cnftest.cc diff --git a/src/Test/elemequalsattest.c b/src/Test/elemequalsattest.cc similarity index 100% rename from src/Test/elemequalsattest.c rename to src/Test/elemequalsattest.cc diff --git a/src/Test/elemequalunsattest.c b/src/Test/elemequalunsattest.cc similarity index 100% rename from src/Test/elemequalunsattest.c rename to src/Test/elemequalunsattest.cc diff --git a/src/Test/funcencodingtest.c b/src/Test/funcencodingtest.cc similarity index 100% rename from src/Test/funcencodingtest.c rename to src/Test/funcencodingtest.cc diff --git a/src/Test/logicopstest.c b/src/Test/logicopstest.cc similarity index 100% rename from src/Test/logicopstest.c rename to src/Test/logicopstest.cc diff --git a/src/Test/ltelemconsttest.c b/src/Test/ltelemconsttest.cc similarity index 100% rename from src/Test/ltelemconsttest.c rename to src/Test/ltelemconsttest.cc diff --git a/src/Test/ordergraphtest.c b/src/Test/ordergraphtest.cc similarity index 100% rename from src/Test/ordergraphtest.c rename to src/Test/ordergraphtest.cc diff --git a/src/Test/ordertest.c b/src/Test/ordertest.cc similarity index 100% rename from src/Test/ordertest.c rename to src/Test/ordertest.cc diff --git a/src/Test/tablefuncencodetest.c b/src/Test/tablefuncencodetest.cc similarity index 100% rename from src/Test/tablefuncencodetest.c rename to src/Test/tablefuncencodetest.cc diff --git a/src/Test/tablepredicencodetest.c b/src/Test/tablepredicencodetest.cc similarity index 100% rename from src/Test/tablepredicencodetest.c rename to src/Test/tablepredicencodetest.cc diff --git a/src/Tuner/tunable.c b/src/Tuner/tunable.cc similarity index 88% rename from src/Tuner/tunable.c rename to src/Tuner/tunable.cc index 237b91c..e0a3201 100644 --- a/src/Tuner/tunable.c +++ b/src/Tuner/tunable.cc @@ -1,7 +1,7 @@ #include "tunable.h" Tuner * allocTuner() { - return ourmalloc(sizeof(Tuner)); + return (Tuner *) ourmalloc(sizeof(Tuner)); } void deleteTuner(Tuner *This) { diff --git a/src/common.c b/src/common.cc similarity index 100% rename from src/common.c rename to src/common.cc diff --git a/src/csolver.c b/src/csolver.cc similarity index 100% rename from src/csolver.c rename to src/csolver.cc -- 2.34.1