source: rtems/cpukit/libcsupport/src/assocptrbyname.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

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