source: rtems/cpukit/libcsupport/src/assocptrbyname.c @ e02d5dd9

4.115
Last change on this file since e02d5dd9 was bcd0ea64, checked in by Alex Ivanov <alexivanov97@…>, on 12/09/12 at 22:55:17

libcsupport: Doxygen enhancement task #2

http://www.google-melange.com/gci/task/view/google/gci2012/8017203

  • Property mode set to 100644
File size: 562 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Associate Pointer by Name
5 *  @ingroup Associativity
6 */
7
8#if HAVE_CONFIG_H
9#include "config.h"
10#endif
11
12#define INSIDE_ASSOC
13
14#include <rtems.h>
15#include <rtems/assoc.h>
16
17#include <string.h>             /* strcat, strcmp */
18
19
20const rtems_assoc_t *rtems_assoc_ptr_by_name(
21  const rtems_assoc_t *ap,
22  const char          *name
23)
24{
25  const rtems_assoc_t *default_ap = 0;
26
27  if (rtems_assoc_is_default(ap))
28    default_ap = ap++;
29
30  for ( ; ap->name; ap++)
31    if (strcmp(ap->name, name) == 0)
32        return ap;
33
34  return default_ap;
35}
Note: See TracBrowser for help on using the repository browser.