This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #133604) fix binmode on Win32 :crlf layers
[perl5.git] / embed.fnc
index f6325d9..0838fa7 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -768,10 +768,6 @@ AMp        |UV     |to_uni_title   |UV c|NN U8 *p|NN STRLEN *lenp
 AbDMpR |bool   |isIDFIRST_lazy |NN const char* p
 AbDMpR |bool   |isALNUM_lazy   |NN const char* p
 p      |void   |init_uniprops
-EpX    |SV *   |parse_uniprop_string|NN const char * const name           \
-                                    |const Size_t len                     \
-                                    |const bool to_fold                   \
-                                    |NN bool * invert
 #ifdef PERL_IN_UTF8_C
 snR    |U8     |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp  \
                |const char dummy
@@ -827,6 +823,12 @@ EXnidR     |bool   |is_utf8_non_invariant_string|NN const U8* const s          \
 #endif
 AbnpdD |STRLEN |is_utf8_char   |NN const U8 *s
 Abmnpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end
+AnidR  |Size_t |isUTF8_CHAR|NN const U8 * const s0                         \
+                           |NN const U8 * const e
+AnidR  |Size_t |isSTRICT_UTF8_CHAR |NN const U8 * const s0                 \
+                                   |NN const U8 * const e
+AnidR  |Size_t |isC9_STRICT_UTF8_CHAR |NN const U8 * const s0              \
+                                      |NN const U8 * const e
 AnmdpR |bool   |is_utf8_string |NN const U8 *s|STRLEN len
 AnidR  |bool   |is_utf8_string_flags                                       \
                |NN const U8 *s|STRLEN len|const U32 flags
@@ -984,7 +986,6 @@ EMiR        |char*|form_short_octal_warning|NN const char * const s  \
                                |const STRLEN len
 EiRn   |I32    |regcurly       |NN const char *s
 #endif
-Epn    |int    |uniprop_lookup |NN const char * tokstr|const Size_t len
 Apd    |UV     |grok_hex       |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
 Apd    |int    |grok_infnan    |NN const char** sp|NN const char *send
 Apd    |int    |grok_number    |NN const char *pv|STRLEN len|NULLOK UV *valuep
@@ -1367,7 +1368,7 @@ p |REGEXP*|re_op_compile  |NULLOK SV ** const patternp \
                                |NN const regexp_engine* eng \
                                |NULLOK REGEXP *old_re \
                                |NULLOK bool *is_bare_re \
-                               |U32 rx_flags|U32 pm_flags
+                               |const U32 rx_flags|const U32 pm_flags
 Ap     |REGEXP*|re_compile     |NN SV * const pattern|U32 orig_rx_flags
 Ap     |char*  |re_intuit_start|NN REGEXP * const rx \
                                |NULLOK SV* sv \
@@ -1696,7 +1697,6 @@ EXpRM     |SV*    |swash_init     |NN const char* pkg|NN const char* name|NN SV* listsv|I32
 EXpM   |UV     |swash_fetch    |NN SV *swash|NN const U8 *ptr|bool do_utf8
 #ifdef PERL_IN_REGCOMP_C
 EiMR   |SV*    |add_cp_to_invlist      |NULLOK SV* invlist|const UV cp
-EiM    |void   |invlist_set_len|NN SV* const invlist|const UV len|const bool offset
 EiMRn  |bool   |invlist_is_iterating|NN SV* const invlist
 #ifndef PERL_EXT_RE_BUILD
 EiMRn  |UV*    |_invlist_array_init    |NN SV* const invlist|const bool will_have_0
@@ -1705,12 +1705,13 @@ EsM     |void   |_append_range_to_invlist   |NN SV* const invlist|const UV start|const
 EsM    |void   |invlist_extend    |NN SV* const invlist|const UV len
 EsM    |void   |invlist_replace_list_destroys_src|NN SV *dest|NN SV *src
 EiMRn  |IV*    |get_invlist_previous_index_addr|NN SV* invlist
+EiM    |void   |invlist_set_len|NN SV* const invlist|const UV len|const bool offset
 EiMn   |void   |invlist_set_previous_index|NN SV* const invlist|const IV index
 EiMRn  |IV     |invlist_previous_index|NN SV* const invlist
 EiMn   |void   |invlist_trim   |NN SV* invlist
 EiM    |void   |invlist_clear  |NN SV* invlist
+sM     |void   |initialize_invlist_guts|NN SV* invlist|const Size_t initial_size
 #endif
-EiMR   |SV*    |invlist_clone  |NN SV* const invlist
 EiMRn  |STRLEN*|get_invlist_iter_addr  |NN SV* invlist
 EiMn   |void   |invlist_iterinit|NN SV* invlist
 EsMRn  |bool   |invlist_iternext|NN SV* invlist|NN UV* start|NN UV* end
@@ -1739,6 +1740,9 @@ EXMpR     |SV*    |_add_range_to_invlist  |NULLOK SV* invlist|UV start|UV end
 EXMpR  |SV*    |_setup_canned_invlist|const STRLEN size|const UV element0|NN UV** other_elements_ptr
 EXMpn  |void   |_invlist_populate_swatch   |NN SV* const invlist|const UV start|const UV end|NN U8* swatch
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_SV_C)
+EMpX   |SV*    |invlist_clone  |NN SV* const invlist|NULLOK SV* newlist
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
 EXp    |SV*    |_core_swash_init|NN const char* pkg|NN const char* name \
                |NN SV* listsv|I32 minbits|I32 none \
@@ -1746,6 +1750,7 @@ EXp       |SV*    |_core_swash_init|NN const char* pkg|NN const char* name \
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)
 EiMRn  |UV*    |invlist_array  |NN SV* const invlist
+EiMRn  |bool   |is_invlist     |NN SV* const invlist
 EiMRn  |bool*  |get_invlist_offset_addr|NN SV* invlist
 EiMRn  |UV     |_invlist_len   |NN SV* const invlist
 EMiRn  |bool   |_invlist_contains_cp|NN SV* const invlist|const UV cp
@@ -1798,9 +1803,9 @@ s |U32    |check_and_deprecate                                        \
                                |NN const char * const file                 \
                                |const unsigned line
 s      |UV     |_to_utf8_case  |const UV uv1                                   \
-                               |NN const U8 *p                                 \
+                               |NULLOK const U8 *p                             \
                                |NN U8* ustrp                                   \
-                               |NULLOK STRLEN *lenp                            \
+                               |NN STRLEN *lenp                                \
                                |NN SV *invlist                                 \
                                |NN const int * const invmap                    \
                                |NULLOK const unsigned int * const * const aux_tables   \
@@ -1869,16 +1874,23 @@ Aopd    |UV     |utf8_to_uvchr_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *ret
 ApdD   |UV     |utf8_to_uvuni_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
 pM     |bool   |check_utf8_print       |NN const U8 *s|const STRLEN len
 
-Adop   |UV     |utf8n_to_uvchr |NN const U8 *s                             \
+Adnop  |UV     |utf8n_to_uvchr |NN const U8 *s                             \
                                |STRLEN curlen                              \
                                |NULLOK STRLEN *retlen                      \
                                |const U32 flags
-Adop   |UV     |utf8n_to_uvchr_error|NN const U8 *s                        \
+Adnop  |UV     |utf8n_to_uvchr_error|NN const U8 *s                        \
                                |STRLEN curlen                              \
                                |NULLOK STRLEN *retlen                      \
                                |const U32 flags                            \
                                |NULLOK U32 * errors
-AMdp   |UV     |utf8n_to_uvchr_msgs|NN const U8 *s                         \
+AMndi  |UV     |utf8n_to_uvchr_msgs|NN const U8 *s                         \
+                               |STRLEN curlen                              \
+                               |NULLOK STRLEN *retlen                      \
+                               |const U32 flags                            \
+                               |NULLOK U32 * errors                        \
+                               |NULLOK AV ** msgs
+AMnp   |UV     |_utf8n_to_uvchr_msgs_helper                                \
+                               |NN const U8 *s                             \
                                |STRLEN curlen                              \
                                |NULLOK STRLEN *retlen                      \
                                |const U32 flags                            \
@@ -2350,21 +2362,22 @@ Ep      |void   |regprop        |NULLOK const regexp *prog|NN SV* sv|NN const regnode* o|NULLO
 Ep     |int    |re_printf      |NN const char *fmt|...
 #endif
 #if defined(PERL_IN_REGCOMP_C)
-Es     |regnode*|reg           |NN RExC_state_t *pRExC_state \
+Es     |regnode_offset|reg     |NN RExC_state_t *pRExC_state \
                                |I32 paren|NN I32 *flagp|U32 depth
-Es     |regnode*|regnode_guts  |NN RExC_state_t *pRExC_state              \
+Es     |regnode_offset|regnode_guts|NN RExC_state_t *pRExC_state          \
                                |const U8 op                               \
                                |const STRLEN extra_len                    \
                                |NN const char* const name
-Es     |regnode*|reganode      |NN RExC_state_t *pRExC_state|U8 op \
+Es     |void   |change_engine_size|NN RExC_state_t *pRExC_state|const Ptrdiff_t size
+Es     |regnode_offset|reganode|NN RExC_state_t *pRExC_state|U8 op \
                                |U32 arg
-Es     |regnode*|reg2Lanode    |NN RExC_state_t *pRExC_state              \
+Es     |regnode_offset|reg2Lanode|NN RExC_state_t *pRExC_state            \
                                |const U8 op                               \
                                |const U32 arg1                            \
                                |const I32 arg2
-Es     |regnode*|regatom       |NN RExC_state_t *pRExC_state \
+Es     |regnode_offset|regatom |NN RExC_state_t *pRExC_state \
                                |NN I32 *flagp|U32 depth
-Es     |regnode*|regbranch     |NN RExC_state_t *pRExC_state \
+Es     |regnode_offset|regbranch       |NN RExC_state_t *pRExC_state \
                                |NN I32 *flagp|I32 first|U32 depth
 Es     |void    |set_ANYOF_arg |NN RExC_state_t* const pRExC_state \
                                |NN regnode* const node                    \
@@ -2380,7 +2393,7 @@ Es        |void   |output_or_return_posix_warnings                            \
 Es     |AV*     |add_multi_match|NULLOK AV* multi_char_matches             \
                                |NN SV* multi_string                        \
                                |const STRLEN cp_count
-Es     |regnode*|regclass      |NN RExC_state_t *pRExC_state                 \
+Es     |regnode_offset|regclass|NN RExC_state_t *pRExC_state                 \
                                |NN I32 *flagp|U32 depth|const bool stop_at_1 \
                                |bool allow_multi_fold                        \
                                |const bool silence_non_portable              \
@@ -2390,15 +2403,16 @@ Es      |regnode*|regclass      |NN RExC_state_t *pRExC_state                 \
                                |NULLOK AV** return_posix_warnings
 Es     |void|add_above_Latin1_folds|NN RExC_state_t *pRExC_state|const U8 cp \
                                |NN SV** invlist
-Ei     |regnode*|handle_named_backref|NN RExC_state_t *pRExC_state         \
+Ei     |regnode_offset|handle_named_backref|NN RExC_state_t *pRExC_state   \
                                |NN I32 *flagp                              \
                                |NN char * parse_start                      \
                                |char ch
 EsnR   |unsigned int|regex_set_precedence|const U8 my_operator
-Es     |regnode*|handle_regex_sets|NN RExC_state_t *pRExC_state \
+Es     |regnode_offset|handle_regex_sets|NN RExC_state_t *pRExC_state \
                                |NULLOK SV ** return_invlist            \
                                |NN I32 *flagp|U32 depth                \
                                |NN char * const oregcomp_parse
+Es     |void   |set_regex_pv   |NN RExC_state_t *pRExC_state|NN REGEXP *Rx
 #if defined(DEBUGGING) && defined(ENABLE_REGEX_SETS_DEBUGGING)
 Es     |void   |dump_regex_sets_structures                                 \
                                |NN RExC_state_t *pRExC_state               \
@@ -2406,21 +2420,23 @@ Es      |void   |dump_regex_sets_structures                                 \
                                |const IV fence|NN AV * fence_stack
 #endif
 Es     |void|parse_lparen_question_flags|NN RExC_state_t *pRExC_state
-Es     |regnode*|reg_node      |NN RExC_state_t *pRExC_state|U8 op
-Es     |regnode*|regpiece      |NN RExC_state_t *pRExC_state \
+Es     |regnode_offset|reg_node|NN RExC_state_t *pRExC_state|U8 op
+Es     |regnode_offset|regpiece|NN RExC_state_t *pRExC_state \
                                |NN I32 *flagp|U32 depth
 Es     |bool   |grok_bslash_N  |NN RExC_state_t *pRExC_state               \
-                               |NULLOK regnode** nodep                     \
+                               |NULLOK regnode_offset* nodep               \
                                |NULLOK UV *code_point_p                    \
                                |NULLOK int* cp_count                       \
                                |NN I32 *flagp                              \
                                |const bool strict                          \
                                |const U32 depth
 Es     |void   |reginsert      |NN RExC_state_t *pRExC_state \
-                               |U8 op|NN regnode *operand|U32 depth
+                               |const U8 op                                \
+                               |const regnode_offset operand               \
+                               |const U32 depth
 Es     |void   |regtail        |NN RExC_state_t * pRExC_state              \
-                               |NN const regnode * const p                 \
-                               |NN const regnode * const val               \
+                               |NN const regnode_offset p                  \
+                               |NN const regnode_offset val                \
                                |const U32 depth
 Es     |SV *   |reg_scan_name  |NN RExC_state_t *pRExC_state \
                                |U32 flags
@@ -2429,7 +2445,7 @@ Es        |U32    |join_exact     |NN RExC_state_t *pRExC_state \
                                |NN bool *unfolded_multi_char          \
                                |U32 flags|NULLOK regnode *val|U32 depth
 Ei     |void   |alloc_maybe_populate_EXACT|NN RExC_state_t *pRExC_state \
-                               |NN regnode *node|NN I32 *flagp|STRLEN len \
+                               |NN regnode_offset node|NN I32 *flagp|STRLEN len \
                                |UV code_point|bool downgradable
 Ein    |U8   |compute_EXACTish|NN RExC_state_t *pRExC_state
 Es     |void   |nextchar       |NN RExC_state_t *pRExC_state
@@ -2499,6 +2515,10 @@ EnsR     |int    |edit_distance  |NN const UV *src                   \
                                |const STRLEN x                     \
                                |const STRLEN y                     \
                                |const SSize_t maxDistance
+EXp    |SV *   |parse_uniprop_string|NN const char * const name           \
+                                    |const Size_t name_len                \
+                                    |const bool to_fold                   \
+                                    |NN bool * invert
 #  ifdef DEBUGGING
 Ep     |int    |re_indentf     |NN const char *fmt|U32 depth|...
 Es     |void        |regdump_intflags|NULLOK const char *lead| const U32 flags
@@ -2537,7 +2557,7 @@ Es        |void   |dump_trie_interim_table|NN const struct _reg_trie_data *trie\
                                |NULLOK HV* widecharmap|NN AV *revcharmap\
                                |U32 next_alloc|U32 depth
 Es     |U8     |regtail_study  |NN RExC_state_t *pRExC_state \
-                               |NN regnode *p|NN const regnode *val|U32 depth
+                               |NN regnode_offset p|NN const regnode_offset val|U32 depth
 #  endif
 #endif
 
@@ -2794,9 +2814,11 @@ s        |bool   |isa_lookup     |NN HV *stash|NN const char * const name \
 #endif
 
 #if defined(PERL_IN_LOCALE_C)
+#  ifdef USE_LOCALE
 sn     |const char*|category_name |const int category
 s      |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
 s      |void   |restore_switched_locale|const int category|NULLOK const char * const original_locale
+#  endif
 #  ifdef HAS_NL_LANGINFO
 sn     |const char*|my_nl_langinfo|const nl_item item|bool toggle
 #  else
@@ -2865,12 +2887,6 @@ pn       |Malloc_t       |mem_log_realloc        |const UV n|const UV typesize|NN const char *type_
 pn     |Malloc_t       |mem_log_free   |Malloc_t oldalloc|NN const char *filename|const int linenumber|NN const char *funcname
 #endif
 
-#if defined(PERL_IN_NUMERIC_C)
-#ifndef USE_QUADMATH
-sn     |NV|mulexp10    |NV value|I32 exponent
-#endif
-#endif
-
 #if defined(PERL_IN_UTF8_C)
 sR     |HV *   |new_msg_hv |NN const char * const message                  \
                            |U32 categories                                 \
@@ -2881,14 +2897,10 @@ sRM     |UV     |check_locale_boundary_crossing                             \
                |NN U8* const ustrp                                         \
                |NN STRLEN *lenp
 iR     |bool   |is_utf8_common |NN const U8 *const p                       \
-                               |NULLOK SV **swash                          \
-                               |NN const char * const swashname            \
                                |NULLOK SV* const invlist
 iR     |bool   |is_utf8_common_with_len|NN const U8 *const p               \
-                                          |NN const U8 *const e            \
-                                   |NULLOK SV **swash                      \
-                                   |NN const char * const swashname        \
-                                   |NULLOK SV* const invlist
+                                       |NN const U8 *const e               \
+                                       |NULLOK SV* const invlist
 sR     |SV*    |swatch_get     |NN SV* swash|UV start|UV span
 sRM    |U8*    |swash_scan_list_line|NN U8* l|NN U8* const lend|NN UV* min \
                |NN UV* max|NN UV* val|const bool wants_value               \
@@ -2910,7 +2922,8 @@ Apd       |char*  |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32
 Apmb   |void   |sv_copypv      |NN SV *const dsv|NN SV *const ssv
 Apmd   |void   |sv_copypv_nomg |NN SV *const dsv|NN SV *const ssv
 Apd    |void   |sv_copypv_flags        |NN SV *const dsv|NN SV *const ssv|const I32 flags
-Ap     |char*  |my_atof2       |NN const char *s|NN NV* value
+Apo    |char*  |my_atof2       |NN const char *orig|NN NV* value
+Ap     |char*  |my_atof3       |NN const char *orig|NN NV* value|const STRLEN len
 Apn    |int    |my_socketpair  |int family|int type|int protocol|int fd[2]
 Apn    |int    |my_dirfd       |NULLOK DIR* dir
 #ifdef PERL_ANY_COW