fixed some compile errors

This commit is contained in:
Richard Thier 2024-09-14 12:59:14 +02:00
parent 0bd5940a47
commit 4107f42b53

View File

@ -11,6 +11,7 @@ struct wordstart {
/* char vars[]; // The local variables of the word. */ /* char vars[]; // The local variables of the word. */
/* char data[]; // The "body" of the word - either text source or after processing the threaded code of it (see flags) */ /* char data[]; // The "body" of the word - either text source or after processing the threaded code of it (see flags) */
}; };
typedef struct wordstart wordstart;
enum SLC_SYM_OP { SLC_SYM_SET, SLC_SYM_GET, SLC_SYM_ERASE }; enum SLC_SYM_OP { SLC_SYM_SET, SLC_SYM_GET, SLC_SYM_ERASE };
enum SLC_STACK_OP { SLC_STACK_PUSH, SLC_STACK_POP, SLC_STACK_AT, SLC_STACK_COUNT, SLC_STACK_ERASE }; enum SLC_STACK_OP { SLC_STACK_PUSH, SLC_STACK_POP, SLC_STACK_AT, SLC_STACK_COUNT, SLC_STACK_ERASE };
@ -41,7 +42,7 @@ enum SLC_IO_OP {
* @param word When adding a found word to the symbol table, the key will point to this word * @param word When adding a found word to the symbol table, the key will point to this word
* @returns The word definition stored for the key, or NULL when it is not stored yet or op is SET and there was an error. * @returns The word definition stored for the key, or NULL when it is not stored yet or op is SET and there was an error.
*/ */
typedef wordstart* (*sym)(SLC_SYM_OP op, char *key, wordstart *word); typedef wordstart* (*sym)(enum SLC_SYM_OP op, char *key, wordstart *word);
/** /**
* Function-abstraction for an integer "stack". * Function-abstraction for an integer "stack".
@ -58,7 +59,7 @@ typedef wordstart* (*sym)(SLC_SYM_OP op, char *key, wordstart *word);
* @param param On SLC_STACK_PUSH, this is the element to push onto the stack, in case of SLC_STACK_AT, its the index. * @param param On SLC_STACK_PUSH, this is the element to push onto the stack, in case of SLC_STACK_AT, its the index.
* @return The element at the given stack location in case of SLC_STACK_AT or the count in case of SLC_STACK_COUNT. Can show error! * @return The element at the given stack location in case of SLC_STACK_AT or the count in case of SLC_STACK_COUNT. Can show error!
*/ */
typedef uint32_t (*stack)(SLC_STACK_OP op, uint32_t param); typedef uint32_t (*stack)(enum SLC_STACK_OP op, uint32_t param);
/** /**
* Function-abstraction for an integer "session-storage". * Function-abstraction for an integer "session-storage".
@ -72,7 +73,7 @@ typedef uint32_t (*stack)(SLC_STACK_OP op, uint32_t param);
* @param i Used on SESSION_GET and is the accessor index * @param i Used on SESSION_GET and is the accessor index
* @returns The accessor index in case of ALLOC (0xFFFFFFFF == -1 means error), on get it returns the store BYTE as uint32_t * @returns The accessor index in case of ALLOC (0xFFFFFFFF == -1 means error), on get it returns the store BYTE as uint32_t
*/ */
typedef uint32_t (*session)(SLC_SESSION_OP op, uint32_t i); typedef uint32_t (*session)(enum SLC_SESSION_OP op, uint32_t i);
/** /**
* Function-abstraction for io connectors. * Function-abstraction for io connectors.
@ -93,7 +94,7 @@ typedef uint32_t (*session)(SLC_SESSION_OP op, uint32_t i);
* @param param The name or temporary name or command or the handle pointer parameter depending on op. * @param param The name or temporary name or command or the handle pointer parameter depending on op.
* @returns A handle pointer or pointer to character to read / written or closed/unlocked handle (NULL on errors). Also cmd stdout. * @returns A handle pointer or pointer to character to read / written or closed/unlocked handle (NULL on errors). Also cmd stdout.
*/ */
typedef const char* (*ioconn)(SLC_IO_OP op, const char *param); typedef const char* (*ioconn)(enum SLC_IO_OP op, const char *param);
/** /**
* This function runs the main slc engine over a snippet of code. * This function runs the main slc engine over a snippet of code.
@ -116,9 +117,9 @@ void slc(
ioconn io_connector, ioconn io_connector,
const char *prefix, const char *prefix,
const char *ender, const char *ender,
const char *varprefix, const char *varprefix
) { ) {
// TODO // TODO
} }
#ENDIF /* SLC_H */ #endif /* SLC_H */