Changeset dbbbe75b in mainline for uspace/lib/c


Ignore:
Timestamp:
2018-01-15T21:54:21Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8348846
Parents:
c718bda
Message:

Add missing standard functions to <ctype.h>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ctype.h

    rc718bda rdbbbe75b  
    6161}
    6262
     63static inline int isblank(int c)
     64{
     65        return c == ' ' || c == '\t';
     66}
     67
     68static inline int iscntrl(int c)
     69{
     70        return (c >= 0 && c < 0x20) || c == 0x7E;
     71}
     72
     73static inline int isprint(int c)
     74{
     75        return c >= 0 && c < 0x80 && !iscntrl(c);
     76}
     77
     78static inline int isgraph(int c)
     79{
     80        return isprint(c) && c != ' ';
     81}
     82
    6383static inline int isspace(int c)
    6484{
     
    7595                return 0;
    7696        }
     97}
     98
     99static inline int ispunct(int c)
     100{
     101        return !isspace(c) && !isalnum(c) && isprint(c);
     102}
     103
     104static inline int isxdigit(int c)
     105{
     106        return isdigit(c) ||
     107            (c >= 'a' && c <= 'f') ||
     108            (c >= 'A' && c <= 'F');
    77109}
    78110
Note: See TracChangeset for help on using the changeset viewer.