X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/1cb310e62eaf4422ee298d9d87c35f9dd6b4c71c..a80283a747da0ca5a791dcfc5fe1a6261feecc5c:/csrc/pf_guts.h diff --git a/csrc/pf_guts.h b/csrc/pf_guts.h index 0e34581..80df530 100644 --- a/csrc/pf_guts.h +++ b/csrc/pf_guts.h @@ -23,7 +23,7 @@ ** PFORTH_VERSION changes when PForth is modified and released. ** See README file for version info. */ -#define PFORTH_VERSION "25" +#define PFORTH_VERSION "27" /* ** PFORTH_FILE_VERSION changes when incompatible changes are made @@ -279,6 +279,8 @@ enum cforth_primitive_ids /* Added to support 64 bit operation. */ ID_CELL, ID_CELLS, + /* DELETE-FILE */ + ID_FILE_DELETE, /* If you add a word here, take away one reserved word below. */ #ifdef PF_SUPPORT_FP /* Only reserve space if we are adding FP so that we can detect @@ -297,7 +299,6 @@ enum cforth_primitive_ids ID_RESERVED11, ID_RESERVED12, ID_RESERVED13, - ID_RESERVED14, ID_FP_D_TO_F, ID_FP_FSTORE, ID_FP_FTIMES, @@ -422,26 +423,20 @@ typedef struct pfDictionary_s ucell_t dic_Flags; /* Headers contain pointers to names and dictionary. */ - uint8_t *dic_HeaderBaseUnaligned; + ucell_t dic_HeaderBaseUnaligned; - uint8_t *dic_HeaderBase; - union - { - cell_t *Cell; - uint8_t *Byte; - } dic_HeaderPtr; - uint8_t *dic_HeaderLimit; + ucell_t dic_HeaderBase; + ucell_t dic_HeaderPtr; + ucell_t dic_HeaderLimit; /* Code segment contains tokenized code and data. */ - - uint8_t *dic_CodeBaseUnaligned; - - uint8_t *dic_CodeBase; + ucell_t dic_CodeBaseUnaligned; + ucell_t dic_CodeBase; union { cell_t *Cell; uint8_t *Byte; } dic_CodePtr; - uint8_t *dic_CodeLimit; + ucell_t dic_CodeLimit; } pfDictionary_t; /* Save state of include when nesting files. */ @@ -487,7 +482,7 @@ extern ExecToken gAcceptP_XT; /* XT of ACCEPT */ extern cell_t gDepthAtColon; /* Global variables. */ -extern char *gVarContext; /* Points to last name field. */ +extern cell_t gVarContext; /* Points to last name field. */ extern cell_t gVarState; /* 1 if compiling. */ extern cell_t gVarBase; /* Numeric Base. */ extern cell_t gVarEcho; /* Echo input from file. */ @@ -555,15 +550,15 @@ extern cell_t gIncludeIndex; #define IN_DICS(addr) (IN_CODE_DIC(addr) || IN_NAME_DIC(addr)) /* Address conversion */ -#define ABS_TO_NAMEREL( a ) ((cell_t) (((uint8_t *) a) - NAME_BASE )) -#define ABS_TO_CODEREL( a ) ((cell_t) (((uint8_t *) a) - CODE_BASE )) -#define NAMEREL_TO_ABS( a ) ((char *) (((cell_t) a) + NAME_BASE)) -#define CODEREL_TO_ABS( a ) ((cell_t *) (((cell_t) a) + CODE_BASE)) +#define ABS_TO_NAMEREL( a ) ((cell_t) (((ucell_t) a) - NAME_BASE )) +#define ABS_TO_CODEREL( a ) ((cell_t) (((ucell_t) a) - CODE_BASE )) +#define NAMEREL_TO_ABS( a ) ((ucell_t) (((cell_t) a) + NAME_BASE)) +#define CODEREL_TO_ABS( a ) ((ucell_t) (((cell_t) a) + CODE_BASE)) /* The check for >0 is only needed for CLONE testing. !!! */ #define IsTokenPrimitive(xt) ((xt=0)) -#define FREE_VAR(v) { if (v) { pfFreeMem(v); v = NULL; } } +#define FREE_VAR(v) { if (v) { pfFreeMem((void *)(v)); v = 0; } } #define DATA_STACK_DEPTH (gCurrentTask->td_StackBase - gCurrentTask->td_StackPtr) #define DROP_DATA_STACK (gCurrentTask->td_StackPtr++)