Changes in uspace/app/sbi/src/strtab.c [38aaacc2:1faa995] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/strtab.c
r38aaacc2 r1faa995 30 30 * 31 31 * Converts strings to more compact SID (string ID, integer) and back. 32 * (The point is that this deduplicates the strings. Using SID might actually 33 * not be such a big win.) 34 * 35 * The string table is a singleton as there will never be a need for 32 * The string table is not an object as there will never be a need for 36 33 * more than one. 37 *38 * Current implementation uses a linked list and thus it is slow.39 34 */ 40 35 … … 48 43 static list_t str_list; 49 44 50 /** Initialize string table. */51 45 void strtab_init(void) 52 46 { … … 54 48 } 55 49 56 /** Get SID of a string.57 *58 * Return SID of @a str. If @a str is not in the string table yet,59 * it is added and thus a new SID is assigned.60 *61 * @param str String62 * @return SID of @a str.63 */64 50 sid_t strtab_get_sid(const char *str) 65 51 { … … 84 70 } 85 71 86 /** Get string with the given SID.87 *88 * Returns string that has SID @a sid. If no such string exists, this89 * causes a fatal error in the interpreter.90 *91 * @param sid SID of the string.92 * @return Pointer to the string.93 */94 72 char *strtab_get_str(sid_t sid) 95 73 {
Note:
See TracChangeset
for help on using the changeset viewer.