minor cleanup
This commit is contained in:
parent
9293ed0443
commit
3655278bcd
|
@ -1,5 +1,4 @@
|
|||
/* */
|
||||
|
||||
#include "picoc.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 "../interpreter.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include <errno.h>
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
|
||||
#include <errno.h>
|
||||
#include "../interpreter.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* stdlib.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ struct LibraryFunction StringFunctions[] =
|
|||
{StringStrdup, "char *strdup(char *);"},
|
||||
{StringStrtok_r,"char *strtok_r(char *,char *,char **);"},
|
||||
#endif
|
||||
{NULL, NULL }
|
||||
{NULL, NULL }
|
||||
};
|
||||
|
||||
/* creates various system-dependent definitions */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
||||
/* */
|
||||
#include <time.h>
|
||||
#include "../interpreter.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* stdlib.h library */
|
||||
/*#include <stdio.h>*/
|
||||
/*#include <unistd.h>*/
|
||||
/* */
|
||||
#include <limits.h>
|
||||
#include <fcntl.h>
|
||||
#include "../interpreter.h"
|
||||
|
|
|
@ -11,16 +11,24 @@
|
|||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifndef min
|
||||
#define min(x,y) (((x)<(y))?(x):(y))
|
||||
#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 */
|
||||
#define PRINT_SOURCE_POS() { \
|
||||
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"); \
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define DEBUGGER
|
||||
#define USE_READLINE (defined by default for UNIX_HOST)
|
||||
*/
|
||||
#define USE_READLINE
|
||||
|
||||
/* undocumented, but probably useful */
|
||||
#undef DEBUG_HEAP
|
||||
|
@ -62,9 +63,8 @@
|
|||
#ifdef UNIX_HOST
|
||||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
# define USE_READLINE
|
||||
#elif defined(WIN32) /*(predefined on MSVC)*/
|
||||
|
||||
#undef USE_READLINE
|
||||
#else
|
||||
# error ***** A platform must be explicitly defined! *****
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue