rewrite the emulator to use UTF-8 internally

This commit is contained in:
David Hrdlička
2021-03-14 20:35:01 +01:00
parent 56d62de4fe
commit dfbbe08a07
146 changed files with 1507 additions and 1457 deletions

View File

@@ -102,7 +102,7 @@ typedef struct {
void * lpt;
/* Output file name. */
wchar_t filename[1024];
char filename[1024];
/* Printer timeout. */
pc_timer_t pulse_timer;
@@ -143,23 +143,23 @@ typedef struct {
static void
dump_page(prnt_t *dev)
{
wchar_t path[1024];
char path[1024];
uint16_t x, y;
uint8_t ch;
FILE *fp;
/* Create the full path for this file. */
memset(path, 0x00, sizeof(path));
plat_append_filename(path, usr_path, L"printer");
plat_append_filename(path, usr_path, "printer");
if (! plat_dir_check(path))
plat_dir_create(path);
plat_path_slash(path);
wcscat(path, dev->filename);
strcpy(path, dev->filename);
/* Create the file. */
fp = plat_fopen(path, L"a");
fp = plat_fopen(path, "a");
if (fp == NULL) {
//ERRLOG("PRNT: unable to create print page '%ls'\n", path);
//ERRLOG("PRNT: unable to create print page '%s'\n", path);
return;
}
fseek(fp, 0, SEEK_END);
@@ -250,7 +250,7 @@ reset_printer(prnt_t *dev)
dev->page->dirty = 0;
/* Create a file for this page. */
plat_tempfile(dev->filename, NULL, L".txt");
plat_tempfile(dev->filename, NULL, ".txt");
timer_disable(&dev->pulse_timer);
timer_disable(&dev->timeout_timer);