1 /* Declarations for ident.
2 Copyright (C) 1995, 1996 Markus Armbruster */
4 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
5 ** All rights reserved.
7 ** Authors: Martin Trapp, Christian Schaefer
18 * ident -- identifiers in the firm library
20 * Identifiers are used in the firm library. This is the interface to it.
29 * ident - the abstract data type ident
32 typedef const struct set_entry ident;
35 /****f* ident/id_from_str
38 * id_from_str - store a string and create an ident
40 * ident *id = id_from_str (char *str, int len);
42 * Stores a string in the ident module and returns a handle for the string.
44 * str - the string (or whatever) which shall be stored
45 * len - the length of the data in bytes
47 * id - a handle for the generated ident
49 * id_to_str, id_to_strlen
52 inline ident *id_from_str (char *str, int len);
54 /****f* ident/id_to_str
57 * id_to_str - return a string represented by an ident
59 * char *cp = id_to_str (ident *id);
61 * Returns the string cp represented by id. This string cp is not
68 * id_from_str, id_to_strlen
71 inline const char *id_to_str (ident *id);
73 /****f* ident/id_to_strlen
76 * id_to_strlen - return the length of a string represented by an ident
78 * int len = id_to_strlen (ident *id);
80 * Returns the length of string represented by id.
84 * len - the length of the string
86 * id_from_str, id_to_str
89 inline int id_to_strlen(ident *id);
91 # endif /* _IDENT_H_ */