mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
27 lines
608 B
C
27 lines
608 B
C
|
#include "libc/nexgen32e/kompressor.h"
|
||
|
#include "third_party/python/Modules/unicodedata.h"
|
||
|
/* clang-format off */
|
||
|
/* 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;
|
||
|
}
|