4.104.114.84.95
Last change
on this file since 4de102cc was
9c49db4,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/08/01 at 18:26:44
|
2001-01-08 Ralf Corsepius <corsepiu@…>
- configure.in: Add libc/config.h
- libc/Makefile.am: Add INCLUDES += -I. to pickup config.h
- libc/.cvsignore: Add config.h and stamp-h
- libc/*.c: Add config.h support.
|
-
Property mode set to
100644
|
File size:
788 bytes
|
Rev | Line | |
---|
[1c841bd2] | 1 | /* |
---|
| 2 | * assoc.c |
---|
| 3 | * rtems assoc routines |
---|
| 4 | * |
---|
| 5 | * $Id$ |
---|
| 6 | */ |
---|
| 7 | |
---|
[9c49db4] | 8 | #if HAVE_CONFIG_H |
---|
| 9 | #include "config.h" |
---|
| 10 | #endif |
---|
| 11 | |
---|
[1c841bd2] | 12 | #include <rtems.h> |
---|
[3ba74c73] | 13 | #include <rtems/assoc.h> |
---|
[1c841bd2] | 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 | |
---|
Note: See
TracBrowser
for help on using the repository browser.