1NAMEINDEX(3)                 MBK UTILITY FUNCTIONS                NAMEINDEX(3)
2
3
4

NAME

6       nameindex - concatenate a name and index with user separator
7

SYNOPSIS

9       #include "mut.h"
10       char ∗nameindex(s, i)
11       char ∗s;
12       long i;
13

PARAMETERS

15       s                   Pointer to a string
16
17       t                   Long integer
18

DESCRIPTION

20       The  nameindex function adds the separator defined by MBK_SEPAR(1), and
21       then the string version of i at the end of string s.  This is not  like
22       a strcat(3) of the standard library, because s is not being modified.
23       The  string  returned has already been put in the names dictionary by a
24       call to namealloc(3).
25

RETURN VALUE

27       nameindex returns a pointer to a string in the name hash table.
28

EXAMPLE

30       #include "mut.h"
31       #include "mlo.h"
32       void a_sig_name(ptsig)
33       losig_list ∗ptsig;
34       {
35          return pt->NAMECHAIN ? (char ∗)(pt->NAMECHAIN->DATA)
36                   : nameindex("mbk_sig", pt->INDEX);
37       }
38

SEE ALSO

40       mbk(1), namealloc(3), MBK_SEPAR(1).
41
42
43
44
45
46
47ASIM/LIP6                       October 1, 1997                   NAMEINDEX(3)
Impressum