@@ -2030,55 +2030,6 @@ MC_DLLEXPORT extern MCNumberRef kMCMinusOne;
20302030#define DBL_INT_MAX (1LL << DBL_MANT_DIG) /* the maximum integer faithfully representable by a double */
20312031#define DBL_INT_MIN (-DBL_INT_MAX) /* the minimum integer faithfully representable by a double */
20322032
2033-
2034- // //////////////////////////////////////////////////////////////////////////////
2035- //
2036- // NAME DEFINITIONS
2037- //
2038-
2039- // Like MCSTR but for NameRefs
2040- MC_DLLEXPORT MCNameRef MCNAME (const char *);
2041-
2042- // Create a name using the given string.
2043- MC_DLLEXPORT bool MCNameCreate (MCStringRef string, MCNameRef& r_name);
2044- // Create a name using chars.
2045- MC_DLLEXPORT bool MCNameCreateWithChars (const unichar_t *chars, uindex_t count, MCNameRef& r_name);
2046- // Create a name using native chars.
2047- MC_DLLEXPORT bool MCNameCreateWithNativeChars (const char_t *chars, uindex_t count, MCNameRef& r_name);
2048-
2049- // Create a name using the given string, releasing the original.
2050- MC_DLLEXPORT bool MCNameCreateAndRelease (MCStringRef string, MCNameRef& r_name);
2051-
2052- // Looks for an existing name matching the given string.
2053- MC_DLLEXPORT MCNameRef MCNameLookupCaseless (MCStringRef string);
2054-
2055- // Returns a unsigned integer which can be used to order a table for a binary
2056- // search.
2057- MC_DLLEXPORT uintptr_t MCNameGetCaselessSearchKey (MCNameRef name);
2058-
2059- // Returns the string content of the name.
2060- MC_DLLEXPORT MCStringRef MCNameGetString (MCNameRef name);
2061-
2062- // Returns true if the given name is the empty name.
2063- MC_DLLEXPORT bool MCNameIsEmpty (MCNameRef name);
2064-
2065- // Returns true if the names are equal (caselessly). Note that MCNameIsEqualTo
2066- // is *not* the same as MCValueIsEqualTo as it is a comparison up to case (of
2067- // the name's string) rather than exact.
2068- MC_DLLEXPORT bool MCNameIsEqualToCaseless (MCNameRef left, MCNameRef right);
2069-
2070- }
2071-
2072- bool MCNameIsEqualTo (MCNameRef self, MCNameRef p_other_name, bool p_case_sensitive, bool p_form_sensitive);
2073-
2074- extern " C" {
2075-
2076- // The empty name object;
2077- MC_DLLEXPORT extern MCNameRef kMCEmptyName ;
2078-
2079- MC_DLLEXPORT extern MCNameRef kMCTrueName ;
2080- MC_DLLEXPORT extern MCNameRef kMCFalseName ;
2081-
20822033// //////////////////////////////////////////////////////////////////////////////
20832034//
20842035// STRING DEFINITIONS
@@ -2767,6 +2718,49 @@ MCStringNormalizeLineEndings(MCStringRef p_input,
27672718 MCStringRef& r_output,
27682719 MCStringLineEndingStyle* r_original_style);
27692720
2721+ // //////////////////////////////////////////////////////////////////////////////
2722+ //
2723+ // NAME DEFINITIONS
2724+ //
2725+
2726+ // Like MCSTR but for NameRefs
2727+ MC_DLLEXPORT MCNameRef MCNAME (const char *);
2728+
2729+ // Create a name using the given string.
2730+ MC_DLLEXPORT bool MCNameCreate (MCStringRef string, MCNameRef& r_name);
2731+ // Create a name using chars.
2732+ MC_DLLEXPORT bool MCNameCreateWithChars (const unichar_t *chars, uindex_t count, MCNameRef& r_name);
2733+ // Create a name using native chars.
2734+ MC_DLLEXPORT bool MCNameCreateWithNativeChars (const char_t *chars, uindex_t count, MCNameRef& r_name);
2735+
2736+ // Create a name using the given string, releasing the original.
2737+ MC_DLLEXPORT bool MCNameCreateAndRelease (MCStringRef string, MCNameRef& r_name);
2738+
2739+ // Looks for an existing name matching the given string.
2740+ MC_DLLEXPORT MCNameRef MCNameLookupCaseless (MCStringRef string);
2741+
2742+ // Returns a unsigned integer which can be used to order a table for a binary
2743+ // search.
2744+ MC_DLLEXPORT uintptr_t MCNameGetCaselessSearchKey (MCNameRef name);
2745+
2746+ // Returns the string content of the name.
2747+ MC_DLLEXPORT MCStringRef MCNameGetString (MCNameRef name);
2748+
2749+ // Returns true if the given name is the empty name.
2750+ MC_DLLEXPORT bool MCNameIsEmpty (MCNameRef name);
2751+
2752+ // Returns true if the names are equal under the options specified by options.
2753+ MC_DLLEXPORT bool MCNameIsEqualTo (MCNameRef left, MCNameRef right, MCStringOptions p_options);
2754+
2755+ // Returns true if the names are equal caselessly.
2756+ MC_DLLEXPORT bool MCNameIsEqualToCaseless (MCNameRef left, MCNameRef right);
2757+
2758+ // The empty name object;
2759+ MC_DLLEXPORT extern MCNameRef kMCEmptyName ;
2760+
2761+ MC_DLLEXPORT extern MCNameRef kMCTrueName ;
2762+ MC_DLLEXPORT extern MCNameRef kMCFalseName ;
2763+
27702764// //////////////////////////////////////////////////////////////////////////////
27712765//
27722766// DATA DEFINITIONS
0 commit comments