From ae23a4ce56fc500ec5bc204c720b6d7f1c656004 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 30 Apr 2024 17:26:28 +0200 Subject: [PATCH] unicode: Deprecate most xmlUCSIs* functions These don't seem to be used by downstream code. --- genUnicode.py | 4 +- include/libxml/xmlunicode.h | 166 +++++++++++++++++++++++++++++++++++- python/generator.py | 5 +- 3 files changed, 171 insertions(+), 4 deletions(-) diff --git a/genUnicode.py b/genUnicode.py index c6e13a85..cf50bfef 100755 --- a/genUnicode.py +++ b/genUnicode.py @@ -373,7 +373,7 @@ static xmlIntFunc for block in bkeys: name = block.replace('-', '') - header.write("XMLPUBFUN int xmlUCSIs%s\t(int code);\n" % name) + header.write("XML_DEPRECATED\nXMLPUBFUN int xmlUCSIs%s\t(int code);\n" % name) output.write("/**\n * xmlUCSIs%s:\n * @code: UCS code point\n" % (name)) output.write(" *\n * Check whether the character is part of %s UCS Block\n"% (block)) @@ -413,7 +413,7 @@ xmlUCSIsBlock(int code, const char *block) { for name in ckeys: ranges = Categories[name] - header.write("XMLPUBFUN int xmlUCSIsCat%s\t(int code);\n" % name) + header.write("XML_DEPRECATED\nXMLPUBFUN int xmlUCSIsCat%s\t(int code);\n" % name) output.write("/**\n * xmlUCSIsCat%s:\n * @code: UCS code point\n" % (name)) output.write(" *\n * Check whether the character is part of %s UCS Category\n"% (name)) diff --git a/include/libxml/xmlunicode.h b/include/libxml/xmlunicode.h index 2e50a49f..b6d795b2 100644 --- a/include/libxml/xmlunicode.h +++ b/include/libxml/xmlunicode.h @@ -7,7 +7,7 @@ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html * using the genUnicode.py Python script. * - * Generation date: Mon Mar 27 11:09:52 2006 + * Generation date: Tue Apr 30 17:30:38 2024 * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt * Author: Daniel Veillard */ @@ -23,172 +23,336 @@ extern "C" { #endif +XML_DEPRECATED XMLPUBFUN int xmlUCSIsAegeanNumbers (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsArabic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsArmenian (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsArrows (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBasicLatin (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBengali (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBlockElements (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBopomofo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBopomofoExtended (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBoxDrawing (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBraillePatterns (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsBuhid (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKCompatibility (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCherokee (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsControlPictures (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCurrencySymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCyrillic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsDeseret (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsDevanagari (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsDingbats (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsEthiopic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGeometricShapes (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGeorgian (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGothic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGreek (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGreekExtended (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGreekandCoptic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGujarati (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsGurmukhi (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHangulJamo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHangulSyllables (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHanunoo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHebrew (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHighSurrogates (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsHiragana (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsIPAExtensions (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKanbun (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKangxiRadicals (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKannada (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKatakana (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKhmer (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsKhmerSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLao (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLatin1Supplement (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLatinExtendedA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLatinExtendedB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLimbu (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsLowSurrogates (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMalayalam (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMathematicalOperators (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMongolian (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMusicalSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsMyanmar (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsNumberForms (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsOgham (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsOldItalic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsOriya (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsOsmanya (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsPrivateUse (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsPrivateUseArea (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsRunic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsShavian (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSinhala (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSmallFormVariants (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSpecials (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsSyriac (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTagalog (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTagbanwa (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTags (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTaiLe (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTamil (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTelugu (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsThaana (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsThai (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsTibetan (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsUgaritic (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsVariationSelectors (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsYiRadicals (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsYiSyllables (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code); XMLPUBFUN int xmlUCSIsBlock (int code, const char *block); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatC (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatCc (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatCf (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatCo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatCs (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatL (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatLl (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatLm (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatLo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatLt (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatLu (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatM (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatMc (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatMe (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatMn (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatN (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatNd (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatNl (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatNo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatP (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPc (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPd (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPe (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPf (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPi (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatPs (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatS (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatSc (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatSk (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatSm (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatSo (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatZ (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatZl (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatZp (int code); +XML_DEPRECATED XMLPUBFUN int xmlUCSIsCatZs (int code); XMLPUBFUN int xmlUCSIsCat (int code, const char *cat); diff --git a/python/generator.py b/python/generator.py index 11f58c73..466a2e68 100755 --- a/python/generator.py +++ b/python/generator.py @@ -492,7 +492,10 @@ def print_function_wrapper(name, output, export, include): # Don't delete the function entry in the caller. return 1 - is_deprecated = name in deprecated_funcs + if name.startswith('xmlUCSIs'): + is_deprecated = name != 'xmlUCSIsBlock' and name != 'xmlUCSIsCat' + else: + is_deprecated = name in deprecated_funcs c_call = "" format=""