Changeset 38aaacc2 in mainline for uspace/app/sbi/src/os


Ignore:
Timestamp:
2010-04-23T21:41:10Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4f866c
Parents:
074444f
Message:

Update SBI to rev. 207.

Location:
uspace/app/sbi/src/os
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/os/helenos.c

    r074444f r38aaacc2  
    4747static tinput_t *tinput = NULL;
    4848
    49 /** Concatenate two strings. */
     49/** Concatenate two strings.
     50 *
     51 * @param a     First string
     52 * @param b     Second string
     53 * @return      New string, concatenation of @a a and @a b.
     54 */
    5055char *os_str_acat(const char *a, const char *b)
    5156{
     
    6974}
    7075
    71 /** Compare two strings. */
     76/** Compare two strings.
     77 *
     78 * @param a     First string
     79 * @param b     Second string
     80 * @return      Zero if equal, nonzero if not equal
     81 */
    7282int os_str_cmp(const char *a, const char *b)
    7383{
     
    7585}
    7686
    77 /** Return number of characters in string. */
     87/** Return number of characters in string.
     88 *
     89 * @param str   String
     90 * @return      Number of characters in @a str.
     91 */
    7892size_t os_str_length(const char *str)
    7993{
     
    8195}
    8296
    83 /** Duplicate string. */
     97/** Duplicate string.
     98 *
     99 * @param str   String
     100 * @return      New string, duplicate of @a str.
     101 */
    84102char *os_str_dup(const char *str)
    85103{
     
    87105}
    88106
    89 /** Get character from string at the given index. */
     107/** Get character from string at the given index.
     108 *
     109 * @param str           String
     110 * @param index         Character index (starting from zero).
     111 * @param out_char      Place to store character.
     112 * @return              EOK on success, EINVAL if index is out of bounds,
     113 *                      EIO on decoding error.
     114 */
    90115int os_str_get_char(const char *str, int index, int *out_char)
    91116{
     
    116141}
    117142
    118 /** Read one line of input from the user. */
     143/** Read one line of input from the user.
     144 *
     145 * @param ptr   Place to store pointer to new string.
     146 */
    119147int os_input_line(char **ptr)
    120148{
     
    147175}
    148176
    149 /** Simple command execution. */
     177/** Simple command execution.
     178 *
     179 * @param cmd   Command and arguments (NULL-terminated list of strings.)
     180 *              Command is present just one, not duplicated.
     181 */
    150182int os_exec(char *const cmd[])
    151183{
     
    166198}
    167199
    168 /** Store the executable file path via which we were executed. */
     200/** Store the executable file path via which we were executed.
     201 *
     202 * @param path  Executable path via which we were executed.
     203 */
    169204void os_store_ef_path(char *path)
    170205{
  • uspace/app/sbi/src/os/os.h

    r074444f r38aaacc2  
    3737void os_input_disp_help(void);
    3838int os_input_line(char **ptr);
    39 int os_exec(char *const cmd[]);
     39int os_exec(char * const cmd[]);
    4040
    4141void os_store_ef_path(char *path);
  • uspace/app/sbi/src/os/posix.c

    r074444f r38aaacc2  
    4747 * The string functions are in fact standard C, but would not work under
    4848 * HelenOS.
    49  */
    50 
    51 /** Concatenate two strings. */
     49 *
     50 * XXX String functions used here only work with 8-bit text encoding.
     51 */
     52
     53/** Concatenate two strings.
     54 *
     55 * @param a     First string
     56 * @param b     Second string
     57 * @return      New string, concatenation of @a a and @a b.
     58 */
    5259char *os_str_acat(const char *a, const char *b)
    5360{
     
    7178}
    7279
    73 /** Compare two strings. */
     80/** Compare two strings.
     81 *
     82 * @param a     First string
     83 * @param b     Second string
     84 * @return      Zero if equal, nonzero if not equal
     85 */
    7486int os_str_cmp(const char *a, const char *b)
    7587{
     
    7789}
    7890
    79 /** Return number of characters in string. */
     91/** Return number of characters in string.
     92 *
     93 * @param str   String
     94 * @return      Number of characters in @a str.
     95 */
    8096size_t os_str_length(const char *str)
    8197{
     
    8399}
    84100
    85 /** Duplicate string. */
     101/** Duplicate string.
     102 *
     103 * @param str   String
     104 * @return      New string, duplicate of @a str.
     105 */
    86106char *os_str_dup(const char *str)
    87107{
     
    89109}
    90110
    91 /** Get character from string at the given index. */
     111/** Get character from string at the given index.
     112 *
     113 * @param str           String
     114 * @param index         Character index (starting from zero).
     115 * @param out_char      Place to store character.
     116 * @return              EOK on success, EINVAL if index is out of bounds,
     117 *                      EIO on decoding error.
     118 */
    92119int os_str_get_char(const char *str, int index, int *out_char)
    93120{
     
    111138}
    112139
    113 /** Read one line of input from the user. */
     140/** Read one line of input from the user.
     141 *
     142 * @param ptr   Place to store pointer to new string.
     143 */
    114144int os_input_line(char **ptr)
    115145{
     
    126156}
    127157
    128 /** Simple command execution. */
     158/** Simple command execution.
     159 *
     160 * @param cmd   Command and arguments (NULL-terminated list of strings.)
     161 *              Command is present just one, not duplicated.
     162 */
    129163int os_exec(char *const cmd[])
    130164{
     
    157191}
    158192
    159 /** Store the executable file path via which we were executed. */
     193/** Store the executable file path via which we were executed.
     194 *
     195 * @param path  Executable path via which we were executed.
     196 */
    160197void os_store_ef_path(char *path)
    161198{
Note: See TracChangeset for help on using the changeset viewer.