moved enum from .h to .c file

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@383 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2024-07-30 13:36:50 +00:00
parent 9d71a86a74
commit fb9bbc7c56
3 changed files with 19 additions and 15 deletions

View File

@ -16,6 +16,23 @@
#include "tree.h"
// type definitions
// values for input_now->state
enum inputstate {
INPUTSTATE_SOF, // start of file (check for hashbang)
INPUTSTATE_NORMAL, // everything's fine
INPUTSTATE_AGAIN, // re-process last byte
INPUTSTATE_SKIPBLANKS, // shrink multiple spaces
INPUTSTATE_LF, // send start-of-line after end-of-statement
INPUTSTATE_CR, // same, but also remember to skip LF
INPUTSTATE_SKIPLF, // skip LF if that's next
INPUTSTATE_COMMENT, // skip characters until newline or EOF
INPUTSTATE_EOB, // send end-of-block after end-of-statement
INPUTSTATE_EOF, // send end-of-file after end-of-statement
};
// Constants
const char FILE_READBINARY[] = "rb";
#define CHAR_LF (10) // line feed (in file)

View File

@ -13,19 +13,6 @@
// type definitions
// values for input component "src.state" (FIXME - try to move this into .c file!)
enum inputstate {
INPUTSTATE_SOF, // start of file (check for hashbang)
INPUTSTATE_NORMAL, // everything's fine
INPUTSTATE_AGAIN, // re-process last byte
INPUTSTATE_SKIPBLANKS, // shrink multiple spaces
INPUTSTATE_LF, // send start-of-line after end-of-statement
INPUTSTATE_CR, // same, but also remember to skip LF
INPUTSTATE_SKIPLF, // skip LF if that's next
INPUTSTATE_COMMENT, // skip characters until newline or EOF
INPUTSTATE_EOB, // send end-of-block after end-of-statement
INPUTSTATE_EOF, // send end-of-file after end-of-statement
};
enum inputsrc {
INPUTSRC_FILE,
INPUTSRC_RAM
@ -38,7 +25,7 @@ struct input {
// the current code initially came from, i.e. it may change during macro execution.
struct location location; // file + line (during RAM reads as well)
enum inputsrc source;
enum inputstate state; // state of input
int state; // state of input (type is really "enum inputstate")
union {
FILE *fd; // file descriptor
char *ram_ptr; // RAM read ptr (loop or macro block)

View File

@ -9,7 +9,7 @@
#define RELEASE "0.97" // update before release FIXME
#define CODENAME "Zem" // update before release
#define CHANGE_DATE "19 Jul" // update before release FIXME
#define CHANGE_DATE "20 Jul" // update before release FIXME
#define CHANGE_YEAR "2024" // update before release
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/"
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME