source: rtems/cpukit/libcsupport/src/assocnamebad.c @ 692aefe

4.115
Last change on this file since 692aefe was 692aefe, checked in by Ralf Corsépius <ralf.corsepius@…>, on 02/22/12 at 09:00:33

2012-02-22 Ralf Corsépius <ralf.corsepius@…>

  • libcsupport/src/assocnamebad.c: Add #define INSIDE_ASSOC.
  • Property mode set to 100644
File size: 740 bytes
Line 
1/*
2 * assoc.c
3 *      rtems assoc routines
4 *
5 *  $Id$
6 */
7
8#if HAVE_CONFIG_H
9#include "config.h"
10#endif
11
12#define INSIDE_ASSOC
13
14#include <rtems.h>
15#include <rtems/assoc.h>
16
17#include <inttypes.h>
18#include <stdio.h>              /* sprintf */
19
20/*
21 * what to return if a value is not found
22 * this is not reentrant, but it really shouldn't be invoked anyway
23 */
24
25const char *
26rtems_assoc_name_bad(
27#ifdef RTEMS_DEBUG
28    uint32_t   bad_value
29#else
30    uint32_t   bad_value __attribute((unused))
31#endif
32)
33{
34#ifdef RTEMS_DEBUG
35    static char bad_buffer[32];
36
37    sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
38#else
39    static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
40#endif
41    return bad_buffer;
42}
Note: See TracBrowser for help on using the repository browser.