home *** CD-ROM | disk | FTP | other *** search
- /* $Header: perl.h,v 3.0.1.11 91/01/11 18:10:57 lwall Locked $
- *
- * Copyright (c) 1989, Larry Wall
- *
- * You may distribute under the terms of the GNU General Public License
- * as specified in the README file that comes with the perl 3.0 kit.
- *
- * $Log: perl.h,v $
- * Revision 3.0.1.11 91/01/11 18:10:57 lwall
- * patch42: ANSIfied the stat mode checking
- *
- * Revision 3.0.1.10 90/11/10 01:44:13 lwall
- * patch38: more msdos/os2 upgrades
- *
- * Revision 3.0.1.9 90/10/15 17:59:41 lwall
- * patch29: some machines didn't like unsigned C preprocessor values
- *
- * Revision 3.0.1.8 90/08/09 04:10:53 lwall
- * patch19: various MSDOS and OS/2 patches folded in
- * patch19: did preliminary work toward debugging packages and evals
- * patch19: added -x switch to extract script from input trash
- *
- * Revision 3.0.1.7 90/03/27 16:12:52 lwall
- * patch16: MSDOS support
- * patch16: support for machines that can't cast negative floats to unsigned ints
- *
- * Revision 3.0.1.6 90/03/12 16:40:43 lwall
- * patch13: did some ndir straightening up for Xenix
- *
- * Revision 3.0.1.5 90/02/28 17:52:28 lwall
- * patch9: Configure now determines whether volatile is supported
- * patch9: volatilized some more variables for super-optimizing compilers
- * patch9: unused VREG symbol deleted
- * patch9: perl can now start up other interpreters scripts
- * patch9: you may now undef $/ to have no input record separator
- * patch9: nested evals clobbered their longjmp environment
- *
- * Revision 3.0.1.4 89/12/21 20:07:35 lwall
- * patch7: arranged for certain registers to be restored after longjmp()
- * patch7: Configure now compiles a test program to figure out time.h fiasco
- * patch7: Configure now detects DG/UX thingies like [sg]etpgrp2 and utime.h
- * patch7: memcpy() and memset() return void in __STDC__
- * patch7: errno may now be a macro with an lvalue
- * patch7: ANSI strerror() is now supported
- * patch7: Xenix support for sys/ndir.h, cross compilation
- *
- * Revision 3.0.1.3 89/11/17 15:28:57 lwall
- * patch5: byteorder now is a hex value
- * patch5: Configure now looks for <time.h> including <sys/time.h>
- *
- * Revision 3.0.1.2 89/11/11 04:39:38 lwall
- * patch2: Configure may now set -DDEBUGGING
- * patch2: netinet/in.h needed sys/types.h some places
- * patch2: more <sys/time.h> and <time.h> wrangling
- * patch2: yydebug moved to where type doesn't matter
- *
- * Revision 3.0.1.1 89/10/26 23:17:08 lwall
- * patch1: vfork now conditionally defined based on VFORK
- * patch1: DEC risc machines have a buggy memcmp
- * patch1: perl.h now includes <netinet/in.h> if it exists
- *
- * Revision 3.0 89/10/18 15:21:21 lwall
- * 3.0 baseline
- *
- */
-
- #define VOIDUSED 1
- #include "config.h"
-
- #define PROTOTYPES
- #define PROTO(x) x
-
- #undef I_PARAM
- #undef I_TYPES
- #undef I_TIMES
- #undef TIMES
-
- #define TIME_T time_t
-
- #define ANSI_INCLUDES
-
- #define mypopen popen
- #define mypclose pclose
-
- #define VOLATILE
-
- #ifdef MEMCPY
- #define bcopy(s1,s2,l) memcpy(s2,s1,l)
- #define bzero(s,l) memset(s,0,l)
- #endif /* MEMCPY */
-
- #ifndef BCMP /* prefer bcmp slightly 'cuz it doesn't order */
- #define bcmp(s1,s2,l) memcmp(s1,s2,l)
- #endif
-
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
- #include <ctype.h>
- #include <setjmp.h>
- #include <time.h>
- #include <errno.h>
- #include "kernel.h"
- #include "swis.h"
-
- #include "stat.h"
-
- #ifdef GDBM
-
- #include "gdbm.h"
- #define SOME_DBM
- #ifdef NDBM
- #undef NDBM
- #endif
- #ifdef ODBM
- #undef ODBM
- #endif
-
- #define DBM dbm_file_info
- #define dbm_fetch(db,key) gdbm_fetch(db,key)
- #define dbm_delete(db,key) gdbm_delete(db,key)
- #define dbm_nextkey(db,key) gdbm_nextkey(db,key)
- #define dbm_firstkey(db) gdbm_firstkey(db)
- #define dbm_close(db) gdbm_close(db)
- #define dbm_store(db,key,val,rep) gdbm_store(db,key,val)
-
- #else /* GDBM */
- #ifdef NDBM
-
- #include <ndbm.h>
- #define SOME_DBM
- #ifdef ODBM
- #undef ODBM
- #endif
-
- #else /* NDBM */
- #ifdef ODBM
-
- #ifdef NULL
- #undef NULL /* suppress redefinition message */
- #endif
- #include <dbm.h>
- #ifdef NULL
- #undef NULL
- #endif
- #define NULL 0 /* silly thing is, we don't even use this */
- #define SOME_DBM
- #define dbm_fetch(db,dkey) fetch(dkey)
- #define dbm_delete(db,dkey) delete(dkey)
- #define dbm_store(db,dkey,dcontent,flags) store(dkey,dcontent)
- #define dbm_close(db) dbmclose()
- #define dbm_firstkey(db) firstkey()
-
- #endif /* ODBM */
- #endif /* NDBM */
- #endif /* GDBM */
-
- #ifdef SOME_DBM
- EXT char *dbmkey;
- EXT int dbmlen;
- #endif
-
- #if defined(I_DIRENT) && !defined(M_XENIX)
- # include <dirent.h>
- # define DIRENT dirent
- #else
- # ifdef I_SYSNDIR
- # include <sys/ndir.h>
- # define DIRENT direct
- # else
- # ifdef I_SYSDIR
- # ifdef hp9000s500
- # include <ndir.h> /* may be wrong in the future */
- # else
- # include "sys/dir.h"
- # endif
- # define DIRENT direct
- # endif
- # endif
- #endif
-
- typedef unsigned int STRLEN;
-
- typedef struct arg ARG;
- typedef struct cmd CMD;
- typedef struct formcmd FCMD;
- typedef struct scanpat SPAT;
- typedef struct stio STIO;
- typedef struct sub SUBR;
- typedef struct string STR;
- typedef struct atbl ARRAY;
- typedef struct htbl HASH;
- typedef struct regexp REGEXP;
- typedef struct stabptrs STBP;
- typedef struct stab STAB;
- typedef struct callsave CSV;
-
- #include "handy.h"
- #include "regexp.h"
- #include "str.h"
- #include "util.h"
- #include "form.h"
- #include "stab.h"
- #include "spat.h"
- #include "arg.h"
- #include "cmd.h"
- #include "array.h"
- #include "hash.h"
-
- #if defined(iAPX286) || defined(M_I286) || defined(I80286)
- # define I286
- #endif
-
- #ifndef __STDC__
- #ifdef CHARSPRINTF
- char *sprintf();
- #else
- int sprintf();
- #endif
- #endif
-
- EXT char *Yes INIT("1");
- EXT char *No INIT("");
-
- /* "gimme" values */
-
- /* Note: cmd.c assumes that it can use && to produce one of these values! */
- #define G_SCALAR 0
- #define G_ARRAY 1
-
- #ifdef CRIPPLED_CC
- int str_true();
- #else /* !CRIPPLED_CC */
- #define str_true(str) (Str = (str), \
- (Str->str_pok ? \
- ((*Str->str_ptr > '0' || \
- Str->str_cur > 1 || \
- (Str->str_cur && *Str->str_ptr != '0')) ? 1 : 0) \
- : \
- (Str->str_nok ? (Str->str_u.str_nval != 0.0) : 0 ) ))
- #endif /* CRIPPLED_CC */
-
- #ifdef DEBUGGING
- #define str_peek(str) (Str = (str), \
- (Str->str_pok ? \
- Str->str_ptr : \
- (Str->str_nok ? \
- (sprintf(tokenbuf,"num(%g)",Str->str_u.str_nval), \
- (char*)tokenbuf) : \
- "" )))
- #endif
-
- #ifdef CRIPPLED_CC
- char *str_get();
- #else
- #ifdef TAINT
- #define str_get(str) (Str = (str), tainted |= Str->str_tainted, \
- (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
- #else
- #define str_get(str) (Str = (str), (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
- #endif /* TAINT */
- #endif /* CRIPPLED_CC */
-
- #ifdef CRIPPLED_CC
- double str_gnum();
- #else /* !CRIPPLED_CC */
- #ifdef TAINT
- #define str_gnum(str) (Str = (str), tainted |= Str->str_tainted, \
- (Str->str_nok ? Str->str_u.str_nval : str_2num(Str)))
- #else /* !TAINT */
- #define str_gnum(str) (Str = (str), (Str->str_nok ? Str->str_u.str_nval : str_2num(Str)))
- #endif /* TAINT*/
- #endif /* CRIPPLED_CC */
- EXT STR *Str;
-
- #define GROWSTR(pp,lp,len) if (*(lp) < (len)) growstr(pp,lp,len)
-
- #ifndef MSDOS
- #define STR_GROW(str,len) if ((str)->str_len < (len)) str_grow(str,len)
- #define Str_Grow str_grow
- #else
- /* extra parentheses intentionally NOT placed around "len"! */
- #define STR_GROW(str,len) if ((str)->str_len < (unsigned long)len) \
- str_grow(str,(unsigned long)len)
- #define Str_Grow(str,len) str_grow(str,(unsigned long)(len))
- #endif /* MSDOS */
-
- #ifndef BYTEORDER
- #define BYTEORDER 0x1234
- #endif
-
- #ifdef CASTNEGFLOAT
- #define U_S(what) ((unsigned short)(what))
- #define U_I(what) ((unsigned int)(what))
- #define U_L(what) ((unsigned long)(what))
- #else
- unsigned long castulong();
- #define U_S(what) ((unsigned int)castulong(what))
- #define U_I(what) ((unsigned int)castulong(what))
- #define U_L(what) (castulong(what))
- #endif
-
- extern CMD *add_label PROTO((char *, CMD *));
- extern CMD *block_head PROTO((CMD *));
- extern CMD *append_line PROTO((CMD *, CMD *));
- extern CMD *make_acmd PROTO((int, STAB *, ARG *, ARG *));
- extern CMD *make_ccmd PROTO((int, ARG *, struct compcmd));
- extern CMD *make_icmd PROTO((int, ARG *, struct compcmd));
- extern CMD *invert PROTO((CMD *));
- extern CMD *addcond PROTO((CMD *, ARG *));
- extern CMD *addloop PROTO((CMD *, ARG *));
- extern CMD *wopt PROTO((CMD *));
- extern CMD *over PROTO((STAB *, CMD *));
-
- extern STAB *stabent PROTO((char *, int));
- extern STAB *genstab PROTO((void));
-
- extern ARG *stab2arg PROTO((int, STAB *));
- extern ARG *op_new PROTO((int));
- extern ARG *make_op PROTO((int, int, ARG *, ARG *, ARG *));
- extern ARG *make_match PROTO((int, ARG *, SPAT *));
- extern ARG *make_split PROTO((STAB *, ARG *, ARG *));
- extern ARG *rcatmaybe PROTO((ARG *));
- extern ARG *listish PROTO((ARG *));
- extern ARG *maybelistish PROTO((int, ARG *));
- extern ARG *localize PROTO((ARG *));
- extern ARG *fixeval PROTO((ARG *));
- extern ARG *jmaybe PROTO((ARG *));
- extern ARG *l PROTO((ARG *));
- extern ARG *fixl PROTO((int, ARG *));
- extern ARG *mod_match PROTO((int, ARG *, ARG *));
- extern ARG *make_list PROTO((ARG *));
- extern ARG *cmd_to_arg PROTO((CMD *));
- extern ARG *addflags PROTO((int, int, ARG *));
- extern ARG *hide_ary PROTO((ARG *));
- extern ARG *cval_to_arg PROTO((char *));
-
- #ifdef LEAKTEST
- extern STR *str_new PROTO((int, STRLEN));
- #else
- extern STR *str_new PROTO((STRLEN));
- #endif
- extern STR *stab_str PROTO((STR *));
-
- extern int do_each PROTO((STR *, HASH *, int, int *));
- extern int do_subr PROTO((ARG *, int, int *));
- extern int do_match PROTO((STR *, ARG *, int, int *));
- extern int do_unpack PROTO((STR *, int, int *));
- extern int do_truncate PROTO((STR *, ARG *, int, int *));
- extern int eval PROTO((ARG *, int, int)); /* evaluates expressions */
- extern int do_eval PROTO((STR *, int, HASH *, int, int *)); /* evaluates eval operator */
- extern int do_assign PROTO((ARG *, int, int *));
- extern int frename PROTO((const char *, const char *));
-
- extern SUBR *make_sub PROTO((char *, CMD *));
- extern SUBR *make_usub PROTO((char *, int, int (*)(), char *));
-
- extern FCMD *load_format PROTO((void));
-
- extern char *scanpat PROTO((char *));
- extern char *scansubst PROTO((char *));
- extern char *scantrans PROTO((char *));
- extern char *scanstr PROTO((char *));
- extern char *scanreg PROTO((char *, char *, char *));
- extern char *str_append_till PROTO((STR *, char *, char *, int, char *));
- extern char *str_gets PROTO((STR *, FILE *, int));
- extern char *str_grow PROTO((STR *, int));
- extern char *getenvar PROTO((char *, char **));
-
- extern bool do_open PROTO((STAB *, char *, STRLEN));
- extern bool do_close PROTO((STAB *, int));
- extern bool do_print PROTO((STR *, FILE *));
- extern bool do_aprint PROTO((ARG *, FILE *, int *));
- extern bool do_exec PROTO((char *));
- extern bool do_aexec PROTO((STR *, int *));
-
- extern int do_subst PROTO((STR *, ARG *, int));
- extern int do_dbsubr PROTO((ARG *, int, int *));
- extern int do_study PROTO((STR *, ARG *, int, int *));
- extern int do_defined PROTO((STR *, ARG *, int, int *));
- extern int do_undef PROTO((STR *, ARG *, int, int *));
- extern int do_vec PROTO((int, STR *, int *));
- extern int do_ctl PROTO((int, STAB *, int, STR *));
- extern int do_dirop PROTO((int, STAB *, int, int *));
- extern int do_splice PROTO((ARRAY *, int, int *));
- extern int do_grep PROTO((ARG *, STR *, int, int *));
- extern int do_reverse PROTO((int *));
- extern int do_sreverse PROTO((STR *, int *));
- extern int do_sort PROTO((STR *, STAB *, int, int *));
- extern int do_range PROTO((int, int *));
- extern int do_kv PROTO((STR *, HASH *, int, int, int *));
- extern int do_aspawn PROTO((STR *, int *));
- extern int do_spawn PROTO((char *));
- extern int do_unlink PROTO((int *));
- extern int do_caller PROTO((ARG *, int, int, int *));
- extern int ingroup PROTO((int, int));
- extern int looks_like_number PROTO((STR *));
- extern int mystat PROTO((ARG *, STR *));
- extern int yyparse PROTO((void));
- extern int yylex PROTO((void));
-
- extern void str_replace PROTO((STR *, STR *));
- extern void str_inc PROTO((STR *));
- extern void str_dec PROTO((STR *));
- extern void str_free PROTO((STR *));
- extern void stab_clear PROTO((STAB *));
- extern void do_unshift PROTO((ARRAY *, int *));
- extern void do_join PROTO((STR *, int *));
- extern void do_sprintf PROTO((STR *, int, STR **));
- extern void do_accept PROTO((STR *, STAB *, STAB *));
- extern void do_pipe PROTO((STR *, STAB *, STAB *));
- extern void do_vecset PROTO((STR *, STR *));
- extern void do_pack PROTO((STR *, int *));
- extern void do_chop PROTO((STR *, STR *));
- extern void do_vop PROTO((int, STR *, STR *, STR *));
- extern void savelist PROTO((STR **, int));
- extern void saveitem PROTO((STR *));
- extern void saveint PROTO((int *));
- extern void savelong PROTO((long *));
- extern void savesptr PROTO((STR **));
- extern void savehptr PROTO((HASH **));
- extern void restorelist PROTO((int));
- extern void repeatcpy PROTO((char *, char *, int, int));
- extern void make_form PROTO((STAB *, FCMD *));
- extern void make_cswitch PROTO((CMD *, int));
- extern void make_nswitch PROTO((CMD *, int));
- extern void yyerror PROTO((char *));
- extern void cmd_free PROTO((CMD *));
- extern void arg_free PROTO((ARG *));
- extern void spat_free PROTO((SPAT *));
- extern void dehoist PROTO((ARG *, int));
- extern void magicalize PROTO((char *));
- extern void hoistmust PROTO((SPAT *));
- extern void while_io PROTO((CMD *));
- extern void grow_dlevel PROTO((void));
- extern void checkcomma PROTO((char *, char *));
- extern void regfree PROTO((struct regexp *));
- extern void stamp PROTO((char *));
- extern void userinit PROTO((void));
- extern void magicname PROTO((char *, char *, int));
-
- extern STR *do_syscall PROTO((int *));
-
- extern HASH *savehash PROTO((STAB *));
-
- extern ARRAY *saveary PROTO((STAB *));
-
- #ifdef DEBUGGING
- extern void dump_all PROTO((void));
- extern void dump_cmd PROTO((CMD *, CMD *));
- extern void dump_arg PROTO((ARG *));
- extern void dump_flags PROTO((char *, unsigned int));
- extern void dump_stab PROTO((STAB *));
- extern void dump_spat PROTO((SPAT *));
- extern void dump PROTO((char *, ...));
- #endif
-
- EXT char **origargv;
- EXT int origargc;
- EXT line_t subline INIT(0);
- EXT STR *subname INIT(Nullstr);
- EXT int arybase INIT(0);
-
- struct outrec {
- long o_lines;
- char *o_str;
- int o_len;
- };
-
- EXT struct outrec outrec;
- EXT struct outrec toprec;
-
- EXT STAB *stdinstab INIT(Nullstab);
- EXT STAB *last_in_stab INIT(Nullstab);
- EXT STAB *defstab INIT(Nullstab);
- EXT STAB *argvstab INIT(Nullstab);
- EXT STAB *envstab INIT(Nullstab);
- EXT STAB *sigstab INIT(Nullstab);
- EXT STAB *defoutstab INIT(Nullstab);
- EXT STAB *curoutstab INIT(Nullstab);
- EXT STAB *argvoutstab INIT(Nullstab);
- EXT STAB *incstab INIT(Nullstab);
- EXT STAB *leftstab INIT(Nullstab);
- EXT STAB *amperstab INIT(Nullstab);
- EXT STAB *rightstab INIT(Nullstab);
- EXT STAB *DBstab INIT(Nullstab);
- EXT STAB *DBline INIT(Nullstab);
- EXT STAB *DBsub INIT(Nullstab);
-
- EXT HASH *defstash; /* main symbol table */
- EXT HASH *curstash; /* symbol table for current package */
- EXT HASH *debstash; /* symbol table for perldb package */
-
- EXT STR *curstname; /* name of current package */
-
- EXT STR *freestrroot INIT(Nullstr);
- EXT STR *lastretstr INIT(Nullstr);
- EXT STR *DBsingle INIT(Nullstr);
- EXT STR *DBtrace INIT(Nullstr);
- EXT STR *DBsignal INIT(Nullstr);
-
- EXT int lastspbase;
- EXT int lastsize;
-
- EXT char *origfilename;
- EXT FILE * VOLATILE rsfp;
- EXT char buf[1024];
- EXT char *bufptr;
- EXT char *oldbufptr;
- EXT char *oldoldbufptr;
- EXT char *bufend;
-
- EXT STR *linestr INIT(Nullstr);
-
- EXT int record_separator INIT('\n');
- EXT int rslen INIT(1);
- EXT char *ofs INIT(Nullch);
- EXT int ofslen INIT(0);
- EXT char *ors INIT(Nullch);
- EXT int orslen INIT(0);
- EXT char *ofmt INIT(Nullch);
- EXT char *inplace INIT(Nullch);
- EXT char *nointrp INIT("");
-
- EXT bool preprocess INIT(FALSE);
- EXT bool minus_n INIT(FALSE);
- EXT bool minus_p INIT(FALSE);
- EXT bool minus_a INIT(FALSE);
- EXT bool doswitches INIT(FALSE);
- EXT bool dowarn INIT(FALSE);
- EXT bool doextract INIT(FALSE);
- EXT bool allstabs INIT(FALSE); /* init all customary symbols in symbol table?*/
- EXT bool sawampersand INIT(FALSE); /* must save all match strings */
- EXT bool sawstudy INIT(FALSE); /* do fbminstr on all strings */
- EXT bool sawi INIT(FALSE); /* study must assume case insensitive */
- EXT bool sawvec INIT(FALSE);
- EXT bool localizing INIT(FALSE); /* are we processing a local() list? */
-
- #ifdef CSH
- char *cshname INIT(CSH);
- int cshlen INIT(0);
- #endif /* CSH */
-
- #ifdef TAINT
- EXT bool tainted INIT(FALSE); /* using variables controlled by $< */
- #endif
-
- #define TMPPATH "PerlTmp"
-
- EXT char *e_tmpname;
- EXT FILE *e_fp INIT(Nullfp);
-
- EXT char tokenbuf[256];
- EXT int expectterm INIT(TRUE); /* how to interpret ambiguous tokens */
- EXT VOLATILE int in_eval INIT(FALSE); /* trap fatal errors? */
- EXT int multiline INIT(0); /* $*--do strings hold >1 line? */
- EXT int error_count INIT(0); /* how many errors so far, max 10 */
- EXT int multi_start INIT(0); /* 1st line of multi-line string */
- EXT int multi_end INIT(0); /* last line of multi-line string */
- EXT int multi_open INIT(0); /* delimiter of said string */
- EXT int multi_close INIT(0); /* delimiter of said string */
-
- EXT char err_mess[255]; /* Last OS error string */
- EXT int err_no; /* Last OS error number */
-
- extern void save_err PROTO((void));
- extern void os_starttime PROTO((double *));
-
- extern void execv PROTO((char *, char **));
- extern void sleep PROTO((unsigned));
- extern int mkdir PROTO((char *));
- extern int rmdir PROTO((char *));
- extern int chdir PROTO((char *));
- extern int unlink PROTO((char *));
- #ifdef ARM
- /* Note: not the same as Unix isatty() */
- extern int isatty PROTO((FILE *));
- /* Interface for exec/spawn functions */
- extern int exec_cmdv PROTO((int, int *));
- /* Get current dir: arg 1 => preserve PWD, arg 2 => value of PWD */
- extern char *getcwd PROTO((int, char **));
- #endif
-
- extern STR *interp PROTO((STR *, STR *, int));
- extern void free_arg PROTO((ARG *));
- extern STIO *stio_new PROTO((void));
-
- EXT struct stat statbuf;
- EXT struct stat statcache;
- EXT STAB *statstab INIT(Nullstab);
- EXT STR *statname;
- EXT int unsafe;
-
- #ifdef DEBUGGING
- EXT VOLATILE int debug INIT(0);
- EXT int dlevel INIT(0);
- EXT int dlmax INIT(128);
- EXT char *debname;
- EXT char *debdelim;
- #define YYDEBUG 1
- #endif
- EXT int perldb INIT(0);
-
- EXT line_t cmdline INIT(NOLINE);
-
- EXT STR str_undef;
- EXT STR str_no;
- EXT STR str_yes;
-
- /* runtime control stuff */
-
- EXT struct loop {
- char *loop_label; /* what the loop was called, if anything */
- int loop_sp; /* stack pointer to copy stuff down to */
- jmp_buf loop_env;
- } *loop_stack;
-
- EXT int loop_ptr INIT(-1);
- EXT int loop_max INIT(128);
-
- EXT jmp_buf top_env;
-
- EXT char * VOLATILE goto_targ INIT(Nullch); /* cmd_exec gets strange when set */
-
- struct ufuncs {
- int (*uf_val)();
- int (*uf_set)();
- int uf_index;
- };
-
- EXT ARRAY *stack; /* THE STACK */
-
- EXT ARRAY * VOLATILE savestack; /* to save non-local values on */
-
- EXT ARRAY *tosave; /* strings to save on recursive subroutine */
-
- EXT ARRAY *lineary; /* lines of script for debugger */
- EXT ARRAY *dbargs; /* args to call listed by caller function */
-
- EXT int *di; /* for tmp use in debuggers */
- EXT char *dc;
- EXT short *ds;
-
- EXT double basetime INIT(0.0);
-
- #ifndef ANSI_INCLUDES
- double atof();
- long time();
- struct tm *gmtime(), *localtime();
- char *index(), *rindex();
- char *strcpy(), *strcat();
- #endif
- extern char *mktemp PROTO((const char *));
- #ifdef CRYPT
- extern char *crypt PROTO((char *, char *));
- #endif
-
- #ifdef EUNICE
- #define UNLINK unlnk
- int unlnk();
- #else
- #define UNLINK unlink
- #endif
-
- #ifndef SETREUID
- #ifdef SETRESUID
- #define setreuid(r,e) setresuid(r,e,-1)
- #define SETREUID
- #endif
- #endif
- #ifndef SETREGID
- #ifdef SETRESGID
- #define setregid(r,e) setresgid(r,e,-1)
- #define SETREGID
- #endif
- #endif
-