minor cleanup

This commit is contained in:
Joseph Poirier 2015-06-10 14:37:21 -05:00
parent 9293ed0443
commit 3655278bcd
12 changed files with 22 additions and 17 deletions

View file

@ -1,5 +1,4 @@
/* */
#include "picoc.h"
#include "interpreter.h"

View file

@ -1,4 +1,4 @@
/* string.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include <ctype.h>
#include "../interpreter.h"

View file

@ -1,4 +1,4 @@
/* string.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include <errno.h>
#include "../interpreter.h"

View file

@ -1,4 +1,4 @@
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include "../interpreter.h"

View file

@ -1,4 +1,4 @@
/* string.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include "../interpreter.h"

View file

@ -1,4 +1,4 @@
/* stdio.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include <errno.h>
#include "../interpreter.h"

View file

@ -1,4 +1,4 @@
/* stdlib.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include "../interpreter.h"

View file

@ -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 */

View file

@ -1,4 +1,4 @@
/* string.h library for large systems - small embedded systems use clibrary.c instead */
/* */
#include <time.h>
#include "../interpreter.h"

View file

@ -1,6 +1,4 @@
/* stdlib.h library */
/*#include <stdio.h>*/
/*#include <unistd.h>*/
/* */
#include <limits.h>
#include <fcntl.h>
#include "../interpreter.h"

View file

@ -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"); \
}

View file

@ -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