Previous 15994 Revisions Next

r1475 Tuesday 1st January, 2008 at 21:51:43 UTC by Nathan Woods
Greater use of ATTR_PRINTF. [Oliver Stoeneberg]
[docs]messnew.txt
[src/mess]hashfile.c pile.h
[src/mess/drivers]ip20.c ip22.c mpf1.c
[src/mess/machine]sgi.c
[src/mess/tools/imgtool]imgtool.h
[src/mess/tools/messdocs]messdocs.c
[src/mess/tools/messtest]core.h testimgt.c testmess.c
[src/mess/video]newport.c

src/mess/pile.h
r1474r1475
3838}
3939
4040int pile_vprintf(mess_pile *pile, const char *fmt, va_list args);
41int pile_printf(mess_pile *pile, const char *fmt, ...);
41int pile_printf(mess_pile *pile, const char *fmt, ...)/* ATTR_PRINTF(2,3)*/;
4242int pile_putc(mess_pile *pile, char c);
4343int pile_puts(mess_pile *pile, const char *s);
4444
src/mess/tools/messdocs/messdocs.c
r1474r1475
2525};
2626
2727
28static void process_error(struct messdocs_state *state, const char *tag, const char *msgfmt, ...)
28static void process_error(struct messdocs_state *state, const char *tag, const char *msgfmt, ...) ATTR_PRINTF(3,4)
2929{
3030   /*va_list va;*/
3131   /*char buf[512];*/
src/mess/tools/messtest/testimgt.c
r1474r1475
3131{
3232   const char *msg;
3333   msg = imgtool_error(err);
34   report_message(MSG_FAILURE, msg);
34   report_message(MSG_FAILURE, "%s", msg);
3535}
3636
3737
src/mess/tools/messtest/testmess.c
r1474r1475
261261      {
262262         nextpos = pos + strlen(&buffer[pos]);
263263      }
264      report_message(MSG_FAILURE, &buffer[pos]);
264      report_message(MSG_FAILURE, "%s", &buffer[pos]);
265265      pos = nextpos;
266266   }
267267}
r1474r1475
10111011   if (attotime_compare(current_time, time_limit) > 0)
10121012   {
10131013      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));
10151015      return;
10161016   }
10171017
src/mess/tools/messtest/core.h
r1474r1475
7171
7272/* reporting */
7373void error_report(const char *message);
74void error_reportf(const char *fmt, ...);
74void error_reportf(const char *fmt, ...) ATTR_PRINTF(1,2);
7575void error_missingattribute(const char *attribute);
7676void error_outofmemory(void);
7777void error_invalidmemregion(const char *s);
7878void error_baddevicetype(const char *s);
7979
80void report_message(messtest_messagetype_t msgtype, const char *fmt, ...);
80void report_message(messtest_messagetype_t msgtype, const char *fmt, ...) ATTR_PRINTF(2,3);
8181void report_testcase_begin(const char *testcase_name);
8282void report_testcase_ran(int failure);
8383
src/mess/tools/imgtool/imgtool.h
r1474r1475
7373void imgtool_exit(void);
7474const imgtool_module *imgtool_find_module(const char *modulename);
7575imgtool_module_features imgtool_get_module_features(const imgtool_module *module);
76void imgtool_warn(const char *format, ...);
76void imgtool_warn(const char *format, ...) ATTR_PRINTF(1,2);
7777
7878/* ----- image management ----- */
7979imgtoolerr_t imgtool_identify_file(const char *filename, imgtool_module **modules, size_t count);
src/mess/video/newport.c
r1474r1475
2929
3030#define VERBOSE_LEVEL ( 0 )
3131
32INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3);
33
3234INLINE void verboselog( int n_level, const char *s_fmt, ... )
3335{
3436   if( VERBOSE_LEVEL >= n_level )
src/mess/machine/sgi.c
r1474r1475
1111
1212#define VERBOSE_LEVEL ( 1 )
1313
14INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3);
15
1416INLINE void verboselog( int n_level, const char *s_fmt, ... )
1517{
1618   if( VERBOSE_LEVEL >= n_level )
src/mess/hashfile.c
r1474r1475
6464
6565***************************************************************************/
6666
67static void parse_error(struct hash_parse_state *state, const char *fmt, ...) ATTR_PRINTF(2,3);
68
6769static void parse_error(struct hash_parse_state *state, const char *fmt, ...)
6870{
6971   char buf[256];
r1474r1475
8284
8385static void unknown_tag(struct hash_parse_state *state, const char *tagname)
8486{
85   parse_error(state, "[%d:%d]: Unknown tag: %s\n",
87   parse_error(state, "[%lu:%lu]: Unknown tag: %s\n",
8688      XML_GetCurrentLineNumber(state->parser),
8789      XML_GetCurrentColumnNumber(state->parser),
8890      tagname);
r1474r1475
9294
9395static void unknown_attribute(struct hash_parse_state *state, const char *attrname)
9496{
95   parse_error(state, "[%d:%d]: Unknown attribute: %s\n",
97   parse_error(state, "[%lu:%lu]: Unknown attribute: %s\n",
9698      XML_GetCurrentLineNumber(state->parser),
9799      XML_GetCurrentColumnNumber(state->parser),
98100      attrname);
r1474r1475
103105static void unknown_attribute_value(struct hash_parse_state *state,
104106   const char *attrname, const char *attrvalue)
105107{
106   parse_error(state, "[%d:%d]: Unknown attribute value: %s\n",
108   parse_error(state, "[%lu:%lu]: Unknown attribute value: %s\n",
107109      XML_GetCurrentLineNumber(state->parser),
108110      XML_GetCurrentColumnNumber(state->parser),
109111      attrvalue);
r1474r1475
320322      state.done = mame_feof(hashfile->file);
321323      if (XML_Parse(state.parser, buf, len, state.done) == XML_STATUS_ERROR)
322324      {
323         parse_error(&state, "[%d:%d]: %s\n",
325         parse_error(&state, "[%lu:%lu]: %s\n",
324326            XML_GetCurrentLineNumber(state.parser),
325327            XML_GetCurrentColumnNumber(state.parser),
326328            XML_ErrorString(XML_GetErrorCode(state.parser)));
src/mess/drivers/mpf1.c
r1474r1475
3838
3939#define VERBOSE_LEVEL ( 0 )
4040
41INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3);
42
4143INLINE void verboselog( int n_level, const char *s_fmt, ... )
4244{
4345   if( VERBOSE_LEVEL >= n_level )
src/mess/drivers/ip22.c
r1474r1475
6262
6363static UINT32 *ip22_mainram;
6464
65INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3);
66
6567INLINE void verboselog( int n_level, const char *s_fmt, ... )
6668{
6769   if( VERBOSE_LEVEL >= n_level )
r1474r1475
953955   switch( offset )
954956   {
955957   case 0x0010/4:
956      verboselog( 0, "HAL2 Status read: 0x0004\n", 0x0004 );
958      verboselog( 0, "HAL2 Status read: 0x0004\n" );
957959      return 0x0004;
958960      break;
959961   case 0x0020/4:
960      verboselog( 0, "HAL2 Revision read: 0x4011\n", 0x4011 );
962      verboselog( 0, "HAL2 Revision read: 0x4011\n" );
961963      return 0x4011;
962964      break;
963965   }
src/mess/drivers/ip20.c
r1474r1475
2828
2929#define VERBOSE_LEVEL ( 2 )
3030
31INLINE void verboselog( int n_level, const char *s_fmt, ... ) ATTR_PRINTF(2,3);
32
3133INLINE void verboselog( int n_level, const char *s_fmt, ... )
3234{
3335   if( VERBOSE_LEVEL >= n_level )
docs/messnew.txt
r1474r1475
3434
3535- Conditional logging cleanups.  [Atari Ace]
3636
37- Greater use of ATTR_PRINTF.  [Oliver Stoeneberg]
3738
3839
40
39410.122
4042
4143New System Drivers Supported (in no particular order):

Previous 15994 Revisions Next


© 1998-2018 The MESS Team