6 /* syntax definitions */
8 #define ASM_COMMENT ';'
9 #define ASM_NEWLINE '\n'
13 #define ASM_OP_IMM '$'
14 #define ASM_OP_REG '%'
15 #define ASM_OP_SEP ','
19 #define is_comment(c) (c == ASM_COMMENT)
20 #define is_newline(c) (c == ASM_NEWLINE)
24 #define DEF_LINE_LEN 64
26 /* exported helpers for parsing */
27 char *skip_spaces(char *line
, size_t len
);
28 void remove_comment(char *line
, size_t len
);
29 char *get_line_end(char *line
, size_t len
, int line_nr
);
31 /* exported functions */
32 int file_read_line(FILE *file
, char *line
, size_t len
);
33 FILE *file_open(const char *path
, const char *mode
);
34 FILE *file_open_tmp(char *template);
35 void file_write_bin(const void *ptr
, size_t size
, FILE *stream
);
37 #endif /* _DAS_FILE_H */