Changeset f4338d2 in mainline for generic/src/lib


Ignore:
Timestamp:
2005-11-26T22:48:17Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a8c48241
Parents:
ff3b3197
Message:

Improve kconsole's support for recognition of commands with arguments.
Implement ARG_TYPE_STRING.
Add 'describe' command.
Move kconsole.c to generic/src/console.
Move kconsole.h to generic/include/console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/lib/func.c

    rff3b3197 rf4338d2  
    8383 *
    8484 */
    85 int strcmp(const char *src, const char *dst, size_t len)
     85int strncmp(const char *src, const char *dst, size_t len)
    8686{
    8787        int i;
     
    9696}
    9797
     98/** Copy NULL terminated string.
     99 *
     100 * Copy at most 'len' characters from string 'src' to 'dest'.
     101 * If 'src' is shorter than 'len', '\0' is inserted behind the
     102 * last copied character.
     103 *
     104 * @param src Source string.
     105 * @param dst Destination buffer.
     106 * @param len Size of destination buffer.
     107 */
     108void strncpy(char *dest, const char *src, size_t len)
     109{
     110        int i;
     111        for (i = 0; i < len; i++) {
     112                if (!(dest[i] = src[i]))
     113                        return;
     114        }
     115}
Note: See TracChangeset for help on using the changeset viewer.