Changeset d8e3467 in mainline for uspace/lib/c/generic/arg_parse.c


Ignore:
Timestamp:
2010-04-18T00:22:35Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9dae191e
Parents:
c39a103
Message:

rename arg_short_long() to arg_parse_short_long() and move it to libc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/arg_parse.c

    rc39a103 rd8e3467  
    3434#include <errno.h>
    3535#include <str.h>
     36
     37int arg_parse_short_long(const char *arg, const char *ashort, const char *along)
     38{
     39        if (str_cmp(arg, ashort) == 0)
     40                return 0;
     41       
     42        if (str_lcmp(arg, along, str_length(along)) == 0)
     43                return str_length(along);
     44       
     45        return -1;
     46}
    3647
    3748/** Parse the next argument as an integer.
Note: See TracChangeset for help on using the changeset viewer.