From d2d8ab6bfc7891bb0380113404c68cf9ce182483 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Sun, 24 Jan 2016 00:10:35 -0800 Subject: [PATCH] rename swab to avoid conflict with string.h --- semanticMisc.c | 4 ++-- semanticMisc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/semanticMisc.c b/semanticMisc.c index 644e264..05efaa4 100644 --- a/semanticMisc.c +++ b/semanticMisc.c @@ -725,7 +725,7 @@ subValueKind(valueType *leftOperand, valueType *rightOperand) } int -swab(int i) +swabInt(int i) { return(((i & 0xFF) << 8) | ((i & 0xFF00) >> 8)); } @@ -733,7 +733,7 @@ swab(int i) valueType * swabValue(valueType *value) { - return(newValue(value->kindOfValue, swab(value->value), value-> + return(newValue(value->kindOfValue, swabInt(value->value), value-> addressMode)); } diff --git a/semanticMisc.h b/semanticMisc.h index 0533c35..e6f9211 100644 --- a/semanticMisc.h +++ b/semanticMisc.h @@ -36,7 +36,7 @@ valueKindType opValueKind(valueType *leftOperand, valueType *rightOperand); bool relocatableValue(valueType *address); valueKindType selectValueKind(valueType *leftOperand, valueType *rightOperand); valueKindType subValueKind(valueType *leftOperand, valueType *rightOperand); -int swab(int i); +int swabInt(int i); valueType *swabValue(valueType *value); valueKindType unopValueKind(valueType *operand); void valueField(symbolTableEntryType *symbol, valueType *value);