u8g2-copy/tools/ugl/ugl.h

58 lines
989 B
C
Raw Normal View History

2017-07-02 23:00:50 +08:00
/*
proc <name>
*/
#ifndef _UGL_H
#define _UGL_H
#include <stdint.h>
#include <stdarg.h>
2017-07-09 23:37:16 +08:00
#include <stdio.h>
2017-07-02 23:00:50 +08:00
#define UGL_MAX_IDENTIFIER_LEN 63
/* ugl_error.c */
2017-07-09 23:37:16 +08:00
extern int ugl_current_input_line;
extern int ugl_is_suppress_log;
2017-07-02 23:00:50 +08:00
void ugl_err(const char *fmt, ...) __attribute__ ((noreturn));
void ugl_plog(const char *fmt, ...);
2017-07-07 16:10:15 +08:00
void ugl_glog(const char *fmt, ...);
2017-07-02 23:00:50 +08:00
/* ugl_arrays.c */
extern uint16_t ugl_bytecode_len;
void ugl_InitBytecode(void);
void ugl_AddBytecode(uint8_t x);
void ugl_ExecBytecode(void);
void ugl_ResolveSymbols(void);
2017-07-09 23:37:16 +08:00
void ugl_WriteBytecodeCArray(FILE *fp, const char *name);
2017-07-02 23:00:50 +08:00
int ugl_GetLabel(const char *name);
void ugl_SetLabelBytecodePos(const char *name, uint16_t bytecode_pos);
uint16_t ugl_GetLabelBytecodePos(int idx);
2017-07-09 22:13:08 +08:00
/* ugl_parse.c */
2017-07-02 23:00:50 +08:00
2017-07-09 23:37:16 +08:00
uint16_t uglStartNamelessProc(int args);
2017-07-09 22:13:08 +08:00
int ugl_read_line(const char **s);
2017-07-09 23:37:16 +08:00
int uglReadLine(const char **s);
/* ugl_main.c */
2017-07-09 22:13:08 +08:00
int ugl_read_fp(void);
2017-07-02 23:00:50 +08:00
int ugl_read_filename(const char *name);
#endif