Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/strings.c

    rfc3680e r8ecef91  
    3131 * @{
    3232 */
    33 /** @file Additional string manipulation.
     33/** @file
    3434 */
    3535
     
    4545
    4646/**
    47  * Find first set bit (beginning with the least significant bit).
    4847 *
    49  * @param i Integer in which to look for the first set bit.
    50  * @return Index of first set bit. Bits are numbered starting at one.
     48 * @param i
     49 * @return
    5150 */
    5251int posix_ffs(int i)
     
    8382
    8483/**
    85  * Compare two strings (case-insensitive).
    8684 *
    87  * @param s1 First string to be compared.
    88  * @param s2 Second string to be compared.
    89  * @return Difference of the first pair of inequal characters,
    90  *     or 0 if strings have the same content.
     85 * @param s1
     86 * @param s2
     87 * @return
    9188 */
    9289int posix_strcasecmp(const char *s1, const char *s2)
     
    9693
    9794/**
    98  * Compare part of two strings (case-insensitive).
    9995 *
    100  * @param s1 First string to be compared.
    101  * @param s2 Second string to be compared.
    102  * @param n Maximum number of characters to be compared.
    103  * @return Difference of the first pair of inequal characters,
    104  *     or 0 if strings have the same content.
     96 * @param s1
     97 * @param s2
     98 * @param n
     99 * @return
    105100 */
    106101int posix_strncasecmp(const char *s1, const char *s2, size_t n)
     
    121116
    122117/**
    123  * Compare two memory areas.
    124118 *
    125  * @param mem1 Pointer to the first area to compare.
    126  * @param mem2 Pointer to the second area to compare.
    127  * @param n Common size of both areas.
    128  * @return If n is 0, return zero. If the areas match, return
    129  *     zero. Otherwise return non-zero.
     119 * @param mem1
     120 * @param mem2
     121 * @param n
     122 * @return
    130123 */
    131124int posix_bcmp(const void *mem1, const void *mem2, size_t n)
     
    135128
    136129/**
    137  * Copy bytes in memory with overlapping areas.
    138130 *
    139  * @param src Source area.
    140  * @param dest Destination area.
    141  * @param n Number of bytes to copy.
     131 * @param dest
     132 * @param src
     133 * @param n
    142134 */
    143 void posix_bcopy(const void *src, void *dest, size_t n)
     135void posix_bcopy(const void *dest, void *src, size_t n)
    144136{
    145137        /* Note that memmove has different order of arguments. */
    146         memmove(dest, src, n);
     138        memmove(src, dest, n);
    147139}
    148140
    149141/**
    150  * Reset bytes in memory area to zero.
    151142 *
    152  * @param mem Memory area to be zeroed.
    153  * @param n Number of bytes to reset.
     143 * @param mem
     144 * @param n
    154145 */
    155146void posix_bzero(void *mem, size_t n)
     
    159150
    160151/**
    161  * Scan string for a first occurence of a character.
    162152 *
    163  * @param s String in which to look for the character.
    164  * @param c Character to look for.
    165  * @return Pointer to the specified character on success,
    166  *     NULL pointer otherwise.
     153 * @param s
     154 * @param c
     155 * @return
    167156 */
    168157char *posix_index(const char *s, int c)
     
    172161
    173162/**
    174  * Scan string for a last occurence of a character.
    175  *
    176  * @param s String in which to look for the character.
    177  * @param c Character to look for.
    178  * @return Pointer to the specified character on success,
    179  *     NULL pointer otherwise.
     163 *
     164 * @param s
     165 * @param c
     166 * @return
    180167 */
    181168char *posix_rindex(const char *s, int c)
Note: See TracChangeset for help on using the changeset viewer.