Changeset 883fedc in mainline for uspace/app/sbi/src/strtab.c


Ignore:
Timestamp:
2010-04-23T23:09:56Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37c9fc8
Parents:
80badbe (diff), 6c39a907 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jsvoboda/helenos/sysel. New: generic classes, autoboxing, delegates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/strtab.c

    r80badbe r883fedc  
    3030 *
    3131 * Converts strings to more compact SID (string ID, integer) and back.
    32  * The string table is not an object as there will never be a need for
     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
    3336 * more than one.
     37 *
     38 * Current implementation uses a linked list and thus it is slow.
    3439 */
    3540
     
    4348static list_t str_list;
    4449
     50/** Initialize string table. */
    4551void strtab_init(void)
    4652{
     
    4854}
    4955
     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   String
     62 * @return      SID of @a str.
     63 */
    5064sid_t strtab_get_sid(const char *str)
    5165{
     
    7084}
    7185
     86/** Get string with the given SID.
     87 *
     88 * Returns string that has SID @a sid. If no such string exists, this
     89 * causes a fatal error in the interpreter.
     90 *
     91 * @param sid   SID of the string.
     92 * @return      Pointer to the string.
     93 */
    7294char *strtab_get_str(sid_t sid)
    7395{
Note: See TracChangeset for help on using the changeset viewer.