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/assocptrbyremote.c | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 cpukit/libcsupport/src/assocptrbyremote.c (limited to 'cpukit/libcsupport/src/assocptrbyremote.c') diff --git a/cpukit/libcsupport/src/assocptrbyremote.c b/cpukit/libcsupport/src/assocptrbyremote.c new file mode 100644 index 0000000000..4879c2d397 --- /dev/null +++ b/cpukit/libcsupport/src/assocptrbyremote.c @@ -0,0 +1,34 @@ +/* + * assoc.c + * rtems assoc routines + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#define INSIDE_ASSOC + +#include +#include + +#include /* strcat, strcmp */ + +const rtems_assoc_t *rtems_assoc_ptr_by_remote( + const rtems_assoc_t *ap, + uint32_t remote_value +) +{ + const rtems_assoc_t *default_ap = 0; + + if (rtems_assoc_is_default(ap)) + default_ap = ap++; + + for ( ; ap->name; ap++) + if (ap->remote_value == remote_value) + return ap; + + return default_ap; +} -- cgit v1.2.3