2016-12-28 20:32:00 +00:00
|
|
|
// ACME - a crossassembler for producing 6502/65c02/65816/65ce02 code.
|
|
|
|
// Copyright (C) 1998-2016 Marco Baye
|
2012-02-27 21:14:46 +00:00
|
|
|
// Have a look at "acme.c" for further info
|
|
|
|
//
|
|
|
|
// Character encoding stuff
|
|
|
|
#ifndef encoding_H
|
|
|
|
#define encoding_H
|
|
|
|
|
|
|
|
|
2017-12-22 22:55:36 +00:00
|
|
|
#include <stdio.h> // for FILE*
|
|
|
|
|
|
|
|
|
2014-12-16 08:21:44 +00:00
|
|
|
//struct encoder;
|
2017-10-16 17:01:44 +00:00
|
|
|
extern const struct encoder *encoder_current; // gets set before each pass TODO - set for each part
|
2014-12-16 08:21:44 +00:00
|
|
|
extern const struct encoder encoder_raw;
|
|
|
|
extern const struct encoder encoder_pet;
|
|
|
|
extern const struct encoder encoder_scr;
|
|
|
|
extern const struct encoder encoder_file;
|
|
|
|
extern char *encoding_loaded_table; // ...loaded from file
|
|
|
|
|
|
|
|
|
2014-12-04 23:58:00 +00:00
|
|
|
// prototypes
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
// convert character using current encoding
|
2014-12-16 08:21:44 +00:00
|
|
|
extern char encoding_encode_char(char byte);
|
2014-12-04 23:58:00 +00:00
|
|
|
// set "raw" as default encoding
|
|
|
|
extern void encoding_passinit(void);
|
2014-12-16 08:21:44 +00:00
|
|
|
// try to load encoding table from given file
|
2017-12-22 22:55:36 +00:00
|
|
|
extern void encoding_load_from_file(char target[256], FILE *stream);
|
2014-12-16 08:21:44 +00:00
|
|
|
// lookup encoder held in DynaBuf and return its struct pointer (or NULL on failure)
|
|
|
|
extern const struct encoder *encoding_find(void);
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|