minor cleanup
This commit is contained in:
parent
9293ed0443
commit
3655278bcd
|
@ -1,5 +1,4 @@
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
#include "picoc.h"
|
#include "picoc.h"
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* stdlib.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
/* */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
/* stdlib.h library */
|
/* */
|
||||||
/*#include <stdio.h>*/
|
|
||||||
/*#include <unistd.h>*/
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
|
@ -11,16 +11,24 @@
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(x,y) (((x)<(y))?(x):(y))
|
#define min(x,y) (((x)<(y))?(x):(y))
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef min
|
||||||
|
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
#define MEM_ALIGN(x) (((x) + sizeof(ALIGN_TYPE) - 1) & ~(sizeof(ALIGN_TYPE)-1))
|
#define MEM_ALIGN(x) (((x) + sizeof(ALIGN_TYPE)-1) & ~(sizeof(ALIGN_TYPE)-1))
|
||||||
|
|
||||||
/* for debugging */
|
/* for debugging */
|
||||||
#define PRINT_SOURCE_POS() { \
|
#define PRINT_SOURCE_POS() { \
|
||||||
PrintSourceTextErrorLine(Parser->pc->CStdOut, \
|
PrintSourceTextErrorLine(Parser->pc->CStdOut, \
|
||||||
Parser->FileName, Parser->SourceText, Parser->Line, Parser->CharacterPos); \
|
Parser->FileName, \
|
||||||
|
Parser->SourceText, \
|
||||||
|
Parser->Line, \
|
||||||
|
Parser->CharacterPos); \
|
||||||
PlatformPrintf(Parser->pc->CStdOut, "\n"); \
|
PlatformPrintf(Parser->pc->CStdOut, "\n"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define DEBUGGER
|
#define DEBUGGER
|
||||||
#define USE_READLINE (defined by default for UNIX_HOST)
|
#define USE_READLINE (defined by default for UNIX_HOST)
|
||||||
*/
|
*/
|
||||||
|
#define USE_READLINE
|
||||||
|
|
||||||
/* undocumented, but probably useful */
|
/* undocumented, but probably useful */
|
||||||
#undef DEBUG_HEAP
|
#undef DEBUG_HEAP
|
||||||
|
@ -62,9 +63,8 @@
|
||||||
#ifdef UNIX_HOST
|
#ifdef UNIX_HOST
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# define USE_READLINE
|
|
||||||
#elif defined(WIN32) /*(predefined on MSVC)*/
|
#elif defined(WIN32) /*(predefined on MSVC)*/
|
||||||
|
#undef USE_READLINE
|
||||||
#else
|
#else
|
||||||
# error ***** A platform must be explicitly defined! *****
|
# error ***** A platform must be explicitly defined! *****
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue