GNU C's 'protoize' plus a few hand edits.
Will compile miniperl with gcc -x c++ (i.e. treat .c a C++ files)
Does not link seems gcc's C++ does not define a symbol for
const char foo[] = "....";
i.e. with empty [].
p4raw-id: //depot/ansiperl@194
#include "perl.h"
void
-av_reify(av)
-AV* av;
+av_reify(AV *av)
{
I32 key;
SV* sv;
}
void
-av_extend(av,key)
-AV *av;
-I32 key;
+av_extend(AV *av, I32 key)
{
dTHR; /* only necessary if we have to extend stack */
if (key > AvMAX(av)) {
}
SV**
-av_fetch(av,key,lval)
-register AV *av;
-I32 key;
-I32 lval;
+av_fetch(register AV *av, I32 key, I32 lval)
{
SV *sv;
}
SV**
-av_store(av,key,val)
-register AV *av;
-I32 key;
-SV *val;
+av_store(register AV *av, I32 key, SV *val)
{
SV** ary;
}
AV *
-newAV()
+newAV(void)
{
register AV *av;
}
AV *
-av_make(size,strp)
-register I32 size;
-register SV **strp;
+av_make(register I32 size, register SV **strp)
{
register AV *av;
register I32 i;
}
AV *
-av_fake(size,strp)
-register I32 size;
-register SV **strp;
+av_fake(register I32 size, register SV **strp)
{
register AV *av;
register SV** ary;
}
void
-av_clear(av)
-register AV *av;
+av_clear(register AV *av)
{
register I32 key;
SV** ary;
}
void
-av_undef(av)
-register AV *av;
+av_undef(register AV *av)
{
register I32 key;
}
void
-av_push(av,val)
-register AV *av;
-SV *val;
+av_push(register AV *av, SV *val)
{
if (!av)
return;
}
SV *
-av_pop(av)
-register AV *av;
+av_pop(register AV *av)
{
SV *retval;
}
void
-av_unshift(av,num)
-register AV *av;
-register I32 num;
+av_unshift(register AV *av, register I32 num)
{
register I32 i;
register SV **sstr,**dstr;
}
SV *
-av_shift(av)
-register AV *av;
+av_shift(register AV *av)
{
SV *retval;
}
I32
-av_len(av)
-register AV *av;
+av_len(register AV *av)
{
return AvFILL(av);
}
void
-av_fill(av, fill)
-register AV *av;
-I32 fill;
+av_fill(register AV *av, I32 fill)
{
if (!av)
croak("panic: null array");
}
SV**
-avhv_fetch(av, key, klen, lval)
-AV *av;
-char *key;
-U32 klen;
-I32 lval;
+avhv_fetch(AV *av, char *key, U32 klen, I32 lval)
{
SV **keys, **indsvp;
I32 ind;
}
SV**
-avhv_fetch_ent(av, keysv, lval, hash)
-AV *av;
-SV *keysv;
-I32 lval;
-U32 hash;
+avhv_fetch_ent(AV *av, SV *keysv, I32 lval, U32 hash)
{
SV **keys, **indsvp;
HE *he;
}
SV**
-avhv_store(av, key, klen, val, hash)
-AV *av;
-char *key;
-U32 klen;
-SV *val;
-U32 hash;
+avhv_store(AV *av, char *key, U32 klen, SV *val, U32 hash)
{
SV **keys, **indsvp;
I32 ind;
}
SV**
-avhv_store_ent(av, keysv, val, hash)
-AV *av;
-SV *keysv;
-SV *val;
-U32 hash;
+avhv_store_ent(AV *av, SV *keysv, SV *val, U32 hash)
{
SV **keys;
HE *he;
}
bool
-avhv_exists_ent(av, keysv, hash)
-AV *av;
-SV *keysv;
-U32 hash;
+avhv_exists_ent(AV *av, SV *keysv, U32 hash)
{
SV **keys;
}
bool
-avhv_exists(av, key, klen)
-AV *av;
-char *key;
-U32 klen;
+avhv_exists(AV *av, char *key, U32 klen)
{
SV **keys;
/* avhv_delete leaks. Caller can re-index and compress if so desired. */
SV *
-avhv_delete(av, key, klen, flags)
-AV *av;
-char *key;
-U32 klen;
-I32 flags;
+avhv_delete(AV *av, char *key, U32 klen, I32 flags)
{
SV **keys;
SV *sv;
/* avhv_delete_ent leaks. Caller can re-index and compress if so desired. */
SV *
-avhv_delete_ent(av, keysv, flags, hash)
-AV *av;
-SV *keysv;
-I32 flags;
-U32 hash;
+avhv_delete_ent(AV *av, SV *keysv, I32 flags, U32 hash)
{
SV **keys;
SV *sv;
}
I32
-avhv_iterinit(av)
-AV *av;
+avhv_iterinit(AV *av)
{
SV **keys;
}
HE *
-avhv_iternext(av)
-AV *av;
+avhv_iternext(AV *av)
{
SV **keys;
}
SV *
-avhv_iterval(av, entry)
-AV *av;
-register HE *entry;
+avhv_iterval(AV *av, register HE *entry)
{
SV **keys;
SV *sv;
}
SV *
-avhv_iternextsv(av, key, retlen)
-AV *av;
-char **key;
-I32 *retlen;
+avhv_iternextsv(AV *av, char **key, I32 *retlen)
{
SV **keys;
HE *he;
#endif /* !defined(I_STDARG) && !defined(I_VARARGS) */
void
-deb_growlevel()
+deb_growlevel(void)
{
dlmax += 128;
Renew(debname, dlmax, char);
}
I32
-debstackptrs()
+debstackptrs(void)
{
dTHR;
PerlIO_printf(Perl_debug_log, "%8lx %8lx %8ld %8ld %8ld\n",
}
I32
-debstack()
+debstack(void)
{
dTHR;
I32 top = stack_sp - stack_base;
#endif
bool
-do_open(gv,name,len,as_raw,rawmode,rawperm,supplied_fp)
-GV *gv;
-register char *name;
-I32 len;
-int as_raw;
-int rawmode, rawperm;
-PerlIO *supplied_fp;
+do_open(GV *gv, register char *name, I32 len, int as_raw, int rawmode, int rawperm, FILE *supplied_fp)
{
register IO *io = GvIOn(gv);
PerlIO *saveifp = Nullfp;
}
PerlIO *
-nextargv(gv)
-register GV *gv;
+nextargv(register GV *gv)
{
register SV *sv;
#ifndef FLEXFILENAMES
#ifdef HAS_PIPE
void
-do_pipe(sv, rgv, wgv)
-SV *sv;
-GV *rgv;
-GV *wgv;
+do_pipe(SV *sv, GV *rgv, GV *wgv)
{
register IO *rstio;
register IO *wstio;
}
bool
-io_close(io)
-IO* io;
+io_close(IO *io)
{
bool retval = FALSE;
int status;
}
bool
-do_eof(gv)
-GV *gv;
+do_eof(GV *gv)
{
dTHR;
register IO *io;
}
long
-do_tell(gv)
-GV *gv;
+do_tell(GV *gv)
{
register IO *io;
register PerlIO *fp;
}
bool
-do_seek(gv, pos, whence)
-GV *gv;
-long pos;
-int whence;
+do_seek(GV *gv, long int pos, int whence)
{
register IO *io;
register PerlIO *fp;
}
long
-do_sysseek(gv, pos, whence)
-GV *gv;
-long pos;
-int whence;
+do_sysseek(GV *gv, long int pos, int whence)
{
register IO *io;
register PerlIO *fp;
#endif /* F_FREESP */
bool
-do_print(sv,fp)
-register SV *sv;
-PerlIO *fp;
+do_print(register SV *sv, FILE *fp)
{
register char *tmps;
STRLEN len;
}
I32
-my_stat(ARGS)
-dARGS
+my_stat(ARGSproto)
{
dSP;
IO *io;
}
I32
-my_lstat(ARGS)
-dARGS
+my_lstat(ARGSproto)
{
dSP;
SV *sv;
}
bool
-do_aexec(really,mark,sp)
-SV *really;
-register SV **mark;
-register SV **sp;
+do_aexec(SV *really, register SV **mark, register SV **sp)
{
register char **a;
char *tmps;
}
void
-do_execfree()
+do_execfree(void)
{
if (Argv) {
Safefree(Argv);
#if !defined(OS2) && !defined(WIN32)
bool
-do_exec(cmd)
-char *cmd;
+do_exec(char *cmd)
{
register char **a;
register char *s;
#endif /* OS2 || WIN32 */
I32
-apply(type,mark,sp)
-I32 type;
-register SV **mark;
-register SV **sp;
+apply(I32 type, register SV **mark, register SV **sp)
{
dTHR;
register I32 val;
/* Do the permissions allow some operation? Assumes statcache already set. */
#ifndef VMS /* VMS' cando is in vms.c */
I32
-cando(bit, effective, statbufp)
-I32 bit;
-I32 effective;
-register struct stat *statbufp;
+cando(I32 bit, I32 effective, register struct stat *statbufp)
{
#ifdef DOSISH
/* [Comments and code from Len Reed]
#endif /* ! VMS */
I32
-ingroup(testgid,effective)
-I32 testgid;
-I32 effective;
+ingroup(I32 testgid, I32 effective)
{
if (testgid == (effective ? egid : gid))
return TRUE;
#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
I32
-do_ipcget(optype, mark, sp)
-I32 optype;
-SV **mark;
-SV **sp;
+do_ipcget(I32 optype, SV **mark, SV **sp)
{
dTHR;
key_t key;
}
I32
-do_ipcctl(optype, mark, sp)
-I32 optype;
-SV **mark;
-SV **sp;
+do_ipcctl(I32 optype, SV **mark, SV **sp)
{
dTHR;
SV *astr;
}
I32
-do_msgsnd(mark, sp)
-SV **mark;
-SV **sp;
+do_msgsnd(SV **mark, SV **sp)
{
#ifdef HAS_MSG
dTHR;
}
I32
-do_msgrcv(mark, sp)
-SV **mark;
-SV **sp;
+do_msgrcv(SV **mark, SV **sp)
{
#ifdef HAS_MSG
dTHR;
}
I32
-do_semop(mark, sp)
-SV **mark;
-SV **sp;
+do_semop(SV **mark, SV **sp)
{
#ifdef HAS_SEM
dTHR;
}
I32
-do_shmio(optype, mark, sp)
-I32 optype;
-SV **mark;
-SV **sp;
+do_shmio(I32 optype, SV **mark, SV **sp)
{
#ifdef HAS_SHM
dTHR;
SETERRNO(EFAULT,SS$_ACCVIO); /* can't do as caller requested */
return -1;
}
- shm = (Shmat_t)shmat(id, (char*)NULL, (optype == OP_SHMREAD) ? SHM_RDONLY : 0);
+ shm = (char *)shmat(id, (char*)NULL, (optype == OP_SHMREAD) ? SHM_RDONLY : 0);
if (shm == (char *)-1) /* I hate System V IPC, I really do */
return -1;
if (optype == OP_SHMREAD) {
#endif
I32
-do_trans(sv,arg)
-SV *sv;
-OP *arg;
+do_trans(SV *sv, OP *arg)
{
dTHR;
register short *tbl;
}
void
-do_join(sv,del,mark,sp)
-register SV *sv;
-SV *del;
-register SV **mark;
-register SV **sp;
+do_join(register SV *sv, SV *del, register SV **mark, register SV **sp)
{
SV **oldmark = mark;
register I32 items = sp - mark;
}
void
-do_sprintf(sv,len,sarg)
-SV *sv;
-I32 len;
-SV **sarg;
+do_sprintf(SV *sv, I32 len, SV **sarg)
{
STRLEN patlen;
char *pat = SvPV(*sarg, patlen);
}
void
-do_vecset(sv)
-SV *sv;
+do_vecset(SV *sv)
{
SV *targ = LvTARG(sv);
register I32 offset;
}
void
-do_chop(astr,sv)
-register SV *astr;
-register SV *sv;
+do_chop(register SV *astr, register SV *sv)
{
STRLEN len;
char *s;
}
I32
-do_chomp(sv)
-register SV *sv;
+do_chomp(register SV *sv)
{
register I32 count;
STRLEN len;
}
void
-do_vop(optype,sv,left,right)
-I32 optype;
-SV *sv;
-SV *left;
-SV *right;
+do_vop(I32 optype, SV *sv, SV *left, SV *right)
{
#ifdef LIBERAL
register long *dl;
}
OP *
-do_kv(ARGS)
-dARGS
+do_kv(ARGSproto)
{
dSP;
HV *hv = (HV*)POPs;
#ifndef DEBUGGING
void
-dump_all()
+dump_all(void)
{
}
#else /* Rest of file is for DEBUGGING */
#endif
void
-dump_all()
+dump_all(void)
{
dTHR;
PerlIO_setlinebuf(Perl_debug_log);
}
void
-dump_packsubs(stash)
-HV* stash;
+dump_packsubs(HV *stash)
{
dTHR;
I32 i;
}
void
-dump_sub(gv)
-GV* gv;
+dump_sub(GV *gv)
{
SV *sv = sv_newmortal();
}
void
-dump_form(gv)
-GV* gv;
+dump_form(GV *gv)
{
SV *sv = sv_newmortal();
}
void
-dump_eval()
+dump_eval(void)
{
dump_op(eval_root);
}
void
-dump_op(o)
-register OP *o;
+dump_op(OP *o)
{
dump("{\n");
if (o->op_seq)
}
void
-dump_gv(gv)
-register GV *gv;
+dump_gv(GV *gv)
{
SV *sv;
}
void
-dump_pm(pm)
-register PMOP *pm;
+dump_pm(PMOP *pm)
{
char ch;
EXT char rcsid[];
GV *
-gv_AVadd(gv)
-register GV *gv;
+gv_AVadd(register GV *gv)
{
if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
croak("Bad symbol for array");
}
GV *
-gv_HVadd(gv)
-register GV *gv;
+gv_HVadd(register GV *gv)
{
if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
croak("Bad symbol for hash");
}
GV *
-gv_IOadd(gv)
-register GV *gv;
+gv_IOadd(register GV *gv)
{
if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
croak("Bad symbol for filehandle");
}
GV *
-gv_fetchfile(name)
-char *name;
+gv_fetchfile(char *name)
{
dTHR;
char smallbuf[256];
}
void
-gv_init(gv, stash, name, len, multi)
-GV *gv;
-HV *stash;
-char *name;
-STRLEN len;
-int multi;
+gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
{
dTHR;
register GP *gp;
}
static void
-gv_init_sv(gv, sv_type)
-GV* gv;
-I32 sv_type;
+gv_init_sv(GV *gv, I32 sv_type)
{
switch (sv_type) {
case SVt_PVIO:
}
GV *
-gv_fetchmeth(stash, name, len, level)
-HV* stash;
-char* name;
-STRLEN len;
-I32 level;
+gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level)
{
AV* av;
GV* topgv;
}
GV *
-gv_fetchmethod(stash, name)
-HV* stash;
-char* name;
+gv_fetchmethod(HV *stash, char *name)
{
return gv_fetchmethod_autoload(stash, name, TRUE);
}
GV *
-gv_fetchmethod_autoload(stash, name, autoload)
-HV* stash;
-char* name;
-I32 autoload;
+gv_fetchmethod_autoload(HV *stash, char *name, I32 autoload)
{
dTHR;
register char *nend;
}
GV*
-gv_autoload4(stash, name, len, method)
-HV* stash;
-char* name;
-STRLEN len;
-I32 method;
+gv_autoload4(HV *stash, char *name, STRLEN len, I32 method)
{
static char autoload[] = "AUTOLOAD";
static STRLEN autolen = 8;
}
HV*
-gv_stashpv(name,create)
-char *name;
-I32 create;
+gv_stashpv(char *name, I32 create)
{
return gv_stashpvn(name, strlen(name), create);
}
HV*
-gv_stashpvn(name,namelen,create)
-char *name;
-U32 namelen;
-I32 create;
+gv_stashpvn(char *name, U32 namelen, I32 create)
{
char smallbuf[256];
char *tmpbuf;
}
HV*
-gv_stashsv(sv,create)
-SV *sv;
-I32 create;
+gv_stashsv(SV *sv, I32 create)
{
register char *ptr;
STRLEN len;
GV *
-gv_fetchpv(nambeg,add,sv_type)
-char *nambeg;
-I32 add;
-I32 sv_type;
+gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
{
dTHR;
register char *name = nambeg;
}
void
-gv_fullname3(sv, gv, prefix)
-SV *sv;
-GV *gv;
-char *prefix;
+gv_fullname3(SV *sv, GV *gv, char *prefix)
{
HV *hv = GvSTASH(gv);
if (!hv) {
}
void
-gv_efullname3(sv, gv, prefix)
-SV *sv;
-GV *gv;
-char *prefix;
+gv_efullname3(SV *sv, GV *gv, char *prefix)
{
GV *egv = GvEGV(gv);
if (!egv)
/* XXX compatibility with versions <= 5.003. */
void
-gv_fullname(sv,gv)
-SV *sv;
-GV *gv;
+gv_fullname(SV *sv, GV *gv)
{
gv_fullname3(sv, gv, sv == (SV*)gv ? "*" : "");
}
/* XXX compatibility with versions <= 5.003. */
void
-gv_efullname(sv,gv)
-SV *sv;
-GV *gv;
+gv_efullname(SV *sv, GV *gv)
{
gv_efullname3(sv, gv, sv == (SV*)gv ? "*" : "");
}
IO *
-newIO()
+newIO(void)
{
dTHR;
IO *io;
}
void
-gv_check(stash)
-HV* stash;
+gv_check(HV *stash)
{
dTHR;
register HE *entry;
}
GV *
-newGVgen(pack)
-char *pack;
+newGVgen(char *pack)
{
return gv_fetchpv(form("%s::_GEN_%ld", pack, (long)gensym++),
TRUE, SVt_PVGV);
/* hopefully this is only called on local symbol table entries */
GP*
-gp_ref(gp)
-GP* gp;
+gp_ref(GP *gp)
{
gp->gp_refcnt++;
if (gp->gp_cv) {
}
void
-gp_free(gv)
-GV* gv;
+gp_free(GV *gv)
{
GP* gp;
CV* cv;
/* Updates and caches the CV's */
bool
-Gv_AMupdate(stash)
-HV* stash;
+Gv_AMupdate(HV *stash)
{
dTHR;
GV** gvp;
GV* gv;
CV* cv;
MAGIC* mg=mg_find((SV*)stash,'c');
- AMT *amtp=mg ? (AMT*)mg->mg_ptr: NULL;
+ AMT *amtp = (mg) ? (AMT*)mg->mg_ptr: (AMT *) NULL;
AMT amt;
if (mg && amtp->was_ok_am == amagic_generation
* advised to call SPAGAIN macro in your code after call */
SV*
-amagic_call(left,right,method,flags)
-SV* left;
-SV* right;
-int method;
-int flags;
+amagic_call(SV *left, SV *right, int method, int flags)
{
dTHR;
MAGIC *mg;
&& (mg = mg_find((SV*)(stash=SvSTASH(SvRV(left))),'c'))
&& (ocvp = cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (oamtp = amtp = (AMT*)mg->mg_ptr)->table
- : NULL))
+ : (CV **) NULL))
&& ((cv = cvp[off=method+assignshift])
|| (assign && amtp->fallback > AMGfallNEVER && /* fallback to
* usual method */
&& (mg = mg_find((SV*)(stash=SvSTASH(SvRV(right))),'c'))
&& (cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (amtp = (AMT*)mg->mg_ptr)->table
- : NULL))
+ : (CV **) NULL))
&& (cv = cvp[off=method])) { /* Method for right
* argument found */
lr=1;
static void hsplit _((HV *hv));
static void hfreeentries _((HV *hv));
-static HE* more_he();
+static HE* more_he(void);
static HE*
-new_he()
+new_he(void)
{
HE* he;
if (he_root) {
}
static void
-del_he(p)
-HE* p;
+del_he(HE *p)
{
HeNEXT(p) = (HE*)he_root;
he_root = p;
}
static HE*
-more_he()
+more_he(void)
{
register HE* he;
register HE* heend;
}
static HEK *
-save_hek(str, len, hash)
-char *str;
-I32 len;
-U32 hash;
+save_hek(char *str, I32 len, U32 hash)
{
char *k;
register HEK *hek;
}
void
-unshare_hek(hek)
-HEK *hek;
+unshare_hek(HEK *hek)
{
unsharepvn(HEK_KEY(hek),HEK_LEN(hek),HEK_HASH(hek));
}
* contains an SV* */
SV**
-hv_fetch(hv,key,klen,lval)
-HV *hv;
-char *key;
-U32 klen;
-I32 lval;
+hv_fetch(HV *hv, char *key, U32 klen, I32 lval)
{
register XPVHV* xhv;
register U32 hash;
/* returns a HE * structure with the all fields set */
/* note that hent_val will be a mortal sv for MAGICAL hashes */
HE *
-hv_fetch_ent(hv,keysv,lval,hash)
-HV *hv;
-SV *keysv;
-I32 lval;
-register U32 hash;
+hv_fetch_ent(HV *hv, SV *keysv, I32 lval, register U32 hash)
{
register XPVHV* xhv;
register char *key;
}
SV**
-hv_store(hv,key,klen,val,hash)
-HV *hv;
-char *key;
-U32 klen;
-SV *val;
-register U32 hash;
+hv_store(HV *hv, char *key, U32 klen, SV *val, register U32 hash)
{
register XPVHV* xhv;
register I32 i;
}
HE *
-hv_store_ent(hv,keysv,val,hash)
-HV *hv;
-SV *keysv;
-SV *val;
-register U32 hash;
+hv_store_ent(HV *hv, SV *keysv, SV *val, register U32 hash)
{
register XPVHV* xhv;
register char *key;
}
SV *
-hv_delete(hv,key,klen,flags)
-HV *hv;
-char *key;
-U32 klen;
-I32 flags;
+hv_delete(HV *hv, char *key, U32 klen, I32 flags)
{
register XPVHV* xhv;
register I32 i;
}
SV *
-hv_delete_ent(hv,keysv,flags,hash)
-HV *hv;
-SV *keysv;
-I32 flags;
-U32 hash;
+hv_delete_ent(HV *hv, SV *keysv, I32 flags, U32 hash)
{
register XPVHV* xhv;
register I32 i;
}
bool
-hv_exists(hv,key,klen)
-HV *hv;
-char *key;
-U32 klen;
+hv_exists(HV *hv, char *key, U32 klen)
{
register XPVHV* xhv;
register U32 hash;
bool
-hv_exists_ent(hv,keysv,hash)
-HV *hv;
-SV *keysv;
-U32 hash;
+hv_exists_ent(HV *hv, SV *keysv, U32 hash)
{
register XPVHV* xhv;
register char *key;
}
static void
-hsplit(hv)
-HV *hv;
+hsplit(HV *hv)
{
register XPVHV* xhv = (XPVHV*)SvANY(hv);
I32 oldsize = (I32) xhv->xhv_max + 1; /* sic(k) */
}
void
-hv_ksplit(hv, newmax)
-HV *hv;
-IV newmax;
+hv_ksplit(HV *hv, IV newmax)
{
register XPVHV* xhv = (XPVHV*)SvANY(hv);
I32 oldsize = (I32) xhv->xhv_max + 1; /* sic(k) */
}
HV *
-newHV()
+newHV(void)
{
register HV *hv;
register XPVHV* xhv;
}
void
-hv_free_ent(hv, entry)
-HV *hv;
-register HE *entry;
+hv_free_ent(HV *hv, register HE *entry)
{
if (!entry)
return;
}
void
-hv_delayfree_ent(hv, entry)
-HV *hv;
-register HE *entry;
+hv_delayfree_ent(HV *hv, register HE *entry)
{
if (!entry)
return;
}
void
-hv_clear(hv)
-HV *hv;
+hv_clear(HV *hv)
{
register XPVHV* xhv;
if (!hv)
}
static void
-hfreeentries(hv)
-HV *hv;
+hfreeentries(HV *hv)
{
register HE **array;
register HE *entry;
}
void
-hv_undef(hv)
-HV *hv;
+hv_undef(HV *hv)
{
register XPVHV* xhv;
if (!hv)
}
I32
-hv_iterinit(hv)
-HV *hv;
+hv_iterinit(HV *hv)
{
register XPVHV* xhv;
HE *entry;
}
HE *
-hv_iternext(hv)
-HV *hv;
+hv_iternext(HV *hv)
{
register XPVHV* xhv;
register HE *entry;
}
char *
-hv_iterkey(entry,retlen)
-register HE *entry;
-I32 *retlen;
+hv_iterkey(register HE *entry, I32 *retlen)
{
if (HeKLEN(entry) == HEf_SVKEY) {
STRLEN len;
/* unlike hv_iterval(), this always returns a mortal copy of the key */
SV *
-hv_iterkeysv(entry)
-register HE *entry;
+hv_iterkeysv(register HE *entry)
{
if (HeKLEN(entry) == HEf_SVKEY)
return sv_mortalcopy(HeKEY_sv(entry));
}
SV *
-hv_iterval(hv,entry)
-HV *hv;
-register HE *entry;
+hv_iterval(HV *hv, register HE *entry)
{
if (SvRMAGICAL(hv)) {
if (mg_find((SV*)hv,'P')) {
}
SV *
-hv_iternextsv(hv, key, retlen)
- HV *hv;
- char **key;
- I32 *retlen;
+hv_iternextsv(HV *hv, char **key, I32 *retlen)
{
HE *he;
if ( (he = hv_iternext(hv)) == NULL)
}
void
-hv_magic(hv, gv, how)
-HV* hv;
-GV* gv;
-int how;
+hv_magic(HV *hv, GV *gv, int how)
{
sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0);
}
char*
-sharepvn(sv, len, hash)
-char* sv;
-I32 len;
-U32 hash;
+sharepvn(char *sv, I32 len, U32 hash)
{
return HEK_KEY(share_hek(sv, len, hash));
}
* len and hash must both be valid for str.
*/
void
-unsharepvn(str, len, hash)
-char* str;
-I32 len;
-U32 hash;
+unsharepvn(char *str, I32 len, U32 hash)
{
register XPVHV* xhv;
register HE *entry;
* len and hash must both be valid for str.
*/
HEK *
-share_hek(str, len, hash)
-char *str;
-I32 len;
-register U32 hash;
+share_hek(char *str, I32 len, register U32 hash)
{
register XPVHV* xhv;
register HE *entry;
#ifdef USE_PERL_SBRK
#define sbrk(a) Perl_sbrk(a)
char * Perl_sbrk _((int size));
+#else
+#ifdef DONT_DECLARE_STD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
#else
-extern char *sbrk();
+extern char *sbrk(int);
+#endif
#endif
#ifdef DEBUGGING_MSTATS
#ifdef DEBUGGING
#define ASSERT(p) if (!(p)) botch(STRINGIFY(p)); else
static void
-botch(s)
- char *s;
+botch(char *s)
{
PerlIO_printf(PerlIO_stderr(), "assertion botched: %s\n", s);
abort();
#endif
Malloc_t
-malloc(nbytes)
- register MEM_SIZE nbytes;
+malloc(register size_t nbytes)
{
register union overhead *p;
register int bucket = 0;
* Allocate more memory to the indicated bucket.
*/
static void
-morecore(bucket)
- register int bucket;
+morecore(register int bucket)
{
register union overhead *ovp;
register int rnu; /* 2^rnu bytes will be requested */
}
Free_t
-free(mp)
- Malloc_t mp;
+free(void *mp)
{
register MEM_SIZE size;
register union overhead *ovp;
int reall_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */
Malloc_t
-realloc(mp, nbytes)
- Malloc_t mp;
- MEM_SIZE nbytes;
+realloc(void *mp, size_t nbytes)
{
register MEM_SIZE onb;
union overhead *ovp;
* Return bucket number, or -1 if not found.
*/
static int
-findbucket(freep, srchlen)
- union overhead *freep;
- int srchlen;
+findbucket(union overhead *freep, int srchlen)
{
register union overhead *p;
register int i, j;
}
Malloc_t
-calloc(elements, size)
- register MEM_SIZE elements;
- register MEM_SIZE size;
+calloc(register size_t elements, register size_t size)
{
long sz = elements * size;
Malloc_t p = malloc(sz);
* frees for each size category.
*/
void
-dump_mstats(s)
- char *s;
+dump_mstats(char *s)
{
register int i, j;
register union overhead *p;
}
#else
void
-dump_mstats(s)
- char *s;
+dump_mstats(char *s)
{
}
#endif
static void restore_magic _((void *p));
static void
-save_magic(mgs, sv)
-MGS* mgs;
-SV* sv;
+save_magic(MGS *mgs, SV *sv)
{
assert(SvMAGICAL(sv));
}
static void
-restore_magic(p)
-void* p;
+restore_magic(void *p)
{
MGS* mgs = (MGS*)p;
SV* sv = mgs->mgs_sv;
void
-mg_magical(sv)
-SV* sv;
+mg_magical(SV *sv)
{
MAGIC* mg;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
}
int
-mg_get(sv)
-SV* sv;
+mg_get(SV *sv)
{
MGS mgs;
MAGIC* mg;
}
int
-mg_set(sv)
-SV* sv;
+mg_set(SV *sv)
{
MGS mgs;
MAGIC* mg;
}
U32
-mg_len(sv)
-SV* sv;
+mg_len(SV *sv)
{
MAGIC* mg;
char *junk;
}
int
-mg_clear(sv)
-SV* sv;
+mg_clear(SV *sv)
{
MGS mgs;
MAGIC* mg;
}
MAGIC*
-mg_find(sv, type)
-SV* sv;
-int type;
+mg_find(SV *sv, int type)
{
MAGIC* mg;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
}
int
-mg_copy(sv, nsv, key, klen)
-SV* sv;
-SV* nsv;
-char *key;
-I32 klen;
+mg_copy(SV *sv, SV *nsv, char *key, I32 klen)
{
int count = 0;
MAGIC* mg;
}
int
-mg_free(sv)
-SV* sv;
+mg_free(SV *sv)
{
MAGIC* mg;
MAGIC* moremagic;
#endif
U32
-magic_len(sv, mg)
-SV *sv;
-MAGIC *mg;
+magic_len(SV *sv, MAGIC *mg)
{
register I32 paren;
register char *s;
}
int
-magic_get(sv, mg)
-SV *sv;
-MAGIC *mg;
+magic_get(SV *sv, MAGIC *mg)
{
register I32 paren;
register char *s;
}
int
-magic_getuvar(sv, mg)
-SV *sv;
-MAGIC *mg;
+magic_getuvar(SV *sv, MAGIC *mg)
{
struct ufuncs *uf = (struct ufuncs *)mg->mg_ptr;
}
int
-magic_setenv(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setenv(SV *sv, MAGIC *mg)
{
register char *s;
char *ptr;
}
int
-magic_clearenv(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_clearenv(SV *sv, MAGIC *mg)
{
my_setenv(MgPV(mg,na),Nullch);
return 0;
}
int
-magic_set_all_env(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_set_all_env(SV *sv, MAGIC *mg)
{
#if defined(VMS)
die("Can't make list assignment to %%ENV on this system");
}
int
-magic_clear_all_env(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_clear_all_env(SV *sv, MAGIC *mg)
{
#if defined(VMS)
die("Can't make list assignment to %%ENV on this system");
}
int
-magic_getsig(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getsig(SV *sv, MAGIC *mg)
{
I32 i;
/* Are we fetching a signal entry? */
return 0;
}
int
-magic_clearsig(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_clearsig(SV *sv, MAGIC *mg)
{
I32 i;
/* Are we clearing a signal entry? */
}
int
-magic_setsig(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setsig(SV *sv, MAGIC *mg)
{
dTHR;
register char *s;
}
int
-magic_setisa(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setisa(SV *sv, MAGIC *mg)
{
sub_generation++;
return 0;
#ifdef OVERLOAD
int
-magic_setamagic(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setamagic(SV *sv, MAGIC *mg)
{
/* HV_badAMAGIC_on(Sv_STASH(sv)); */
amagic_generation++;
#endif /* OVERLOAD */
int
-magic_setnkeys(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setnkeys(SV *sv, MAGIC *mg)
{
if (LvTARG(sv)) {
hv_ksplit((HV*)LvTARG(sv), SvIV(sv));
}
static int
-magic_methpack(sv,mg,meth)
-SV* sv;
-MAGIC* mg;
-char *meth;
+magic_methpack(SV *sv, MAGIC *mg, char *meth)
{
dTHR;
dSP;
}
int
-magic_getpack(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getpack(SV *sv, MAGIC *mg)
{
magic_methpack(sv,mg,"FETCH");
if (mg->mg_ptr)
}
int
-magic_setpack(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setpack(SV *sv, MAGIC *mg)
{
dTHR;
dSP;
}
int
-magic_clearpack(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_clearpack(SV *sv, MAGIC *mg)
{
return magic_methpack(sv,mg,"DELETE");
}
-int magic_wipepack(sv,mg)
-SV* sv;
-MAGIC* mg;
+int magic_wipepack(SV *sv, MAGIC *mg)
{
dTHR;
dSP;
}
int
-magic_nextpack(sv,mg,key)
-SV* sv;
-MAGIC* mg;
-SV* key;
+magic_nextpack(SV *sv, MAGIC *mg, SV *key)
{
dTHR;
dSP;
}
int
-magic_existspack(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_existspack(SV *sv, MAGIC *mg)
{
return magic_methpack(sv,mg,"EXISTS");
}
int
-magic_setdbline(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setdbline(SV *sv, MAGIC *mg)
{
dTHR;
OP *o;
}
int
-magic_getarylen(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getarylen(SV *sv, MAGIC *mg)
{
dTHR;
sv_setiv(sv, AvFILL((AV*)mg->mg_obj) + curcop->cop_arybase);
}
int
-magic_setarylen(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setarylen(SV *sv, MAGIC *mg)
{
dTHR;
av_fill((AV*)mg->mg_obj, SvIV(sv) - curcop->cop_arybase);
}
int
-magic_getpos(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getpos(SV *sv, MAGIC *mg)
{
SV* lsv = LvTARG(sv);
}
int
-magic_setpos(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setpos(SV *sv, MAGIC *mg)
{
SV* lsv = LvTARG(sv);
SSize_t pos;
}
int
-magic_getglob(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getglob(SV *sv, MAGIC *mg)
{
if (SvFAKE(sv)) { /* FAKE globs can get coerced */
SvFAKE_off(sv);
}
int
-magic_setglob(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setglob(SV *sv, MAGIC *mg)
{
register char *s;
GV* gv;
}
int
-magic_setsubstr(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setsubstr(SV *sv, MAGIC *mg)
{
STRLEN len;
char *tmps = SvPV(sv,len);
}
int
-magic_gettaint(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_gettaint(SV *sv, MAGIC *mg)
{
TAINT_IF((mg->mg_len & 1) ||
(mg->mg_len & 2) && mg->mg_obj == sv); /* kludge */
}
int
-magic_settaint(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_settaint(SV *sv, MAGIC *mg)
{
dTHR;
if (localizing) {
}
int
-magic_setvec(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setvec(SV *sv, MAGIC *mg)
{
do_vecset(sv); /* XXX slurp this routine */
return 0;
}
int
-magic_getdefelem(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_getdefelem(SV *sv, MAGIC *mg)
{
SV *targ = Nullsv;
if (LvTARGLEN(sv)) {
}
int
-magic_setdefelem(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setdefelem(SV *sv, MAGIC *mg)
{
if (LvTARGLEN(sv))
vivify_defelem(sv);
}
int
-magic_freedefelem(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_freedefelem(SV *sv, MAGIC *mg)
{
SvREFCNT_dec(LvTARG(sv));
return 0;
}
void
-vivify_defelem(sv)
-SV* sv;
+vivify_defelem(SV *sv)
{
dTHR; /* just for SvREFCNT_inc and SvREFCNT_dec*/
MAGIC* mg;
}
int
-magic_setmglob(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setmglob(SV *sv, MAGIC *mg)
{
mg->mg_len = -1;
SvSCREAM_off(sv);
}
int
-magic_setbm(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setbm(SV *sv, MAGIC *mg)
{
sv_unmagic(sv, 'B');
SvVALID_off(sv);
}
int
-magic_setfm(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setfm(SV *sv, MAGIC *mg)
{
sv_unmagic(sv, 'f');
SvCOMPILED_off(sv);
}
int
-magic_setuvar(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setuvar(SV *sv, MAGIC *mg)
{
struct ufuncs *uf = (struct ufuncs *)mg->mg_ptr;
#ifdef USE_LOCALE_COLLATE
int
-magic_setcollxfrm(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_setcollxfrm(SV *sv, MAGIC *mg)
{
/*
* René Descartes said "I think not."
#endif /* USE_LOCALE_COLLATE */
int
-magic_set(sv,mg)
-SV* sv;
-MAGIC* mg;
+magic_set(SV *sv, MAGIC *mg)
{
dTHR;
register char *s;
#ifdef USE_THREADS
int
-magic_mutexfree(sv, mg)
-SV *sv;
-MAGIC *mg;
+magic_mutexfree(SV *sv, MAGIC *mg)
{
dTHR;
DEBUG_L(PerlIO_printf(PerlIO_stderr(), "0x%lx: magic_mutexfree 0x%lx\n",
#endif /* USE_THREADS */
I32
-whichsig(sig)
-char *sig;
+whichsig(char *sig)
{
register char **sigv;
static SV* sig_sv;
static void
-unwind_handler_stack(p)
- void *p;
+unwind_handler_stack(void *p)
{
dTHR;
U32 flags = *(U32*)p;
}
Signal_t
-sighandler(sig)
-int sig;
+sighandler(int sig)
{
dTHR;
dSP;
/* Do not delete this line--writemain depends on it */
static void
-xs_init()
+xs_init(void)
{
dXSUB_SYS;
}
CV* startcv, I32 cx_ix));
static char*
-gv_ename(gv)
-GV* gv;
+gv_ename(GV *gv)
{
SV* tmpsv = sv_newmortal();
gv_efullname3(tmpsv, gv, Nullch);
}
static OP *
-no_fh_allowed(o)
-OP *o;
+no_fh_allowed(OP *o)
{
yyerror(form("Missing comma after first argument to %s function",
op_desc[o->op_type]));
}
static OP *
-too_few_arguments(o, name)
-OP* o;
-char* name;
+too_few_arguments(OP *o, char *name)
{
yyerror(form("Not enough arguments for %s", name));
return o;
}
static OP *
-too_many_arguments(o, name)
-OP *o;
-char* name;
+too_many_arguments(OP *o, char *name)
{
yyerror(form("Too many arguments for %s", name));
return o;
}
static void
-bad_type(n, t, name, kid)
-I32 n;
-char *t;
-char *name;
-OP *kid;
+bad_type(I32 n, char *t, char *name, OP *kid)
{
yyerror(form("Type of arg %d to %s must be %s (not %s)",
(int)n, name, t, op_desc[kid->op_type]));
}
void
-assertref(o)
-OP *o;
+assertref(OP *o)
{
int type = o->op_type;
if (type != OP_AELEM && type != OP_HELEM) {
/* "register" allocation */
PADOFFSET
-pad_allocmy(name)
-char *name;
+pad_allocmy(char *name)
{
dTHR;
PADOFFSET off;
}
PADOFFSET
-pad_findmy(name)
-char *name;
+pad_findmy(char *name)
{
dTHR;
I32 off;
}
void
-pad_leavemy(fill)
-I32 fill;
+pad_leavemy(I32 fill)
{
I32 off;
SV **svp = AvARRAY(comppad_name);
}
PADOFFSET
-pad_alloc(optype,tmptype)
-I32 optype;
-U32 tmptype;
+pad_alloc(I32 optype, U32 tmptype)
{
dTHR;
SV *sv;
}
void
-pad_reset()
+pad_reset(void)
{
dTHR;
register I32 po;
/* Destructor */
void
-op_free(o)
-OP *o;
+op_free(OP *o)
{
register OP *kid, *nextkid;
}
static void
-null(o)
-OP* o;
+null(OP *o)
{
if (o->op_type != OP_NULL && o->op_targ > 0)
pad_free(o->op_targ);
#define LINKLIST(o) ((o)->op_next ? (o)->op_next : linklist((OP*)o))
OP *
-linklist(o)
-OP *o;
+linklist(OP *o)
{
register OP *kid;
}
OP *
-scalarkids(o)
-OP *o;
+scalarkids(OP *o)
{
OP *kid;
if (o && o->op_flags & OPf_KIDS) {
}
static OP *
-scalarboolean(o)
-OP *o;
+scalarboolean(OP *o)
{
if (dowarn &&
o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST) {
}
OP *
-scalar(o)
-OP *o;
+scalar(OP *o)
{
OP *kid;
}
OP *
-scalarvoid(o)
-OP *o;
+scalarvoid(OP *o)
{
OP *kid;
char* useless = 0;
}
OP *
-listkids(o)
-OP *o;
+listkids(OP *o)
{
OP *kid;
if (o && o->op_flags & OPf_KIDS) {
}
OP *
-list(o)
-OP *o;
+list(OP *o)
{
OP *kid;
}
OP *
-scalarseq(o)
-OP *o;
+scalarseq(OP *o)
{
OP *kid;
}
static OP *
-modkids(o, type)
-OP *o;
-I32 type;
+modkids(OP *o, I32 type)
{
OP *kid;
if (o && o->op_flags & OPf_KIDS) {
static I32 modcount;
OP *
-mod(o, type)
-OP *o;
-I32 type;
+mod(OP *o, I32 type)
{
dTHR;
OP *kid;
}
static bool
-scalar_mod_type(o, type)
-OP *o;
-I32 type;
+scalar_mod_type(OP *o, I32 type)
{
switch (type) {
case OP_SASSIGN:
}
OP *
-refkids(o, type)
-OP *o;
-I32 type;
+refkids(OP *o, I32 type)
{
OP *kid;
if (o && o->op_flags & OPf_KIDS) {
}
OP *
-ref(o, type)
-OP *o;
-I32 type;
+ref(OP *o, I32 type)
{
OP *kid;
}
OP *
-my(o)
-OP *o;
+my(OP *o)
{
OP *kid;
I32 type;
}
OP *
-sawparens(o)
-OP *o;
+sawparens(OP *o)
{
if (o)
o->op_flags |= OPf_PARENS;
}
OP *
-bind_match(type, left, right)
-I32 type;
-OP *left;
-OP *right;
+bind_match(I32 type, OP *left, OP *right)
{
OP *o;
}
OP *
-invert(o)
-OP *o;
+invert(OP *o)
{
if (!o)
return o;
}
OP *
-scope(o)
-OP *o;
+scope(OP *o)
{
if (o) {
if (o->op_flags & OPf_PARENS || PERLDB_NOOPT || tainting) {
}
int
-block_start(full)
-int full;
+block_start(int full)
{
dTHR;
int retval = savestack_ix;
}
OP*
-block_end(floor, seq)
-I32 floor;
-OP* seq;
+block_end(I32 floor, OP *seq)
{
dTHR;
int needblockscope = hints & HINT_BLOCK_SCOPE;
}
void
-newPROG(o)
-OP *o;
+newPROG(OP *o)
{
dTHR;
if (in_eval) {
}
OP *
-localize(o, lex)
-OP *o;
-I32 lex;
+localize(OP *o, I32 lex)
{
if (o->op_flags & OPf_PARENS)
list(o);
}
OP *
-jmaybe(o)
-OP *o;
+jmaybe(OP *o)
{
if (o->op_type == OP_LIST) {
o = convert(OP_JOIN, 0,
}
OP *
-fold_constants(o)
-register OP *o;
+fold_constants(register OP *o)
{
dTHR;
register OP *curop;
}
OP *
-gen_constant_list(o)
-register OP *o;
+gen_constant_list(register OP *o)
{
dTHR;
register OP *curop;
}
OP *
-convert(type, flags, o)
-I32 type;
-I32 flags;
-OP* o;
+convert(I32 type, I32 flags, OP *o)
{
OP *kid;
OP *last = 0;
/* List constructors */
OP *
-append_elem(type, first, last)
-I32 type;
-OP* first;
-OP* last;
+append_elem(I32 type, OP *first, OP *last)
{
if (!first)
return last;
}
OP *
-append_list(type, first, last)
-I32 type;
-LISTOP* first;
-LISTOP* last;
+append_list(I32 type, LISTOP *first, LISTOP *last)
{
if (!first)
return (OP*)last;
}
OP *
-prepend_elem(type, first, last)
-I32 type;
-OP* first;
-OP* last;
+prepend_elem(I32 type, OP *first, OP *last)
{
if (!first)
return last;
/* Constructors */
OP *
-newNULLLIST()
+newNULLLIST(void)
{
return newOP(OP_STUB, 0);
}
OP *
-force_list(o)
-OP *o;
+force_list(OP *o)
{
if (!o || o->op_type != OP_LIST)
o = newLISTOP(OP_LIST, 0, o, Nullop);
}
OP *
-newLISTOP(type, flags, first, last)
-I32 type;
-I32 flags;
-OP* first;
-OP* last;
+newLISTOP(I32 type, I32 flags, OP *first, OP *last)
{
LISTOP *listop;
}
OP *
-newOP(type, flags)
-I32 type;
-I32 flags;
+newOP(I32 type, I32 flags)
{
OP *o;
Newz(1101, o, 1, OP);
}
OP *
-newUNOP(type, flags, first)
-I32 type;
-I32 flags;
-OP* first;
+newUNOP(I32 type, I32 flags, OP *first)
{
UNOP *unop;
}
OP *
-newBINOP(type, flags, first, last)
-I32 type;
-I32 flags;
-OP* first;
-OP* last;
+newBINOP(I32 type, I32 flags, OP *first, OP *last)
{
BINOP *binop;
Newz(1101, binop, 1, BINOP);
}
OP *
-pmtrans(o, expr, repl)
-OP *o;
-OP *expr;
-OP *repl;
+pmtrans(OP *o, OP *expr, OP *repl)
{
SV *tstr = ((SVOP*)expr)->op_sv;
SV *rstr = ((SVOP*)repl)->op_sv;
register U8 *r = (U8*)SvPV(rstr, rlen);
register I32 i;
register I32 j;
- I32 delete;
+ I32 Delete;
I32 complement;
register short *tbl;
tbl = (short*)cPVOPo->op_pv;
complement = o->op_private & OPpTRANS_COMPLEMENT;
- delete = o->op_private & OPpTRANS_DELETE;
+ Delete = o->op_private & OPpTRANS_DELETE;
/* squash = o->op_private & OPpTRANS_SQUASH; */
if (complement) {
for (i = 0, j = 0; i < 256; i++) {
if (!tbl[i]) {
if (j >= rlen) {
- if (delete)
+ if (Delete)
tbl[i] = -2;
else if (rlen)
tbl[i] = r[j-1];
}
}
else {
- if (!rlen && !delete) {
+ if (!rlen && !Delete) {
r = t; rlen = tlen;
}
for (i = 0; i < 256; i++)
tbl[i] = -1;
for (i = 0, j = 0; i < tlen; i++,j++) {
if (j >= rlen) {
- if (delete) {
+ if (Delete) {
if (tbl[t[i]] == -1)
tbl[t[i]] = -2;
continue;
}
OP *
-newPMOP(type, flags)
-I32 type;
-I32 flags;
+newPMOP(I32 type, I32 flags)
{
dTHR;
PMOP *pmop;
}
OP *
-pmruntime(o, expr, repl)
-OP *o;
-OP *expr;
-OP *repl;
+pmruntime(OP *o, OP *expr, OP *repl)
{
PMOP *pm;
LOGOP *rcop;
}
OP *
-newSVOP(type, flags, sv)
-I32 type;
-I32 flags;
-SV *sv;
+newSVOP(I32 type, I32 flags, SV *sv)
{
SVOP *svop;
Newz(1101, svop, 1, SVOP);
}
OP *
-newGVOP(type, flags, gv)
-I32 type;
-I32 flags;
-GV *gv;
+newGVOP(I32 type, I32 flags, GV *gv)
{
dTHR;
GVOP *gvop;
}
OP *
-newPVOP(type, flags, pv)
-I32 type;
-I32 flags;
-char *pv;
+newPVOP(I32 type, I32 flags, char *pv)
{
PVOP *pvop;
Newz(1101, pvop, 1, PVOP);
}
void
-package(o)
-OP *o;
+package(OP *o)
{
dTHR;
SV *sv;
}
void
-utilize(aver, floor, version, id, arg)
-int aver;
-I32 floor;
-OP *version;
-OP *id;
-OP *arg;
+utilize(int aver, I32 floor, OP *version, OP *id, OP *arg)
{
OP *pack;
OP *meth;
}
OP *
-newSLICEOP(flags, subscript, listval)
-I32 flags;
-OP *subscript;
-OP *listval;
+newSLICEOP(I32 flags, OP *subscript, OP *listval)
{
return newBINOP(OP_LSLICE, flags,
list(force_list(subscript)),
}
static I32
-list_assignment(o)
-register OP *o;
+list_assignment(register OP *o)
{
if (!o)
return TRUE;
}
OP *
-newASSIGNOP(flags, left, optype, right)
-I32 flags;
-OP *left;
-I32 optype;
-OP *right;
+newASSIGNOP(I32 flags, OP *left, I32 optype, OP *right)
{
OP *o;
}
OP *
-newSTATEOP(flags, label, o)
-I32 flags;
-char *label;
-OP *o;
+newSTATEOP(I32 flags, char *label, OP *o)
{
dTHR;
U32 seq = intro_my();
/* "Introduce" my variables to visible status. */
U32
-intro_my()
+intro_my(void)
{
SV **svp;
SV *sv;
}
OP *
-newLOGOP(type, flags, first, other)
-I32 type;
-I32 flags;
-OP* first;
-OP* other;
+newLOGOP(I32 type, I32 flags, OP *first, OP *other)
{
dTHR;
LOGOP *logop;
}
OP *
-newCONDOP(flags, first, trueop, falseop)
-I32 flags;
-OP* first;
-OP* trueop;
-OP* falseop;
+newCONDOP(I32 flags, OP *first, OP *trueop, OP *falseop)
{
dTHR;
CONDOP *condop;
}
OP *
-newRANGE(flags, left, right)
-I32 flags;
-OP *left;
-OP *right;
+newRANGE(I32 flags, OP *left, OP *right)
{
dTHR;
CONDOP *condop;
}
OP *
-newLOOPOP(flags, debuggable, expr, block)
-I32 flags;
-I32 debuggable;
-OP *expr;
-OP *block;
+newLOOPOP(I32 flags, I32 debuggable, OP *expr, OP *block)
{
dTHR;
OP* listop;
}
OP *
-newWHILEOP(flags, debuggable, loop, whileline, expr, block, cont)
-I32 flags;
-I32 debuggable;
-LOOP *loop;
-I32 whileline;
-OP *expr;
-OP *block;
-OP *cont;
+newWHILEOP(I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *expr, OP *block, OP *cont)
{
dTHR;
OP *redo;
}
OP*
-newLOOPEX(type, label)
-I32 type;
-OP* label;
+newLOOPEX(I32 type, OP *label)
{
dTHR;
OP *o;
}
void
-cv_undef(cv)
-CV *cv;
+cv_undef(CV *cv)
{
dTHR;
#ifdef USE_THREADS
#endif /* DEBUG_CLOSURES */
static CV *
-cv_clone2(proto, outside)
-CV* proto;
-CV* outside;
+cv_clone2(CV *proto, CV *outside)
{
dTHR;
AV* av;
}
CV *
-cv_clone(proto)
-CV* proto;
+cv_clone(CV *proto)
{
return cv_clone2(proto, CvOUTSIDE(proto));
}
void
-cv_ckproto(cv, gv, p)
-CV* cv;
-GV* gv;
-char* p;
+cv_ckproto(CV *cv, GV *gv, char *p)
{
if ((!p != !SvPOK(cv)) || (p && strNE(p, SvPVX(cv)))) {
SV* msg = sv_newmortal();
}
SV *
-cv_const_sv(cv)
-CV* cv;
+cv_const_sv(CV *cv)
{
OP *o;
SV *sv;
}
CV *
-newSUB(floor,o,proto,block)
-I32 floor;
-OP *o;
-OP *proto;
-OP *block;
+newSUB(I32 floor, OP *o, OP *proto, OP *block)
{
dTHR;
char *name = o ? SvPVx(cSVOPo->op_sv, na) : Nullch;
#endif
CV *
-newXS(name, subaddr, filename)
-char *name;
-void (*subaddr) _((CV*));
-char *filename;
+newXS(char *name, void (*subaddr) (CV *), char *filename)
{
dTHR;
GV *gv = gv_fetchpv(name ? name : "__ANON__", GV_ADDMULTI, SVt_PVCV);
}
void
-newFORM(floor,o,block)
-I32 floor;
-OP *o;
-OP *block;
+newFORM(I32 floor, OP *o, OP *block)
{
dTHR;
register CV *cv;
}
OP *
-newANONLIST(o)
-OP* o;
+newANONLIST(OP *o)
{
return newUNOP(OP_REFGEN, 0,
mod(list(convert(OP_ANONLIST, 0, o)), OP_REFGEN));
}
OP *
-newANONHASH(o)
-OP* o;
+newANONHASH(OP *o)
{
return newUNOP(OP_REFGEN, 0,
mod(list(convert(OP_ANONHASH, 0, o)), OP_REFGEN));
}
OP *
-newANONSUB(floor, proto, block)
-I32 floor;
-OP *proto;
-OP *block;
+newANONSUB(I32 floor, OP *proto, OP *block)
{
return newUNOP(OP_REFGEN, 0,
newSVOP(OP_ANONCODE, 0, (SV*)newSUB(floor, 0, proto, block)));
}
OP *
-oopsAV(o)
-OP *o;
+oopsAV(OP *o)
{
switch (o->op_type) {
case OP_PADSV:
}
OP *
-oopsHV(o)
-OP *o;
+oopsHV(OP *o)
{
switch (o->op_type) {
case OP_PADSV:
}
OP *
-newAVREF(o)
-OP *o;
+newAVREF(OP *o)
{
if (o->op_type == OP_PADANY) {
o->op_type = OP_PADAV;
}
OP *
-newGVREF(type,o)
-I32 type;
-OP *o;
+newGVREF(I32 type, OP *o)
{
if (type == OP_MAPSTART)
return newUNOP(OP_NULL, 0, o);
}
OP *
-newHVREF(o)
-OP *o;
+newHVREF(OP *o)
{
if (o->op_type == OP_PADANY) {
o->op_type = OP_PADHV;
}
OP *
-oopsCV(o)
-OP *o;
+oopsCV(OP *o)
{
croak("NOT IMPL LINE %d",__LINE__);
/* STUB */
}
OP *
-newCVREF(flags, o)
-I32 flags;
-OP *o;
+newCVREF(I32 flags, OP *o)
{
return newUNOP(OP_RV2CV, flags, scalar(o));
}
OP *
-newSVREF(o)
-OP *o;
+newSVREF(OP *o)
{
if (o->op_type == OP_PADANY) {
o->op_type = OP_PADSV;
/* Check routines. */
OP *
-ck_anoncode(o)
-OP *o;
+ck_anoncode(OP *o)
{
PADOFFSET ix;
SV* name;
}
OP *
-ck_bitop(o)
-OP *o;
+ck_bitop(OP *o)
{
o->op_private = hints;
return o;
}
OP *
-ck_concat(o)
-OP *o;
+ck_concat(OP *o)
{
if (cUNOPo->op_first->op_type == OP_CONCAT)
o->op_flags |= OPf_STACKED;
}
OP *
-ck_spair(o)
-OP *o;
+ck_spair(OP *o)
{
if (o->op_flags & OPf_KIDS) {
OP* newop;
}
OP *
-ck_delete(o)
-OP *o;
+ck_delete(OP *o)
{
o = ck_fun(o);
o->op_private = 0;
}
OP *
-ck_eof(o)
-OP *o;
+ck_eof(OP *o)
{
I32 type = o->op_type;
}
OP *
-ck_eval(o)
-OP *o;
+ck_eval(OP *o)
{
hints |= HINT_BLOCK_SCOPE;
if (o->op_flags & OPf_KIDS) {
}
OP *
-ck_exec(o)
-OP *o;
+ck_exec(OP *o)
{
OP *kid;
if (o->op_flags & OPf_STACKED) {
}
OP *
-ck_exists(o)
-OP *o;
+ck_exists(OP *o)
{
o = ck_fun(o);
if (o->op_flags & OPf_KIDS) {
}
OP *
-ck_gvconst(o)
-register OP *o;
+ck_gvconst(register OP *o)
{
o = fold_constants(o);
if (o->op_type == OP_CONST)
}
OP *
-ck_rvconst(o)
-register OP *o;
+ck_rvconst(register OP *o)
{
dTHR;
SVOP *kid = (SVOP*)cUNOPo->op_first;
}
OP *
-ck_ftst(o)
-OP *o;
+ck_ftst(OP *o)
{
dTHR;
I32 type = o->op_type;
}
OP *
-ck_fun(o)
-OP *o;
+ck_fun(OP *o)
{
dTHR;
register OP *kid;
}
OP *
-ck_glob(o)
-OP *o;
+ck_glob(OP *o)
{
GV *gv;
}
OP *
-ck_grep(o)
-OP *o;
+ck_grep(OP *o)
{
LOGOP *gwop;
OP *kid;
}
OP *
-ck_index(o)
-OP *o;
+ck_index(OP *o)
{
if (o->op_flags & OPf_KIDS) {
OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */
}
OP *
-ck_lengthconst(o)
-OP *o;
+ck_lengthconst(OP *o)
{
/* XXX length optimization goes here */
return ck_fun(o);
}
OP *
-ck_lfun(o)
-OP *o;
+ck_lfun(OP *o)
{
OPCODE type = o->op_type;
return modkids(ck_fun(o), type);
}
OP *
-ck_rfun(o)
-OP *o;
+ck_rfun(OP *o)
{
OPCODE type = o->op_type;
return refkids(ck_fun(o), type);
}
OP *
-ck_listiob(o)
-OP *o;
+ck_listiob(OP *o)
{
register OP *kid;
}
OP *
-ck_fun_locale(o)
-OP *o;
+ck_fun_locale(OP *o)
{
o = ck_fun(o);
}
OP *
-ck_scmp(o)
-OP *o;
+ck_scmp(OP *o)
{
o->op_private = 0;
#ifdef USE_LOCALE
}
OP *
-ck_match(o)
-OP *o;
+ck_match(OP *o)
{
o->op_private |= OPpRUNTIME;
return o;
}
OP *
-ck_null(o)
-OP *o;
+ck_null(OP *o)
{
return o;
}
OP *
-ck_repeat(o)
-OP *o;
+ck_repeat(OP *o)
{
if (cBINOPo->op_first->op_flags & OPf_PARENS) {
o->op_private |= OPpREPEAT_DOLIST;
}
OP *
-ck_require(o)
-OP *o;
+ck_require(OP *o)
{
if (o->op_flags & OPf_KIDS) { /* Shall we supply missing .pm? */
SVOP *kid = (SVOP*)cUNOPo->op_first;
}
OP *
-ck_retarget(o)
-OP *o;
+ck_retarget(OP *o)
{
croak("NOT IMPL LINE %d",__LINE__);
/* STUB */
}
OP *
-ck_select(o)
-OP *o;
+ck_select(OP *o)
{
OP* kid;
if (o->op_flags & OPf_KIDS) {
}
OP *
-ck_shift(o)
-OP *o;
+ck_shift(OP *o)
{
I32 type = o->op_type;
}
OP *
-ck_sort(o)
-OP *o;
+ck_sort(OP *o)
{
o->op_private = 0;
#ifdef USE_LOCALE
}
OP *
-ck_split(o)
-OP *o;
+ck_split(OP *o)
{
register OP *kid;
PMOP* pm;
}
OP *
-ck_subr(o)
-OP *o;
+ck_subr(OP *o)
{
dTHR;
OP *prev = ((cUNOPo->op_first->op_sibling)
}
OP *
-ck_svconst(o)
-OP *o;
+ck_svconst(OP *o)
{
SvREADONLY_on(cSVOPo->op_sv);
return o;
}
OP *
-ck_trunc(o)
-OP *o;
+ck_trunc(OP *o)
{
if (o->op_flags & OPf_KIDS) {
SVOP *kid = (SVOP*)cUNOPo->op_first;
/* A peephole optimizer. We visit the ops in the order they're to execute. */
void
-peep(o)
-register OP* o;
+peep(register OP *o)
{
dTHR;
register OP* oldop = 0;
#endif
PerlInterpreter *
-perl_alloc()
+perl_alloc(void)
{
PerlInterpreter *sv_interp;
}
void
-perl_construct( sv_interp )
-register PerlInterpreter *sv_interp;
+perl_construct(register PerlInterpreter *sv_interp)
{
#if defined(USE_THREADS) && !defined(FAKE_THREADS)
struct thread *thr;
}
void
-perl_destruct(sv_interp)
-register PerlInterpreter *sv_interp;
+perl_destruct(register PerlInterpreter *sv_interp)
{
dTHR;
int destruct_level; /* 0=none, 1=full, 2=full with checks */
}
void
-perl_free(sv_interp)
-PerlInterpreter *sv_interp;
+perl_free(PerlInterpreter *sv_interp)
{
if (!(curinterp = sv_interp))
return;
}
int
-perl_parse(sv_interp, xsinit, argc, argv, env)
-PerlInterpreter *sv_interp;
-void (*xsinit)_((void));
-int argc;
-char **argv;
-char **env;
+perl_parse(PerlInterpreter *sv_interp, void (*xsinit) (void), int argc, char **argv, char **env)
{
dTHR;
register SV *sv;
}
int
-perl_run(sv_interp)
-PerlInterpreter *sv_interp;
+perl_run(PerlInterpreter *sv_interp)
{
dTHR;
I32 oldscope;
}
SV*
-perl_get_sv(name, create)
-char* name;
-I32 create;
+perl_get_sv(char *name, I32 create)
{
GV* gv = gv_fetchpv(name, create, SVt_PV);
if (gv)
}
AV*
-perl_get_av(name, create)
-char* name;
-I32 create;
+perl_get_av(char *name, I32 create)
{
GV* gv = gv_fetchpv(name, create, SVt_PVAV);
if (create)
}
HV*
-perl_get_hv(name, create)
-char* name;
-I32 create;
+perl_get_hv(char *name, I32 create)
{
GV* gv = gv_fetchpv(name, create, SVt_PVHV);
if (create)
}
CV*
-perl_get_cv(name, create)
-char* name;
-I32 create;
+perl_get_cv(char *name, I32 create)
{
GV* gv = gv_fetchpv(name, create, SVt_PVCV);
if (create && !GvCVu(gv))
/* Be sure to refetch the stack pointer after calling these routines. */
I32
-perl_call_argv(subname, flags, argv)
-char *subname;
-I32 flags; /* See G_* flags in cop.h */
-register char **argv; /* null terminated arg list */
+perl_call_argv(char *subname, I32 flags, register char **argv)
+
+ /* See G_* flags in cop.h */
+ /* null terminated arg list */
{
dTHR;
dSP;
}
I32
-perl_call_pv(subname, flags)
-char *subname; /* name of the subroutine */
-I32 flags; /* See G_* flags in cop.h */
+perl_call_pv(char *subname, I32 flags)
+ /* name of the subroutine */
+ /* See G_* flags in cop.h */
{
return perl_call_sv((SV*)perl_get_cv(subname, TRUE), flags);
}
I32
-perl_call_method(methname, flags)
-char *methname; /* name of the subroutine */
-I32 flags; /* See G_* flags in cop.h */
+perl_call_method(char *methname, I32 flags)
+ /* name of the subroutine */
+ /* See G_* flags in cop.h */
{
dTHR;
dSP;
/* May be called with any of a CV, a GV, or an SV containing the name. */
I32
-perl_call_sv(sv, flags)
-SV* sv;
-I32 flags; /* See G_* flags in cop.h */
+perl_call_sv(SV *sv, I32 flags)
+
+ /* See G_* flags in cop.h */
{
dTHR;
LOGOP myop; /* fake syntax tree node */
/* Eval a string. The G_EVAL flag is always assumed. */
I32
-perl_eval_sv(sv, flags)
-SV* sv;
-I32 flags; /* See G_* flags in cop.h */
+perl_eval_sv(SV *sv, I32 flags)
+
+ /* See G_* flags in cop.h */
{
dTHR;
UNOP myop; /* fake syntax tree node */
}
SV*
-perl_eval_pv(p, croak_on_error)
-char* p;
-I32 croak_on_error;
+perl_eval_pv(char *p, I32 croak_on_error)
{
dTHR;
dSP;
/* Require a module. */
void
-perl_require_pv(pv)
-char* pv;
+perl_require_pv(char *pv)
{
SV* sv = sv_newmortal();
sv_setpv(sv, "require '");
}
void
-magicname(sym,name,namlen)
-char *sym;
-char *name;
-I32 namlen;
+magicname(char *sym, char *name, I32 namlen)
{
register GV *gv;
}
static void
-usage(name) /* XXX move this out into a module ? */
-char *name;
+usage(char *name) /* XXX move this out into a module ? */
+
{
/* This message really ought to be max 23 lines.
* Removed -h because the user already knows that opton. Others? */
/* This routine handles any switches that can be given during run */
char *
-moreswitches(s)
-char *s;
+moreswitches(char *s)
{
I32 numlen;
U32 rschar;
/* unexec() can be found in the Gnu emacs distribution */
void
-my_unexec()
+my_unexec(void)
{
#ifdef UNEXEC
SV* prog;
}
static void
-init_main_stash()
+init_main_stash(void)
{
dTHR;
GV *gv;
}
static void
-validate_suid(validarg, scriptname)
-char *validarg;
-char *scriptname;
+validate_suid(char *validarg, char *scriptname)
{
int which;
}
static void
-find_beginning()
+find_beginning(void)
{
register char *s, *s2;
}
static void
-init_ids()
+init_ids(void)
{
uid = (int)getuid();
euid = (int)geteuid();
}
static void
-forbid_setid(s)
-char *s;
+forbid_setid(char *s)
{
if (euid != uid)
croak("No %s allowed while running setuid", s);
}
static void
-init_debugger()
+init_debugger(void)
{
dTHR;
curstash = debstash;
}
void
-init_stacks(ARGS)
-dARGS
+init_stacks(ARGSproto)
{
curstack = newAV();
mainstack = curstack; /* remember in case we switch stacks */
}
static void
-nuke_stacks()
+nuke_stacks(void)
{
dTHR;
Safefree(cxstack);
static PerlIO *tmpfp; /* moved outside init_lexer() because of UNICOS bug */
static void
-init_lexer()
+init_lexer(void)
{
tmpfp = rsfp;
rsfp = Nullfp;
}
static void
-init_predump_symbols()
+init_predump_symbols(void)
{
dTHR;
GV *tmpgv;
}
static void
-init_postdump_symbols(argc,argv,env)
-register int argc;
-register char **argv;
-register char **env;
+init_postdump_symbols(register int argc, register char **argv, register char **env)
{
char *s;
SV *sv;
}
static void
-init_perllib()
+init_perllib(void)
{
char *s;
if (!tainting) {
#endif
static void
-incpush(p, addsubdirs)
-char *p;
-int addsubdirs;
+incpush(char *p, int addsubdirs)
{
SV *subdir = Nullsv;
static char *archpat_auto;
}
void
-call_list(oldscope, list)
-I32 oldscope;
-AV* list;
+call_list(I32 oldscope, AV *list)
{
dTHR;
line_t oldline = curcop->cop_line;
}
void
-my_exit(status)
-U32 status;
+my_exit(U32 status)
{
dTHR;
}
void
-my_failure_exit()
+my_failure_exit(void)
{
#ifdef VMS
if (vaxc$errno & 1) {
}
static void
-my_exit_jump()
+my_exit_jump(void)
{
dTHR;
register CONTEXT *cx;
};
#ifdef USE_THREADS
-#define ARGSproto struct thread *
+#define ARGSproto struct thread *thr
#else
#define ARGSproto void
#endif /* USE_THREADS */
/* VMS doesn't use environ array and NeXT has problems with crt0.o globals */
#if !defined(VMS) && !(defined(NeXT) && defined(__DYNAMIC__))
-#ifndef DONT_DECLARE_STD
+#if !defined(DONT_DECLARE_STD) || (defined(__svr4__) && defined(__GNUC__) && defined(sun))
extern char ** environ; /* environment variables supplied via exec */
#endif
#else
#ifdef PERLIO_IS_STDIO
void
-PerlIO_init()
+PerlIO_init(void)
{
/* Does nothing (yet) except force this file to be included
in perl binary. That allows this file to force inclusion
#undef PerlIO_tmpfile
PerlIO *
-PerlIO_tmpfile()
+PerlIO_tmpfile(void)
{
return tmpfile();
}
#ifndef PerlIO_vsprintf
int
-PerlIO_vsprintf(s,n,fmt,ap)
-char *s;
-const char *fmt;
-int n;
-va_list ap;
+PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap)
{
int val = vsprintf(s, fmt, ap);
if (n >= 0)
#include "perl.h"
static void
-dep()
+dep(void)
{
deprecate("\"do\" to call subroutines");
}
*/
#ifdef CXUX_BROKEN_CONSTANT_CONVERT
static double UV_MAX_cxux = ((double)UV_MAX);
+#endif
+
+#ifdef HAS_CRYPT
+#ifdef __cplusplus
+#ifdef FCRYPT
+extern "C" char *fcrypt(char *,char *);
+#else
+extern "C" char *crypt(char *,char *);
+#endif
+#endif
#endif
/*
/* variations on pp_null */
+#ifdef DONT_DECLARE_STD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#else
+extern pid_t getpid (void);
+#endif
+
PP(pp_stub)
{
dSP;
}
static SV*
-refto(sv)
-SV* sv;
+refto(SV *sv)
{
SV* rv;
}
static U32
-seed()
+seed(void)
{
/*
* This is really just a quick hack which grabs various garbage
}
static SV *
-mul128(sv, m)
- SV *sv;
- U8 m;
+mul128(SV *sv, U8 m)
{
STRLEN len;
char *s = SvPV(sv, len);
U32 i = 0;
if (!strnEQ(s, "0000", 4)) { /* need to grow sv */
- SV *new = newSVpv("0000000000", 10);
+ SV *New = newSVpv("0000000000", 10);
- sv_catsv(new, sv);
+ sv_catsv(New, sv);
SvREFCNT_dec(sv); /* free old sv */
- sv = new;
+ sv = New;
s = SvPV(sv, len);
}
t = s + len - 1;
}
static void
-doencodes(sv, s, len)
-register SV *sv;
-register char *s;
-register I32 len;
+doencodes(register SV *sv, register char *s, register I32 len)
{
char hunk[5];
}
static SV *
-is_an_int(s, l)
- char *s;
- STRLEN l;
+is_an_int(char *s, STRLEN l)
{
SV *result = newSVpv("", l);
char *result_c = SvPV(result, na); /* convenience */
}
static int
-div128(pnum, done)
- SV *pnum; /* must be '\0' terminated */
- bool *done;
+div128(SV *pnum, char *done)
+ /* must be '\0' terminated */
+
{
STRLEN len;
char *s = SvPV(pnum, len);
#ifdef USE_THREADS
void
-unlock_condpair(svv)
-void *svv;
+unlock_condpair(void *svv)
{
dTHR;
MAGIC *mg = mg_find((SV*)svv, 'm');
}
void
-rxres_save(rsp, rx)
-void **rsp;
-REGEXP *rx;
+rxres_save(void **rsp, REGEXP *rx)
{
UV *p = (UV*)*rsp;
U32 i;
}
void
-rxres_restore(rsp, rx)
-void **rsp;
-REGEXP *rx;
+rxres_restore(void **rsp, REGEXP *rx)
{
UV *p = (UV*)*rsp;
U32 i;
}
void
-rxres_free(rsp)
-void **rsp;
+rxres_free(void **rsp)
{
UV *p = (UV*)*rsp;
/* Control. */
static I32
-dopoptolabel(label)
-char *label;
+dopoptolabel(char *label)
{
dTHR;
register I32 i;
}
I32
-dowantarray()
+dowantarray(void)
{
I32 gimme = block_gimme();
return (gimme == G_VOID) ? G_SCALAR : gimme;
}
I32
-block_gimme()
+block_gimme(void)
{
dTHR;
I32 cxix;
}
static I32
-dopoptosub(startingblock)
-I32 startingblock;
+dopoptosub(I32 startingblock)
{
dTHR;
I32 i;
}
static I32
-dopoptoeval(startingblock)
-I32 startingblock;
+dopoptoeval(I32 startingblock)
{
dTHR;
I32 i;
}
static I32
-dopoptoloop(startingblock)
-I32 startingblock;
+dopoptoloop(I32 startingblock)
{
dTHR;
I32 i;
}
void
-dounwind(cxix)
-I32 cxix;
+dounwind(I32 cxix)
{
dTHR;
register CONTEXT *cx;
}
OP *
-die_where(message)
-char *message;
+die_where(char *message)
{
dTHR;
if (in_eval) {
}
static int
-sortcv(a, b)
-const void *a;
-const void *b;
+sortcv(const void *a, const void *b)
{
dTHR;
SV * const *str1 = (SV * const *)a;
}
static int
-sortcmp(a, b)
-const void *a;
-const void *b;
+sortcmp(const void *a, const void *b)
{
return sv_cmp(*(SV * const *)a, *(SV * const *)b);
}
static int
-sortcmp_locale(a, b)
-const void *a;
-const void *b;
+sortcmp_locale(const void *a, const void *b)
{
return sv_cmp_locale(*(SV * const *)a, *(SV * const *)b);
}
static OP* lastgotoprobe;
static OP *
-dofindlabel(o,label,opstack,oplimit)
-OP *o;
-char *label;
-OP **opstack;
-OP **oplimit;
+dofindlabel(OP *o, char *label, OP **opstack, OP **oplimit)
{
OP *kid;
OP **ops = opstack;
/* Eval. */
static void
-save_lines(array, sv)
-AV *array;
-SV *sv;
+save_lines(AV *array, SV *sv)
{
register char *s = SvPVX(sv);
register char *send = SvPVX(sv) + SvCUR(sv);
}
static OP *
-docatch(o)
-OP *o;
+docatch(OP *o)
{
dTHR;
int ret;
/* With USE_THREADS, eval_owner must be held on entry to doeval */
static OP *
-doeval(gimme)
-int gimme;
+doeval(int gimme)
{
dTHR;
dSP;
}
static void
-doparseform(sv)
-SV *sv;
+doparseform(SV *sv)
{
STRLEN len;
register char *s = SvPV_force(sv, len);
#include "EXTERN.h"
#include "perl.h"
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+
/* Hot code. */
#ifdef USE_THREADS
static void
-unset_cvowner(cvarg)
-void *cvarg;
+unset_cvowner(void *cvarg)
{
register CV* cv = (CV *) cvarg;
#ifdef DEBUGGING
}
OP *
-do_readline()
+do_readline(void)
{
dTHR;
dSP; dTARGETSTACKED;
}
LvTARG(lv) = SvREFCNT_inc(av);
LvTARGOFF(lv) = cx->blk_loop.iterix;
- LvTARGLEN(lv) = -1;
+ LvTARGLEN(lv) = (UV) -1;
sv = (SV*)lv;
}
}
static CV *
-get_db_sub(svp, cv)
-SV **svp;
-CV *cv;
+get_db_sub(SV **svp, CV *cv)
{
dTHR;
SV *oldsv = *svp;
}
void
-sub_crush_depth(cv)
-CV* cv;
+sub_crush_depth(CV *cv)
{
if (CvANON(cv))
warn("Deep recursion on anonymous subroutine");
}
void
-vivify_ref(sv, to_what)
-SV* sv;
-U32 to_what;
+vivify_ref(SV *sv, U32 to_what)
{
if (SvGMAGICAL(sv))
mg_get(sv);
# include <unistd.h>
#endif
+#ifdef HAS_SYSCALL
+#ifdef __cplusplus
+extern "C" int syscall(unsigned long,...);
+#endif
+#endif
+
#ifdef I_SYS_WAIT
# include <sys/wait.h>
#endif
}
void
-setdefout(gv)
-GV *gv;
+setdefout(GV *gv)
{
dTHR;
if (gv)
GV *newdefout, *egv;
HV *hv;
- newdefout = (op->op_private > 0) ? ((GV *) POPs) : NULL;
+ newdefout = (op->op_private > 0) ? ((GV *) POPs) : (GV *) NULL;
egv = GvEGV(defoutgv);
if (!egv)
}
static OP *
-doform(cv,gv,retop)
-CV *cv;
-GV *gv;
-OP *retop;
+doform(CV *cv, GV *gv, OP *retop)
{
dTHR;
register CONTEXT *cx;
{
dSP; dTARGET;
#if defined(HAS_TELLDIR) || defined(telldir)
-#if !defined(telldir) && !defined(HAS_TELLDIR_PROTOTYPE)
+#if !defined(telldir) && !defined(HAS_TELLDIR_PROTOTYPE) && !defined(DONT_DECLARE_STD)
long telldir _((DIR *));
#endif
GV *gv = (GV*)POPs;
I32 which = op->op_type;
register char **elem;
register SV *sv;
- struct hostent *gethostbyname();
- struct hostent *gethostbyaddr();
-#ifdef HAS_GETHOSTENT
- struct hostent *gethostent();
+#if defined(HAS_GETHOSTENT) && !defined(DONT_DECLARE_STD)
+ struct hostent *gethostbyname(const char *);
+ struct hostent *gethostbyaddr(const char *, int, int);
+ struct hostent *gethostent(void);
#endif
struct hostent *hent;
unsigned long len;
I32 which = op->op_type;
register char **elem;
register SV *sv;
- struct netent *getnetbyname();
- struct netent *getnetbyaddr();
- struct netent *getnetent();
+#ifndef DONT_DECLARE_STD
+ struct netent *getnetbyname(const char *);
+ struct netent *getnetbyaddr(long int, int);
+ struct netent *getnetent(void);
+#endif
struct netent *nent;
if (which == OP_GNBYNAME)
#ifdef HAS_SOCKET
I32 which = op->op_type;
register char **elem;
- register SV *sv;
- struct protoent *getprotobyname();
- struct protoent *getprotobynumber();
- struct protoent *getprotoent();
+ register SV *sv;
+#ifndef DONT_DECLARE_STD
+ struct protoent *getprotobyname(const char *);
+ struct protoent *getprotobynumber(int);
+ struct protoent *getprotoent(void);
+#endif
struct protoent *pent;
if (which == OP_GPBYNAME)
I32 which = op->op_type;
register char **elem;
register SV *sv;
- struct servent *getservbyname();
+#ifndef DONT_DECLARE_STD
+ struct servent *getservbyname(const char *, const char *);
struct servent *getservbynumber();
- struct servent *getservent();
+ struct servent *getservent(void);
+#endif
struct servent *sent;
if (which == OP_GSBYNAME) {
PP(pp_syscall)
{
-#ifdef HAS_SYSCALL
+#ifdef HAS_SYSCALL
dSP; dMARK; dORIGMARK; dTARGET;
register I32 items = SP - MARK;
unsigned long a[20];
*/
static int
-fcntl_emulate_flock(fd, operation)
-int fd;
-int operation;
+fcntl_emulate_flock(int fd, int operation)
{
struct flock flock;
* of the structure of the compiled regexp. [I'll say.]
*/
regexp *
-pregcomp(exp,xend,pm)
-char* exp;
-char* xend;
-PMOP* pm;
+pregcomp(char *exp, char *xend, PMOP *pm)
{
register regexp *r;
register char *scan;
* follows makes it hard to avoid.
*/
static char *
-reg(paren, flagp)
-I32 paren; /* Parenthesized? */
-I32 *flagp;
+reg(I32 paren, I32 *flagp)
+ /* Parenthesized? */
+
{
register char *ret;
register char *br;
* Implements the concatenation operator.
*/
static char *
-regbranch(flagp)
-I32 *flagp;
+regbranch(I32 *flagp)
{
register char *ret;
register char *chain;
* endmarker role is not redundant.
*/
static char *
-regpiece(flagp)
-I32 *flagp;
+regpiece(I32 *flagp)
{
register char *ret;
register char op;
* [Yes, it is worth fixing, some scripts can run twice the speed.]
*/
static char *
-regatom(flagp)
-I32 *flagp;
+regatom(I32 *flagp)
{
register char *ret = 0;
I32 flags;
}
static char *
-regwhite(p, e)
-char *p;
-char *e;
+regwhite(char *p, char *e)
{
while (p < e) {
if (isSPACE(*p))
}
static void
-regset(opnd, c)
-char *opnd;
-register I32 c;
+regset(char *opnd, register I32 c)
{
if (opnd == ®dummy)
return;
}
static char *
-regclass()
+regclass(void)
{
register char *opnd;
- register I32 class;
+ register I32 Class;
register I32 lastclass = 1234;
register I32 range = 0;
register char *ret;
ret = regnode(ANYOF);
opnd = regcode;
- for (class = 0; class < 33; class++)
+ for (Class = 0; Class < 33; Class++)
regc(0);
if (*regparse == '^') { /* Complement of range. */
regnaughty++;
goto skipcond; /* allow 1st char to be ] or - */
while (regparse < regxend && *regparse != ']') {
skipcond:
- class = UCHARAT(regparse++);
- if (class == '\\') {
- class = UCHARAT(regparse++);
- switch (class) {
+ Class = UCHARAT(regparse++);
+ if (Class == '\\') {
+ Class = UCHARAT(regparse++);
+ switch (Class) {
case 'w':
if (regflags & PMf_LOCALE) {
if (opnd != ®dummy)
*opnd |= ANYOF_ALNUML;
}
else {
- for (class = 0; class < 256; class++)
- if (isALNUM(class))
- regset(opnd, class);
+ for (Class = 0; Class < 256; Class++)
+ if (isALNUM(Class))
+ regset(opnd, Class);
}
lastclass = 1234;
continue;
*opnd |= ANYOF_NALNUML;
}
else {
- for (class = 0; class < 256; class++)
- if (!isALNUM(class))
- regset(opnd, class);
+ for (Class = 0; Class < 256; Class++)
+ if (!isALNUM(Class))
+ regset(opnd, Class);
}
lastclass = 1234;
continue;
*opnd |= ANYOF_SPACEL;
}
else {
- for (class = 0; class < 256; class++)
- if (isSPACE(class))
- regset(opnd, class);
+ for (Class = 0; Class < 256; Class++)
+ if (isSPACE(Class))
+ regset(opnd, Class);
}
lastclass = 1234;
continue;
*opnd |= ANYOF_NSPACEL;
}
else {
- for (class = 0; class < 256; class++)
- if (!isSPACE(class))
- regset(opnd, class);
+ for (Class = 0; Class < 256; Class++)
+ if (!isSPACE(Class))
+ regset(opnd, Class);
}
lastclass = 1234;
continue;
case 'd':
- for (class = '0'; class <= '9'; class++)
- regset(opnd, class);
+ for (Class = '0'; Class <= '9'; Class++)
+ regset(opnd, Class);
lastclass = 1234;
continue;
case 'D':
- for (class = 0; class < '0'; class++)
- regset(opnd, class);
- for (class = '9' + 1; class < 256; class++)
- regset(opnd, class);
+ for (Class = 0; Class < '0'; Class++)
+ regset(opnd, Class);
+ for (Class = '9' + 1; Class < 256; Class++)
+ regset(opnd, Class);
lastclass = 1234;
continue;
case 'n':
- class = '\n';
+ Class = '\n';
break;
case 'r':
- class = '\r';
+ Class = '\r';
break;
case 't':
- class = '\t';
+ Class = '\t';
break;
case 'f':
- class = '\f';
+ Class = '\f';
break;
case 'b':
- class = '\b';
+ Class = '\b';
break;
case 'e':
- class = '\033';
+ Class = '\033';
break;
case 'a':
- class = '\007';
+ Class = '\007';
break;
case 'x':
- class = scan_hex(regparse, 2, &numlen);
+ Class = scan_hex(regparse, 2, &numlen);
regparse += numlen;
break;
case 'c':
- class = UCHARAT(regparse++);
- class = toCTRL(class);
+ Class = UCHARAT(regparse++);
+ Class = toCTRL(Class);
break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- class = scan_oct(--regparse, 3, &numlen);
+ Class = scan_oct(--regparse, 3, &numlen);
regparse += numlen;
break;
}
}
if (range) {
- if (lastclass > class)
+ if (lastclass > Class)
FAIL("invalid [] range in regexp");
range = 0;
}
else {
- lastclass = class;
+ lastclass = Class;
if (*regparse == '-' && regparse+1 < regxend &&
regparse[1] != ']') {
regparse++;
continue; /* do it next time */
}
}
- for ( ; lastclass <= class; lastclass++)
+ for ( ; lastclass <= Class; lastclass++)
regset(opnd, lastclass);
- lastclass = class;
+ lastclass = Class;
}
if (*regparse != ']')
FAIL("unmatched [] in regexp");
}
static char*
-nextchar()
+nextchar(void)
{
char* retval = regparse++;
- regtail - set the next-pointer at the end of a node chain
*/
static void
-regtail(p, val)
-char *p;
-char *val;
+regtail(char *p, char *val)
{
register char *scan;
register char *temp;
- regoptail - regtail on operand of first argument; nop if operandless
*/
static void
-regoptail(p, val)
-char *p;
-char *val;
+regoptail(char *p, char *val)
{
/* "Operandless" and "op != BRANCH" are synonymous in practice. */
if (p == NULL || p == ®dummy || regkind[(U8)OP(p)] != BRANCH)
- regcurly - a little FSA that accepts {\d+,?\d*}
*/
STATIC I32
-regcurly(s)
-register char *s;
+regcurly(register char *s)
{
if (*s++ != '{')
return FALSE;
- regdump - dump a regexp onto Perl_debug_log in vaguely comprehensible form
*/
void
-regdump(r)
-regexp *r;
+regdump(regexp *r)
{
register char *s;
register char op = EXACT; /* Arbitrary non-END op. */
- regprop - printable representation of opcode
*/
void
-regprop(sv, o)
-SV *sv;
-char *o;
+regprop(SV *sv, char *o)
{
register char *p = 0;
#endif /* DEBUGGING */
void
-pregfree(r)
-struct regexp *r;
+pregfree(struct regexp *r)
{
if (!r)
return;
static char * regcppop _((void));
static CHECKPOINT
-regcppush(parenfloor)
-I32 parenfloor;
+regcppush(I32 parenfloor)
{
dTHR;
int retval = savestack_ix;
}
static char *
-regcppop()
+regcppop(void)
{
dTHR;
I32 i = SSPOPINT;
* 0 > length [ "foobar" =~ / ( (foo) | (bar) )* /x ]->[1]
*/
static void
-regcppartblow(base)
-I32 base;
+regcppartblow(I32 base)
{
dTHR;
I32 i = SSPOPINT;
- pregexec - match a regexp against a string
*/
I32
-pregexec(prog, stringarg, strend, strbeg, minend, screamer, safebase)
-register regexp *prog;
-char *stringarg;
-register char *strend; /* pointer to null at end of string */
-char *strbeg; /* real beginning of string */
-I32 minend; /* end of match must be at least minend after stringarg */
-SV *screamer;
-I32 safebase; /* no need to remember string in subbase */
+pregexec(register regexp *prog, char *stringarg, register char *strend, char *strbeg, I32 minend, SV *screamer, I32 safebase)
+
+
+ /* pointer to null at end of string */
+ /* real beginning of string */
+ /* end of match must be at least minend after stringarg */
+
+ /* no need to remember string in subbase */
{
register char *s;
register char *c;
- regtry - try match at specific point
*/
static I32 /* 0 failure, 1 success */
-regtry(prog, startpos)
-regexp *prog;
-char *startpos;
+regtry(regexp *prog, char *startpos)
{
register I32 i;
register char **sp;
* advantage of machines that use a register save mask on subroutine entry.
*/
static I32 /* 0 failure, 1 success */
-regmatch(prog)
-char *prog;
+regmatch(char *prog)
{
register char *scan; /* Current node. */
char *next; /* Next node. */
* rather than incrementing count on every character.]
*/
static I32
-regrepeat(p, max)
-char *p;
-I32 max;
+regrepeat(char *p, I32 max)
{
register char *scan;
register char *opnd;
*/
static bool
-reginclass(p, c)
-register char *p;
-register I32 c;
+reginclass(register char *p, register I32 c)
{
char flags = *p;
bool match = FALSE;
* that bypass this code for speed.]
*/
char *
-regnext(p)
-register char *p;
+regnext(register char *p)
{
register I32 offset;
dEXT char *watchok;
int
-runops_standard() {
+runops_standard(void) {
dTHR;
SAVEI32(runlevel);
runlevel++;
static void debprof _((OP*o));
int
-runops_debug() {
+runops_debug(void) {
dTHR;
if (!op) {
warn("NULL OP IN RUN");
}
I32
-debop(o)
-OP *o;
+debop(OP *o)
{
SV *sv;
deb("%s", op_name[o->op_type]);
}
void
-watch(addr)
-char **addr;
+watch(char **addr)
{
watchaddr = addr;
watchok = *addr;
}
static void
-debprof(o)
-OP* o;
+debprof(OP *o)
{
if (!profiledata)
New(000, profiledata, MAXO, U32);
}
void
-debprofdump()
+debprofdump(void)
{
unsigned i;
if (!profiledata)
#include "perl.h"
SV**
-stack_grow(sp, p, n)
-SV** sp;
-SV** p;
-int n;
+stack_grow(SV **sp, SV **p, int n)
{
dTHR;
stack_sp = sp;
}
I32
-cxinc()
+cxinc(void)
{
dTHR;
cxstack_max = cxstack_max * 3 / 2;
}
void
-push_return(retop)
-OP *retop;
+push_return(OP *retop)
{
dTHR;
if (retstack_ix == retstack_max) {
}
OP *
-pop_return()
+pop_return(void)
{
dTHR;
if (retstack_ix > 0)
}
void
-push_scope()
+push_scope(void)
{
dTHR;
if (scopestack_ix == scopestack_max) {
}
void
-pop_scope()
+pop_scope(void)
{
dTHR;
I32 oldsave = scopestack[--scopestack_ix];
}
void
-markstack_grow()
+markstack_grow(void)
{
dTHR;
I32 oldmax = markstack_max - markstack;
}
void
-savestack_grow()
+savestack_grow(void)
{
dTHR;
savestack_max = savestack_max * 3 / 2;
}
void
-free_tmps()
+free_tmps(void)
{
dTHR;
/* XXX should tmps_floor live in cxstack? */
}
static SV *
-save_scalar_at(sptr)
-SV **sptr;
+save_scalar_at(SV **sptr)
{
dTHR;
register SV *sv;
}
SV *
-save_scalar(gv)
-GV *gv;
+save_scalar(GV *gv)
{
dTHR;
SSCHECK(3);
}
SV*
-save_svref(sptr)
-SV **sptr;
+save_svref(SV **sptr)
{
dTHR;
SSCHECK(3);
}
void
-save_gp(gv, empty)
-GV *gv;
-I32 empty;
+save_gp(GV *gv, I32 empty)
{
dTHR;
SSCHECK(6);
}
AV *
-save_ary(gv)
-GV *gv;
+save_ary(GV *gv)
{
dTHR;
AV *oav, *av;
}
HV *
-save_hash(gv)
-GV *gv;
+save_hash(GV *gv)
{
dTHR;
HV *ohv, *hv;
}
void
-save_item(item)
-register SV *item;
+save_item(register SV *item)
{
dTHR;
register SV *sv;
}
void
-save_int(intp)
-int *intp;
+save_int(int *intp)
{
dTHR;
SSCHECK(3);
}
void
-save_long(longp)
-long *longp;
+save_long(long int *longp)
{
dTHR;
SSCHECK(3);
}
void
-save_I32(intp)
-I32 *intp;
+save_I32(I32 *intp)
{
dTHR;
SSCHECK(3);
}
void
-save_I16(intp)
-I16 *intp;
+save_I16(I16 *intp)
{
dTHR;
SSCHECK(3);
}
void
-save_iv(ivp)
-IV *ivp;
+save_iv(IV *ivp)
{
dTHR;
SSCHECK(3);
* force word-alignment and we'll miss the pointer.
*/
void
-save_pptr(pptr)
-char **pptr;
+save_pptr(char **pptr)
{
dTHR;
SSCHECK(3);
}
void
-save_sptr(sptr)
-SV **sptr;
+save_sptr(SV **sptr)
{
dTHR;
SSCHECK(3);
}
void
-save_nogv(gv)
-GV *gv;
+save_nogv(GV *gv)
{
dTHR;
SSCHECK(2);
}
void
-save_hptr(hptr)
-HV **hptr;
+save_hptr(HV **hptr)
{
dTHR;
SSCHECK(3);
}
void
-save_aptr(aptr)
-AV **aptr;
+save_aptr(AV **aptr)
{
dTHR;
SSCHECK(3);
}
void
-save_freesv(sv)
-SV *sv;
+save_freesv(SV *sv)
{
dTHR;
SSCHECK(2);
}
void
-save_freeop(o)
-OP *o;
+save_freeop(OP *o)
{
dTHR;
SSCHECK(2);
}
void
-save_freepv(pv)
-char *pv;
+save_freepv(char *pv)
{
dTHR;
SSCHECK(2);
}
void
-save_clearsv(svp)
-SV** svp;
+save_clearsv(SV **svp)
{
dTHR;
SSCHECK(2);
}
void
-save_delete(hv,key,klen)
-HV *hv;
-char *key;
-I32 klen;
+save_delete(HV *hv, char *key, I32 klen)
{
dTHR;
SSCHECK(4);
}
void
-save_list(sarg,maxsarg)
-register SV **sarg;
-I32 maxsarg;
+save_list(register SV **sarg, I32 maxsarg)
{
dTHR;
register SV *sv;
}
void
-save_destructor(f,p)
-void (*f) _((void*));
-void* p;
+save_destructor(void (*f) (void *), void *p)
{
dTHR;
SSCHECK(3);
}
void
-save_op()
+save_op(void)
{
dTHR;
SSCHECK(2);
}
void
-leave_scope(base)
-I32 base;
+leave_scope(I32 base)
{
dTHR;
register SV *sv;
#ifdef DEBUGGING
void
-cx_dump(cx)
-CONTEXT* cx;
+cx_dump(CONTEXT *cx)
{
dTHR;
PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), block_type[cx->cx_type]);
} while (0)
static void
-del_sv(p)
-SV* p;
+del_sv(SV *p)
{
if (debug & 32768) {
SV* sva;
#endif /* DEBUGGING */
void
-sv_add_arena(ptr, size, flags)
-char* ptr;
-U32 size;
-U32 flags;
+sv_add_arena(char *ptr, U32 size, U32 flags)
{
SV* sva = (SV*)ptr;
register SV* sv;
/* sv_mutex must be held while calling more_sv() */
static SV*
-more_sv()
+more_sv(void)
{
register SV* sv;
}
static void
-visit(f)
-SVFUNC f;
+visit(SVFUNC f)
{
SV* sva;
SV* sv;
#endif /* PURIFY */
static void
-do_report_used(sv)
-SV* sv;
+do_report_used(SV *sv)
{
if (SvTYPE(sv) != SVTYPEMASK) {
/* XXX Perhaps this ought to go to Perl_debug_log, if DEBUGGING. */
}
void
-sv_report_used()
+sv_report_used(void)
{
visit(do_report_used);
}
static void
-do_clean_objs(sv)
-SV* sv;
+do_clean_objs(SV *sv)
{
SV* rv;
#ifndef DISABLE_DESTRUCTOR_KLUDGE
static void
-do_clean_named_objs(sv)
-SV* sv;
+do_clean_named_objs(SV *sv)
{
if (SvTYPE(sv) == SVt_PVGV && GvSV(sv))
do_clean_objs(GvSV(sv));
static bool in_clean_objs = FALSE;
void
-sv_clean_objs()
+sv_clean_objs(void)
{
in_clean_objs = TRUE;
#ifndef DISABLE_DESTRUCTOR_KLUDGE
}
static void
-do_clean_all(sv)
-SV* sv;
+do_clean_all(SV *sv)
{
DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning loops:\n "), sv_dump(sv));)
SvFLAGS(sv) |= SVf_BREAK;
static bool in_clean_all = FALSE;
void
-sv_clean_all()
+sv_clean_all(void)
{
in_clean_all = TRUE;
visit(do_clean_all);
}
void
-sv_free_arenas()
+sv_free_arenas(void)
{
SV* sva;
SV* svanext;
}
static XPVIV*
-new_xiv()
+new_xiv(void)
{
IV** xiv;
if (xiv_root) {
}
static void
-del_xiv(p)
-XPVIV* p;
+del_xiv(XPVIV *p)
{
IV** xiv = (IV**)((char*)(p) + sizeof(XPV));
*xiv = (IV *)xiv_root;
}
static XPVIV*
-more_xiv()
+more_xiv(void)
{
register IV** xiv;
register IV** xivend;
}
static XPVNV*
-new_xnv()
+new_xnv(void)
{
double* xnv;
if (xnv_root) {
}
static void
-del_xnv(p)
-XPVNV* p;
+del_xnv(XPVNV *p)
{
double* xnv = (double*)((char*)(p) + sizeof(XPVIV));
*(double**)xnv = xnv_root;
}
static XPVNV*
-more_xnv()
+more_xnv(void)
{
register double* xnv;
register double* xnvend;
}
static XRV*
-new_xrv()
+new_xrv(void)
{
XRV* xrv;
if (xrv_root) {
}
static void
-del_xrv(p)
-XRV* p;
+del_xrv(XRV *p)
{
p->xrv_rv = (SV*)xrv_root;
xrv_root = p;
}
static XRV*
-more_xrv()
+more_xrv(void)
{
register XRV* xrv;
register XRV* xrvend;
}
static XPV*
-new_xpv()
+new_xpv(void)
{
XPV* xpv;
if (xpv_root) {
}
static void
-del_xpv(p)
-XPV* p;
+del_xpv(XPV *p)
{
p->xpv_pv = (char*)xpv_root;
xpv_root = p;
}
static XPV*
-more_xpv()
+more_xpv(void)
{
register XPV* xpv;
register XPV* xpvend;
#define del_XIV(p) free((char*)p)
#else
#define new_XIV() (void*)new_xiv()
-#define del_XIV(p) del_xiv(p)
+#define del_XIV(p) del_xiv((XPVIV*) p)
#endif
#ifdef PURIFY
#define del_XNV(p) free((char*)p)
#else
#define new_XNV() (void*)new_xnv()
-#define del_XNV(p) del_xnv(p)
+#define del_XNV(p) del_xnv((XPVNV*) p)
#endif
#ifdef PURIFY
#define del_XRV(p) free((char*)p)
#else
#define new_XRV() (void*)new_xrv()
-#define del_XRV(p) del_xrv(p)
+#define del_XRV(p) del_xrv((XRV*) p)
#endif
#ifdef PURIFY
#define del_XPV(p) free((char*)p)
#else
#define new_XPV() (void*)new_xpv()
-#define del_XPV(p) del_xpv(p)
+#define del_XPV(p) del_xpv((XPV *)p)
#endif
#define new_XPVIV() (void*)safemalloc(sizeof(XPVIV))
#define del_XPVIO(p) free((char*)p)
bool
-sv_upgrade(sv, mt)
-register SV* sv;
-U32 mt;
+sv_upgrade(register SV *sv, U32 mt)
{
char* pv;
U32 cur;
#ifdef DEBUGGING
char *
-sv_peek(sv)
-register SV *sv;
+sv_peek(SV *sv)
{
SV *t = sv_newmortal();
STRLEN prevlen;
#endif
int
-sv_backoff(sv)
-register SV *sv;
+sv_backoff(register SV *sv)
{
assert(SvOOK(sv));
if (SvIVX(sv)) {
}
char *
-sv_grow(sv,newlen)
-register SV *sv;
+sv_grow(register SV *sv, register I32 newlen)
+
#ifndef DOSISH
-register I32 newlen;
+
#else
-unsigned long newlen;
+
#endif
{
register char *s;
}
void
-sv_setiv(sv,i)
-register SV *sv;
-IV i;
+sv_setiv(register SV *sv, IV i)
{
sv_check_thinkfirst(sv);
switch (SvTYPE(sv)) {
}
void
-sv_setuv(sv,u)
-register SV *sv;
-UV u;
+sv_setuv(register SV *sv, UV u)
{
if (u <= IV_MAX)
sv_setiv(sv, u);
}
void
-sv_setnv(sv,num)
-register SV *sv;
-double num;
+sv_setnv(register SV *sv, double num)
{
sv_check_thinkfirst(sv);
switch (SvTYPE(sv)) {
}
static void
-not_a_number(sv)
-SV *sv;
+not_a_number(SV *sv)
{
dTHR;
char tmpbuf[64];
}
IV
-sv_2iv(sv)
-register SV *sv;
+sv_2iv(register SV *sv)
{
if (!sv)
return 0;
}
UV
-sv_2uv(sv)
-register SV *sv;
+sv_2uv(register SV *sv)
{
if (!sv)
return 0;
}
double
-sv_2nv(sv)
-register SV *sv;
+sv_2nv(register SV *sv)
{
if (!sv)
return 0.0;
}
static IV
-asIV(sv)
-SV *sv;
+asIV(SV *sv)
{
I32 numtype = looks_like_number(sv);
double d;
}
static UV
-asUV(sv)
-SV *sv;
+asUV(SV *sv)
{
I32 numtype = looks_like_number(sv);
}
I32
-looks_like_number(sv)
-SV *sv;
+looks_like_number(SV *sv)
{
register char *s;
register char *send;
}
char *
-sv_2pv(sv, lp)
-register SV *sv;
-STRLEN *lp;
+sv_2pv(register SV *sv, STRLEN *lp)
{
register char *s;
int olderrno;
/* This function is only called on magical items */
bool
-sv_2bool(sv)
-register SV *sv;
+sv_2bool(register SV *sv)
{
if (SvGMAGICAL(sv))
mg_get(sv);
*/
void
-sv_setsv(dstr,sstr)
-SV *dstr;
-register SV *sstr;
+sv_setsv(SV *dstr, register SV *sstr)
{
dTHR;
register U32 sflags;
}
void
-sv_setpvn(sv,ptr,len)
-register SV *sv;
-register const char *ptr;
-register STRLEN len;
+sv_setpvn(register SV *sv, register const char *ptr, register STRLEN len)
{
assert(len >= 0); /* STRLEN is probably unsigned, so this may
elicit a warning, but it won't hurt. */
}
void
-sv_setpv(sv,ptr)
-register SV *sv;
-register const char *ptr;
+sv_setpv(register SV *sv, register const char *ptr)
{
register STRLEN len;
}
void
-sv_usepvn(sv,ptr,len)
-register SV *sv;
-register char *ptr;
-register STRLEN len;
+sv_usepvn(register SV *sv, register char *ptr, register STRLEN len)
{
sv_check_thinkfirst(sv);
if (!SvUPGRADE(sv, SVt_PV))
}
static void
-sv_check_thinkfirst(sv)
-register SV *sv;
+sv_check_thinkfirst(register SV *sv)
{
if (SvTHINKFIRST(sv)) {
if (SvREADONLY(sv)) {
}
void
-sv_chop(sv,ptr) /* like set but assuming ptr is in sv */
-register SV *sv;
-register char *ptr;
+sv_chop(register SV *sv, register char *ptr) /* like set but assuming ptr is in sv */
+
+
{
register STRLEN delta;
}
void
-sv_catpvn(sv,ptr,len)
-register SV *sv;
-register char *ptr;
-register STRLEN len;
+sv_catpvn(register SV *sv, register char *ptr, register STRLEN len)
{
STRLEN tlen;
char *junk;
}
void
-sv_catsv(dstr,sstr)
-SV *dstr;
-register SV *sstr;
+sv_catsv(SV *dstr, register SV *sstr)
{
char *s;
STRLEN len;
}
void
-sv_catpv(sv,ptr)
-register SV *sv;
-register char *ptr;
+sv_catpv(register SV *sv, register char *ptr)
{
register STRLEN len;
STRLEN tlen;
newSV(x,len)
I32 x;
#else
-newSV(len)
+newSV(STRLEN len)
#endif
-STRLEN len;
+
{
register SV *sv;
/* name is assumed to contain an SV* if (name && namelen == HEf_SVKEY) */
void
-sv_magic(sv, obj, how, name, namlen)
-register SV *sv;
-SV *obj;
-int how;
-char *name;
-I32 namlen;
+sv_magic(register SV *sv, SV *obj, int how, char *name, I32 namlen)
{
MAGIC* mg;
}
int
-sv_unmagic(sv, type)
-SV* sv;
-int type;
+sv_unmagic(SV *sv, int type)
{
MAGIC* mg;
MAGIC** mgp;
}
void
-sv_insert(bigstr,offset,len,little,littlelen)
-SV *bigstr;
-STRLEN offset;
-STRLEN len;
-char *little;
-STRLEN littlelen;
+sv_insert(SV *bigstr, STRLEN offset, STRLEN len, char *little, STRLEN littlelen)
{
register char *big;
register char *mid;
/* make sv point to what nstr did */
void
-sv_replace(sv,nsv)
-register SV *sv;
-register SV *nsv;
+sv_replace(register SV *sv, register SV *nsv)
{
U32 refcnt = SvREFCNT(sv);
sv_check_thinkfirst(sv);
}
void
-sv_clear(sv)
-register SV *sv;
+sv_clear(register SV *sv)
{
assert(sv);
assert(SvREFCNT(sv) == 0);
}
SV *
-sv_newref(sv)
-SV* sv;
+sv_newref(SV *sv)
{
if (sv)
SvREFCNT(sv)++;
}
void
-sv_free(sv)
-SV *sv;
+sv_free(SV *sv)
{
if (!sv)
return;
}
STRLEN
-sv_len(sv)
-register SV *sv;
+sv_len(register SV *sv)
{
char *junk;
STRLEN len;
}
I32
-sv_eq(str1,str2)
-register SV *str1;
-register SV *str2;
+sv_eq(register SV *str1, register SV *str2)
{
char *pv1;
STRLEN cur1;
}
I32
-sv_cmp(str1, str2)
-register SV *str1;
-register SV *str2;
+sv_cmp(register SV *str1, register SV *str2)
{
STRLEN cur1 = 0;
- char *pv1 = str1 ? SvPV(str1, cur1) : NULL;
+ char *pv1 = str1 ? SvPV(str1, cur1) : (char *) NULL;
STRLEN cur2 = 0;
- char *pv2 = str2 ? SvPV(str2, cur2) : NULL;
+ char *pv2 = str2 ? SvPV(str2, cur2) : (char *) NULL;
I32 retval;
if (!cur1)
}
I32
-sv_cmp_locale(sv1, sv2)
-register SV *sv1;
-register SV *sv2;
+sv_cmp_locale(register SV *sv1, register SV *sv2)
{
#ifdef USE_LOCALE_COLLATE
goto raw_compare;
len1 = 0;
- pv1 = sv1 ? sv_collxfrm(sv1, &len1) : NULL;
+ pv1 = sv1 ? sv_collxfrm(sv1, &len1) : (char *) NULL;
len2 = 0;
- pv2 = sv2 ? sv_collxfrm(sv2, &len2) : NULL;
+ pv2 = sv2 ? sv_collxfrm(sv2, &len2) : (char *) NULL;
if (!pv1 || !len1) {
if (pv2 && len2)
* according to the locale settings.
*/
char *
-sv_collxfrm(sv, nxp)
- SV *sv;
- STRLEN *nxp;
+sv_collxfrm(SV *sv, STRLEN *nxp)
{
MAGIC *mg;
- mg = SvMAGICAL(sv) ? mg_find(sv, 'o') : NULL;
+ mg = SvMAGICAL(sv) ? mg_find(sv, 'o') : (MAGIC *) NULL;
if (!mg || !mg->mg_ptr || *(U32*)mg->mg_ptr != collation_ix) {
char *s, *xf;
STRLEN len, xlen;
#endif /* USE_LOCALE_COLLATE */
char *
-sv_gets(sv,fp,append)
-register SV *sv;
-register PerlIO *fp;
-I32 append;
+sv_gets(register SV *sv, register FILE *fp, I32 append)
{
char *rsptr;
STRLEN rslen;
void
-sv_inc(sv)
-register SV *sv;
+sv_inc(register SV *sv)
{
register char *d;
int flags;
}
void
-sv_dec(sv)
-register SV *sv;
+sv_dec(register SV *sv)
{
int flags;
* permanent location. */
static void
-sv_mortalgrow()
+sv_mortalgrow(void)
{
dTHR;
tmps_max += (tmps_max < 512) ? 128 : 512;
}
SV *
-sv_mortalcopy(oldstr)
-SV *oldstr;
+sv_mortalcopy(SV *oldstr)
{
dTHR;
register SV *sv;
}
SV *
-sv_newmortal()
+sv_newmortal(void)
{
dTHR;
register SV *sv;
/* same thing without the copying */
SV *
-sv_2mortal(sv)
-register SV *sv;
+sv_2mortal(register SV *sv)
{
dTHR;
if (!sv)
}
SV *
-newSVpv(s,len)
-char *s;
-STRLEN len;
+newSVpv(char *s, STRLEN len)
{
register SV *sv;
SV *
-newSVnv(n)
-double n;
+newSVnv(double n)
{
register SV *sv;
}
SV *
-newSViv(i)
-IV i;
+newSViv(IV i)
{
register SV *sv;
}
SV *
-newRV(ref)
-SV *ref;
+newRV(SV *ref)
{
dTHR;
register SV *sv;
#ifdef CRIPPLED_CC
SV *
-newRV_noinc(ref)
-SV *ref;
+newRV_noinc(SV *ref)
{
register SV *sv;
/* make an exact duplicate of old */
SV *
-newSVsv(old)
-register SV *old;
+newSVsv(register SV *old)
{
register SV *sv;
}
void
-sv_reset(s,stash)
-register char *s;
-HV *stash;
+sv_reset(register char *s, HV *stash)
{
register HE *entry;
register GV *gv;
}
IO*
-sv_2io(sv)
-SV *sv;
+sv_2io(SV *sv)
{
IO* io;
GV* gv;
}
CV *
-sv_2cv(sv, st, gvp, lref)
-SV *sv;
-HV **st;
-GV **gvp;
-I32 lref;
+sv_2cv(SV *sv, HV **st, GV **gvp, I32 lref)
{
GV *gv;
CV *cv;
#ifndef SvTRUE
I32
-SvTRUE(sv)
-register SV *sv;
+SvTRUE(register SV *sv)
{
if (!sv)
return 0;
#ifndef SvIV
IV
-SvIV(sv)
-register SV *sv;
+SvIV(register SV *sv)
{
if (SvIOK(sv))
return SvIVX(sv);
#ifndef SvUV
UV
-SvUV(sv)
-register SV *sv;
+SvUV(register SV *sv)
{
if (SvIOK(sv))
return SvUVX(sv);
#ifndef SvNV
double
-SvNV(sv)
-register SV *sv;
+SvNV(register SV *sv)
{
if (SvNOK(sv))
return SvNVX(sv);
#ifdef CRIPPLED_CC
char *
-sv_pvn(sv, lp)
-SV *sv;
-STRLEN *lp;
+sv_pvn(SV *sv, STRLEN *lp)
{
if (SvPOK(sv)) {
*lp = SvCUR(sv);
#endif
char *
-sv_pvn_force(sv, lp)
-SV *sv;
-STRLEN *lp;
+sv_pvn_force(SV *sv, STRLEN *lp)
{
char *s;
}
char *
-sv_reftype(sv, ob)
-SV* sv;
-int ob;
+sv_reftype(SV *sv, int ob)
{
if (ob && SvOBJECT(sv))
return HvNAME(SvSTASH(sv));
}
int
-sv_isobject(sv)
-SV *sv;
+sv_isobject(SV *sv)
{
if (!sv)
return 0;
}
int
-sv_isa(sv, name)
-SV *sv;
-char *name;
+sv_isa(SV *sv, char *name)
{
if (!sv)
return 0;
}
SV*
-newSVrv(rv, classname)
-SV *rv;
-char *classname;
+newSVrv(SV *rv, char *classname)
{
dTHR;
SV *sv;
}
SV*
-sv_setref_pv(rv, classname, pv)
-SV *rv;
-char *classname;
-void* pv;
+sv_setref_pv(SV *rv, char *classname, void *pv)
{
if (!pv)
sv_setsv(rv, &sv_undef);
}
SV*
-sv_setref_iv(rv, classname, iv)
-SV *rv;
-char *classname;
-IV iv;
+sv_setref_iv(SV *rv, char *classname, IV iv)
{
sv_setiv(newSVrv(rv,classname), iv);
return rv;
}
SV*
-sv_setref_nv(rv, classname, nv)
-SV *rv;
-char *classname;
-double nv;
+sv_setref_nv(SV *rv, char *classname, double nv)
{
sv_setnv(newSVrv(rv,classname), nv);
return rv;
}
SV*
-sv_setref_pvn(rv, classname, pv, n)
-SV *rv;
-char *classname;
-char* pv;
-I32 n;
+sv_setref_pvn(SV *rv, char *classname, char *pv, I32 n)
{
sv_setpvn(newSVrv(rv,classname), pv, n);
return rv;
}
SV*
-sv_bless(sv,stash)
-SV* sv;
-HV* stash;
+sv_bless(SV *sv, HV *stash)
{
dTHR;
SV *ref;
}
static void
-sv_unglob(sv)
-SV* sv;
+sv_unglob(SV *sv)
{
assert(SvTYPE(sv) == SVt_PVGV);
SvFAKE_off(sv);
}
void
-sv_unref(sv)
-SV* sv;
+sv_unref(SV *sv)
{
SV* rv = SvRV(sv);
}
void
-sv_taint(sv)
-SV *sv;
+sv_taint(SV *sv)
{
sv_magic((sv), Nullsv, 't', Nullch, 0);
}
void
-sv_untaint(sv)
-SV *sv;
+sv_untaint(SV *sv)
{
if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) {
MAGIC *mg = mg_find(sv, 't');
}
bool
-sv_tainted(sv)
-SV *sv;
+sv_tainted(SV *sv)
{
if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) {
MAGIC *mg = mg_find(sv, 't');
}
void
-sv_setpviv(sv, iv)
-SV *sv;
-IV iv;
+sv_setpviv(SV *sv, IV iv)
{
STRLEN len;
char buf[TYPE_DIGITS(UV)];
}
void
-sv_vsetpvfn(sv, pat, patlen, args, svargs, svmax, used_locale)
- SV *sv;
- const char *pat;
- STRLEN patlen;
- va_list *args;
- SV **svargs;
- I32 svmax;
- bool *used_locale;
+sv_vsetpvfn(SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs, I32 svmax, char *used_locale)
{
sv_setpvn(sv, "", 0);
sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, used_locale);
}
void
-sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, used_locale)
- SV *sv;
- const char *pat;
- STRLEN patlen;
- va_list *args;
- SV **svargs;
- I32 svmax;
- bool *used_locale;
+sv_vcatpvfn(SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs, I32 svmax, char *used_locale)
{
dTHR;
char *p;
#ifdef DEBUGGING
void
-sv_dump(sv)
-SV* sv;
+sv_dump(SV *sv)
{
SV *d = sv_newmortal();
char *s;
}
#else
void
-sv_dump(sv)
-SV* sv;
+sv_dump(SV *sv)
{
}
#endif
#include "perl.h"
void
-taint_proper(f, s)
-const char *f;
-char *s;
+taint_proper(const char *f, char *s)
{
char *ug;
}
void
-taint_env()
+taint_env(void)
{
SV** svp;
MAGIC* mg;
#define OLDLOP(f) return(yylval.ival=f,expect = XTERM,bufptr = s,(int)LSTOP)
static int
-ao(toketype)
-int toketype;
+ao(int toketype)
{
if (*bufptr == '=') {
bufptr++;
}
static void
-no_op(what, s)
-char *what;
-char *s;
+no_op(char *what, char *s)
{
char *oldbp = bufptr;
bool is_first = (oldbufptr == linestart);
}
static void
-missingterm(s)
-char *s;
+missingterm(char *s)
{
char tmpbuf[3];
char q;
}
void
-deprecate(s)
-char *s;
+deprecate(char *s)
{
if (dowarn)
warn("Use of %s is deprecated", s);
}
static void
-depcom()
+depcom(void)
{
deprecate("comma-less variable list");
}
void
-lex_start(line)
-SV *line;
+lex_start(SV *line)
{
dTHR;
char *s;
}
void
-lex_end()
+lex_end(void)
{
doextract = FALSE;
}
static void
-restore_rsfp(f)
-void *f;
+restore_rsfp(void *f)
{
PerlIO *fp = (PerlIO*)f;
}
static void
-incline(s)
-char *s;
+incline(char *s)
{
dTHR;
char *t;
}
static char *
-skipspace(s)
-register char *s;
+skipspace(register char *s)
{
dTHR;
if (lex_formbrack && lex_brackets <= lex_formbrack) {
}
static void
-check_uni() {
+check_uni(void) {
char *s;
char ch;
char *t;
#define UNI(f) return uni(f,s)
static int
-uni(f,s)
-I32 f;
-char *s;
+uni(I32 f, char *s)
{
yylval.ival = f;
expect = XTERM;
}
static void
-force_next(type)
-I32 type;
+force_next(I32 type)
{
nexttype[nexttoke] = type;
nexttoke++;
}
static char *
-force_word(start,token,check_keyword,allow_pack,allow_tick)
-register char *start;
-int token;
-int check_keyword;
-int allow_pack;
-int allow_tick;
+force_word(register char *start, int token, int check_keyword, int allow_pack, int allow_tick)
{
register char *s;
STRLEN len;
}
static void
-force_ident(s, kind)
-register char *s;
-int kind;
+force_ident(register char *s, int kind)
{
if (s && *s) {
OP* o = (OP*)newSVOP(OP_CONST, 0, newSVpv(s,0));
}
static char *
-force_version(s)
-char *s;
+force_version(char *s)
{
OP *version = Nullop;
}
static SV *
-q(sv)
-SV *sv;
+q(SV *sv)
{
register char *s;
register char *send;
}
static I32
-sublex_start()
+sublex_start(void)
{
register I32 op_type = yylval.ival;
}
static I32
-sublex_push()
+sublex_push(void)
{
dTHR;
push_scope();
}
static I32
-sublex_done()
+sublex_done(void)
{
if (!lex_starts++) {
expect = XOPERATOR;
}
static char *
-scan_const(start)
-char *start;
+scan_const(char *start)
{
register char *send = bufend;
SV *sv = NEWSV(93, send - start);
/* This is the one truly awful dwimmer necessary to conflate C and sed. */
static int
-intuit_more(s)
-register char *s;
+intuit_more(register char *s)
{
if (lex_brackets)
return TRUE;
}
static int
-intuit_method(start,gv)
-char *start;
-GV *gv;
+intuit_method(char *start, GV *gv)
{
char *s = start + (*start == '$');
char tmpbuf[sizeof tokenbuf];
}
static char*
-incl_perldb()
+incl_perldb(void)
{
if (perldb) {
char *pdb = getenv("PERL5DB");
static int filter_debug = 0;
SV *
-filter_add(funcp, datasv)
- filter_t funcp;
- SV *datasv;
+filter_add(filter_t funcp, SV *datasv)
{
if (!funcp){ /* temporary handy debugging hack to be deleted */
filter_debug = atoi((char*)datasv);
/* Delete most recently added instance of this filter function. */
void
-filter_del(funcp)
- filter_t funcp;
+filter_del(filter_t funcp)
{
if (filter_debug)
warn("filter_del func %p", funcp);
/* Invoke the n'th filter function for the current rsfp. */
I32
-filter_read(idx, buf_sv, maxlen)
- int idx;
- SV *buf_sv;
- int maxlen; /* 0 = read one text line */
+filter_read(int idx, SV *buf_sv, int maxlen)
+
+
+ /* 0 = read one text line */
{
filter_t funcp;
SV *datasv = NULL;
}
static char *
-filter_gets(sv,fp, append)
-register SV *sv;
-register PerlIO *fp;
-STRLEN append;
+filter_gets(register SV *sv, register FILE *fp, STRLEN append)
{
if (rsfp_filters) {
EXT int yychar; /* last token */
int
-yylex()
+yylex(void)
{
dTHR;
register char *s;
}
I32
-keyword(d, len)
-register char *d;
-I32 len;
+keyword(register char *d, I32 len)
{
switch (*d) {
case '_':
}
static void
-checkcomma(s,name,what)
-register char *s;
-char *name;
-char *what;
+checkcomma(register char *s, char *name, char *what)
{
char *w;
}
static char *
-scan_word(s, dest, destlen, allow_package, slp)
-register char *s;
-char *dest;
-STRLEN destlen;
-int allow_package;
-STRLEN *slp;
+scan_word(register char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp)
{
register char *d = dest;
register char *e = d + destlen - 3; /* two-character token, ending NUL */
}
static char *
-scan_ident(s, send, dest, destlen, ck_uni)
-register char *s;
-register char *send;
-char *dest;
-STRLEN destlen;
-I32 ck_uni;
+scan_ident(register char *s, register char *send, char *dest, STRLEN destlen, I32 ck_uni)
{
register char *d;
register char *e;
return s;
}
-void pmflag(pmfl,ch)
-U16* pmfl;
-int ch;
+void pmflag(U16 *pmfl, int ch)
{
if (ch == 'i')
*pmfl |= PMf_FOLD;
}
static char *
-scan_pat(start)
-char *start;
+scan_pat(char *start)
{
PMOP *pm;
char *s;
}
static char *
-scan_subst(start)
-char *start;
+scan_subst(char *start)
{
register char *s;
register PMOP *pm;
}
void
-hoistmust(pm)
-register PMOP *pm;
+hoistmust(register PMOP *pm)
{
dTHR;
if (!pm->op_pmshort && pm->op_pmregexp->regstart &&
}
static char *
-scan_trans(start)
-char *start;
+scan_trans(char *start)
{
register char* s;
OP *o;
short *tbl;
I32 squash;
- I32 delete;
+ I32 Delete;
I32 complement;
yylval.ival = OP_NULL;
New(803,tbl,256,short);
o = newPVOP(OP_TRANS, 0, (char*)tbl);
- complement = delete = squash = 0;
+ complement = Delete = squash = 0;
while (*s == 'c' || *s == 'd' || *s == 's') {
if (*s == 'c')
complement = OPpTRANS_COMPLEMENT;
else if (*s == 'd')
- delete = OPpTRANS_DELETE;
+ Delete = OPpTRANS_DELETE;
else
squash = OPpTRANS_SQUASH;
s++;
}
- o->op_private = delete|squash|complement;
+ o->op_private = Delete|squash|complement;
lex_op = o;
yylval.ival = OP_TRANS;
}
static char *
-scan_heredoc(s)
-register char *s;
+scan_heredoc(register char *s)
{
dTHR;
SV *herewas;
}
static char *
-scan_inputsymbol(start)
-char *start;
+scan_inputsymbol(char *start)
{
register char *s = start;
register char *d;
}
static char *
-scan_str(start)
-char *start;
+scan_str(char *start)
{
dTHR;
SV *sv;
}
char *
-scan_num(start)
-char *start;
+scan_num(char *start)
{
register char *s = start;
register char *d;
}
static char *
-scan_formline(s)
-register char *s;
+scan_formline(register char *s)
{
dTHR;
register char *eol;
}
static void
-set_csh()
+set_csh(void)
{
#ifdef CSH
if (!cshlen)
}
I32
-start_subparse(is_format, flags)
-I32 is_format;
-U32 flags;
+start_subparse(I32 is_format, U32 flags)
{
dTHR;
I32 oldsavestack_ix = savestack_ix;
}
int
-yywarn(s)
-char *s;
+yywarn(char *s)
{
dTHR;
--error_count;
}
int
-yyerror(s)
-char *s;
+yyerror(char *s)
{
dTHR;
char *where = NULL;
*/
static SV *
-isa_lookup(stash, name, len, level)
-HV *stash;
-char *name;
-int len;
-int level;
+isa_lookup(HV *stash, char *name, int len, int level)
{
AV* av;
GV* gv;
}
bool
-sv_derived_from(sv, name)
-SV * sv ;
-char * name ;
+sv_derived_from(SV *sv, char *name)
{
SV *rv;
char *type;
}
void
-boot_core_UNIVERSAL()
+boot_core_UNIVERSAL(void)
{
char *file = __FILE__;
/* copy a string up to some (non-backslashed) delimiter, if any */
char *
-delimcpy(to, toend, from, fromend, delim, retlen)
-register char *to;
-register char *toend;
-register char *from;
-register char *fromend;
-register int delim;
-I32 *retlen;
+delimcpy(register char *to, register char *toend, register char *from, register char *fromend, register int delim, I32 *retlen)
{
register I32 tolen;
for (tolen = 0; from < fromend; from++, tolen++) {
/* This routine was donated by Corey Satten. */
char *
-instr(big, little)
-register char *big;
-register char *little;
+instr(register char *big, register char *little)
{
register char *s, *x;
register I32 first;
/* same as instr but allow embedded nulls */
char *
-ninstr(big, bigend, little, lend)
-register char *big;
-register char *bigend;
-char *little;
-char *lend;
+ninstr(register char *big, register char *bigend, char *little, char *lend)
{
register char *s, *x;
register I32 first = *little;
/* reverse of the above--find last substring */
char *
-rninstr(big, bigend, little, lend)
-register char *big;
-char *bigend;
-char *little;
-char *lend;
+rninstr(register char *big, char *bigend, char *little, char *lend)
{
register char *bigbeg;
register char *s, *x;
* Set up for a new ctype locale.
*/
void
-perl_new_ctype(newctype)
- char *newctype;
+perl_new_ctype(char *newctype)
{
#ifdef USE_LOCALE_CTYPE
* Set up for a new collation locale.
*/
void
-perl_new_collate(newcoll)
- char *newcoll;
+perl_new_collate(char *newcoll)
{
#ifdef USE_LOCALE_COLLATE
* Set up for a new numeric locale.
*/
void
-perl_new_numeric(newnum)
- char *newnum;
+perl_new_numeric(char *newnum)
{
#ifdef USE_LOCALE_NUMERIC
}
void
-perl_set_numeric_standard()
+perl_set_numeric_standard(void)
{
#ifdef USE_LOCALE_NUMERIC
}
void
-perl_set_numeric_local()
+perl_set_numeric_local(void)
{
#ifdef USE_LOCALE_NUMERIC
* Initialize locale awareness.
*/
int
-perl_init_i18nl10n(printwarn)
- int printwarn;
+perl_init_i18nl10n(int printwarn)
{
int ok = 1;
/* returns
/* Backwards compatibility. */
int
-perl_init_i18nl14n(printwarn)
- int printwarn;
+perl_init_i18nl14n(int printwarn)
{
return perl_init_i18nl10n(printwarn);
}
* Please see sv_collxfrm() to see how this is used.
*/
char *
-mem_collxfrm(s, len, xlen)
- const char *s;
- STRLEN len;
- STRLEN *xlen;
+mem_collxfrm(const char *s, STRLEN len, STRLEN *xlen)
{
char *xbuf;
STRLEN xalloc, xin, xout;
#endif /* USE_LOCALE_COLLATE */
void
-fbm_compile(sv)
-SV *sv;
+fbm_compile(SV *sv)
{
register unsigned char *s;
register unsigned char *table;
}
char *
-fbm_instr(big, bigend, littlestr)
-unsigned char *big;
-register unsigned char *bigend;
-SV *littlestr;
+fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr)
{
register unsigned char *s;
register I32 tmp;
}
char *
-screaminstr(bigstr, littlestr)
-SV *bigstr;
-SV *littlestr;
+screaminstr(SV *bigstr, SV *littlestr)
{
register unsigned char *s, *x;
register unsigned char *big;
}
I32
-ibcmp(s1, s2, len)
-char *s1, *s2;
-register I32 len;
+ibcmp(char *s1, char *s2, register I32 len)
{
register U8 *a = (U8 *)s1;
register U8 *b = (U8 *)s2;
}
I32
-ibcmp_locale(s1, s2, len)
-char *s1, *s2;
-register I32 len;
+ibcmp_locale(char *s1, char *s2, register I32 len)
{
register U8 *a = (U8 *)s1;
register U8 *b = (U8 *)s2;
/* copy a string to a safe spot */
char *
-savepv(sv)
-char *sv;
+savepv(char *sv)
{
register char *newaddr;
/* same thing but with a known length */
char *
-savepvn(sv, len)
-char *sv;
-register I32 len;
+savepvn(char *sv, register I32 len)
{
register char *newaddr;
/* the SV for form() and mess() is not kept in an arena */
static SV *
-mess_alloc()
+mess_alloc(void)
{
SV *sv;
XPVMG *any;
}
char *
-mess(pat, args)
- const char *pat;
- va_list *args;
+mess(const char *pat, va_list *args)
{
SV *sv;
static char dgd[] = " during global destruction.\n";
#ifndef VMS /* VMS' my_setenv() is in VMS.c */
#ifndef WIN32
void
-my_setenv(nam,val)
-char *nam, *val;
+my_setenv(char *nam, char *val)
{
register I32 i=setenv_getix(nam); /* where does it go? */
#endif /* WIN32 */
I32
-setenv_getix(nam)
-char *nam;
+setenv_getix(char *nam)
{
register I32 i, len = strlen(nam);
/* VMS' my_popen() is in VMS.c, same with OS/2. */
#if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && !defined(VMS)
PerlIO *
-my_popen(cmd,mode)
-char *cmd;
-char *mode;
+my_popen(char *cmd, char *mode)
{
int p[2];
- register I32 this, that;
+ register I32 This, that;
register I32 pid;
SV *sv;
I32 doexec = strNE(cmd,"-");
#endif
if (pipe(p) < 0)
return Nullfp;
- this = (*mode == 'w');
- that = !this;
+ This = (*mode == 'w');
+ that = !This;
if (doexec && tainting) {
taint_env();
taint_proper("Insecure %s%s", "EXEC");
}
while ((pid = (doexec?vfork():fork())) < 0) {
if (errno != EAGAIN) {
- close(p[this]);
+ close(p[This]);
if (!doexec)
croak("Can't fork");
return Nullfp;
GV* tmpgv;
#define THIS that
-#define THAT this
+#define THAT This
close(p[THAT]);
if (p[THIS] != (*mode == 'r')) {
dup2(p[THIS], *mode == 'r');
}
do_execfree(); /* free any memory malloced by child on vfork */
close(p[that]);
- if (p[that] < p[this]) {
- dup2(p[this], p[that]);
- close(p[this]);
- p[this] = p[that];
+ if (p[that] < p[This]) {
+ dup2(p[This], p[that]);
+ close(p[This]);
+ p[This] = p[that];
}
- sv = *av_fetch(fdpid,p[this],TRUE);
+ sv = *av_fetch(fdpid,p[This],TRUE);
(void)SvUPGRADE(sv,SVt_IV);
SvIVX(sv) = pid;
forkprocess = pid;
- return PerlIO_fdopen(p[this], mode);
+ return PerlIO_fdopen(p[This], mode);
}
#else
#if defined(atarist) || defined(DJGPP)
#ifdef HAS_SIGACTION
Sighandler_t
-rsignal(signo, handler)
-int signo;
-Sighandler_t handler;
+rsignal(int signo, Sighandler_t handler)
{
struct sigaction act, oact;
}
Sighandler_t
-rsignal_state(signo)
-int signo;
+rsignal_state(int signo)
{
struct sigaction oact;
}
int
-rsignal_save(signo, handler, save)
-int signo;
-Sighandler_t handler;
-Sigsave_t *save;
+rsignal_save(int signo, Sighandler_t handler, Sigsave_t *save)
{
struct sigaction act;
}
int
-rsignal_restore(signo, save)
-int signo;
-Sigsave_t *save;
+rsignal_restore(int signo, Sigsave_t *save)
{
return sigaction(signo, save, (struct sigaction *)NULL);
}
/* VMS' my_pclose() is in VMS.c; same with OS/2 */
#if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && !defined(VMS)
I32
-my_pclose(ptr)
-PerlIO *ptr;
+my_pclose(FILE *ptr)
{
Sigsave_t hstat, istat, qstat;
int status;
#if !defined(DOSISH) || defined(OS2)
I32
-wait4pid(pid,statusp,flags)
-int pid;
-int *statusp;
-int flags;
+wait4pid(int pid, int *statusp, int flags)
{
SV *sv;
SV** svp;
void
/*SUPPRESS 590*/
-pidgone(pid,status)
-int pid;
-int status;
+pidgone(int pid, int status)
{
register SV *sv;
char spid[TYPE_CHARS(int)];
#endif
void
-repeatcpy(to,from,len,count)
-register char *to;
-register char *from;
-I32 len;
-register I32 count;
+repeatcpy(register char *to, register char *from, I32 len, register I32 count)
{
register I32 todo;
register char *frombase = from;
#endif /* !HAS_RENAME */
UV
-scan_oct(start, len, retlen)
-char *start;
-I32 len;
-I32 *retlen;
+scan_oct(char *start, I32 len, I32 *retlen)
{
register char *s = start;
register UV retval = 0;
}
UV
-scan_hex(start, len, retlen)
-char *start;
-I32 len;
-I32 *retlen;
+scan_hex(char *start, I32 len, I32 *retlen)
{
register char *s = start;
register UV retval = 0;
#endif /* OLD_PTHREADS_API */
MAGIC *
-condpair_magic(sv)
-SV *sv;
+condpair_magic(SV *sv)
{
MAGIC *mg;
* Needed for SunOS with Sun's 'acc' for example.
*/
double
-Perl_huge()
+Perl_huge(void)
{
return HUGE_VAL;
}