From: David Griffith Date: Fri, 28 Apr 2023 04:11:51 +0000 (-0700) Subject: Clarified a bit on the os_fatal() and os_warn() functions that use va_list. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=9970229ca2bb38041dda0c5765331634be6dc60a;p=liskon_frotz.git Clarified a bit on the os_fatal() and os_warn() functions that use va_list. The dumb interface does not use va_list printf functions because I'm not entirely sure if the most primitive of C compilers will support them. For this reason, the core must not call os_fatal() or os_warn() with formatting. For all other interfaces, formatting may be used as long as the implementations of os_fatal() and os_warn() are written to support it. It should be noted here that currently only the SDL interface uses os_warn(). --- diff --git a/src/common/frotz.h b/src/common/frotz.h index 112623c..ccae2de 100644 --- a/src/common/frotz.h +++ b/src/common/frotz.h @@ -879,7 +879,6 @@ void os_display_char(zchar); void os_display_string(const zchar *); void os_draw_picture(int, int, int); void os_erase_area(int, int, int, int, int); -void os_fatal(const char *, ...); void os_finish_with_sample(int); int os_font_data(int, int *, int *); void os_init_screen(void); @@ -909,9 +908,15 @@ int os_storyfile_tell(FILE *); int os_string_width(const zchar *); zword os_to_true_colour (int); void os_init_setup(void); -void os_warn(const char *, ...); void os_quit(int); +/* Don't use string expansions from the core! The dumb interface + * doesn't support it for historical reasons. Suuport in the interfaces is + * optional. + */ +void os_fatal(const char *, ...); +void os_warn(const char *, ...); + /** * Called regularly by the interpreter, at least every few instructions * (only when interpreting: e.g., not when waiting for input).