OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [assocnamebad.c] - Blame information for rev 581

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 * assoc.c
3
 *      rtems assoc routines
4
 *
5
 *  $Id: assocnamebad.c,v 1.2 2001-09-27 12:01:15 chris Exp $
6
 */
7
 
8
#include <rtems.h>
9
#include "assoc.h"
10
 
11
#include <stdio.h>              /* sprintf */
12
#include <string.h>             /* strcat, strcmp */
13
 
14
#define STREQ(a,b)      (strcmp((a), (b)) == 0)
15
#define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
16
 
17
/*
18
 * what to return if a value is not found
19
 * this is not reentrant, but it really shouldn't be invoked anyway
20
 */
21
 
22
const char *
23
rtems_assoc_name_bad(
24
    unsigned32 bad_value
25
)
26
{
27
#ifdef RTEMS_DEBUG
28
    static char bad_buffer[32];
29
 
30
    sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
31
#else
32
    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
33
#endif
34
    return bad_buffer;
35
}
36
 
37
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.