Changeset 2b3dd78 in mainline for uspace/lib/posix/src/ctype.c
- Timestamp:
- 2018-01-31T12:02:00Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5595841
- Parents:
- a0a9cc2 (diff), 14d789c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/ctype.c
ra0a9cc2 r2b3dd78 1 1 /* 2 * Copyright (c) 2009 Lukas Mejdrech 2 * Copyright (c) 2011 Jiri Zarevucky 3 * Copyright (c) 2011 Petr Koupy 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup net30 /** @addtogroup libposix 30 31 * @{ 31 32 */ 33 /** @file Character classification. 34 */ 32 35 33 #ifndef __SELF_TEST_H__ 34 #define __SELF_TEST_H__ 36 #include "posix/ctype.h" 35 37 36 extern errno_t self_test(void); 38 /** 39 * Checks whether character is ASCII. (obsolete) 40 * 41 * @param c Character to inspect. 42 * @return Non-zero if character match the definition, zero otherwise. 43 */ 44 int isascii(int c) 45 { 46 return c >= 0 && c < 128; 47 } 37 48 38 #endif 49 /** 50 * Converts argument to a 7-bit ASCII character. (obsolete) 51 * 52 * @param c Character to convert. 53 * @return Coverted character. 54 */ 55 int toascii(int c) 56 { 57 return c & 0x7F; 58 } 39 59 40 60 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.