Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/mujs/utf.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 /* | |
| 2 * The authors of this software are Rob Pike and Ken Thompson. | |
| 3 * Copyright (c) 2002 by Lucent Technologies. | |
| 4 * Permission to use, copy, modify, and distribute this software for any | |
| 5 * purpose without fee is hereby granted, provided that this entire notice | |
| 6 * is included in all copies of any software which is or includes a copy | |
| 7 * or modification of this software and in all copies of the supporting | |
| 8 * documentation for such software. | |
| 9 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED | |
| 10 * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE | |
| 11 * ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY | |
| 12 * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. | |
| 13 */ | |
| 14 #ifndef js_utf_h | |
| 15 #define js_utf_h | |
| 16 | |
| 17 typedef int Rune; /* 32 bits */ | |
| 18 | |
| 19 #define chartorune jsU_chartorune | |
| 20 #define runetochar jsU_runetochar | |
| 21 #define runelen jsU_runelen | |
| 22 | |
| 23 #define isalpharune jsU_isalpharune | |
| 24 #define islowerrune jsU_islowerrune | |
| 25 #define isupperrune jsU_isupperrune | |
| 26 #define tolowerrune jsU_tolowerrune | |
| 27 #define toupperrune jsU_toupperrune | |
| 28 | |
| 29 enum | |
| 30 { | |
| 31 UTFmax = 4, /* maximum bytes per rune */ | |
| 32 Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ | |
| 33 Runeself = 0x80, /* rune and UTF sequences are the same (<) */ | |
| 34 Runeerror = 0xFFFD, /* decoding error in UTF */ | |
| 35 Runemax = 0x10FFFF, /* maximum rune value */ | |
| 36 }; | |
| 37 | |
| 38 int chartorune(Rune *rune, const char *str); | |
| 39 int runetochar(char *str, const Rune *rune); | |
| 40 int runelen(int c); | |
| 41 | |
| 42 int isalpharune(Rune c); | |
| 43 int islowerrune(Rune c); | |
| 44 int isupperrune(Rune c); | |
| 45 Rune tolowerrune(Rune c); | |
| 46 Rune toupperrune(Rune c); | |
| 47 | |
| 48 #endif |
