src/mess/pile.h
| r1474 | r1475 | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | int pile_vprintf(mess_pile *pile, const char *fmt, va_list args); |
| 41 | | int pile_printf(mess_pile *pile, const char *fmt, ...); |
| 41 | int pile_printf(mess_pile *pile, const char *fmt, ...)/* ATTR_PRINTF(2,3)*/; |
| 42 | 42 | int pile_putc(mess_pile *pile, char c); |
| 43 | 43 | int pile_puts(mess_pile *pile, const char *s); |
| 44 | 44 | |
src/mess/tools/messtest/testmess.c
| r1474 | r1475 | |
| 261 | 261 | { |
| 262 | 262 | nextpos = pos + strlen(&buffer[pos]); |
| 263 | 263 | } |
| 264 | | report_message(MSG_FAILURE, &buffer[pos]); |
| 264 | report_message(MSG_FAILURE, "%s", &buffer[pos]); |
| 265 | 265 | pos = nextpos; |
| 266 | 266 | } |
| 267 | 267 | } |
| r1474 | r1475 | |
| 1011 | 1011 | if (attotime_compare(current_time, time_limit) > 0) |
| 1012 | 1012 | { |
| 1013 | 1013 | state = STATE_ABORTED; |
| 1014 | | report_message(MSG_FAILURE, "Time limit of %.2f seconds exceeded", time_limit); |
| 1014 | report_message(MSG_FAILURE, "Time limit of %s attoseconds exceeded", attotime_string(time_limit, 9)); |
| 1015 | 1015 | return; |
| 1016 | 1016 | } |
| 1017 | 1017 | |
src/mess/tools/messtest/core.h
| r1474 | r1475 | |
| 71 | 71 | |
| 72 | 72 | /* reporting */ |
| 73 | 73 | void error_report(const char *message); |
| 74 | | void error_reportf(const char *fmt, ...); |
| 74 | void error_reportf(const char *fmt, ...) ATTR_PRINTF(1,2); |
| 75 | 75 | void error_missingattribute(const char *attribute); |
| 76 | 76 | void error_outofmemory(void); |
| 77 | 77 | void error_invalidmemregion(const char *s); |
| 78 | 78 | void error_baddevicetype(const char *s); |
| 79 | 79 | |
| 80 | | void report_message(messtest_messagetype_t msgtype, const char *fmt, ...); |
| 80 | void report_message(messtest_messagetype_t msgtype, const char *fmt, ...) ATTR_PRINTF(2,3); |
| 81 | 81 | void report_testcase_begin(const char *testcase_name); |
| 82 | 82 | void report_testcase_ran(int failure); |
| 83 | 83 | |
src/mess/tools/imgtool/imgtool.h
| r1474 | r1475 | |
| 73 | 73 | void imgtool_exit(void); |
| 74 | 74 | const imgtool_module *imgtool_find_module(const char *modulename); |
| 75 | 75 | imgtool_module_features imgtool_get_module_features(const imgtool_module *module); |
| 76 | | void imgtool_warn(const char *format, ...); |
| 76 | void imgtool_warn(const char *format, ...) ATTR_PRINTF(1,2); |
| 77 | 77 | |
| 78 | 78 | /* ----- image management ----- */ |
| 79 | 79 | imgtoolerr_t imgtool_identify_file(const char *filename, imgtool_module **modules, size_t count); |
src/mess/hashfile.c
| r1474 | r1475 | |
| 64 | 64 | |
| 65 | 65 | ***************************************************************************/ |
| 66 | 66 | |
| 67 | static void parse_error(struct hash_parse_state *state, const char *fmt, ...) ATTR_PRINTF(2,3); |
| 68 | |
| 67 | 69 | static void parse_error(struct hash_parse_state *state, const char *fmt, ...) |
| 68 | 70 | { |
| 69 | 71 | char buf[256]; |
| r1474 | r1475 | |
| 82 | 84 | |
| 83 | 85 | static void unknown_tag(struct hash_parse_state *state, const char *tagname) |
| 84 | 86 | { |
| 85 | | parse_error(state, "[%d:%d]: Unknown tag: %s\n", |
| 87 | parse_error(state, "[%lu:%lu]: Unknown tag: %s\n", |
| 86 | 88 | XML_GetCurrentLineNumber(state->parser), |
| 87 | 89 | XML_GetCurrentColumnNumber(state->parser), |
| 88 | 90 | tagname); |
| r1474 | r1475 | |
| 92 | 94 | |
| 93 | 95 | static void unknown_attribute(struct hash_parse_state *state, const char *attrname) |
| 94 | 96 | { |
| 95 | | parse_error(state, "[%d:%d]: Unknown attribute: %s\n", |
| 97 | parse_error(state, "[%lu:%lu]: Unknown attribute: %s\n", |
| 96 | 98 | XML_GetCurrentLineNumber(state->parser), |
| 97 | 99 | XML_GetCurrentColumnNumber(state->parser), |
| 98 | 100 | attrname); |
| r1474 | r1475 | |
| 103 | 105 | static void unknown_attribute_value(struct hash_parse_state *state, |
| 104 | 106 | const char *attrname, const char *attrvalue) |
| 105 | 107 | { |
| 106 | | parse_error(state, "[%d:%d]: Unknown attribute value: %s\n", |
| 108 | parse_error(state, "[%lu:%lu]: Unknown attribute value: %s\n", |
| 107 | 109 | XML_GetCurrentLineNumber(state->parser), |
| 108 | 110 | XML_GetCurrentColumnNumber(state->parser), |
| 109 | 111 | attrvalue); |
| r1474 | r1475 | |
| 320 | 322 | state.done = mame_feof(hashfile->file); |
| 321 | 323 | if (XML_Parse(state.parser, buf, len, state.done) == XML_STATUS_ERROR) |
| 322 | 324 | { |
| 323 | | parse_error(&state, "[%d:%d]: %s\n", |
| 325 | parse_error(&state, "[%lu:%lu]: %s\n", |
| 324 | 326 | XML_GetCurrentLineNumber(state.parser), |
| 325 | 327 | XML_GetCurrentColumnNumber(state.parser), |
| 326 | 328 | XML_ErrorString(XML_GetErrorCode(state.parser))); |
src/mess/drivers/ip22.c
| r1474 | r1475 | |
| 62 | 62 | |
| 63 | 63 | static UINT32 *ip22_mainram; |
| 64 | 64 | |
| 65 | INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3); |
| 66 | |
| 65 | 67 | INLINE void verboselog( int n_level, const char *s_fmt, ... ) |
| 66 | 68 | { |
| 67 | 69 | if( VERBOSE_LEVEL >= n_level ) |
| r1474 | r1475 | |
| 953 | 955 | switch( offset ) |
| 954 | 956 | { |
| 955 | 957 | case 0x0010/4: |
| 956 | | verboselog( 0, "HAL2 Status read: 0x0004\n", 0x0004 ); |
| 958 | verboselog( 0, "HAL2 Status read: 0x0004\n" ); |
| 957 | 959 | return 0x0004; |
| 958 | 960 | break; |
| 959 | 961 | case 0x0020/4: |
| 960 | | verboselog( 0, "HAL2 Revision read: 0x4011\n", 0x4011 ); |
| 962 | verboselog( 0, "HAL2 Revision read: 0x4011\n" ); |
| 961 | 963 | return 0x4011; |
| 962 | 964 | break; |
| 963 | 965 | } |