File: clearhid.c

package info (click to toggle)
icmake 6.22-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,120 kB
  • ctags: 1,045
  • sloc: ansic: 9,241; makefile: 1,138; asm: 126; sh: 124
file content (34 lines) | stat: -rw-r--r-- 892 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
                            C L E A R H I D . C

          Clear hidden function names from the function- and
          global symboltables
*/

#include "iccomp.h"

static void remove_name(register SYMTAB_ *tab)
{
    register unsigned
        index;

    if ((index = looksym(tab)) < tab->n_defined)
    {
        free(tab->symbol[index].name);      /* free the name-memory */
        tab->symbol[index].name =           /* set a dummy name     */
                           xstrdup(nullstring);
    }
}

void clear_hidden()
{
    register int
        index;

    for (index = 0; index < sizeof(hidden) / sizeof(HIDDEN_FUNCTION_); index++)
    {
        strcpy(string, hidden[index].name); /* prepare the lookup-name     */
        remove_name(&funtab);               /* remove the name from funtab */
        remove_name(&global);               /* remove also from global     */
    }
}