diff options
Diffstat (limited to 'engines/glk/adrift/sxprotos.h')
-rw-r--r-- | engines/glk/adrift/sxprotos.h | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/engines/glk/adrift/sxprotos.h b/engines/glk/adrift/sxprotos.h index 6591b5d820..57ce5f392f 100644 --- a/engines/glk/adrift/sxprotos.h +++ b/engines/glk/adrift/sxprotos.h @@ -41,11 +41,10 @@ namespace Adrift { typedef Common::SeekableReadStream *sx_script; /* Typedef representing a test descriptor. */ -typedef struct sx_test_descriptor_s -{ - const sc_char *name; - sc_game game; - sx_script script; +typedef struct sx_test_descriptor_s { + const sc_char *name; + sc_game game; + sx_script script; } sx_test_descriptor_t; /* @@ -54,58 +53,58 @@ typedef struct sx_test_descriptor_s * checks. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -extern void sx_trace (const sc_char *format, ...) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void sx_error (const sc_char *format, ...) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void sx_fatal (const sc_char *format, ...) - __attribute__ ((__format__ (__printf__, 1, 2))); +extern void sx_trace(const sc_char *format, ...) +__attribute__((__format__(__printf__, 1, 2))); +extern void sx_error(const sc_char *format, ...) +__attribute__((__format__(__printf__, 1, 2))); +extern void sx_fatal(const sc_char *format, ...) +__attribute__((__format__(__printf__, 1, 2))); #else -extern void sx_trace (const sc_char *format, ...); -extern void sx_error (const sc_char *format, ...); -extern void sx_fatal (const sc_char *format, ...); +extern void sx_trace(const sc_char *format, ...); +extern void sx_error(const sc_char *format, ...); +extern void sx_fatal(const sc_char *format, ...); #endif -extern void *sx_malloc (size_t size); -extern void *sx_realloc (void *pointer, size_t size); -extern void sx_free (void *pointer); +extern void *sx_malloc(size_t size); +extern void *sx_realloc(void *pointer, size_t size); +extern void sx_free(void *pointer); extern Common::SeekableReadStream *sx_fopen(const sc_char *name, - const sc_char *extension, const sc_char *mode); -extern sc_char *sx_trim_string (sc_char *string); -extern sc_char *sx_normalize_string (sc_char *string); + const sc_char *extension, const sc_char *mode); +extern sc_char *sx_trim_string(sc_char *string); +extern sc_char *sx_normalize_string(sc_char *string); /* OS stub hooks controller functions. */ -extern void stub_attach_handlers (sc_bool (*read_line) (sc_char *, sc_int), - void (*print_string) (const sc_char *), - void *(*open_file) (sc_bool), - sc_int (*read_file) - (void*, sc_byte*, sc_int), - void (*write_file) - (void*, const sc_byte*, sc_int), - void (*close_file) (void*)); -extern void stub_detach_handlers (void); -extern void stub_debug_trace (sc_bool flag); +extern void stub_attach_handlers(sc_bool(*read_line)(sc_char *, sc_int), + void (*print_string)(const sc_char *), + void *(*open_file)(sc_bool), + sc_int(*read_file) + (void *, sc_byte *, sc_int), + void (*write_file) + (void *, const sc_byte *, sc_int), + void (*close_file)(void *)); +extern void stub_detach_handlers(void); +extern void stub_debug_trace(sc_bool flag); /* Test controller function. */ -extern sc_int test_run_game_tests (const sx_test_descriptor_t tests[], - sc_int count, sc_bool is_verbose); +extern sc_int test_run_game_tests(const sx_test_descriptor_t tests[], + sc_int count, sc_bool is_verbose); /* Globbing function. */ -extern sc_bool glob_match (const sc_char *pattern, const sc_char *string); +extern sc_bool glob_match(const sc_char *pattern, const sc_char *string); /* Script running and checking functions. */ -extern void scr_test_failed (const sc_char *format, const sc_char *string); -extern void scr_set_verbose (sc_bool flag); -extern void scr_start_script (sc_game game, Common::SeekableReadStream *script); -extern sc_int scr_finalize_script (void); +extern void scr_test_failed(const sc_char *format, const sc_char *string); +extern void scr_set_verbose(sc_bool flag); +extern void scr_start_script(sc_game game, Common::SeekableReadStream *script); +extern sc_int scr_finalize_script(void); /* Serialization helper for script running and checking. */ -extern void *file_open_file_callback (sc_bool is_save); -extern sc_int file_read_file_callback (void *opaque, - sc_byte *buffer, sc_int length); -extern void file_write_file_callback (void *opaque, - const sc_byte *buffer, sc_int length); -extern void file_close_file_callback (void *opaque); -extern void file_cleanup (void); +extern void *file_open_file_callback(sc_bool is_save); +extern sc_int file_read_file_callback(void *opaque, + sc_byte *buffer, sc_int length); +extern void file_write_file_callback(void *opaque, + const sc_byte *buffer, sc_int length); +extern void file_close_file_callback(void *opaque); +extern void file_cleanup(void); } // End of namespace Adrift } // End of namespace Glk |