cosmopolitan/third_party/python/Modules/unicodedata_islinebreak.c
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00

25 lines
585 B
C

#include "libc/nexgen32e/kompressor.h"
#include "third_party/python/Modules/unicodedata.h"
/* GENERATED BY third_party/python/Tools/unicode/makeunicodedata.py 3.2 */
/* Returns 1 for Unicode characters having the line break
* property 'BK', 'CR', 'LF' or 'NL' or having bidirectional
* type 'B', 0 otherwise.
*/
int _PyUnicode_IsLinebreak(Py_UCS4 ch)
{
switch (ch) {
case 0x000A:
case 0x000B:
case 0x000C:
case 0x000D:
case 0x001C:
case 0x001D:
case 0x001E:
case 0x0085:
case 0x2028:
case 0x2029:
return 1;
}
return 0;
}