From 55568af2e70d7026b57fe54ce14f6980a37c4e08 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 26 Mar 2007 22:31:31 +0000 Subject: 2007-03-26 Joel Sherrill * libcsupport/src/assoc.c, libcsupport/src/libio.c, libcsupport/src/write.c: Split files to shrink minimum.exe. Hopefully this will not be deemed necessary to commit to the 4.7 branch. * libcsupport/src/assoclocalbyname.c, libcsupport/src/assoclocalbyremote.c, libcsupport/src/assoclocalbyremotebitfield.c, libcsupport/src/assocnamebylocal.c, libcsupport/src/assocnamebylocalbitfield.c, libcsupport/src/assocnamebyremote.c, libcsupport/src/assocnamebyremotebitfield.c, libcsupport/src/assocptrbylocal.c, libcsupport/src/assocptrbyname.c, libcsupport/src/assocptrbyremote.c, libcsupport/src/assocremotebylocal.c, libcsupport/src/assocremotebylocalbitfield.c, libcsupport/src/assocremotebyname.c, libcsupport/src/libio_init.c, libcsupport/src/write_r.c: New files. --- cpukit/libcsupport/src/assocnamebylocalbitfield.c | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cpukit/libcsupport/src/assocnamebylocalbitfield.c (limited to 'cpukit/libcsupport/src/assocnamebylocalbitfield.c') diff --git a/cpukit/libcsupport/src/assocnamebylocalbitfield.c b/cpukit/libcsupport/src/assocnamebylocalbitfield.c new file mode 100644 index 0000000000..c9d1fa1256 --- /dev/null +++ b/cpukit/libcsupport/src/assocnamebylocalbitfield.c @@ -0,0 +1,38 @@ +/* + * assoc.c + * rtems assoc routines + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#define INSIDE_ASSOC + +#include +#include + +#include /* strcat, strcmp */ + +char *rtems_assoc_name_by_local_bitfield( + const rtems_assoc_t *ap, + uint32_t value, + char *buffer +) +{ + uint32_t b; + + *buffer = 0; + + for (b = 1; b; b <<= 1) { + if (b & value) { + if (*buffer) + strcat(buffer, " "); + strcat(buffer, rtems_assoc_name_by_local(ap, b)); + } + } + + return buffer; +} -- cgit v1.2.3