Files
nunuhara_xsystem4/hll/OutputLog.c
T
Nunuhara Cabbage d3de009e1d Import CG reading code from xsystem35
Plus a bit of SACT2 implementation, and fix a bug where global arrays
were not initialized properly.
2019-11-15 19:01:08 -08:00

45 lines
1.3 KiB
C

/* Copyright (C) 2019 Nunuhara Cabbage <nunuhara@haniwa.technology>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://gnu.org/licenses/>.
*/
#include <stdio.h>
#include "hll.h"
#include "../utfsjis.h"
hll_warn_unimplemented(OutputLog, Create, 0)
hll_defun(Output, args) {
struct string *s = heap[args[1].i].s;
char *u = sjis2utf(s->text, s->size);
printf("%s", u);
free(u);
hll_return(0);
}
hll_warn_unimplemented(OutputLog, Clear, 0)
hll_warn_unimplemented(OutputLog, Save, 0)
hll_warn_unimplemented(OutputLog, EnableAutoSave, 0)
hll_warn_unimplemented(OutputLog, DisableAutoSave, 0)
hll_deflib(OutputLog) {
hll_export(Create),
hll_export(Output),
hll_export(Clear),
hll_export(Save),
hll_export(EnableAutoSave),
hll_export(DisableAutoSave),
NULL
};