diff options
author | Larry Wall <larry@netlabs.com> | 1993-11-10 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1993-11-10 00:00:00 +0000 |
commit | 463ee0b2acbd047c27e8b5393cdd8398881824c5 (patch) | |
tree | ae17d9179fc861ae5fc5a86da9139631530cb6fe /do/defined | |
parent | 93a17b20b6d176db3f04f51a63b0a781e5ffd11c (diff) | |
download | perl-463ee0b2acbd047c27e8b5393cdd8398881824c5.tar.gz |
perl 5.0 alpha 4
[editor's note: the sparc executables have not been included, and
emacs backup files have been removed. This was reconstructed from a
tarball found on the September 1994 InfoMagic CD; the date of this is
approximate]
Diffstat (limited to 'do/defined')
-rw-r--r-- | do/defined | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/do/defined b/do/defined deleted file mode 100644 index 2721f05032..0000000000 --- a/do/defined +++ /dev/null @@ -1,42 +0,0 @@ -int /*SUPPRESS 590*/ -do_defined(TARG,arg,gimme,arglast) -STR *TARG; -register ARG *arg; -int gimme; -int *arglast; -{ - register int type; - register int retarg = arglast[0] + 1; - int retval; - ARRAY *ary; - HASH *hash; - - if ((arg[1].arg_type & A_MASK) != A_LEXPR) - fatal("Illegal argument to defined()"); - arg = arg[1].arg_ptr.arg_arg; - type = arg->arg_type; - - if (type == O_SUBR || type == O_DBSUBR) { - if ((arg[1].arg_type & A_MASK) == A_WORD) - retval = stab_sub(arg[1].arg_ptr.arg_stab) != 0; - else { - STR *tmpstr = STAB_STR(arg[1].arg_ptr.arg_stab); - - retval = tmpstr && stab_sub(stabent(str_get(tmpstr),TRUE)) != 0; - } - } - else if (type == O_ARRAY || type == O_LARRAY || - type == O_ASLICE || type == O_LASLICE ) - retval = ((ary = stab_xarray(arg[1].arg_ptr.arg_stab)) != 0 - && ary->ary_max >= 0 ); - else if (type == O_HASH || type == O_LHASH || - type == O_HSLICE || type == O_LHSLICE ) - retval = ((hash = stab_xhash(arg[1].arg_ptr.arg_stab)) != 0 - && hash->tbl_array); - else - retval = FALSE; - str_numset(TARG,(double)retval); - stack->ary_array[retarg] = TARG; - return retarg; -} - |