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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [libcsupport/] [src/] [assocnamebad.c] - Blame information for rev 1778

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

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

powered by: WebSVN 2.1.0

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