X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=proto.h;h=ea837ec209c7c9962a2fc37650ae53bd1c0cb2d5;hb=5290524f8b52822096b01140005d681d126b507d;hp=01d30a49ce4b544acbb39fbb9a56c386a8cd1b29;hpb=f4758303c4694488fe79aa89312edc922a056bf5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/proto.h b/proto.h index 01d30a4..ea837ec 100644 --- a/proto.h +++ b/proto.h @@ -5,7 +5,6 @@ */ - START_EXTERN_C #if defined(PERL_IMPLICIT_SYS) @@ -315,6 +314,7 @@ PERL_CALLCONV HE* Perl_hv_store_ent(pTHX_ HV* tb, SV* key, SV* val, U32 hash); PERL_CALLCONV void Perl_hv_undef(pTHX_ HV* tb); PERL_CALLCONV I32 Perl_ibcmp(pTHX_ const char* a, const char* b, I32 len); PERL_CALLCONV I32 Perl_ibcmp_locale(pTHX_ const char* a, const char* b, I32 len); +PERL_CALLCONV I32 Perl_ibcmp_utf8(pTHX_ const char* a, char **pe1, UV l1, bool u1, const char* b, char **pe2, UV l2, bool u2); PERL_CALLCONV bool Perl_ingroup(pTHX_ Gid_t testgid, Uid_t effective); PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int, char **); PERL_CALLCONV void Perl_init_debugger(pTHX); @@ -326,37 +326,41 @@ PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit); PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd); PERL_CALLCONV bool Perl_is_gv_magical(pTHX_ char *name, STRLEN len, U32 flags); PERL_CALLCONV I32 Perl_is_lvalue_sub(pTHX); -PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_alnumc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_idfirst(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_alpha(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_ascii(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_space(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_cntrl(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_graph(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_digit(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_upper(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_lower(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_print(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_punct(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_xdigit(pTHX_ U32 c); -PERL_CALLCONV U32 Perl_to_uni_upper(pTHX_ U32 c, U8 *p, STRLEN *lenp); -PERL_CALLCONV U32 Perl_to_uni_title(pTHX_ U32 c, U8 *p, STRLEN *lenp); -PERL_CALLCONV U32 Perl_to_uni_lower(pTHX_ U32 c, U8 *p, STRLEN *lenp); -PERL_CALLCONV bool Perl_is_uni_alnum_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_alnumc_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_idfirst_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_alpha_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_ascii_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_space_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_cntrl_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_graph_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_digit_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_upper_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_lower_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_print_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_punct_lc(pTHX_ U32 c); -PERL_CALLCONV bool Perl_is_uni_xdigit_lc(pTHX_ U32 c); +PERL_CALLCONV U32 Perl_to_uni_upper_lc(pTHX_ U32 c); +PERL_CALLCONV U32 Perl_to_uni_title_lc(pTHX_ U32 c); +PERL_CALLCONV U32 Perl_to_uni_lower_lc(pTHX_ U32 c); +PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_alnumc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_idfirst(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_alpha(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_ascii(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_space(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_cntrl(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_graph(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_digit(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_upper(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_lower(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_print(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_punct(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_xdigit(pTHX_ UV c); +PERL_CALLCONV UV Perl_to_uni_upper(pTHX_ UV c, U8 *p, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_uni_title(pTHX_ UV c, U8 *p, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_uni_lower(pTHX_ UV c, U8 *p, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp); +PERL_CALLCONV bool Perl_is_uni_alnum_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_alnumc_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_idfirst_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_alpha_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_ascii_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_space_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_cntrl_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_graph_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_digit_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_upper_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_lower_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_print_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_punct_lc(pTHX_ UV c); +PERL_CALLCONV bool Perl_is_uni_xdigit_lc(pTHX_ UV c); PERL_CALLCONV STRLEN Perl_is_utf8_char(pTHX_ U8 *p); PERL_CALLCONV bool Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len); PERL_CALLCONV bool Perl_is_utf8_alnum(pTHX_ U8 *p); @@ -457,7 +461,7 @@ PERL_CALLCONV SV* Perl_mess(pTHX_ const char* pat, ...) ; PERL_CALLCONV SV* Perl_vmess(pTHX_ const char* pat, va_list* args); PERL_CALLCONV void Perl_qerror(pTHX_ SV* err); -PERL_CALLCONV void Perl_sortsv(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t f); +PERL_CALLCONV void Perl_sortsv(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t cmp); PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv); PERL_CALLCONV int Perl_mg_copy(pTHX_ SV* sv, SV* nsv, const char* key, I32 klen); PERL_CALLCONV MAGIC* Perl_mg_find(pTHX_ SV* sv, int type); @@ -615,7 +619,7 @@ PERL_CALLCONV void Perl_push_scope(pTHX); PERL_CALLCONV OP* Perl_ref(pTHX_ OP* o, I32 type); PERL_CALLCONV OP* Perl_refkids(pTHX_ OP* o, I32 type); PERL_CALLCONV void Perl_regdump(pTHX_ regexp* r); -PERL_CALLCONV SV* Perl_regclass_swash(pTHX_ struct regnode *n, bool doinit, SV **initsvp); +PERL_CALLCONV SV* Perl_regclass_swash(pTHX_ struct regnode *n, bool doinit, SV **listsvp, SV **altsvp); PERL_CALLCONV I32 Perl_pregexec(pTHX_ regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave); PERL_CALLCONV void Perl_pregfree(pTHX_ struct regexp* r); PERL_CALLCONV regexp* Perl_pregcomp(pTHX_ char* exp, char* xend, PMOP* pm); @@ -691,7 +695,6 @@ PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV* bigsv, SV* littlesv, I32 start_sh PERL_CALLCONV I32 Perl_setenv_getix(pTHX_ char* nam); #endif PERL_CALLCONV void Perl_setdefout(pTHX_ GV* gv); -PERL_CALLCONV char* Perl_sharepvn(pTHX_ const char* sv, I32 len, U32 hash); PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* sv, I32 len, U32 hash); PERL_CALLCONV Signal_t Perl_sighandler(int sig); PERL_CALLCONV SV** Perl_stack_grow(pTHX_ SV** sp, SV**p, int n); @@ -828,6 +831,10 @@ PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ U8 *s, STRLEN curlen, STRLEN* retlen, PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN curlen, STRLEN* retlen, U32 flags); PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv); PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv); +PERL_CALLCONV U8* Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); +PERL_CALLCONV U8* Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); +PERL_CALLCONV char* Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags); +PERL_CALLCONV char* Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags); PERL_CALLCONV void Perl_vivify_defelem(pTHX_ SV* sv); PERL_CALLCONV void Perl_vivify_ref(pTHX_ SV* sv, U32 to_what); PERL_CALLCONV I32 Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags); @@ -901,8 +908,6 @@ PERL_CALLCONV void Perl_sv_setsv_mg(pTHX_ SV *dstr, SV *sstr); PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len); PERL_CALLCONV MGVTBL* Perl_get_vtbl(pTHX_ int vtbl_id); PERL_CALLCONV char* Perl_pv_display(pTHX_ SV *dsv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim); -PERL_CALLCONV char* Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags); -PERL_CALLCONV char* Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags); PERL_CALLCONV void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) #ifdef CHECK_FORMAT __attribute__((format(printf,pTHX_3,pTHX_4))) @@ -1032,9 +1037,10 @@ STATIC void S_cv_dump(pTHX_ CV *cv); # endif STATIC CV* S_cv_clone2(pTHX_ CV *proto, CV *outside); STATIC bool S_scalar_mod_type(pTHX_ OP *o, I32 type); -STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs); +STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp); STATIC OP * S_dup_attrlist(pTHX_ OP *o); -STATIC void S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs); +STATIC void S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs, bool for_my); +STATIC void S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp); # if defined(PL_OP_SLAB_ALLOC) STATIC void* S_Slab_Alloc(pTHX_ int m, size_t sz); # endif @@ -1158,6 +1164,7 @@ STATIC I32 S_regrepeat(pTHX_ regnode *p, I32 max); STATIC I32 S_regrepeat_hard(pTHX_ regnode *p, I32 max, I32 *lp); STATIC I32 S_regtry(pTHX_ regexp *prog, char *startpos); STATIC bool S_reginclass(pTHX_ regnode *n, U8 *p, bool do_utf8sv_is_utf8); +STATIC bool S_reginclasslen(pTHX_ regnode *n, U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8); STATIC CHECKPOINT S_regcppush(pTHX_ I32 parenfloor); STATIC char* S_regcppop(pTHX); STATIC char* S_regcp_set_to(pTHX_ I32 ss); @@ -1169,11 +1176,9 @@ STATIC U8* S_reghopmaybe3(pTHX_ U8 *pos, I32 off, U8 *lim); STATIC char* S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *startpos, I32 norun); #endif -#if defined(PERL_IN_RUN_C) || defined(PERL_DECL_PROT) -# ifdef DEBUGGING +#if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT) STATIC CV* S_deb_curcv(pTHX_ I32 ix); STATIC void S_debprof(pTHX_ OP *o); -# endif #endif #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) @@ -1326,6 +1331,34 @@ PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ SV *sv, I32 flags); PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV* sv, STRLEN* lp, I32 flags); PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV* sv, STRLEN* lp, I32 flags); PERL_CALLCONV char* Perl_my_atof2(pTHX_ const char *s, NV* value); +PERL_CALLCONV int Perl_my_socketpair(int family, int type, int protocol, int fd[2]); + +#if defined(USE_PERLIO) && !defined(USE_SFIO) +PERL_CALLCONV int Perl_PerlIO_close(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_fill(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_fileno(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_eof(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_error(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_flush(pTHX_ PerlIO *); +PERL_CALLCONV void Perl_PerlIO_clearerr(pTHX_ PerlIO *); +PERL_CALLCONV void Perl_PerlIO_set_cnt(pTHX_ PerlIO *, int); +PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *, STDCHAR *, int); +PERL_CALLCONV void Perl_PerlIO_setlinebuf(pTHX_ PerlIO *); +PERL_CALLCONV SSize_t Perl_PerlIO_read(pTHX_ PerlIO *, void *, Size_t); +PERL_CALLCONV SSize_t Perl_PerlIO_write(pTHX_ PerlIO *, const void *, Size_t); +PERL_CALLCONV SSize_t Perl_PerlIO_unread(pTHX_ PerlIO *, const void *, Size_t); +PERL_CALLCONV Off_t Perl_PerlIO_tell(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_seek(pTHX_ PerlIO *, Off_t, int); + +PERL_CALLCONV STDCHAR * Perl_PerlIO_get_base(pTHX_ PerlIO *); +PERL_CALLCONV STDCHAR * Perl_PerlIO_get_ptr(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *); +PERL_CALLCONV int Perl_PerlIO_get_cnt(pTHX_ PerlIO *); + +PERL_CALLCONV PerlIO * Perl_PerlIO_stdin(pTHX); +PERL_CALLCONV PerlIO * Perl_PerlIO_stdout(pTHX); +PERL_CALLCONV PerlIO * Perl_PerlIO_stderr(pTHX); +#endif /* PERLIO_LAYERS */ END_EXTERN_C