nameindex(3) - Linux man page
Name
nameindex - concatenate a name and index with user separator
Synopsys
#include "mut.h" char ∗nameindex(s, i) char ∗s; long i;
Parameters
- s
Pointer to a string
t
Long integer
Description
The nameindex function adds the separator defined by mbk_separ(1), and then the string version of i at the end of string s. This
is not like a strcat(3) of the standard library, because s is not beeing modified.
The string returned has already been put in the names dictionary by a call to namealloc(3).
Return Value
nameindex returns a pointer to a string in the name hash table.
Example
#include "mut.h"
#include "mlo.h"
void a_sig_name(ptsig)
losig_list ∗ptsig;
{
return pt->NAMECHAIN ? (char ∗)(pt->NAMECHAIN->DATA)
: nameindex("mbk_sig", pt->INDEX);
- }
See Also
mbk(1), namealloc(3), mbk_separ(1).