From 85e6fe838fb25b257a1b363debf8691c0992ef71 Mon Sep 17 00:00:00 2001 From: Larry Wall Date: Wed, 4 May 1994 23:00:00 +0000 Subject: perl 5.0 alpha 9 [editor's note: the sparc executables have not been included, and emacs backup files have been removed] --- .config/README | 4 - .config/instruct | 1 - .package | 4 +- AppleMPW | 42 - B1 | 7 - Bugs/amiga | 142 -- Bugs/arraynotok | 72 - Bugs/clearmyarray | 4 - Bugs/clobberref | 1 - Bugs/delete_env | 2 - Bugs/f2p_prune | 37 - Bugs/formatsub | 7 - Bugs/lcsort | 37 - Bugs/lcsortdump | 6 - Bugs/localenv | 6 + Bugs/mig | 17 - Bugs/myforeach | 1 - Bugs/numkey | 12 - Bugs/signedbits | 2 - Bugs/splitdump | 1 - Bugs/splitscalar | 1 - Bugs/subform | 107 -- Bugs/substleak | 98 -- Bugs/substrdump | 2 - Bugs/zeroanonref | 1 - Changes | 6 +- Configure | 1042 +++++++++--- Is | 15 - MANIFEST | 82 +- MANIFEST.new | 82 +- Makefile | 170 +- Makefile.SH | 216 ++- NDBM_File.c | 56 +- ODBM_File.c | 44 +- PACKINGLIST@34 | 397 ----- POSIX.c | 678 +++----- Quick | 170 -- README.Conf | 84 +- SDBM_File.c | 56 +- TCL | 169 -- Todo | 16 +- U/Extensions.U | 53 +- U/Guess.U | 153 ++ U/Loc.U | 20 +- U/Oldconfig.U | 223 ++- U/alignbytes.U | 57 + U/cc.U | 14 +- U/ccflags.U | 29 +- U/d_casti32.U | 15 +- U/d_htonl.U | 76 + U/d_isascii.U | 11 +- U/d_readdir.U | 70 + U/d_safebcpy.U | 81 + U/d_safemcpy.U | 82 + U/d_setlocale.U | 9 - U/d_shmat.U | 54 + U/d_strerror.U | 9 - U/d_vfork.U | 56 + U/dlsrc.U | 224 ++- U/gidtype.U | 18 +- U/groupstype.U | 19 +- U/i_dlfcn.U | 10 - U/i_net_errno.U | 50 + U/i_pwd.U | 134 ++ U/i_sdbm.U | 37 + U/i_sgtty.U | 128 ++ U/i_termio.U | 117 ++ U/i_termios.U | 64 + U/i_vfork.U | 34 + U/libc.U | 9 - U/libpth.U | 11 +- U/libs.U | 33 +- U/libyacc.U | 9 - U/lns.U | 21 + U/loc_sed.U | 10 + U/mallocsrc.U | 35 +- U/prototype.U | 9 - U/sig_name.U | 86 + U/voidflags.U | 17 +- U/yacc.U | 14 +- av.c | 8 - bar | 5 +- bar.out | 500 ------ bar.pm | 10 - byacc | 1 + client | 34 - config.H | 1300 +++++++++------ config.h | 424 +++-- config.sh | 102 +- config_h.SH | 418 +++-- configpm | 19 +- debstack | 14 - dl_sunos.c | 56 + dlperl/Makefile | 51 - dlperl/dlperl.c | 1037 ------------ dlperl/dlperl.doc | 264 --- dlperl/dlperl.man | 219 --- dlperl/usersub.c | 72 - doSH | 58 +- doio.c | 16 +- dump.c | 56 +- eg/client | 34 + eg/server | 27 + embed.h | 9 +- ext/dbm/ODBM_File.xs | 2 + ext/dbm/SDBM_File.so | Bin 0 -> 73728 bytes ext/dbm/perl | 1 + ext/dbm/sdbm/Makefile | 47 + ext/dbm/sdbm/Makefile.SH | 80 + ext/dbm/sdbm/README.too | 6 + ext/dbm/sdbm/dbm.h | 4 +- ext/dbm/sdbm/hash.c | 1 + ext/dbm/sdbm/libsdbm.a | Bin 0 -> 35114 bytes ext/dbm/sdbm/libsdbm_pure_q552_110.a | Bin 0 -> 11826 bytes ext/dbm/sdbm/makefile.sdbm | 55 + ext/dbm/sdbm/pair.c | 7 +- ext/dbm/sdbm/sdbm.c | 28 +- ext/dbm/sdbm/sdbm.h | 150 ++ ext/dbm/sdbm/tune.h | 11 - ext/dl/dl_hpux.c | 71 + ext/dl/dl_next.c | 69 + ext/dl/dl_sunos.c | 56 + ext/dl/eg/test | Bin 0 -> 24576 bytes ext/dl/eg/test1 | Bin 0 -> 24576 bytes ext/posix/POSIX.xs | 175 +- ext/posix/typemap | 10 +- ext/typemap | 65 +- fib4 | 21 + fixmac | 11 - fixpp | 35 - fo | 179 -- foo | 16 +- foo.sh | 1 - formstuff | 223 --- forop | 47 - global.sym | 9 +- goto | 10 - gv.c | 76 +- handy.h | 37 +- hints/3b1cc | 2 + hints/aix_rs.sh | 2 +- hints/cray.sh | 5 + hints/dec_osf_2_0.sh | 13 + hints/hp9000_700.sh | 4 +- hints/isc_3_2_3.sh | 3 +- hints/next_3_2.sh | 8 + hints/titan.sh | 2 +- hv.c | 15 +- installperl | 22 +- interleave | 9 - keywords.h | 426 ++--- lib/Config.pm | 106 +- lib/English.pm | 1 + lib/Hostname.pm | 8 +- lib/NDBM_File.pm | 9 + lib/POSIX.pm | 85 +- lib/SDBM_File.pm | 2 +- lib/Termcap.pm | 174 ++ lib/auto/NDBM_File.so | Bin 0 -> 73728 bytes lib/auto/NDBM_File/NDBM_File.so | Bin 0 -> 73728 bytes lib/auto/ODBM_File.so | Bin 0 -> 73728 bytes lib/auto/ODBM_File/ODBM_File.so | Bin 0 -> 73728 bytes lib/auto/POSIX.so | Bin 0 -> 172032 bytes lib/auto/POSIX/POSIX.so | Bin 0 -> 221184 bytes lib/auto/POSIX/_exit.al | 9 + lib/auto/POSIX/abort.al | 9 + lib/auto/POSIX/abs.al | 9 + lib/auto/POSIX/access.al | 9 + lib/auto/POSIX/alarm.al | 9 + lib/auto/POSIX/asctime.al | 9 + lib/auto/POSIX/assert.al | 12 + lib/auto/POSIX/atan2.al | 9 + lib/auto/POSIX/atexit.al | 8 + lib/auto/POSIX/atof.al | 8 + lib/auto/POSIX/atoi.al | 8 + lib/auto/POSIX/atol.al | 8 + lib/auto/POSIX/bsearch.al | 9 + lib/auto/POSIX/calloc.al | 9 + lib/auto/POSIX/cfgetispeed.al | 9 + lib/auto/POSIX/cfgetospeed.al | 9 + lib/auto/POSIX/cfsetispeed.al | 9 + lib/auto/POSIX/cfsetospeed.al | 9 + lib/auto/POSIX/chdir.al | 9 + lib/auto/POSIX/chmod.al | 9 + lib/auto/POSIX/chown.al | 9 + lib/auto/POSIX/clearerr.al | 9 + lib/auto/POSIX/clock.al | 9 + lib/auto/POSIX/close.al | 9 + lib/auto/POSIX/closedir.al | 10 + lib/auto/POSIX/cos.al | 9 + lib/auto/POSIX/creat.al | 9 + lib/auto/POSIX/ctermid.al | 9 + lib/auto/POSIX/ctime.al | 9 + lib/auto/POSIX/cuserid.al | 9 + lib/auto/POSIX/difftime.al | 9 + lib/auto/POSIX/div.al | 9 + lib/auto/POSIX/dup.al | 9 + lib/auto/POSIX/dup2.al | 9 + lib/auto/POSIX/errno.al | 9 + lib/auto/POSIX/execl.al | 9 + lib/auto/POSIX/execle.al | 9 + lib/auto/POSIX/execlp.al | 9 + lib/auto/POSIX/execv.al | 9 + lib/auto/POSIX/execve.al | 9 + lib/auto/POSIX/execvp.al | 9 + lib/auto/POSIX/exit.al | 9 + lib/auto/POSIX/exp.al | 9 + lib/auto/POSIX/fabs.al | 9 + lib/auto/POSIX/fclose.al | 8 + lib/auto/POSIX/fcntl.al | 9 + lib/auto/POSIX/fdopen.al | 9 + lib/auto/POSIX/feof.al | 9 + lib/auto/POSIX/ferror.al | 9 + lib/auto/POSIX/fflush.al | 9 + lib/auto/POSIX/fgetc.al | 9 + lib/auto/POSIX/fgetpos.al | 9 + lib/auto/POSIX/fgets.al | 10 + lib/auto/POSIX/fileno.al | 9 + lib/auto/POSIX/fopen.al | 8 + lib/auto/POSIX/fork.al | 9 + lib/auto/POSIX/fpathconf.al | 9 + lib/auto/POSIX/fprintf.al | 8 + lib/auto/POSIX/fputc.al | 8 + lib/auto/POSIX/fputs.al | 11 + lib/auto/POSIX/fread.al | 10 + lib/auto/POSIX/free.al | 9 + lib/auto/POSIX/freopen.al | 10 + lib/auto/POSIX/fscanf.al | 10 + lib/auto/POSIX/fseek.al | 10 + lib/auto/POSIX/fsetpos.al | 10 + lib/auto/POSIX/fstat.al | 13 + lib/auto/POSIX/ftell.al | 10 + lib/auto/POSIX/fwrite.al | 10 + lib/auto/POSIX/getc.al | 9 + lib/auto/POSIX/getchar.al | 9 + lib/auto/POSIX/getcwd.al | 9 + lib/auto/POSIX/getegid.al | 9 + lib/auto/POSIX/getenv.al | 9 + lib/auto/POSIX/geteuid.al | 9 + lib/auto/POSIX/getgid.al | 9 + lib/auto/POSIX/getgrgid.al | 9 + lib/auto/POSIX/getgrnam.al | 9 + lib/auto/POSIX/getgroups.al | 10 + lib/auto/POSIX/getlogin.al | 9 + lib/auto/POSIX/getpgrp.al | 9 + lib/auto/POSIX/getpid.al | 9 + lib/auto/POSIX/getppid.al | 9 + lib/auto/POSIX/getpwnam.al | 9 + lib/auto/POSIX/getpwuid.al | 9 + lib/auto/POSIX/gets.al | 10 + lib/auto/POSIX/getuid.al | 9 + lib/auto/POSIX/gmtime.al | 9 + lib/auto/POSIX/isatty.al | 9 + lib/auto/POSIX/kill.al | 9 + lib/auto/POSIX/labs.al | 9 + lib/auto/POSIX/ldiv.al | 9 + lib/auto/POSIX/link.al | 9 + lib/auto/POSIX/localtime.al | 9 + lib/auto/POSIX/log.al | 9 + lib/auto/POSIX/longjmp.al | 8 + lib/auto/POSIX/lseek.al | 9 + lib/auto/POSIX/malloc.al | 9 + lib/auto/POSIX/mblen.al | 9 + lib/auto/POSIX/mbstowcs.al | 9 + lib/auto/POSIX/mbtowc.al | 9 + lib/auto/POSIX/memchr.al | 9 + lib/auto/POSIX/memcmp.al | 9 + lib/auto/POSIX/memcpy.al | 9 + lib/auto/POSIX/memmove.al | 9 + lib/auto/POSIX/memset.al | 9 + lib/auto/POSIX/mkdir.al | 9 + lib/auto/POSIX/mkfifo.al | 9 + lib/auto/POSIX/mktime.al | 9 + lib/auto/POSIX/offsetof.al | 8 + lib/auto/POSIX/opendir.al | 12 + lib/auto/POSIX/pathconf.al | 9 + lib/auto/POSIX/pause.al | 9 + lib/auto/POSIX/perror.al | 10 + lib/auto/POSIX/pipe.al | 9 + lib/auto/POSIX/pow.al | 9 + lib/auto/POSIX/printf.al | 9 + lib/auto/POSIX/putc.al | 10 + lib/auto/POSIX/putchar.al | 10 + lib/auto/POSIX/puts.al | 10 + lib/auto/POSIX/qsort.al | 9 + lib/auto/POSIX/raise.al | 9 + lib/auto/POSIX/rand.al | 9 + lib/auto/POSIX/read.al | 9 + lib/auto/POSIX/readdir.al | 9 + lib/auto/POSIX/realloc.al | 9 + lib/auto/POSIX/remove.al | 9 + lib/auto/POSIX/rename.al | 9 + lib/auto/POSIX/rewind.al | 9 + lib/auto/POSIX/rewinddir.al | 9 + lib/auto/POSIX/rmdir.al | 9 + lib/auto/POSIX/scanf.al | 9 + lib/auto/POSIX/setbuf.al | 9 + lib/auto/POSIX/setgid.al | 9 + lib/auto/POSIX/setjmp.al | 8 + lib/auto/POSIX/setpgid.al | 9 + lib/auto/POSIX/setsid.al | 9 + lib/auto/POSIX/setuid.al | 9 + lib/auto/POSIX/setvbuf.al | 9 + lib/auto/POSIX/sigaction.al | 9 + lib/auto/POSIX/sigaddset.al | 9 + lib/auto/POSIX/sigdelset.al | 9 + lib/auto/POSIX/sigemptyset.al | 9 + lib/auto/POSIX/sigfillset.al | 9 + lib/auto/POSIX/sigismember.al | 9 + lib/auto/POSIX/siglongjmp.al | 8 + lib/auto/POSIX/signal.al | 9 + lib/auto/POSIX/sigpending.al | 9 + lib/auto/POSIX/sigprocmask.al | 9 + lib/auto/POSIX/sigsetjmp.al | 8 + lib/auto/POSIX/sigsuspend.al | 9 + lib/auto/POSIX/sin.al | 9 + lib/auto/POSIX/sleep.al | 9 + lib/auto/POSIX/sprintf.al | 9 + lib/auto/POSIX/sqrt.al | 9 + lib/auto/POSIX/srand.al | 9 + lib/auto/POSIX/sscanf.al | 9 + lib/auto/POSIX/stat.al | 9 + lib/auto/POSIX/strcat.al | 9 + lib/auto/POSIX/strchr.al | 9 + lib/auto/POSIX/strcmp.al | 9 + lib/auto/POSIX/strcoll.al | 9 + lib/auto/POSIX/strcpy.al | 9 + lib/auto/POSIX/strcspn.al | 9 + lib/auto/POSIX/strerror.al | 9 + lib/auto/POSIX/strftime.al | 9 + lib/auto/POSIX/strlen.al | 9 + lib/auto/POSIX/strncat.al | 9 + lib/auto/POSIX/strncmp.al | 9 + lib/auto/POSIX/strncpy.al | 9 + lib/auto/POSIX/stroul.al | 9 + lib/auto/POSIX/strpbrk.al | 9 + lib/auto/POSIX/strrchr.al | 9 + lib/auto/POSIX/strspn.al | 9 + lib/auto/POSIX/strstr.al | 9 + lib/auto/POSIX/strtod.al | 9 + lib/auto/POSIX/strtok.al | 9 + lib/auto/POSIX/strtol.al | 9 + lib/auto/POSIX/strxfrm.al | 9 + lib/auto/POSIX/sysconf.al | 9 + lib/auto/POSIX/system.al | 9 + lib/auto/POSIX/tan.al | 9 + lib/auto/POSIX/tcdrain.al | 9 + lib/auto/POSIX/tcflow.al | 9 + lib/auto/POSIX/tcflush.al | 9 + lib/auto/POSIX/tcgetattr.al | 9 + lib/auto/POSIX/tcgetpgrp.al | 9 + lib/auto/POSIX/tcsendbreak.al | 9 + lib/auto/POSIX/tcsetattr.al | 9 + lib/auto/POSIX/tcsetpgrp.al | 9 + lib/auto/POSIX/time.al | 9 + lib/auto/POSIX/times.al | 9 + lib/auto/POSIX/tmpfile.al | 9 + lib/auto/POSIX/tmpnam.al | 9 + lib/auto/POSIX/tolower.al | 9 + lib/auto/POSIX/toupper.al | 9 + lib/auto/POSIX/ttyname.al | 9 + lib/auto/POSIX/tzname.al | 9 + lib/auto/POSIX/tzset.al | 9 + lib/auto/POSIX/umask.al | 9 + lib/auto/POSIX/ungetc.al | 9 + lib/auto/POSIX/unlink.al | 9 + lib/auto/POSIX/utime.al | 9 + lib/auto/POSIX/vfprintf.al | 9 + lib/auto/POSIX/vprintf.al | 9 + lib/auto/POSIX/vsprintf.al | 9 + lib/auto/POSIX/wait.al | 11 + lib/auto/POSIX/waitpid.al | 11 + lib/auto/POSIX/wcstombs.al | 9 + lib/auto/POSIX/wctomb.al | 9 + lib/auto/POSIX/write.al | 9 + lib/auto/SDBM_File.so | Bin 0 -> 81920 bytes lib/auto/SDBM_File/SDBM_File.so | Bin 0 -> 98304 bytes lib/auto/SDBM_File/foo | Bin 0 -> 73728 bytes lib/chat2.inter | 495 ++++++ lib/dumpvar.pl | 2 +- lib/termcap.pl | 165 -- libperl.rlb | 0 libtperl.rlb | 0 make.out | 12 +- makedepend | 37 +- makedepend.SH | 11 +- makedir | 10 +- makefile | 332 +++- makefile.lib | 1409 ---------------- malloc.c | 2 +- match_stuff | 53 - mg.c | 85 +- mg.h | 1 + miniperlmain.c | 5 +- miniperlmain.x | 0 net | 1 + oldcmdcruft | 592 ------- op.c | 193 ++- op.h | 10 +- opcode.h | 695 ++++---- opcode.pl | 53 +- oy | 16 - package | 21 - parse_format | 48 - pat/env.pat | 22 + pat/inherit.pat | 39 + perl.c | 169 +- perl.h | 85 +- perl.man | 41 +- perl5-notes | 345 ++++ perlmain.c | 8 +- perly.c | 2997 +++++++++++++++++----------------- perly.h | 83 +- perly.h.yacc | 56 - perly.y | 28 +- perly.y.save | 591 ------- pp.c | 606 +++++-- pp.h | 13 +- predump | 41 - proto.h | 49 +- re_tests | 1 - run.c | 7 - save_ary.bad | 44 - scope.c | 43 +- scope.h | 26 +- server | 27 - sortfunc | 9 - sv.c | 105 +- sv.h | 6 +- sv_append_till | 39 - syntax | 0 t/foo | 280 ++++ t/lib/ndbm.t | 117 ++ t/lib/sdbm.t | 9 +- t/perl5a1.tar | Bin 0 -> 8192 bytes tofix | 0 toke.c | 139 +- toke.c.pat1 | 21 + trace.out | 0 trans_stuff | 40 - usersub.c | 2 +- util.c | 16 +- writemain | 60 +- writemain.SH | 55 + x2p/Makefile | 4 +- x2p/makefile | 4 +- x2p/malloc.c | 2 +- x2p/str.c | 6 +- xf | 57 +- 449 files changed, 12975 insertions(+), 12613 deletions(-) delete mode 100644 .config/README delete mode 100644 .config/instruct delete mode 100644 AppleMPW delete mode 100644 B1 delete mode 100644 Bugs/amiga delete mode 100755 Bugs/arraynotok delete mode 100644 Bugs/clearmyarray delete mode 100644 Bugs/clobberref delete mode 100644 Bugs/delete_env delete mode 100644 Bugs/f2p_prune delete mode 100755 Bugs/formatsub delete mode 100644 Bugs/lcsort delete mode 100644 Bugs/lcsortdump create mode 100644 Bugs/localenv delete mode 100755 Bugs/mig delete mode 100644 Bugs/myforeach delete mode 100644 Bugs/numkey delete mode 100644 Bugs/signedbits delete mode 100644 Bugs/splitdump delete mode 100644 Bugs/splitscalar delete mode 100644 Bugs/subform delete mode 100644 Bugs/substleak delete mode 100644 Bugs/substrdump delete mode 100644 Bugs/zeroanonref delete mode 100644 Is delete mode 100644 PACKINGLIST@34 delete mode 100644 Quick delete mode 100644 TCL create mode 100644 U/Guess.U create mode 100644 U/alignbytes.U create mode 100644 U/d_htonl.U create mode 100644 U/d_readdir.U create mode 100644 U/d_safebcpy.U create mode 100644 U/d_safemcpy.U create mode 100644 U/d_shmat.U create mode 100644 U/d_vfork.U create mode 100644 U/i_net_errno.U create mode 100644 U/i_pwd.U create mode 100644 U/i_sdbm.U create mode 100644 U/i_sgtty.U create mode 100644 U/i_termio.U create mode 100644 U/i_termios.U create mode 100644 U/i_vfork.U create mode 100644 U/lns.U create mode 100644 U/loc_sed.U create mode 100644 U/sig_name.U delete mode 100644 bar.out delete mode 100755 bar.pm create mode 120000 byacc delete mode 100755 client delete mode 100644 debstack create mode 100644 dl_sunos.c delete mode 100644 dlperl/Makefile delete mode 100644 dlperl/dlperl.c delete mode 100644 dlperl/dlperl.doc delete mode 100644 dlperl/dlperl.man delete mode 100644 dlperl/usersub.c mode change 100644 => 100755 doSH create mode 100755 eg/client create mode 100755 eg/server create mode 100755 ext/dbm/SDBM_File.so create mode 120000 ext/dbm/perl create mode 100755 ext/dbm/sdbm/Makefile create mode 100644 ext/dbm/sdbm/Makefile.SH create mode 100644 ext/dbm/sdbm/libsdbm.a create mode 100644 ext/dbm/sdbm/libsdbm_pure_q552_110.a create mode 100644 ext/dbm/sdbm/makefile.sdbm create mode 100644 ext/dl/dl_hpux.c create mode 100644 ext/dl/dl_next.c create mode 100644 ext/dl/dl_sunos.c create mode 100755 ext/dl/eg/test create mode 100755 ext/dl/eg/test1 create mode 100755 fib4 delete mode 100755 fixmac delete mode 100755 fixpp delete mode 100755 fo delete mode 100644 foo.sh delete mode 100644 formstuff delete mode 100644 forop delete mode 100755 goto create mode 100644 hints/dec_osf_2_0.sh create mode 100644 hints/next_3_2.sh delete mode 100755 interleave create mode 100644 lib/NDBM_File.pm create mode 100644 lib/Termcap.pm create mode 100755 lib/auto/NDBM_File.so create mode 100755 lib/auto/NDBM_File/NDBM_File.so create mode 100755 lib/auto/ODBM_File.so create mode 100755 lib/auto/ODBM_File/ODBM_File.so create mode 100755 lib/auto/POSIX.so create mode 100755 lib/auto/POSIX/POSIX.so create mode 100644 lib/auto/POSIX/_exit.al create mode 100644 lib/auto/POSIX/abort.al create mode 100644 lib/auto/POSIX/abs.al create mode 100644 lib/auto/POSIX/access.al create mode 100644 lib/auto/POSIX/alarm.al create mode 100644 lib/auto/POSIX/asctime.al create mode 100644 lib/auto/POSIX/assert.al create mode 100644 lib/auto/POSIX/atan2.al create mode 100644 lib/auto/POSIX/atexit.al create mode 100644 lib/auto/POSIX/atof.al create mode 100644 lib/auto/POSIX/atoi.al create mode 100644 lib/auto/POSIX/atol.al create mode 100644 lib/auto/POSIX/bsearch.al create mode 100644 lib/auto/POSIX/calloc.al create mode 100644 lib/auto/POSIX/cfgetispeed.al create mode 100644 lib/auto/POSIX/cfgetospeed.al create mode 100644 lib/auto/POSIX/cfsetispeed.al create mode 100644 lib/auto/POSIX/cfsetospeed.al create mode 100644 lib/auto/POSIX/chdir.al create mode 100644 lib/auto/POSIX/chmod.al create mode 100644 lib/auto/POSIX/chown.al create mode 100644 lib/auto/POSIX/clearerr.al create mode 100644 lib/auto/POSIX/clock.al create mode 100644 lib/auto/POSIX/close.al create mode 100644 lib/auto/POSIX/closedir.al create mode 100644 lib/auto/POSIX/cos.al create mode 100644 lib/auto/POSIX/creat.al create mode 100644 lib/auto/POSIX/ctermid.al create mode 100644 lib/auto/POSIX/ctime.al create mode 100644 lib/auto/POSIX/cuserid.al create mode 100644 lib/auto/POSIX/difftime.al create mode 100644 lib/auto/POSIX/div.al create mode 100644 lib/auto/POSIX/dup.al create mode 100644 lib/auto/POSIX/dup2.al create mode 100644 lib/auto/POSIX/errno.al create mode 100644 lib/auto/POSIX/execl.al create mode 100644 lib/auto/POSIX/execle.al create mode 100644 lib/auto/POSIX/execlp.al create mode 100644 lib/auto/POSIX/execv.al create mode 100644 lib/auto/POSIX/execve.al create mode 100644 lib/auto/POSIX/execvp.al create mode 100644 lib/auto/POSIX/exit.al create mode 100644 lib/auto/POSIX/exp.al create mode 100644 lib/auto/POSIX/fabs.al create mode 100644 lib/auto/POSIX/fclose.al create mode 100644 lib/auto/POSIX/fcntl.al create mode 100644 lib/auto/POSIX/fdopen.al create mode 100644 lib/auto/POSIX/feof.al create mode 100644 lib/auto/POSIX/ferror.al create mode 100644 lib/auto/POSIX/fflush.al create mode 100644 lib/auto/POSIX/fgetc.al create mode 100644 lib/auto/POSIX/fgetpos.al create mode 100644 lib/auto/POSIX/fgets.al create mode 100644 lib/auto/POSIX/fileno.al create mode 100644 lib/auto/POSIX/fopen.al create mode 100644 lib/auto/POSIX/fork.al create mode 100644 lib/auto/POSIX/fpathconf.al create mode 100644 lib/auto/POSIX/fprintf.al create mode 100644 lib/auto/POSIX/fputc.al create mode 100644 lib/auto/POSIX/fputs.al create mode 100644 lib/auto/POSIX/fread.al create mode 100644 lib/auto/POSIX/free.al create mode 100644 lib/auto/POSIX/freopen.al create mode 100644 lib/auto/POSIX/fscanf.al create mode 100644 lib/auto/POSIX/fseek.al create mode 100644 lib/auto/POSIX/fsetpos.al create mode 100644 lib/auto/POSIX/fstat.al create mode 100644 lib/auto/POSIX/ftell.al create mode 100644 lib/auto/POSIX/fwrite.al create mode 100644 lib/auto/POSIX/getc.al create mode 100644 lib/auto/POSIX/getchar.al create mode 100644 lib/auto/POSIX/getcwd.al create mode 100644 lib/auto/POSIX/getegid.al create mode 100644 lib/auto/POSIX/getenv.al create mode 100644 lib/auto/POSIX/geteuid.al create mode 100644 lib/auto/POSIX/getgid.al create mode 100644 lib/auto/POSIX/getgrgid.al create mode 100644 lib/auto/POSIX/getgrnam.al create mode 100644 lib/auto/POSIX/getgroups.al create mode 100644 lib/auto/POSIX/getlogin.al create mode 100644 lib/auto/POSIX/getpgrp.al create mode 100644 lib/auto/POSIX/getpid.al create mode 100644 lib/auto/POSIX/getppid.al create mode 100644 lib/auto/POSIX/getpwnam.al create mode 100644 lib/auto/POSIX/getpwuid.al create mode 100644 lib/auto/POSIX/gets.al create mode 100644 lib/auto/POSIX/getuid.al create mode 100644 lib/auto/POSIX/gmtime.al create mode 100644 lib/auto/POSIX/isatty.al create mode 100644 lib/auto/POSIX/kill.al create mode 100644 lib/auto/POSIX/labs.al create mode 100644 lib/auto/POSIX/ldiv.al create mode 100644 lib/auto/POSIX/link.al create mode 100644 lib/auto/POSIX/localtime.al create mode 100644 lib/auto/POSIX/log.al create mode 100644 lib/auto/POSIX/longjmp.al create mode 100644 lib/auto/POSIX/lseek.al create mode 100644 lib/auto/POSIX/malloc.al create mode 100644 lib/auto/POSIX/mblen.al create mode 100644 lib/auto/POSIX/mbstowcs.al create mode 100644 lib/auto/POSIX/mbtowc.al create mode 100644 lib/auto/POSIX/memchr.al create mode 100644 lib/auto/POSIX/memcmp.al create mode 100644 lib/auto/POSIX/memcpy.al create mode 100644 lib/auto/POSIX/memmove.al create mode 100644 lib/auto/POSIX/memset.al create mode 100644 lib/auto/POSIX/mkdir.al create mode 100644 lib/auto/POSIX/mkfifo.al create mode 100644 lib/auto/POSIX/mktime.al create mode 100644 lib/auto/POSIX/offsetof.al create mode 100644 lib/auto/POSIX/opendir.al create mode 100644 lib/auto/POSIX/pathconf.al create mode 100644 lib/auto/POSIX/pause.al create mode 100644 lib/auto/POSIX/perror.al create mode 100644 lib/auto/POSIX/pipe.al create mode 100644 lib/auto/POSIX/pow.al create mode 100644 lib/auto/POSIX/printf.al create mode 100644 lib/auto/POSIX/putc.al create mode 100644 lib/auto/POSIX/putchar.al create mode 100644 lib/auto/POSIX/puts.al create mode 100644 lib/auto/POSIX/qsort.al create mode 100644 lib/auto/POSIX/raise.al create mode 100644 lib/auto/POSIX/rand.al create mode 100644 lib/auto/POSIX/read.al create mode 100644 lib/auto/POSIX/readdir.al create mode 100644 lib/auto/POSIX/realloc.al create mode 100644 lib/auto/POSIX/remove.al create mode 100644 lib/auto/POSIX/rename.al create mode 100644 lib/auto/POSIX/rewind.al create mode 100644 lib/auto/POSIX/rewinddir.al create mode 100644 lib/auto/POSIX/rmdir.al create mode 100644 lib/auto/POSIX/scanf.al create mode 100644 lib/auto/POSIX/setbuf.al create mode 100644 lib/auto/POSIX/setgid.al create mode 100644 lib/auto/POSIX/setjmp.al create mode 100644 lib/auto/POSIX/setpgid.al create mode 100644 lib/auto/POSIX/setsid.al create mode 100644 lib/auto/POSIX/setuid.al create mode 100644 lib/auto/POSIX/setvbuf.al create mode 100644 lib/auto/POSIX/sigaction.al create mode 100644 lib/auto/POSIX/sigaddset.al create mode 100644 lib/auto/POSIX/sigdelset.al create mode 100644 lib/auto/POSIX/sigemptyset.al create mode 100644 lib/auto/POSIX/sigfillset.al create mode 100644 lib/auto/POSIX/sigismember.al create mode 100644 lib/auto/POSIX/siglongjmp.al create mode 100644 lib/auto/POSIX/signal.al create mode 100644 lib/auto/POSIX/sigpending.al create mode 100644 lib/auto/POSIX/sigprocmask.al create mode 100644 lib/auto/POSIX/sigsetjmp.al create mode 100644 lib/auto/POSIX/sigsuspend.al create mode 100644 lib/auto/POSIX/sin.al create mode 100644 lib/auto/POSIX/sleep.al create mode 100644 lib/auto/POSIX/sprintf.al create mode 100644 lib/auto/POSIX/sqrt.al create mode 100644 lib/auto/POSIX/srand.al create mode 100644 lib/auto/POSIX/sscanf.al create mode 100644 lib/auto/POSIX/stat.al create mode 100644 lib/auto/POSIX/strcat.al create mode 100644 lib/auto/POSIX/strchr.al create mode 100644 lib/auto/POSIX/strcmp.al create mode 100644 lib/auto/POSIX/strcoll.al create mode 100644 lib/auto/POSIX/strcpy.al create mode 100644 lib/auto/POSIX/strcspn.al create mode 100644 lib/auto/POSIX/strerror.al create mode 100644 lib/auto/POSIX/strftime.al create mode 100644 lib/auto/POSIX/strlen.al create mode 100644 lib/auto/POSIX/strncat.al create mode 100644 lib/auto/POSIX/strncmp.al create mode 100644 lib/auto/POSIX/strncpy.al create mode 100644 lib/auto/POSIX/stroul.al create mode 100644 lib/auto/POSIX/strpbrk.al create mode 100644 lib/auto/POSIX/strrchr.al create mode 100644 lib/auto/POSIX/strspn.al create mode 100644 lib/auto/POSIX/strstr.al create mode 100644 lib/auto/POSIX/strtod.al create mode 100644 lib/auto/POSIX/strtok.al create mode 100644 lib/auto/POSIX/strtol.al create mode 100644 lib/auto/POSIX/strxfrm.al create mode 100644 lib/auto/POSIX/sysconf.al create mode 100644 lib/auto/POSIX/system.al create mode 100644 lib/auto/POSIX/tan.al create mode 100644 lib/auto/POSIX/tcdrain.al create mode 100644 lib/auto/POSIX/tcflow.al create mode 100644 lib/auto/POSIX/tcflush.al create mode 100644 lib/auto/POSIX/tcgetattr.al create mode 100644 lib/auto/POSIX/tcgetpgrp.al create mode 100644 lib/auto/POSIX/tcsendbreak.al create mode 100644 lib/auto/POSIX/tcsetattr.al create mode 100644 lib/auto/POSIX/tcsetpgrp.al create mode 100644 lib/auto/POSIX/time.al create mode 100644 lib/auto/POSIX/times.al create mode 100644 lib/auto/POSIX/tmpfile.al create mode 100644 lib/auto/POSIX/tmpnam.al create mode 100644 lib/auto/POSIX/tolower.al create mode 100644 lib/auto/POSIX/toupper.al create mode 100644 lib/auto/POSIX/ttyname.al create mode 100644 lib/auto/POSIX/tzname.al create mode 100644 lib/auto/POSIX/tzset.al create mode 100644 lib/auto/POSIX/umask.al create mode 100644 lib/auto/POSIX/ungetc.al create mode 100644 lib/auto/POSIX/unlink.al create mode 100644 lib/auto/POSIX/utime.al create mode 100644 lib/auto/POSIX/vfprintf.al create mode 100644 lib/auto/POSIX/vprintf.al create mode 100644 lib/auto/POSIX/vsprintf.al create mode 100644 lib/auto/POSIX/wait.al create mode 100644 lib/auto/POSIX/waitpid.al create mode 100644 lib/auto/POSIX/wcstombs.al create mode 100644 lib/auto/POSIX/wctomb.al create mode 100644 lib/auto/POSIX/write.al create mode 100755 lib/auto/SDBM_File.so create mode 100755 lib/auto/SDBM_File/SDBM_File.so create mode 100755 lib/auto/SDBM_File/foo create mode 100644 lib/chat2.inter delete mode 100644 lib/termcap.pl delete mode 100644 libperl.rlb delete mode 100644 libtperl.rlb delete mode 100644 makefile.lib delete mode 100644 match_stuff create mode 100644 miniperlmain.x create mode 120000 net delete mode 100644 oldcmdcruft delete mode 100644 oy delete mode 100644 package delete mode 100644 parse_format create mode 100644 pat/env.pat create mode 100644 pat/inherit.pat create mode 100644 perl5-notes delete mode 100644 perly.h.yacc delete mode 100644 perly.y.save delete mode 100644 predump delete mode 100644 re_tests delete mode 100644 save_ary.bad delete mode 100755 server delete mode 100755 sortfunc delete mode 100644 sv_append_till delete mode 100644 syntax create mode 100755 t/lib/ndbm.t create mode 100644 t/perl5a1.tar delete mode 100644 tofix create mode 100644 toke.c.pat1 create mode 100644 trace.out delete mode 100644 trans_stuff create mode 100644 writemain.SH diff --git a/.config/README b/.config/README deleted file mode 100644 index 943361f6ea..0000000000 --- a/.config/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory created by Configure to save information that should -persist across sessions. - -You may safely delete it if you wish. diff --git a/.config/instruct b/.config/instruct deleted file mode 100644 index 13027a579f..0000000000 --- a/.config/instruct +++ /dev/null @@ -1 +0,0 @@ -lwall diff --git a/.package b/.package index a084d4fe63..223efc558d 100644 --- a/.package +++ b/.package @@ -1,6 +1,6 @@ : basic variables -package=perl -baserev=4.1 +package=perl5 +baserev=5.0 patchbranch=1 mydiff='diff -c' maintname='Larry Wall' diff --git a/AppleMPW b/AppleMPW deleted file mode 100644 index b1f223c7aa..0000000000 --- a/AppleMPW +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - Larry Wall - Matthias Neeracher - c/o 4920 El Camino Real - Los Altos, CA 94022 - - March 26, 1993 - - - Gary Little - M/S 37-X - Apple Computer, Inc. - 20525 Mariani Ave. - Cupertino, CA 95014 - - Dear Gary, - - We are writing you as the product manager of Apple's - EssentialsoToolsoObjects (E.T.O.) CD-ROM. As the authors of Perl for - MPW, we hereby authorize Apple to distribute Perl for MPW including - source code on E.T.O. according to the terms of the "Artistic" license - distributed with Perl and enclosed with this letter. The Perl for MPW - materials are hereby confirmed as being provided to Apple free of - charge, for the purpose of being distributed on E.T.O. This - authorization includes distribution of Perl for MPW on successive - releases of E.T.O. and distribution of revisions to Perl for MPW that - we provide you with or agree to. - - Thank you for your efforts in promoting the use of Perl amongst - Macintosh developers. - - Sincerely, - - - ________________________ ________________________ - - Larry Wall Matthias Neeracher diff --git a/B1 b/B1 deleted file mode 100644 index 9b702684ca..0000000000 --- a/B1 +++ /dev/null @@ -1,7 +0,0 @@ -$ActualRevision = "M"; - -($junk, $ActualRevision) = ''; - -chop($ActualRevision); - -($name, $ActualRevision, $junk) = split(/\s+/, $ActualRevision); diff --git a/Bugs/amiga b/Bugs/amiga deleted file mode 100644 index fdf91018af..0000000000 --- a/Bugs/amiga +++ /dev/null @@ -1,142 +0,0 @@ -Article 38050 of comp.sys.amiga.programmer: -Newsgroups: comp.sys.amiga.programmer -Path: netlabs!news.cerf.net!usc!howland.reston.ans.net!pipex!uunet!majipoor.cygnus.com!fnf -From: fnf@cygnus.com (Fred Fish) -Subject: Re: FreshFish-dec93 CD; broken perl thereon -Message-ID: -Organization: Cygnus Support, Mountain View, CA -References: <1994Jan20.095600.8371@philips.oz.au> -Date: Fri, 28 Jan 1994 06:48:29 GMT -Lines: 129 - -In article , -Bruce Albrecht wrote: ->In article <1994Jan20.095600.8371@philips.oz.au> gduncan@philips.oz.au (Gary Duncan) writes: ->Me too. I don't have the December Fresh Fish, so I can't comment on it, ->but I have been wondering what it will take to do a fresh port of it anyway. - -The diffs that I applied to the base FSF distribution are: - -diff -rc perl-4.036-fsf/Configure perl-4.036-amiga/Configure -*** perl-4.036-fsf/Configure Mon Feb 8 20:37:48 1993 ---- perl-4.036-amiga/Configure Mon Sep 27 21:46:16 1993 -*************** -*** 4023,4029 **** - eval $ans;; - esac - chmod +x doSH -! ./doSH - - if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then - dflt=n ---- 4023,4029 ---- - eval $ans;; - esac - chmod +x doSH -! sh doSH - - if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then - dflt=n -diff -rc perl-4.036-fsf/Makefile.SH perl-4.036-amiga/Makefile.SH -*** perl-4.036-fsf/Makefile.SH Mon Feb 8 20:35:21 1993 ---- perl-4.036-amiga/Makefile.SH Tue Sep 28 07:16:24 1993 -*************** -*** 349,355 **** - - test: perl - - cd t && chmod +x TEST */*.t -! - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST .clist ---- 349,355 ---- - - test: perl - - cd t && chmod +x TEST */*.t -! - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST - - clist: - echo $(c) | tr ' ' '\012' >.clist -*************** -*** 373,376 **** - ln Makefile ../Makefile - ;; - esac -! rm -f makefile ---- 373,377 ---- - ln Makefile ../Makefile - ;; - esac -! #rm -f makefile (AmigaDOS is case-independent) -! -diff -rc perl-4.036-fsf/makedepend.SH perl-4.036-amiga/makedepend.SH -*** perl-4.036-fsf/makedepend.SH Mon Feb 8 20:36:27 1993 ---- perl-4.036-amiga/makedepend.SH Mon Sep 27 22:06:33 1993 -*************** -*** 63,71 **** - $cat /dev/null >.deptmp - $rm -f *.c.c c/*.c.c - if test -f Makefile; then -! cp Makefile makefile - fi -! mf=makefile - if test -f $mf; then - defrule=`<$mf sed -n \ - -e '/^\.c\.o:.*;/{' \ ---- 63,71 ---- - $cat /dev/null >.deptmp - $rm -f *.c.c c/*.c.c - if test -f Makefile; then -! cp Makefile Makefile.bak - fi -! mf=Makefile - if test -f $mf; then - defrule=`<$mf sed -n \ - -e '/^\.c\.o:.*;/{' \ -diff -rc perl-4.036-fsf/perl.h perl-4.036-amiga/perl.h -*** perl-4.036-fsf/perl.h Mon Feb 8 20:36:01 1993 ---- perl-4.036-amiga/perl.h Mon Sep 27 22:06:19 1993 -*************** -*** 79,85 **** ---- 79,87 ---- - */ - #define HAS_ALARM - #define HAS_CHOWN -+ #ifndef amigados - #define HAS_CHROOT -+ #endif - #define HAS_FORK - #define HAS_GETLOGIN - #define HAS_GETPPID -*************** -*** 93,99 **** ---- 95,103 ---- - * password and group functions in general. All Unix systems do. - */ - #define HAS_GROUP -+ #ifndef amigados - #define HAS_PASSWD -+ #endif - - #endif /* !MSDOS */ - -diff -rc perl-4.036-fsf/x2p/Makefile.SH perl-4.036-amiga/x2p/Makefile.SH -*** perl-4.036-fsf/x2p/Makefile.SH Mon Feb 8 20:36:33 1993 ---- perl-4.036-amiga/x2p/Makefile.SH Mon Sep 27 22:07:15 1993 -*************** -*** 157,160 **** - ln Makefile ../Makefile - ;; - esac -! rm -f makefile ---- 157,160 ---- - ln Makefile ../Makefile - ;; - esac -! #rm -f makefile - - - - - - diff --git a/Bugs/arraynotok b/Bugs/arraynotok deleted file mode 100755 index dd1b05383d..0000000000 --- a/Bugs/arraynotok +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl - -# -# I thought that I would try out some perl 5 features for the first time. -# So I wrote a small program, included below. It died, and the partial -# output looks very much like what I wanted to accompish. Even if the program -# had not died, there is still the problem that no output was given under the -# label "sonia:". -# -# Since the output is close, perhaps a bug lurks within...(?) I'm using the -# compiled binary provided in the perl5a6 tar file. I tried to write this -# post so it could be given to perl with the -x flag. You should get the -# output I describe here -- -# James Bence -# jbence@math.ucla.edu -# -# Output: -# -# Pushed ege into @sonia -# Pushed caflisch into @joshua -# Pushed catalina into @julia -# Pushed lunnon into @sonia -# Pushed m270alg into @redwood -# Pushed harten into @joshua -# Pushed ycc into @joshua -# Pushed m270wsc into @redwood -# -# -# joshua: -# caflisch harten ycc -# -# sonia: -# -# -# redwood: -# m270alg m270wsc -# -# julia: -# Segmentation fault -# -# - -require 5.000; - -while () { - ($login,$host) = split; - push(@{$hostref{$host}},$login); # t/op/ref.t (22) suggests this is ok. - print "Pushed $login into \@$host\n"; -} - -print"\n\n"; - -while ( ($host,$ref) = each(%hostref)) { - print "$host:\n "; - $count = 0; - foreach $person (@{$ref}) { - print $person, " "; - $count++; - if ($count % 5 == 0) { print "\n "; } - } - print "\n\n"; -} - -__END__ -ege sonia -caflisch joshua -catalina julia -lunnon sonia -m270alg redwood -harten joshua -ycc joshua -m270wsc redwood diff --git a/Bugs/clearmyarray b/Bugs/clearmyarray deleted file mode 100644 index e4aecb32ab..0000000000 --- a/Bugs/clearmyarray +++ /dev/null @@ -1,4 +0,0 @@ -@a = ( 5, 6, 7, 8); -&foo(1, 2, @a); - -sub foo { my($a, $b, @c) = @_; print scalar(@c), "\n"; } diff --git a/Bugs/clobberref b/Bugs/clobberref deleted file mode 100644 index 4cba683bdd..0000000000 --- a/Bugs/clobberref +++ /dev/null @@ -1 +0,0 @@ -$B = [X, Y]; $B = 1; print $B diff --git a/Bugs/delete_env b/Bugs/delete_env deleted file mode 100644 index a4bf8eff3c..0000000000 --- a/Bugs/delete_env +++ /dev/null @@ -1,2 +0,0 @@ -delete $ENV{TERM}; -system "env"; diff --git a/Bugs/f2p_prune b/Bugs/f2p_prune deleted file mode 100644 index 519003d040..0000000000 --- a/Bugs/f2p_prune +++ /dev/null @@ -1,37 +0,0 @@ -Article 18849 of comp.lang.perl: -Path: netlabs!news.cerf.net!usc!howland.reston.ans.net!xlink.net!zib-berlin.de!zrz.TU-Berlin.DE!w204zrz!koen1830 -From: koen1830@w204zrz.zrz.tu-berlin.de (Andreas Koenig) -Newsgroups: comp.lang.perl -Subject: Bug in find2perl -Date: 14 Feb 1994 09:43:16 GMT -Organization: mal franz, mal anna -Lines: 22 -Message-ID: <2jnh3k$hcv@brachio.zrz.TU-Berlin.DE> -Reply-To: k@franz.ww.TU-Berlin.DE -NNTP-Posting-Host: w204zrz.zrz.tu-berlin.de -Cc: - -Hi all, - -I've encountered a bug in find2perl when used with the -prune Option. -As there have been some bugreports recently, *and* also because there -has to be fixed an incompatibility with perl5, I don't try to offer a -fix, sorry. The bug comes and goes like this (verified for SUN and -NeXT): - -%/usr/bin/find foo -print -foo -foo/bar -foo/bar/baz -%/usr/bin/find foo -prune -print -foo -%perl /usr/local/bin/find2perl foo -prune -print | perl -foo -foo/bar -%perl5a5 /usr/local/bin/find2perl foo -prune -print | perl5a5 -Final $ should be \$ or $name at /usr/local/bin/find2perl line 553, at end of string -syntax error at /usr/local/bin/find2perl line 553, near ""^$tmp$"" -Execution of /usr/local/bin/find2perl aborted due to compilation errors. - - - diff --git a/Bugs/formatsub b/Bugs/formatsub deleted file mode 100755 index e995846baf..0000000000 --- a/Bugs/formatsub +++ /dev/null @@ -1,7 +0,0 @@ -#!./perl - -format STDOUT { - formline "@<<<<<<<<<<<<< @>>>>>>>>>>>\n", "foo", "bar"; -} - -write; diff --git a/Bugs/lcsort b/Bugs/lcsort deleted file mode 100644 index 2cbe8613ad..0000000000 --- a/Bugs/lcsort +++ /dev/null @@ -1,37 +0,0 @@ -Article 20341 of comp.lang.perl: -Path: netlabs!news.cerf.net!mvb.saic.com!MathWorks.Com!news.kei.com!hookup!swrinde!gatech!taco.cc.ncsu.edu!taco.cc.ncsu.edu!setzer -From: setzer@math.ncsu.edu (William Setzer) -Newsgroups: comp.lang.perl -Subject: perl5a6 bug: sort sub @ary -Date: 30 Mar 94 13:49:20 -Organization: The Chebychev Church of Probability -Lines: 23 -Distribution: world -Message-ID: -NNTP-Posting-Host: math.ncsu.edu - -Ok, here's a weird one. Using the precompiled perl5a6 binary for the -sun, the following dumps core: ----- -@S = (0, 1, 2, 3); -for ("A", "D", "b", "c") { $foo{$i++} = $_; } -# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; } -for (sort Alpha @S) { print $foo{$_}, "\n"; } - -sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); } ----- -[Output] -Segmentation fault (core dumped) ----- -However, if you comment out the "sort Alpha" and uncomment the "sort -{lc(...) cmp lc(...) }" line, everything works as expected. Also note -that if you uncomment both "sort"s, everything also works as expected. -Do-do-do-do [twilight zone music :-]. - -William - -PS: Does anyone actually care about these bug reports? I thought I - remember Larry saying that he preferred them in c.l.p., but it - wouldn't be the first time my memory has fritzed. - - diff --git a/Bugs/lcsortdump b/Bugs/lcsortdump deleted file mode 100644 index 4254305b4f..0000000000 --- a/Bugs/lcsortdump +++ /dev/null @@ -1,6 +0,0 @@ -@S = (0, 1, 2, 3); -for ("A", "D", "b", "c") { $foo{$i++} = $_; } -# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; } -for (sort Alpha @S) { print $foo{$_}, "\n"; } - -sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); } diff --git a/Bugs/localenv b/Bugs/localenv new file mode 100644 index 0000000000..6ab19308c6 --- /dev/null +++ b/Bugs/localenv @@ -0,0 +1,6 @@ +{ + local(%ENV); + $ENV{OOPS} = OOPS; + system 'echo NOT $OOPS'; +} +system 'echo $OOPS'; diff --git a/Bugs/mig b/Bugs/mig deleted file mode 100755 index a00a8e8b8a..0000000000 --- a/Bugs/mig +++ /dev/null @@ -1,17 +0,0 @@ -#!./perl - -$foo = < -Received: from mgc.mentorg.com by netlabs.com (4.1/SMI-4.1) - id AA15524; Wed, 2 Mar 94 09:17:50 PST -Received: from rainbow.mentorg.com by mgc.mentorg.com with SMTP - (16.6/15.5+MGC-TD 2.20) id AA04359; Wed, 2 Mar 94 09:16:55 -0800 -Received: from wv.mentorg.com by rainbow.mentorg.com with SMTP - (15.11.1.6/15.5+MGC-TD 2.08) id AA22830; Wed, 2 Mar 94 09:16:53 -0800 -Received: from em-wv02.MENTORG.COM by wv.mentorg.com (8.6.4/CF5.11R) - id JAA18865; Wed, 2 Mar 1994 09:16:51 -0800 -Received: from cynic.MENTORG.COM by em-wv02.MENTORG.COM (4.1/CF3.4) - id AA23300; Wed, 2 Mar 94 09:16:50 PST -Received: by cynic.MENTORG.COM (4.1/CF3.4) - id AA24503; Wed, 2 Mar 94 09:16:50 PST -From: brad_figg@rainbow.mentorg.com ("Brad Figg") -Message-Id: <9403020916.ZM24501@cynic> -Date: Wed, 2 Mar 1994 09:16:50 -0800 -X-Mailer: Z-Mail (3.0.0 15dec93) -To: lwall@netlabs.com -Subject: Perl5 Alpha 6 bug (subs & formats) -Content-Type: text/plain; charset=us-ascii -Mime-Version: 1.0 - - -The following works just fine as is with Perl 4 but doesn't work with -Perl5 Alpha 6 unless the format lines are moved outside the sub block. - - -Brad - -p.s. I'm not currently at a point where I can make the actual offer - but I'm just asking if you have any interest. I have access to - 'Purify' and 'Quantify' from Pure Software. I was thinking of - building Perl5 with these just to see what I'd get. Would you - be interested in the results? - - ------------------------Error.pl--------------------------------- -###################################################################### -## Package Variables -## - -package Error; - -push( @main'Versions, '$Id: Error.pl,v 1.3 1994/02/13 00:26:00 bradf Exp $' ); - -$Strings[ ($None = 0) ] = - "Everythings OK"; -$Strings[ ($BadFileOpen = 0) ] = - "I was unable to open the file \'%s\' due to:\n$!"; -$Strings[ ($NoVersion = 0) ] = - "Unable to read the first four bytes from the file." . - " This probably means it is an empty file."; - -###################################################################### -## -## Emsg -## -## Print a formatted error message to STDERR. -## -## Args: 2 -## 1. An error message that may contain printf formatting strings. -## 2. A list of arguments to be used for the format string -## expansions. -## -## Returns: -## -## if successful: none -## if unsuccessful: none -## -## Calls: -## -## Requires: -## -## Notes: -## - -sub Emsg - { - local( $String, @Args ) = @_; - local( $Err ); - -format EFIRSTLINE = - *** Error: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -$_ - ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~ -$_ -. - -format EBODY = - ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~ -$_ -. - - - $~ = 'EFIRSTLINE'; - $Err = sprintf( $String, @Args ); - foreach (split( "\n", $Err )) { - if ( $_ eq '' ) { print( "\n" ); } - write; - $~ = 'EBODY'; - } - } -[Acked] - diff --git a/Bugs/substleak b/Bugs/substleak deleted file mode 100644 index ff14446488..0000000000 --- a/Bugs/substleak +++ /dev/null @@ -1,98 +0,0 @@ -Return-Path: Martin.Ward@durham.ac.uk -Return-Path: -Received: from scalpel.netlabs.com by netlabs.com (4.1/SMI-4.1) - id AA01931; Thu, 20 Jan 94 03:56:39 PST -Received: from netlabs.com (vaccine-eng1.netlabs.com) by scalpel.netlabs.com (4.1/SMI-4.1) - id AA09639; Thu, 20 Jan 94 03:56:36 PST -Received: from sun2.nsfnet-relay.ac.uk by netlabs.com (4.1/SMI-4.1) - id AA01923; Thu, 20 Jan 94 03:56:01 PST -Via: uk.ac.durham; Thu, 20 Jan 1994 11:47:16 +0000 -Received: from easby.dur.ac.uk by durham.ac.uk; Thu, 20 Jan 94 11:47:05 GMT -Received: from ws-csm3.durham.ac.uk (ws-csm3.dur) by uk.ac.durham.easby; - Thu, 20 Jan 94 11:46:29 GMT -From: Martin.Ward@durham.ac.uk (Martin Ward) -Date: Thu, 20 Jan 94 11:46:27 GMT -Message-Id: -To: des0mpw@easby.durham.ac.uk, lwall@scalpel.netlabs.com -Subject: Re: My last message - ->: After saying I was stumped, I managed to track down the problem! ->: The problem was caused by a line much higher up: ->: ->: $seqpat = "$bs[s]\000e\000q\000\{\000"; # } hack ->: ->: Changing this by adding {} gives: ->: ->: $seqpat = "${bs}[s]\000e\000q\000\{\000"; # } hack ->: ->: which worked! No idea why :-) -> ->It apparently intuited $bs[s] to be an array reference. - -Aha! I think the interpretation is: -"$bs[ s] ..... -^^^^^ ^^ -array ref Therefore this is an expression, so "s]" is the start of - a pattern match/replace, so it scans for ...]....] - -I found the line by repeatedly chopping away everything after (and including) -the line where perl _thought_ the error started. This gradually worked back -through a nasty cascade of errors! - ->: No speed improvement this time (the improvement in user time was swamped ->: by an increase in system time. This may be because it uses 5048k of ->: data/stack space, compared with 985k for perl4). -> ->That doesn't sound good. I hope it's a bug. Does it grow continuously? ->Hopefully it's just a memory leak. - -For perl4 the memory size (shown by top) grows by about 100-150k per 2 seconds, -for perl5 it grows by about 1 - 1.5 Meg per 2 seconds. I don't use the script -very often (and I have over 100 Meg of swap space) so its not a big problem. -Still, with a 124k input file, the size for perl5 went up to 40 Meg! - -I have tracked down a memory leak, which is basically one line from the -texqed script. Store this script in "tmp" and run "perl tmp /vmunix" -(or some other large random file). Monitor the process using "top" in -another window. - -Perl4 is OK but perl5 leaks like a leaky cistern. - - -#!/usr/local/bin/perl - -# print a "." every $interval lines: -$interval = 10; -open (PAIRS, "$ARGV[0]"); -open (OUT, "> /dev/null"); -$bs = "\\\\" . "\000"; -for (;;) { - $line++; - if (($line % $interval) == 0) { - print STDERR "."; - } - read(PAIRS, $_, 20); - last if ($_ eq ""); - - s/$bs([_^\\])\000/\\\377$1\377/g; - - print OUT ; -} - -print STDERR "\n"; - - - -I hope you find this useful! - -NB Changing the "s/.../.../g" to an "m/.../" (with the same pattern) -makes the leak go away even on input files where the pattern NEVER matches!! - - Martin. - -JANET: Martin.Ward@uk.ac.durham Internet (eg US): Martin.Ward@durham.ac.uk -or if that fails: Martin.Ward%uk.ac.durham@nsfnet-relay.ac.uk -or even: Martin.Ward%DURHAM.AC.UK@CUNYVM.CUNY.EDU -BITNET: Martin.Ward%durham.ac.uk@UKACRL UUCP:...!uknet!durham!Martin.Ward -[Last acked 0.7 days ago--not acked] - diff --git a/Bugs/substrdump b/Bugs/substrdump deleted file mode 100644 index aef3fe55ec..0000000000 --- a/Bugs/substrdump +++ /dev/null @@ -1,2 +0,0 @@ - $a="abc"; - substr(\$a,1,0)='a'; diff --git a/Bugs/zeroanonref b/Bugs/zeroanonref deleted file mode 100644 index fd6def99c1..0000000000 --- a/Bugs/zeroanonref +++ /dev/null @@ -1 +0,0 @@ -$z = \'23' diff --git a/Changes b/Changes index 70e9e2b5c2..aa0fec01fc 100644 --- a/Changes +++ b/Changes @@ -28,7 +28,7 @@ New things this means you can return from it. Format value lists may be spread over multiple lines by enclosing in - curlies. + a do {} block. You may now define BEGIN and END subroutines for each package. The BEGIN subroutine executes the moment it's parsed. The END subroutine executes @@ -86,6 +86,10 @@ New things routine, which will be called if a non-existent subroutine is called in that package. + There is now a pragma mechanism, using the keywords "aver" and "deny". + Current pragmas are "integer" and "strict". Unrecognized pragmas + are ignored. + Incompatibilities ----------------- @ now always interpolates an array in double-quotish strings. Some programs diff --git a/Configure b/Configure index bfa8fb3a88..38e554c1a2 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.3 1993/12/15 08:15:07 ram Exp $ # -# Generated on Sat Apr 2 17:29:14 EST 1994 [metaconfig 3.0 PL22] +# Generated on Wed May 4 14:59:36 EDT 1994 [metaconfig 3.0 PL22] cat >/tmp/c1$$ < /dev/null 2>&1 ; then - dflt="$dflt isc_3_2_3" + osvers=3.2.3 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then - dflt="$dflt isc_3_2_2" + osvers=3.2.2 fi - : i386.sh hint is wrong for Interactive. - dflt=`echo $dflt | $sed 's/i386//'` fi ;; esac case "$1" in - aix) dflt="$dflt aix_rs" ;; - sun[Oo][Ss]) case "$3" in - [34]*) vers=`echo $3 | $sed 's/\./_/g'` - dflt="$dflt sunos_$vers" ;; - 5*) vers=`echo $3 | $sed 's/^5/2/g'` - dflt="$dflt solaris_$vers" ;; + aix) osname=aix_rs ;; + sunos) osname=sunos + case "$3" in + [34]*) osvers=$3 ;; + 5*) osname=solaris + osvers=`echo $3 | $sed 's/^5/2/g'` ;; esac ;; - [sS]olaris) case "$3" in - 5*) vers=`echo $3 | $sed 's/^5/2/g'` - dflt="$dflt solaris_$vers" ;; + solaris) osname=solaris + case "$3" in + 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; esac ;; - dnix) dflt="$dflt dnix" ;; - dgux) dflt="$dflt dgux" ;; - genix) dflt="$dflt genix" ;; - hp*ux) dflt="$dflt hpux" ;; - next) dflt="$dflt next" ;; - irix) dflt="$dflt sgi" ;; - ultrix) case "$3" in - 3*) dflt="$dflt ultrix_3" ;; - 4*) dflt="$dflt ultrix_4" ;; + dnix) osname=dnix ;; + dgux) osname=dgux ;; + genix) osname=genix ;; + hp*ux) osname=hpux ;; + next) osname=next ;; + irix) osname=sgi ;; + ultrix) osname=ultrix + case "$3" in + 1*) osvers=1 ;; + 2*) osvers=2 ;; + 3*) osvers=3 ;; + 4*) osvers=4 ;; esac ;; - uts) dflt="$dflt uts" ;; - $2) case "$dflt" in + osf1) case "$5" in + alpha) osname=dec_osf + case "$3" in + [vt]1\.*) osvers=1 ;; + [vt]2\.*) osvers=2 ;; + [vt]3\.*) osvers=3 ;; + esac + ;; + hp*) osname=hp_osf1 ;; # TR + mips) osname=mips_osf1 ;; # TR + # TR = Technology Releases: (un^N)supported + esac + ;; + uts) osname=uts ;; + $2) case "$osname" in *isc*) ;; *) if test -f /etc/systemid; then + osname=sco + : Does anyone know if these next gyrations are needed set `echo $3 | $sed 's/\./ /g'` $4 if $test -f sco_$1_$2_$3.sh; then - dflt="$dflt sco_$1_$2_$3" + osvers=$1.$2.$3 elif $test -f sco_$1_$2.sh; then - dflt="$dflt sco_$1_$2" + osvers=$1.$2 elif $test -f sco_$1.sh; then - dflt="$dflt sco_$1" + osvers=$1 fi fi ;; @@ -1240,25 +1283,31 @@ EOM if test -f /vmunix -a -f news_os.sh; then (what /vmunix | tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1 if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then - dflt="$dflt news_os" + osname=news_os fi $rm -f ../UU/kernel.what fi fi - set X `echo $dflt | tr ' ' '\012' | sort | uniq` - shift - dflt='' - for file in $*; do - if $test -f "$file.sh"; then - dflt="$dflt $file" - fi - done - set X $dflt - shift - dflt=${1+"$@"} - case "$dflt" in - '') dflt=none;; + + : Now look for a hint file osname_osvers + file=`echo "${osname}_${osvers}" | sed -e 's@\.@_@g' -e 's@_$@@'` + case "$file" in + '') dflt=none ;; + *) case "$osvers" in + '') dflt=$file + ;; + *) if $test -f $file.sh ; then + dflt=$file + elif $test -f "${osname}.sh" ; then + dflt="${osname}" + else + dflt=none + fi + ;; + esac + ;; esac + $cat <> ../UU/config.sh - elif $test X$ans = X -o X$ans = Xnone ; then + elif $test X$tans = X -o X$tans = Xnone ; then : nothing else - echo "$file.sh does not exist -- ignored" + : Give one chance to correct a possible typo. + echo "$file.sh does not exist" + dflt=$file + rp="hint to use instead?" + . ../UU/myread + for file in $ans; do + if $test -f "$file.sh"; then + . ./$file.sh + $cat $file.sh >> ../UU/config.sh + elif $test X$ans = X -o X$ans = Xnone ; then + : nothing + else + echo "$file.sh does not exist -- ignored." + fi + done fi done + hint=recommended + : Remember our hint file for later. + if $test -f "$file.sh" ; then + hintfile="$file.sh" + else + hintfile=none + fi + cd .. fi cd UU @@ -1303,6 +1375,43 @@ for file in $loclist $trylist; do eval $file="\$_$file" done +cat << EOM +Configure uses the operating system name and version to set some defaults. +Say "none" to leave it blank. +EOM + +case "$osname" in + ''|' ') + case "$hintfile" in + none) dflt=none ;; + *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/_.*$//'` ;; + esac + ;; + *) dflt="$osname" ;; +esac +rp="Operating system name?" +. ./myread +case "$ans" in + none) osname='' ;; + *) osname="$ans" ;; +esac + +case "$osvers" in + ''|' ') + case "$hintfile" in + none) dflt=none ;; + *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/^[^_]*//'` + dflt=`echo $dflt | sed -e 's/^_//' -e 's/_/./g'` ;; + esac + ;; + *) dflt="$osvers" ;; +esac +rp="Operating system version?" +. ./myread +case "$ans" in + none) osvers='' ;; + *) osvers="$ans" ;; +esac : who configured the system cf_time=`$date 2>&1` cf_by=`( (logname) 2>/dev/null || whoami) 2>&1` @@ -1479,7 +1588,6 @@ echo exit 1 >osf1 echo exit 1 >eunice echo exit 1 >xenix echo exit 1 >venix -d_bsd="$undef" $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 then @@ -1501,7 +1609,6 @@ elif test `echo abc | tr a-z A-Z` = Abc ; then fi elif $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." - d_bsd="$define" echo exit 0 >bsd else echo "Looks kind of like a Version 7 system, but we'll see..." @@ -1618,7 +1725,7 @@ return 1; #endif } EOM - if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then + if $cc -o gccvers gccvers.c >/dev/null 2>&1; then gccversion=`./gccvers` echo "You appear to have version $gccversion." else @@ -1925,12 +2032,12 @@ case "$optimize" in 'none') optimize=" ";; esac +dflt='' case "$ccflags" in '') case "$cc" in *gcc*) if $test "$gccversion" = "1"; then dflt='-fpcc-struct-return' fi ;; - *) dflt='';; esac case "$optimize" in *-g*) dflt="$dflt -DDEBUGGING";; @@ -1944,7 +2051,6 @@ case "$ccflags" in ;; esac ;; -*) dflt="$ccflags" ;; esac case "$mips_type" in @@ -1988,6 +2094,10 @@ set signal.h _NO_PROTO; eval $inctest case "$dflt" in '') dflt=none;; esac +case "$ccflags" in +'') ;; +*) dflt="$ccflags";; +esac $cat </dev/null 2>&1 ; then h_fcntl=true; echo " defines the *_OK access constants." >&4 + elif $test `./findhdr unistd.h` && \ + $cc $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then + echo " defines the *_OK access constants." >&4 else echo "I can't find the four *_OK access constants--I'll use mine." >&4 fi @@ -2816,7 +2930,7 @@ esac' : check for ability to cast large floats to 32-bit ints. echo " " echo 'Checking whether your C compiler can cast large floats to int32.' >&4 -if $test "$intsize" -ge 4; then +if $test "$intsize" -eq 4; then xxx=int else xxx=long @@ -2858,7 +2972,7 @@ case "$yyy" in esac set d_casti32 eval $setvar -$rm -f try.* +$rm -f try try.* : check for ability to cast negative floats to unsigned echo " " echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4 @@ -3177,10 +3291,70 @@ eval $inlibc set getpriority d_getprior eval $inlibc +: define an alternate in-header-list? function +inhdr='echo " "; td=$define; tu=$undef; yyy=$@; +cont=true; xxf="echo \"<\$1> found.\" >&4"; +case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";; +*) xxnf="echo \"<\$1> NOT found, ...\" >&4";; +esac; +case $# in 4) instead=instead;; *) instead="at last";; esac; +while $test "$cont"; do + xxx=`./findhdr $1` + var=$2; eval "was=\$$2"; + if $test "$xxx" && $test -r "$xxx"; + then eval $xxf; + eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td"; + cont=""; + else eval $xxnf; + eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi; + set $yyy; shift; shift; yyy=$@; + case $# in 0) cont="";; + 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; + xxnf="echo \"and I did not find <\$1> either.\" >&4";; + *) xxf="echo \"but I found <\$1\> instead.\" >&4"; + xxnf="echo \"there is no <\$1>, ...\" >&4";; + esac; +done; +while $test "$yyy"; +do set $yyy; var=$2; eval "was=\$$2"; + eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; + set $yyy; shift; shift; yyy=$@; +done' + +: see if this is a netinet/in.h or sys/in.h system +set netinet/in.h i_niin sys/in.h i_sysin +eval $inhdr + : see if htonl --and friends-- exists set htonl d_htonl eval $inlibc - +: Maybe they are macros. +case "$d_htonl" in +'define') ;; +*) cat > try.c < +#include +#$i_niin I_NETINET_IN +#$i_sysin I_SYS_IN +#ifdef I_NETINET_IN +# include +#endif +#ifdef I_SYS_IN +# include +#endif +int main() +{ + int x; + printf("x = ", htonl(7)); +} +EOM + if $cc $ccflags -c try.c >/dev/null 2>&1; then + d_htonl="$define" + echo "But it seems to be defined as a macro." + fi + $rm -f try.* try + ;; +esac : Look for isascii echo " " $cat >isascii.c <<'EOCP' @@ -3269,6 +3443,55 @@ fi set d_msg eval $setvar +: determine which malloc to compile in +: Old versions had dflt='y' only for bsd or v7. +echo " " +case "$usemymalloc" in +'') + if bsd || v7; then + dflt='y' + else + dflt='y' + fi + ;; +*) dflt="$usemymalloc" + ;; +esac +rp="Do you wish to attempt to use the malloc that comes with $package?" +. ./myread +usemymalloc="$ans" +case "$ans" in +y*) mallocsrc='malloc.c' + mallocobj='malloc.o' + d_mymalloc="$define" + ;; +*) mallocsrc='' + mallocobj='' + d_mymalloc="$undef" + ;; +esac + +: compute the type returned by malloc +echo " " +case "$malloctype" in +'') + if $test `./findhdr malloc.h`; then + echo "#include " > malloc.c + fi +#include + $cat >>malloc.c <<'END' +void *malloc(); +END + if $cc $ccflags -c malloc.c >/dev/null 2>&1; then + malloctype='void *' + else + malloctype='char *' + fi + $rm -f malloc.[co] + ;; +esac +echo "Your system wants malloc to return '$malloctype', it would seem." >&4 + socketlib='' sockethdr='' : see whether socket exists @@ -3378,7 +3601,7 @@ xxx=`./findhdr pwd.h` if $test "$xxx"; then i_pwd="$define" echo " found." >&4 - $cppstdin $cppflags < $xxx >$$.h + $cppstdin $cppflags $cppminus < $xxx >$$.h if $contains 'pw_quota' $$.h >/dev/null 2>&1; then d_pwquota="$define" else @@ -3421,9 +3644,15 @@ else echo " NOT found." >&4 fi -: see if readdir exists +: see if readdir and friends exist set readdir d_readdir eval $inlibc +set seekdir d_seekdir +eval $inlibc +set telldir d_telldir +eval $inlibc +set rewinddir d_rewinddir +eval $inlibc : see if rename exists set rename d_rename @@ -3442,20 +3671,21 @@ case "$d_bcopy" in $cat >foo.c <<'EOCP' main() { -char buf[128]; -register char *b; -register int len; -register int off; -register int align; +char buf[128], abc[128]; +char *b; +int len; +int off; +int align; +bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36); for (align = 7; align >= 0; align--) { for (len = 36; len; len--) { b = buf+align; - bcopy("abcdefghijklmnopqrstuvwxyz0123456789", b, len); + bcopy(abc, b, len); for (off = 1; off <= len; off++) { bcopy(b, b+off, len); bcopy(b+off, b, len); - if (bcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len)) + if (bcmp(b, abc, len)) exit(1); } } @@ -3488,20 +3718,22 @@ case "$d_memcpy" in $cat >foo.c <<'EOCP' main() { -char buf[128]; -register char *b; -register int len; -register int off; -register int align; +char buf[128], abc[128]; +char *b; +int len; +int off; +int align; + +memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36); for (align = 7; align >= 0; align--) { for (len = 36; len; len--) { b = buf+align; - memcpy("abcdefghijklmnopqrstuvwxyz0123456789", b, len); + memcpy(abc, b, len); for (off = 1; off <= len; off++) { memcpy(b, b+off, len); memcpy(b+off, b, len); - if (memcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len)) + if (memcmp(b, abc, len)) exit(1); } } @@ -3620,7 +3852,19 @@ eval $inlibc : see if shmat exists set shmat d_shmat eval $inlibc - +: see what shmat returns +d_voidshmat="$undef" +case "$d_shmat" in +define) + $cppstdin $cppflags $cppminus < $usrinc/sys/shm.h >voidshmat.txt 2>/dev/null + if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then + echo "and shmat returns (void*)" + d_voidshmat="$define" + else + echo "and shmat returns (char*)" + fi + ;; +esac : see if shmdt exists set shmdt d_shmdt eval $inlibc @@ -4022,15 +4266,24 @@ case "$d_phostname" in '') d_phostname="$undef";; esac -: backward compatibility for d_hvfork -if test X$d_hvfork != X; then - d_vfork="$d_hvfork" - d_hvfork='' -fi : see if there is a vfork set vfork d_vfork eval $inlibc - +: But do we want to use it. vfork is reportedly unreliable in +: perl in Solaris 2.x, and probably elsewhere. +case "$d_vfork" in +define) + dflt='n' + rp="Some systems have problems with vork. Do you want to use it?" + . ./myread + case "$ans" in + y|Y) ;; + *) echo "Ok, we won't use vfork." + d_vfork="$undef" + ;; + esac + ;; +esac : see if signal is declared as pointer to function returning int or void echo " " xxx=`./findhdr signal.h` @@ -4111,35 +4364,6 @@ Log='$Log' RCSfile='$RCSfile' Revision='$Revision' -: check for alignment requirements -echo " " -case "$alignbytes" in -'') echo "Checking alignment constraints..." >&4 - $cat >try.c <<'EOCP' -struct foobar { - char foo; - double bar; -} try; -main() -{ - printf("%d\n", (char *)&try.bar - (char *)&try.foo); -} -EOCP - if $cc $ccflags try.c -o try >/dev/null 2>&1; then - dflt=`./try` - else - dflt='8' - echo"(I can't seem to compile the test program...)" - fi - ;; -*) dflt="$alignbytes" - ;; -esac -rp="Doubles must be aligned on a how-many-byte boundary?" -. ./myread -alignbytes="$ans" -$rm -f try.c try - : is AFS running? echo " " if test -d /afs; then @@ -4239,77 +4463,228 @@ rp="What is the order of bytes in a long?" byteorder="$ans" $rm -f try.c try -: define an alternate in-header-list? function -inhdr='echo " "; td=$define; tu=$undef; yyy=$@; -cont=true; xxf="echo \"<\$1> found.\" >&4"; -case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";; -*) xxnf="echo \"<\$1> NOT found, ...\" >&4";; -esac; -case $# in 4) instead=instead;; *) instead="at last";; esac; -while $test "$cont"; do - xxx=`./findhdr $1` - var=$2; eval "was=\$$2"; - if $test "$xxx" && $test -r "$xxx"; - then eval $xxf; - eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td"; - cont=""; - else eval $xxnf; - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi; - set $yyy; shift; shift; yyy=$@; - case $# in 0) cont="";; - 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; - xxnf="echo \"and I did not find <\$1> either.\" >&4";; - *) xxf="echo \"but I found <\$1\> instead.\" >&4"; - xxnf="echo \"there is no <\$1>, ...\" >&4";; - esac; -done; -while $test "$yyy"; -do set $yyy; var=$2; eval "was=\$$2"; - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; - set $yyy; shift; shift; yyy=$@; -done' - : see if dlfcn is available set dlfcn.h i_dlfcn eval $inhdr - : determine which dynamic loading, if any, to compile in echo " " case "$usedl" in -'') - case "$i_dlfcn" in - 'define') dflt='y' ;; - *) dflt='n' ;; - esac - ;; -'define') dflt='y' ;; -'y') dflt='y' - usedl='define' ;; -*) dflt='n' ;; +'') case "$i_dlfcn" in + define) dflt='y' ;; + *) dflt='n' ;; + esac + : Does a dl.c file exist for this operating system + $test -f ../ext/dl/dl_${osname}.c && dflt='y' + ;; +define|y|true) dflt='y' + usedl="$define" + ;; +*) dflt='n' + ;; esac rp="Do you wish to attempt to use dynamic loading?" . ./myread usedl="$ans" case "$ans" in -y*) usedl='define'; dlsrc='dl.c'; dlobj='dl.o';; -*) usedl='undef'; dlsrc=''; dlobj='';; +y*) usedl="$define" + if $test -f ../ext/dl/dl_${osname}.c ; then + dflt="ext/dl/dl_${osname}.c" + else + dflt='ext/dl/dl.c' + fi + echo "The following dynamic loading files are available:" + cd ..; ls -C ext/dl/dl*.c; cd UU + rp="Source file to use for dynamic loading" + fn="fne~" + . ./getfile + : emulate basename and dirname + xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'` + dlobj=$xxx.o + dlsrc=$xxx.c + dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'` + case "$dldir" in + '') dldir="." ;; + *) ;; + esac + if $test -f ../$dldir/$dlsrc; then + usedl="$define" + else + echo "File $dlsrc does not exist -- ignored" + usedl="$undef" + fi + + cat << EOM + +Some systems may require passing special flags to $cc -c to +compile modules that will be used to create a shared library. +To use no flags, say "none". +EOM + case "$cccdlflags" in + ''|' ') case "$osname" in + hpux) dflt='+z' ;; + next) dflt='none' ;; + sunos) dflt='none' ;; + *) dflt='none' ;; + esac + ;; + *) dflt="$cccdlflags" ;; + esac + rp="Any special flags to pass to $cc -c to compile shared library modules?" + . ./myread + case "$ans" in + none) cccdlflags='' ;; + *) cccdlflags="$ans" ;; + esac + + cat << 'EOM' + +Some systems may require passing special flags to ld to +create a shared library. To use no flags, say "none". +EOM + case "$lddlflags" in + ''|' ') case "$osname" in + hpux) dflt='-b' ;; + next) dflt='none' ;; + sunos) dflt='none' ;; + *) dflt='none' ;; + esac + ;; + *) dflt="$lddlflags" ;; + esac + rp="Any special flags to pass to ld to create a shared library?" + . ./myread + case "$ans" in + none) lddlflags='' ;; + *) lddlflags="$ans" ;; + esac + + cat < /dev/null 2>&1 ; then + lns="$ln -s" +else + lns="$ln" +fi +rm -f blurfl sym +: see what type lseek is declared as in the kernel +case "$lseektype" in '') - if bsd || v7; then - dflt='y' + if $contains 'off_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then + dflt='off_t'; else - dflt='y' + dflt='long'; fi ;; -*) dflt="$usemymalloc" +*) dflt="$lseektype" ;; esac -rp="Do you wish to attempt to use the malloc that comes with $package?" -. ./myread -usemymalloc="$ans" -case "$ans" in -y*) mallocsrc='malloc.c'; mallocobj='malloc.o';; -*) mallocsrc=''; mallocobj='';; -esac - -: compute the type returned by malloc echo " " -case "$malloctype" in -'') - if $test `./findhdr malloc.h`; then - echo "#include " > malloc.c - fi -#include - $cat >>malloc.c <<'END' -void *malloc(); -END - if $cc $ccflags -c malloc.c >/dev/null 2>&1; then - malloctype='void *' - else - malloctype='char *' - fi - $rm -f malloc.[co] - ;; -esac -echo "Your system wants malloc to return '$malloctype', it would seem." >&4 +rp="What type is lseek's offset on this system declared as?" +. ./myread +lseektype="$ans" : determine where manual pages go $cat <&4 + $cat >try.c <<'EOCP' +struct foobar { + char foo; + double bar; +} try; +main() +{ + printf("%d\n", (char *)&try.bar - (char *)&try.foo); +} +EOCP + if $cc $ccflags try.c -o try >/dev/null 2>&1; then + dflt=`./try` + else + dflt='8' + echo"(I can't seem to compile the test program...)" + fi + ;; +*) dflt="$memalignbytes" + ;; +esac +rp="Doubles must be aligned on a how-many-byte boundary?" +. ./myread +memalignbytes="$ans" +$rm -f try.c try + : Cruising for prototypes echo " " echo "Checking out function prototypes..." >&4 @@ -4537,6 +4927,34 @@ set prototype eval $setvar $rm -f prototype* +: check for length of pointer +echo " " +case "$ptrsize" in +'') + echo "Checking to see how big your pointers are..." >&4 + $cat >try.c <<'EOCP' +#include +main() +{ + printf("%d\n", sizeof(char *)); +} +EOCP + if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then + dflt=`./try` + else + dflt='4' + echo "(I can't seem to compile the test program. Guessing...)" + fi + ;; +*) + dflt="$ptrsize" + ;; +esac +rp="What is the size of a pointer (in bytes)?" +. ./myread +ptrsize="$ans" +$rm -f try.c try + : check for size of random number generator echo " " case "$randbits" in @@ -4575,6 +4993,47 @@ rp='How many bits does your rand() function produce?' randbits="$ans" $rm -f try.c try +: see if ar generates random libraries by itself +echo " " +echo "Checking how to generate random libraries on your machine..." >&4 +$cat >a.c </dev/null 2>&1 +ar rc ran.a a.o >/dev/null 2>&1 +$cat >b.c </dev/null 2>&1; then + if $cc -o b b.c lib.a >/dev/null 2>&1; then + echo "ar appears to generate random libraries itself." + orderlib=false + ranlib=":" + else + echo "a table of contents needs to be added with 'ar ts'." + orderlib=false + ranlib="ar ts" + fi +else + if $test -f /usr/bin/ranlib; then + ranlib=/usr/bin/ranlib + elif $test -f /bin/ranlib; then + ranlib=/bin/ranlib + fi + + if $test -n "$ranlib"; then + echo "your system has $ranlib; we'll use that." + orderlib=false + else + echo "your system doesn't seem to support random libraries" + echo "so we'll use lorder and tsort to order the libraries." + orderlib=true + ranlib=":" + fi +fi +$rm -f a.* b.c b.o b ran.a lib.a + : determine where public executables go case "$scriptdir" in '') @@ -4663,8 +5122,18 @@ END { ;; esac echo "The following signals are available:" -echo $sig_name | tr ' ' '\012' | $sed 's/^/ SIG/' - +echo $sig_name | + $awk 'BEGIN { linelen = 0 } + { for (i = 1; i < NF; i++) + { + name = "SIG" $i " " + linelen = linelen + length(name) + if (linelen > 70) + { + printf "\n" + linelen = length(name) + } + printf "%s", name } }' : see what type of char stdio uses. echo " " if $contains 'unsigned.*char.*_ptr;' `./findhdr stdio.h` >/dev/null 2>&1 ; then @@ -4675,6 +5144,34 @@ else stdchar="char" fi +: see if time exists +echo " " +if set time val -f d_time; eval $csym; $val; then + echo 'time() found.' >&4 + val="$define" + case "$timetype" in + '') + if $contains 'time_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then + dflt='time_t'; + else + dflt='long'; + fi + ;; + *) dflt="$timetype" + ;; + esac + echo " " + rp="What type is returned by time() on this sytem?" + . ./myread + timetype="$ans" +else + echo 'time() not found, hope that will do.' >&4 + val="$undef" + timetype='int'; +fi +set d_time +eval $setvar + : see what type uids are declared as in the kernel case "$uidtype" in '') @@ -4802,8 +5299,7 @@ if $test -f "$bison"; then rp="$rp or bison -y" fi $cat < mem.h + if $contains 'memcpy' mem.h >/dev/null 2>&1; then + echo "We won't be including " + i_memory="$undef" + fi + rm -f mem.h + ;; + esac +esac : see if there are directory access routines out there echo " " if $test `./findhdr ndir.h` && \ @@ -4919,10 +5420,32 @@ else fi fi -: see if this is a netinet/in.h or sys/in.h system -set netinet/in.h i_niin sys/in.h i_sysin +: see if net/errno.h is available +set net/errno.h i_neterrno eval $inhdr - +: Unfortunately, it causes problems on some systems. Arrgh. +case '$i_neterrno' in +'define') echo " found." + cat > try.c <<'EOM' +#include +#include +#include +int func() +{ +int x; +x = ENOTSOCK; +return x; +} +EOM + if $cc $ccflags -c try.c >/dev/null 2>&1; then + i_neterrno="$define" + else + echo "But it causes problems, so we won't include it" + i_neterrno="$undef" + fi + $rm -f try.* try + ;; +esac : see if stdarg is available set stdarg.h i_stdarg eval $inhdr @@ -5147,6 +5670,10 @@ case "$flags" in esac $rm -f try.c try +: see if this is a unistd.h system +set unistd.h i_unistd +eval $inhdr + : see if this is an utime system set utime.h i_utime eval $inhdr @@ -5230,9 +5757,12 @@ esac $rm -f varargs* : see if this is a vfork system -set vfork.h i_vfork -eval $inhdr - +case "$d_vfork" in +define) set vfork.h i_vfork + eval $inhdr + ;; +*) i_vfork="$undef";; +esac : end of configuration questions echo " " echo "End of configuration questions." @@ -5274,7 +5804,6 @@ $startsh # Target system: $myuname extensions='$extensions' -d_bsd='$d_bsd' d_eunice='$d_eunice' d_xenix='$d_xenix' eunicefix='$eunicefix' @@ -5345,6 +5874,8 @@ vi='$vi' zcat='$zcat' hint='$hint' myuname='$myuname' +osname='$osname' +osvers='$osvers' Author='$Author' Date='$Date' Header='$Header' @@ -5356,7 +5887,7 @@ Revision='$Revision' Source='$Source' State='$State' afs='$afs' -alignbytes='$alignbytes' +memalignbytes='$memalignbytes' bin='$bin' binexp='$binexp' installbin='$installbin' @@ -5422,6 +5953,9 @@ d_msgsnd='$d_msgsnd' d_open3='$d_open3' d_portable='$d_portable' d_readdir='$d_readdir' +d_rewinddir='$d_rewinddir' +d_seekdir='$d_seekdir' +d_telldir='$d_telldir' d_rename='$d_rename' d_rmdir='$d_rmdir' d_safebcpy='$d_safebcpy' @@ -5448,6 +5982,7 @@ d_setruid='$d_setruid' d_setsid='$d_setsid' d_shm='$d_shm' d_shmat='$d_shmat' +d_voidshmat='$d_voidshmat' d_shmctl='$d_shmctl' d_shmdt='$d_shmdt' d_shmget='$d_shmget' @@ -5468,6 +6003,8 @@ d_syserrlst='$d_syserrlst' d_symlink='$d_symlink' d_syscall='$d_syscall' d_system='$d_system' +d_time='$d_time' +timetype='$timetype' clocktype='$clocktype' d_times='$d_times' d_truncate='$d_truncate' @@ -5484,8 +6021,13 @@ d_charvspr='$d_charvspr' d_vprintf='$d_vprintf' d_wait4='$d_wait4' d_waitpid='$d_waitpid' +cccdlflags='$cccdlflags' +ccdlflags='$ccdlflags' +dldir='$dldir' dlobj='$dlobj' dlsrc='$dlsrc' +lddlflags='$lddlflags' +shlibsuffix='$shlibsuffix' usedl='$usedl' gidtype='$gidtype' groupstype='$groupstype' @@ -5498,7 +6040,9 @@ i_dlfcn='$i_dlfcn' i_fcntl='$i_fcntl' i_gdbm='$i_gdbm' i_grp='$i_grp' +i_memory='$i_memory' i_ndbm='$i_ndbm' +i_neterrno='$i_neterrno' i_niin='$i_niin' i_sysin='$i_sysin' d_pwage='$d_pwage' @@ -5508,6 +6052,7 @@ d_pwcomment='$d_pwcomment' d_pwexpire='$d_pwexpire' d_pwquota='$d_pwquota' i_pwd='$i_pwd' +i_sdbm='$i_sdbm' i_stdarg='$i_stdarg' i_stddef='$i_stddef' i_string='$i_string' @@ -5527,6 +6072,7 @@ i_systime='$i_systime' i_systimek='$i_systimek' i_time='$i_time' timeincl='$timeincl' +i_unistd='$i_unistd' i_utime='$i_utime' i_varargs='$i_varargs' i_varhdr='$i_varhdr' @@ -5539,6 +6085,9 @@ libpth='$libpth' plibpth='$plibpth' xlibpth='$xlibpth' libs='$libs' +lns='$lns' +lseektype='$lseektype' +d_mymalloc='$d_mymalloc' mallocobj='$mallocobj' mallocsrc='$mallocsrc' malloctype='$malloctype' @@ -5561,12 +6110,15 @@ n='$n' groupcat='$groupcat' hostcat='$hostcat' passcat='$passcat' +orderlib='$orderlib' +ranlib='$ranlib' package='$package' spackage='$spackage' installprivlib='$installprivlib' privlib='$privlib' privlibexp='$privlibexp' prototype='$prototype' +ptrsize='$ptrsize' randbits='$randbits' installscript='$installscript' scriptdir='$scriptdir' diff --git a/Is b/Is deleted file mode 100644 index d6c279cf78..0000000000 --- a/Is +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef I_PWD -#include -#endif -#ifdef I_GRP -#include -#endif -#ifdef I_UTIME -#include -#endif -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif diff --git a/MANIFEST b/MANIFEST index 39ad1e470c..a71f86d46a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,17 +1,14 @@ Artistic The "Artistic License" +Configure Portability tool Copying The GNU General Public License EXTERN.h Included before foreign .h files INTERN.h Included before domestic .h files -Makefile.SH A script that generates Makefile MANIFEST This list of files -NDBM_File.c -ODBM_File.c -POSIX.c +Makefile.SH A script that generates Makefile README The Instructions README.ncr Special instructions for NCR README.uport Special instructions for Microports README.xenix Special instructions for Xenix -SDBM_File.c XSUB.h atarist/FILES atarist/README.ST @@ -44,6 +41,7 @@ atarist/usub/acurses.mus atarist/usub/makefile.st atarist/usub/usersub.c atarist/wildmat.c +autosplit av.c av.h bar.pm @@ -52,13 +50,15 @@ c2ph.doc documentation for c2ph cflags.SH A script that emits C compilation flags per file client A client to test sockets config.H Sample config.h -config_c++.h TEMP FILE -config_h.SH Produces config.h +config_h.SH Produces config.h +configpm Produces lib/Config.pm cop.h cv.h deb.c -dl.c +dlperl/Makefile dlperl/dlperl.c +dlperl/dlperl.doc +dlperl/dlperl.man dlperl/usersub.c doSH Script to run all the *.SH files doio.c I/O operations @@ -100,43 +100,76 @@ eg/sysvipc/ipcsem Example of Sys V IPC semaphores eg/sysvipc/ipcshm Example of Sys V IPC shared memory eg/travesty A program to print travesties of its input text eg/unuc.pats +eg/uudecode eg/van/empty A program to empty the trashcan eg/van/unvanish A program to undo what vanish does eg/van/vanexp A program to expire vanished files eg/van/vanish A program to put files in a trashcan eg/who A sample who program +emacs/cperl-mode +emacs/emacs19 emacs/perl-mode.el Emacs major mode for perl emacs/perldb.el Emacs debugging emacs/perldb.pl Emacs debugging emacs/tedstuff Some optional patches embed_h.SH -ext/dbm/GDBM_File.c -ext/dbm/NDBM_File.c -ext/dbm/ODBM_File.c -ext/dbm/SDBM_File.c -ext/dbm/sdbm/.pure +ext/README +ext/curses/Makefile +ext/curses/bsdcurses.mus +ext/curses/curses.mus +ext/curses/pager +ext/dbm/GDBM_File.xs GDBM extension +ext/dbm/Makefile +ext/dbm/NDBM_File.xs NDBM extension +ext/dbm/ODBM_File.xs ODBM extension +ext/dbm/SDBM_File.xs SDBM extension +ext/dbm/sdbm/CHANGES +ext/dbm/sdbm/COMPARE +ext/dbm/sdbm/Makefile.SH ext/dbm/sdbm/README.too +ext/dbm/sdbm/biblio ext/dbm/sdbm/dba.c ext/dbm/sdbm/dbd.c +ext/dbm/sdbm/dbe.1 ext/dbm/sdbm/dbe.c ext/dbm/sdbm/dbm.c ext/dbm/sdbm/dbm.h ext/dbm/sdbm/dbu.c +ext/dbm/sdbm/grind ext/dbm/sdbm/hash.c ext/dbm/sdbm/linux.patches +ext/dbm/sdbm/makefile.sdbm ext/dbm/sdbm/pair.c ext/dbm/sdbm/pair.h +ext/dbm/sdbm/readme.ms ext/dbm/sdbm/readme.ps +ext/dbm/sdbm/sdbm.3 ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/tune.h ext/dbm/sdbm/util.c -ext/dl/dl.c +ext/dbm/typemap +ext/dl/dl_hpux.c Dynamic loading for HPUX. +ext/dl/dl_next.c Dynamic loading for NeXT +ext/dl/dl_sunos.c Dynamic loading for SunOS 4.1.? +ext/dl/eg/Makefile +ext/dl/eg/Makefile.att ext/dl/eg/main.c ext/dl/eg/test.c ext/dl/eg/test1.c +ext/man2mus +ext/mus +ext/posix/POSIX.xs +ext/posix/typemap +ext/typemap +ext/typemap.oi +ext/typemap.xlib +ext/typemap.xpm +ext/xsubpp +ext/xvarpp form.h Public declarations for the above gettest A little script to test the get* routines +global.sym gv.c gv.h h2ph.SH A thing to turn C .h file into perl .ph files @@ -163,6 +196,9 @@ hints/apollo_C6_7.sh hints/apollo_C6_8.sh hints/aux.sh hints/cray.sh +hints/dec_osf_1.sh +hints/dec_osf_2.sh +hints/dec_osf_3.sh hints/dgux.sh hints/dnix.sh hints/dynix.sh @@ -182,6 +218,7 @@ hints/mips.sh hints/mpc.sh hints/ncr_tower.sh hints/next.sh +hints/next_3_2.sh hints/opus.sh hints/osf1.sh hints/sco_2_3_0.sh @@ -192,11 +229,16 @@ hints/sco_2_3_4.sh hints/sco_3.sh hints/sgi.sh hints/solaris_2_0.sh +hints/solaris_2_1.sh +hints/solaris_2_2.sh +hints/solaris_2_3.sh hints/stellar.sh hints/sunos_3_4.sh hints/sunos_3_5.sh hints/sunos_4_0_1.sh hints/sunos_4_0_2.sh +hints/sunos_4_1_2.sh +hints/sunos_4_1_3.sh hints/svr4.sh hints/ti1500.sh hints/titan.sh @@ -211,15 +253,16 @@ hv.c hv.h hvdbm.h installperl Perl script to do "make install" dirty work +interp.sym ioctl.pl Sample ioctl.pl keywords.h lib/AutoLoader.pm -lib/Config.pm lib/English.pm lib/Exporter.pm lib/FOOBAR.pm lib/FileHandle.pm lib/Hostname.pm +lib/NDBM_File.pm lib/POSIX.pm lib/SDBM_File.pm lib/abbrev.pl An abbreviation table builder @@ -259,13 +302,13 @@ lib/tainted.pl lib/termcap.pl Perl library supporting termcap usage lib/timelocal.pl Perl library supporting inverse of localtime, gmtime lib/validate.pl Perl library supporting wholesale file mode validation -main.c makedepend.SH Precursor to makedepend makedir.SH Precursor to makedir makefile.lib make libperl.a malloc.c A version of malloc you might not want mg.c mg.h +miniperlmain.c Basic perl w/o dynamic loading or extensions. msdos/Changes.dds Expanation of MS-DOS patches by Diomidis Spinellis msdos/Makefile MS-DOS makefile msdos/README.msdos Compiling and usage information @@ -324,13 +367,13 @@ perly.c.byacc perly.c.diff perly.c.yacc perly.fixer A program to remove yacc stack limitations -perly.h perly.h.yacc perly.y Yacc grammar for perl perly.y.save pp.c Push/Pop code pp.h Push/Pop code defs proto.h +protos regcomp.c Regular expression compiler regcomp.h Private declarations for above regexec.c Regular expression evaluator @@ -338,6 +381,7 @@ regexp.h Public declarations for the above scope.c scope.h server A server to test sockets +sortfunc sv.c sv.h t/README Instructions for regression tests @@ -369,6 +413,7 @@ t/io/print.t See if print commands work t/io/tell.t See if file seeking works t/lib/bigint.t t/lib/english.t +t/lib/ndbm.t t/lib/sdbm.t t/op/append.t See if . works t/op/array.t See if array operations work @@ -420,12 +465,12 @@ t/op/unshift.t See if unshift works t/op/vec.t See if vectors work t/op/write.t See if write works taint.c -test.pl toke.c The tokener unixish.h usersub.c User supplied (possibly proprietary) subroutines util.c Utility routines util.h Public declarations for the above +writemain.SH Generate perlmain.c from miniperlmain.c+extensions. x2p/EXTERN.h Same as above x2p/INTERN.h Same as above x2p/Makefile.SH Precursor to Makefile @@ -446,4 +491,3 @@ x2p/str.h Public declarations for the above x2p/util.c Utility routines x2p/util.h Public declarations for the above x2p/walk.c Parse tree walker -Configure Portability tool diff --git a/MANIFEST.new b/MANIFEST.new index 1b3394e623..a71f86d46a 100644 --- a/MANIFEST.new +++ b/MANIFEST.new @@ -1,17 +1,14 @@ Artistic The "Artistic License" +Configure Portability tool Copying The GNU General Public License EXTERN.h Included before foreign .h files INTERN.h Included before domestic .h files -Makefile.SH A script that generates Makefile MANIFEST This list of files -NDBM_File.c -ODBM_File.c -POSIX.c +Makefile.SH A script that generates Makefile README The Instructions README.ncr Special instructions for NCR README.uport Special instructions for Microports README.xenix Special instructions for Xenix -SDBM_File.c XSUB.h atarist/FILES atarist/README.ST @@ -44,6 +41,7 @@ atarist/usub/acurses.mus atarist/usub/makefile.st atarist/usub/usersub.c atarist/wildmat.c +autosplit av.c av.h bar.pm @@ -52,12 +50,15 @@ c2ph.doc documentation for c2ph cflags.SH A script that emits C compilation flags per file client A client to test sockets config.H Sample config.h -config_c++.h TEMP FILE +config_h.SH Produces config.h +configpm Produces lib/Config.pm cop.h cv.h deb.c -dl.c +dlperl/Makefile dlperl/dlperl.c +dlperl/dlperl.doc +dlperl/dlperl.man dlperl/usersub.c doSH Script to run all the *.SH files doio.c I/O operations @@ -99,43 +100,76 @@ eg/sysvipc/ipcsem Example of Sys V IPC semaphores eg/sysvipc/ipcshm Example of Sys V IPC shared memory eg/travesty A program to print travesties of its input text eg/unuc.pats +eg/uudecode eg/van/empty A program to empty the trashcan eg/van/unvanish A program to undo what vanish does eg/van/vanexp A program to expire vanished files eg/van/vanish A program to put files in a trashcan eg/who A sample who program +emacs/cperl-mode +emacs/emacs19 emacs/perl-mode.el Emacs major mode for perl emacs/perldb.el Emacs debugging emacs/perldb.pl Emacs debugging emacs/tedstuff Some optional patches embed_h.SH -ext/dbm/GDBM_File.c -ext/dbm/NDBM_File.c -ext/dbm/ODBM_File.c -ext/dbm/SDBM_File.c -ext/dbm/sdbm/.pure +ext/README +ext/curses/Makefile +ext/curses/bsdcurses.mus +ext/curses/curses.mus +ext/curses/pager +ext/dbm/GDBM_File.xs GDBM extension +ext/dbm/Makefile +ext/dbm/NDBM_File.xs NDBM extension +ext/dbm/ODBM_File.xs ODBM extension +ext/dbm/SDBM_File.xs SDBM extension +ext/dbm/sdbm/CHANGES +ext/dbm/sdbm/COMPARE +ext/dbm/sdbm/Makefile.SH ext/dbm/sdbm/README.too +ext/dbm/sdbm/biblio ext/dbm/sdbm/dba.c ext/dbm/sdbm/dbd.c +ext/dbm/sdbm/dbe.1 ext/dbm/sdbm/dbe.c ext/dbm/sdbm/dbm.c ext/dbm/sdbm/dbm.h ext/dbm/sdbm/dbu.c +ext/dbm/sdbm/grind ext/dbm/sdbm/hash.c ext/dbm/sdbm/linux.patches +ext/dbm/sdbm/makefile.sdbm ext/dbm/sdbm/pair.c ext/dbm/sdbm/pair.h +ext/dbm/sdbm/readme.ms ext/dbm/sdbm/readme.ps +ext/dbm/sdbm/sdbm.3 ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/tune.h ext/dbm/sdbm/util.c -ext/dl/dl.c +ext/dbm/typemap +ext/dl/dl_hpux.c Dynamic loading for HPUX. +ext/dl/dl_next.c Dynamic loading for NeXT +ext/dl/dl_sunos.c Dynamic loading for SunOS 4.1.? +ext/dl/eg/Makefile +ext/dl/eg/Makefile.att ext/dl/eg/main.c ext/dl/eg/test.c ext/dl/eg/test1.c +ext/man2mus +ext/mus +ext/posix/POSIX.xs +ext/posix/typemap +ext/typemap +ext/typemap.oi +ext/typemap.xlib +ext/typemap.xpm +ext/xsubpp +ext/xvarpp form.h Public declarations for the above gettest A little script to test the get* routines +global.sym gv.c gv.h h2ph.SH A thing to turn C .h file into perl .ph files @@ -162,6 +196,9 @@ hints/apollo_C6_7.sh hints/apollo_C6_8.sh hints/aux.sh hints/cray.sh +hints/dec_osf_1.sh +hints/dec_osf_2.sh +hints/dec_osf_3.sh hints/dgux.sh hints/dnix.sh hints/dynix.sh @@ -181,6 +218,7 @@ hints/mips.sh hints/mpc.sh hints/ncr_tower.sh hints/next.sh +hints/next_3_2.sh hints/opus.sh hints/osf1.sh hints/sco_2_3_0.sh @@ -191,11 +229,16 @@ hints/sco_2_3_4.sh hints/sco_3.sh hints/sgi.sh hints/solaris_2_0.sh +hints/solaris_2_1.sh +hints/solaris_2_2.sh +hints/solaris_2_3.sh hints/stellar.sh hints/sunos_3_4.sh hints/sunos_3_5.sh hints/sunos_4_0_1.sh hints/sunos_4_0_2.sh +hints/sunos_4_1_2.sh +hints/sunos_4_1_3.sh hints/svr4.sh hints/ti1500.sh hints/titan.sh @@ -210,15 +253,16 @@ hv.c hv.h hvdbm.h installperl Perl script to do "make install" dirty work +interp.sym ioctl.pl Sample ioctl.pl keywords.h lib/AutoLoader.pm -lib/Config.pm lib/English.pm lib/Exporter.pm lib/FOOBAR.pm lib/FileHandle.pm lib/Hostname.pm +lib/NDBM_File.pm lib/POSIX.pm lib/SDBM_File.pm lib/abbrev.pl An abbreviation table builder @@ -258,13 +302,13 @@ lib/tainted.pl lib/termcap.pl Perl library supporting termcap usage lib/timelocal.pl Perl library supporting inverse of localtime, gmtime lib/validate.pl Perl library supporting wholesale file mode validation -main.c makedepend.SH Precursor to makedepend makedir.SH Precursor to makedir makefile.lib make libperl.a malloc.c A version of malloc you might not want mg.c mg.h +miniperlmain.c Basic perl w/o dynamic loading or extensions. msdos/Changes.dds Expanation of MS-DOS patches by Diomidis Spinellis msdos/Makefile MS-DOS makefile msdos/README.msdos Compiling and usage information @@ -323,13 +367,13 @@ perly.c.byacc perly.c.diff perly.c.yacc perly.fixer A program to remove yacc stack limitations -perly.h perly.h.yacc perly.y Yacc grammar for perl perly.y.save pp.c Push/Pop code pp.h Push/Pop code defs proto.h +protos regcomp.c Regular expression compiler regcomp.h Private declarations for above regexec.c Regular expression evaluator @@ -337,6 +381,7 @@ regexp.h Public declarations for the above scope.c scope.h server A server to test sockets +sortfunc sv.c sv.h t/README Instructions for regression tests @@ -368,6 +413,7 @@ t/io/print.t See if print commands work t/io/tell.t See if file seeking works t/lib/bigint.t t/lib/english.t +t/lib/ndbm.t t/lib/sdbm.t t/op/append.t See if . works t/op/array.t See if array operations work @@ -419,12 +465,12 @@ t/op/unshift.t See if unshift works t/op/vec.t See if vectors work t/op/write.t See if write works taint.c -test.pl toke.c The tokener unixish.h usersub.c User supplied (possibly proprietary) subroutines util.c Utility routines util.h Public declarations for the above +writemain.SH Generate perlmain.c from miniperlmain.c+extensions. x2p/EXTERN.h Same as above x2p/INTERN.h Same as above x2p/Makefile.SH Precursor to Makefile @@ -445,5 +491,3 @@ x2p/str.h Public declarations for the above x2p/util.c Utility routines x2p/util.h Public declarations for the above x2p/walk.c Parse tree walker -Configure Portability tool -config_h.SH Produces config.h diff --git a/Makefile b/Makefile index 0babdb10ab..8da9eee9b4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -# : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $ +# .SH,v $Revision: 4.1 $Date: 92/08/07 17:18:08 $ +# This file is derived from Makefile.SH. Any changes made here will +# be lost the next time you run Configure. +# Makefile is used to generate makefile. The only difference +# is that makefile has the dependencies filled in at the end. # # $Log: Makefile.SH,v $ # Revision 4.1 92/08/07 17:18:08 lwall @@ -36,14 +40,24 @@ mansrc = /usr/local/man/man1 manext = 1 LDFLAGS = CLDFLAGS = + SMALL = LARGE = mallocsrc = malloc.c mallocobj = malloc.o -dlsrc = dl.c -dlobj = dl.o -SLN = ln -s +dlsrc = dl_sunos.c +dlobj = dl_sunos.o +dldir = ext/dl +LNS = /bin/ln -s RMS = rm -f +ranlib = /usr/bin/ranlib + +# The following are used to build and install shared libraries for +# dynamic loading. +LDDLFLAGS = +CCDLFLAGS = +CCCDLFLAGS = +SHLIBSUFFIX = .so libs = -ldbm -ldl -lm -lposix @@ -51,7 +65,7 @@ public = perl shellflags = -# To use an alternate make, set in config.sh. +## To use an alternate make, set in config.sh. MAKE = make CCCMD = `sh $(shellflags) cflags $@` @@ -64,7 +78,7 @@ manpages = perl.man h2ph.man util = -sh = Makefile.SH makedepend.SH h2ph.SH +sh = Makefile.SH cflags.SH embed_h.SH makedepend.SH makedir.SH writemain.SH h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h @@ -79,19 +93,19 @@ c1 = av.c scope.c op.c doop.c doio.c dump.c hv.c c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c -c = $(c1) $(c2) $(c3) +c = $(c1) $(c2) $(c3) $(dlsrc) miniperlmain.c perlmain.c s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c -s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c +s2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c -saber = $(s1) $(s2) $(s3) +saber = $(s1) $(s2) $(s3) $(dlsrc) obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o -obj = $(obj1) $(obj2) $(obj3) $(dlobj) +obj = $(obj1) $(obj2) $(obj3) lintflags = -hbvxac @@ -100,85 +114,105 @@ addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 # grrr SHELL = /bin/sh -.SUFFIXES: .x - .c.o: $(CCCMD) $*.c -.x.c: - sh writemain $*.x >$*.c - all: miniperl perl lib/Config.pm #all: $(public) $(private) $(util) $(scripts) # cd x2p; $(MAKE) all # touch all +# Phony target to force checking subdirectories. +FORCE: + + +$(dlsrc): $(dldir)/$(dlsrc) + cp $(dldir)/$(dlsrc) $(dlsrc) + +$(dlobj): $(dlsrc) + $(CCCMD) $(dlsrc) + + # NDBM_File extension +NDBM_File.o: NDBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c + NDBM_File.c: ext/dbm/NDBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/NDBM_File.xs >tmp + ./miniperl ext/xsubpp ext/dbm/NDBM_File.xs >tmp mv tmp NDBM_File.c -NDBM_File.o: NDBM_File.c +lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX): NDBM_File.o + test -d lib/auto/NDBM_File || mkdir lib/auto/NDBM_File + ld $(LDDLFLAGS) -o $@ NDBM_File.o # ODBM_File extension -ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap - test -f miniperl || make miniperl - ext/xsubpp ext/dbm/ODBM_File.xs >tmp - mv tmp ODBM_File.c - ODBM_File.o: ODBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c -# GDBM_File extension -GDBM_File.c: ext/dbm/GDBM_File.xs ext/xsubpp ext/typemap +ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/GDBM_File.xs >tmp - mv tmp GDBM_File.c + ./miniperl ext/xsubpp ext/dbm/ODBM_File.xs >tmp + mv tmp ODBM_File.c -GDBM_File.o: GDBM_File.c +lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX): ODBM_File.o + test -d lib/auto/ODBM_File || mkdir lib/auto/ODBM_File + ld $(LDDLFLAGS) -o $@ ODBM_File.o # SDBM_File extension +SDBM_File.o: SDBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c + SDBM_File.c: ext/dbm/SDBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/SDBM_File.xs >tmp + ./miniperl ext/xsubpp ext/dbm/SDBM_File.xs >tmp mv tmp SDBM_File.c -SDBM_File.o: SDBM_File.c - -lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/SDBM_File 2>/dev/null - ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a - -ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h - cd ext/dbm/sdbm; $(MAKE) sdbm +lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX): SDBM_File.o ext/dbm/sdbm/libsdbm.a + test -d lib/auto/SDBM_File || mkdir lib/auto/SDBM_File + ld $(LDDLFLAGS) -o $@ SDBM_File.o ext/dbm/sdbm/libsdbm.a # POSIX extension +POSIX.o: POSIX.c + $(CCCMD) $(CCCDLFLAGS) $*.c + POSIX.c: ext/posix/POSIX.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/posix/POSIX.xs >tmp + ./miniperl ext/xsubpp ext/posix/POSIX.xs >tmp mv tmp POSIX.c -POSIX.o: POSIX.c -lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/POSIX 2>/dev/null - ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a -extobjs= ext/dbm/NDBM_File.xs.o ext/dbm/ODBM_File.xs.o ext/dbm/GDBM_File.xs.o ext/dbm/SDBM_File.xs.o ext/posix/POSIX.xs.o +lib/auto/POSIX/POSIX$(SHLIBSUFFIX): POSIX.o + test -d lib/auto/POSIX || mkdir lib/auto/POSIX + ld $(LDDLFLAGS) -o $@ POSIX.o -lm + +# List of extensions (used by writemain) to generate perlmain.c +ext= NDBM_File ODBM_File SDBM_File POSIX +extsrc= NDBM_File.c ODBM_File.c SDBM_File.c POSIX.c +# Extension dependencies. +extdep= lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX) lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX) lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX) lib/auto/POSIX/POSIX$(SHLIBSUFFIX) +# How to include extensions in linking command +extobj= + +ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/sdbm.c + cd ext/dbm/sdbm; $(MAKE) -f Makefile libsdbm.a + # The $& notation tells Sequent machines that it can do a parallel make, # and is harmless otherwise. -miniperlmain.c: miniperlmain.x -miniperlmain.o: miniperlmain.c miniperl: $& miniperlmain.o perl.o $(obj) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs) -perlmain.c: perlmain.x +perlmain.c: miniperlmain.c + sh writemain $(ext) > perlmain.c + perlmain.o: perlmain.c -perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o - $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs) + +perl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep) + $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs) libperl.rlb: libperl.a - ranlib libperl.a + $(ranlib) libperl.a touch libperl.rlb libperl.a: $& perl.o $(obj) @@ -189,11 +223,11 @@ libperl.a: $& perl.o $(obj) # checks as well as the special code to validate that the script in question # has been invoked correctly. -suidperl: $& sperl.o main.o libperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl +suidperl: $& sperl.o perlmain.o libperl.rlb + $(CC) $(LARGE) $(CLDFLAGS) sperl.o perlmain.o libperl.a $(libs) -o suidperl -lib/Config.pm: config.sh - ./configpm +lib/Config.pm: config.sh miniperl + ./miniperl configpm saber: $(saber) # load $(saber) @@ -201,21 +235,16 @@ saber: $(saber) sperl.o: perl.c perly.h patchlevel.h $(h) $(RMS) sperl.c - $(SLN) perl.c sperl.c + $(LNS) perl.c sperl.c $(CCCMD) -DIAMSUID sperl.c $(RMS) sperl.c -dl.o: ext/dl/dl.c - cp ext/dl/dl.c dl.c - $(CC) -c dl.c - - perly.h: perly.c @ echo Dummy dependency for dumb parallel make touch perly.h opcode.h: opcode.pl - - opcode.pl + - perl opcode.pl embed.h: embed_h.SH global.sym interp.sym sh embed_h.SH @@ -234,14 +263,21 @@ install: all ./perl installperl clean: - rm -f *.o all perl taintperl suidperl miniperl + rm -f *.o all perl miniperl + rm -f POSIX.c ?DBM_File.c perlmain.c + rm -f ext/dbm/sdbm/libsdbm.a + cd ext/dbm/sdbm; $(MAKE) -f Makefile clean cd x2p; $(MAKE) clean realclean: clean cd x2p; $(MAKE) realclean + cd ext/dbm/sdbm; $(MAKE) -f Makefile realclean rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man - rm -f perly.h t/perl Makefile config.h makedepend makedir - rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags + rm -f Makefile cflags embed_h makedepend makedir writemain + rm -f config.h t/perl makefile makefile.old cflags + rm -rf lib/auto/?DBM_File lib/auto/POSIX + rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags + rm -f lib/Config.pm rm -f c2ph pstruct # The following lint has practically everything turned on. Unfortunately, @@ -258,17 +294,17 @@ depend: makedepend - test -s perly.h || /bin/rm -f perly.h cd x2p; $(MAKE) depend -test: perl +test: perl lib/Config.pm - cd t && chmod +x TEST */*.t - - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST .clist -hlist: +hlist: $(h) echo $(h) | tr ' ' '\012' >.hlist -shlist: +shlist: $(sh) echo $(sh) | tr ' ' '\012' >.shlist # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE diff --git a/Makefile.SH b/Makefile.SH index fe0549a035..88b8b7194e 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -17,25 +17,31 @@ case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac -case "$d_symlink" in -*define*) sln='ln -s' ;; -*) sln='ln';; -esac - case "$d_dosuid" in *define*) suidperl='suidperl' ;; *) suidperl='';; esac +: Certain parts of Makefile need to be commented out if dynamic +: loading is not used. +case "$usedl" in +define) comment='' ;; +*) comment='#' ;; +esac + echo "Extracting Makefile (with variable substitutions)" : This section of the file will have variable substitutions done on it. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. : Protect any dollar signs and backticks that you do not want interpreted : by putting a backslash in front. You may delete these comments. $spitshell >Makefile <>Makefile <<'!NO!SUBS!' CCCMD = `sh $(shellflags) cflags $@` @@ -103,7 +119,7 @@ manpages = perl.man h2ph.man util = -sh = Makefile.SH makedepend.SH h2ph.SH +sh = Makefile.SH cflags.SH embed_h.SH makedepend.SH makedir.SH writemain.SH h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h @@ -118,19 +134,19 @@ c1 = av.c scope.c op.c doop.c doio.c dump.c hv.c c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c -c = $(c1) $(c2) $(c3) +c = $(c1) $(c2) $(c3) $(dlsrc) miniperlmain.c perlmain.c s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c -s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c +s2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c -saber = $(s1) $(s2) $(s3) +saber = $(s1) $(s2) $(s3) $(dlsrc) obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o -obj = $(obj1) $(obj2) $(obj3) $(dlobj) +obj = $(obj1) $(obj2) $(obj3) lintflags = -hbvxac @@ -139,82 +155,126 @@ addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 # grrr SHELL = /bin/sh -.SUFFIXES: .x - .c.o: $(CCCMD) $*.c -.x.c: - sh writemain $*.x >$*.c - all: miniperl perl lib/Config.pm #all: $(public) $(private) $(util) $(scripts) # cd x2p; $(MAKE) all # touch all + +# Phony target to force checking subdirectories. +FORCE: + !NO!SUBS! + +### Some makes have problems with the following dependency +### if $(dlsrc) or $(dlobj) is empty. +### Therefore, comment it out if dlsrc is null. +### +$spitshell >>Makefile <>Makefile <tmp + ./miniperl ext/xsubpp $f >tmp mv tmp $base.c -$base.o: $base.c +${comment}lib/auto/$base/$base\$(SHLIBSUFFIX): $base.o $extradep +${comment} test -d lib/auto/$base || mkdir lib/auto/$base +${comment} ld \$(LDDLFLAGS) -o \$@ $base.o $extraobj !GROK!THIS! - case $base in - SDBM_File) $spitshell >>Makefile <<'!NO!SUBS!' +done -lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/SDBM_File 2>/dev/null - ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a +$spitshell >>Makefile <>Makefile <<'!NO!SUBS!' -lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/POSIX 2>/dev/null - ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a -!NO!SUBS! - ;; - esac -done +# List of extensions (used by writemain) to generate perlmain.c +ext=$ext +extsrc=$extsrc +# Extension dependencies. +extdep=$extdep +# How to include extensions in linking command +extobj=$extobj -echo "extobjs=$extobjs" >> Makefile +ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/sdbm.c + cd ext/dbm/sdbm; \$(MAKE) -f Makefile libsdbm.a +!GROK!THIS! + +### Now on to the rest of the Makefile. $spitshell >>Makefile <<'!NO!SUBS!' # The $& notation tells Sequent machines that it can do a parallel make, # and is harmless otherwise. -miniperlmain.c: miniperlmain.x -miniperlmain.o: miniperlmain.c miniperl: $& miniperlmain.o perl.o $(obj) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs) -perlmain.c: perlmain.x +perlmain.c: miniperlmain.c + sh writemain $(ext) > perlmain.c + perlmain.o: perlmain.c -perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o - $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs) + +perl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep) + $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs) + +pureperl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep) + purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs) + +quantperl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep) + quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs) libperl.rlb: libperl.a - ranlib libperl.a + $(ranlib) libperl.a touch libperl.rlb libperl.a: $& perl.o $(obj) @@ -225,11 +285,11 @@ libperl.a: $& perl.o $(obj) # checks as well as the special code to validate that the script in question # has been invoked correctly. -suidperl: $& sperl.o main.o libperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl +suidperl: $& sperl.o perlmain.o libperl.rlb + $(CC) $(LARGE) $(CLDFLAGS) sperl.o perlmain.o libperl.a $(libs) -o suidperl -lib/Config.pm: config.sh - ./configpm +lib/Config.pm: config.sh miniperl + ./miniperl configpm saber: $(saber) # load $(saber) @@ -237,25 +297,16 @@ saber: $(saber) sperl.o: perl.c perly.h patchlevel.h $(h) $(RMS) sperl.c - $(SLN) perl.c sperl.c + $(LNS) perl.c sperl.c $(CCCMD) -DIAMSUID sperl.c $(RMS) sperl.c -dl.o: ext/dl/dl.c - cp ext/dl/dl.c dl.c - $(CC) -c dl.c - -!NO!SUBS! - -### Now on to the rest of the Makefile. -$spitshell >>Makefile <<'!NO!SUBS!' - perly.h: perly.c @ echo Dummy dependency for dumb parallel make touch perly.h opcode.h: opcode.pl - - opcode.pl + - perl opcode.pl embed.h: embed_h.SH global.sym interp.sym sh embed_h.SH @@ -274,14 +325,21 @@ install: all ./perl installperl clean: - rm -f *.o all perl taintperl suidperl miniperl + rm -f *.o all perl miniperl + rm -f POSIX.c ?DBM_File.c perlmain.c + rm -f ext/dbm/sdbm/libsdbm.a + cd ext/dbm/sdbm; $(MAKE) -f Makefile clean cd x2p; $(MAKE) clean realclean: clean cd x2p; $(MAKE) realclean + cd ext/dbm/sdbm; $(MAKE) -f Makefile realclean rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man - rm -f perly.h t/perl Makefile config.h makedepend makedir - rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags + rm -f Makefile cflags embed_h makedepend makedir writemain + rm -f config.h t/perl makefile makefile.old cflags + rm -rf lib/auto/?DBM_File lib/auto/POSIX + rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags + rm -f lib/Config.pm rm -f c2ph pstruct # The following lint has practically everything turned on. Unfortunately, @@ -298,28 +356,28 @@ depend: makedepend - test -s perly.h || /bin/rm -f perly.h cd x2p; $(MAKE) depend -test: perl +test: perl lib/Config.pm - cd t && chmod +x TEST */*.t - - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST .clist -hlist: +hlist: $(h) echo $(h) | tr ' ' '\012' >.hlist -shlist: +shlist: $(sh) echo $(sh) | tr ' ' '\012' >.shlist # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE # If this runs make out of memory, delete /usr/include lines. !NO!SUBS! -$eunicefix Makefile4 +$eunicefix Makefile case `pwd` in *SH) - $rm -f ../Makefile4 - ln Makefile4 ../Makefile4 + $rm -f ../Makefile + ln Makefile ../Makefile ;; esac rm -f makefile diff --git a/NDBM_File.c b/NDBM_File.c index 9d5897eabd..d257e89745 100644 --- a/NDBM_File.c +++ b/NDBM_File.c @@ -42,8 +42,11 @@ register int items; { NDBM_File db; - if (SvROK(ST(1))) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (SvROK(ST(1))) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not a reference"); dbm_close(db); @@ -65,8 +68,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -96,8 +102,11 @@ register int items; int flags; int RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -134,8 +143,11 @@ register int items; datum key; int RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -162,8 +174,11 @@ register int items; NDBM_File db; datum RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -188,8 +203,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -216,8 +234,11 @@ register int items; NDBM_File db; int RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); @@ -241,8 +262,11 @@ register int items; NDBM_File db; int RETVAL; - if (sv_isa(ST(1), "NDBM_File")) - db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "NDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (NDBM_File) tmp; + } else croak("db is not of type NDBM_File"); diff --git a/ODBM_File.c b/ODBM_File.c index 61849e3c2b..8a073f3023 100644 --- a/ODBM_File.c +++ b/ODBM_File.c @@ -19,7 +19,9 @@ typedef void* ODBM_File; static int dbmrefcnt; +#ifndef DBM_REPLACE #define DBM_REPLACE 0 +#endif static int XS_ODBM_File_odbm_new(ix, ax, items) @@ -72,8 +74,11 @@ register int items; { ODBM_File db; - if (SvROK(ST(1))) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (SvROK(ST(1))) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not a reference"); dbmrefcnt--; @@ -96,8 +101,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "ODBM_File")) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "ODBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not of type ODBM_File"); @@ -127,8 +135,11 @@ register int items; int flags; int RETVAL; - if (sv_isa(ST(1), "ODBM_File")) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "ODBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not of type ODBM_File"); @@ -165,8 +176,11 @@ register int items; datum key; int RETVAL; - if (sv_isa(ST(1), "ODBM_File")) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "ODBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not of type ODBM_File"); @@ -193,8 +207,11 @@ register int items; ODBM_File db; datum RETVAL; - if (sv_isa(ST(1), "ODBM_File")) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "ODBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not of type ODBM_File"); @@ -219,8 +236,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "ODBM_File")) - db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "ODBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (ODBM_File) tmp; + } else croak("db is not of type ODBM_File"); diff --git a/PACKINGLIST@34 b/PACKINGLIST@34 deleted file mode 100644 index 95a45f94e9..0000000000 --- a/PACKINGLIST@34 +++ /dev/null @@ -1,397 +0,0 @@ -After all the perl kits are run you should have the following files: - -Filename Kit Description --------- --- ----------- -Artistic 37 The "Artistic License" -Configure:AA 8 Run this first -Configure:AB 14 -Copying 33 The GNU General Public License -EXTERN.h 44 Included before foreign .h files -INTERN.h 44 Included before domestic .h files -MANIFEST 31 This list of files -Makefile.SH 15 Precursor to Makefile -PACKINGLIST 19 Which files came from which kits -README 1 The Instructions -README.ncr 2 Special instructions for NCR -README.uport 2 Special instructions for Microports -README.xenix 2 Special instructions for Xenix -Wishlist 44 Some things that may or may not happen -arg.h 22 Public declarations for the above -array.c 27 Numerically subscripted arrays -array.h 43 Public declarations for the above -atarist/FILES 42 -atarist/README.ST 1 -atarist/RESULTS 40 -atarist/atarist.c 36 -atarist/config.h 23 -atarist/echo.c 41 -atarist/explain 40 -atarist/makefile.sm 34 -atarist/makefile.st 34 -atarist/osbind.pl 36 -atarist/perldb.diff 37 -atarist/perlglob.c 43 -atarist/test/binhandl 44 -atarist/test/ccon 44 -atarist/test/dbm 40 -atarist/test/err 44 -atarist/test/gdbm 44 -atarist/test/gdbm.t 40 -atarist/test/glob 44 -atarist/test/osexample.pl44 -atarist/test/pi.pl 39 -atarist/test/printenv 20 -atarist/test/readme 35 -atarist/test/sig 44 -atarist/test/tbinmode 44 -atarist/usersub.c 44 -atarist/usub/README.ATARI 2 -atarist/usub/acurses.mus32 -atarist/usub/makefile.st43 -atarist/usub/usersub.c 43 -atarist/wildmat.c 34 -c2ph.SH 25 program to translate dbx stabs to perl -c2ph.doc 33 documentation for c2ph -cflags.SH 40 A script that emits C compilation flags per file -client 43 A client to test sockets -cmd.c 19 Command interpreter -cmd.h 37 Public declarations for the above -config.H 26 Sample config.h -config_h.SH 22 Produces config.h -cons.c 17 Routines to construct cmd nodes of a parse tree -consarg.c 20 Routines to construct arg nodes of a parse tree -doSH 43 Script to run all the *.SH files -doarg.c 13 Scalar expression evaluation -doio.c:AA 4 I/O operations -doio.c:AB 25 -dolist.c 12 Array expression evaluation -dump.c 35 Debugging output -eg/ADB 27 An adb wrapper to put in your crash dir -eg/README 1 Intro to example perl scripts -eg/changes 43 A program to list recently changed files -eg/down 44 A program to do things to subdirectories -eg/dus 43 A program to do du -s on non-mounted dirs -eg/findcp 42 A find wrapper that implements a -cp switch -eg/findtar 44 A find wrapper that pumps out a tar file -eg/g/gcp 40 A program to do a global rcp -eg/g/gcp.man 41 Manual page for gcp -eg/g/ged 28 A program to do a global edit -eg/g/ghosts 43 A sample /etc/ghosts file -eg/g/gsh 39 A program to do a global rsh -eg/g/gsh.man 41 Manual page for gsh -eg/muck 39 A program to find missing make dependencies -eg/muck.man 43 Manual page for muck -eg/myrup 43 A program to find lightly loaded machines -eg/nih 44 Script to insert #! workaround -eg/relink 40 A program to change symbolic links -eg/rename 41 A program to rename files -eg/rmfrom 44 A program to feed doomed filenames to -eg/scan/scan_df 42 Scan for filesystem anomalies -eg/scan/scan_last 42 Scan for login anomalies -eg/scan/scan_messages 37 Scan for console message anomalies -eg/scan/scan_passwd 43 Scan for passwd file anomalies -eg/scan/scan_ps 43 Scan for process anomalies -eg/scan/scan_sudo 42 Scan for sudo anomalies -eg/scan/scan_suid 40 Scan for setuid anomalies -eg/scan/scanner 41 An anomaly reporter -eg/shmkill 43 A program to remove unused shared memory -eg/sysvipc/README 2 Intro to Sys V IPC examples -eg/sysvipc/ipcmsg 17 Example of SYS V IPC message queues -eg/sysvipc/ipcsem 43 Example of Sys V IPC semaphores -eg/sysvipc/ipcshm 42 Example of Sys V IPC shared memory -eg/travesty 43 A program to print travesties of its input text -eg/van/empty 43 A program to empty the trashcan -eg/van/unvanish 42 A program to undo what vanish does -eg/van/vanexp 44 A program to expire vanished files -eg/van/vanish 41 A program to put files in a trashcan -eg/who 44 A sample who program -emacs/perl-mode.el 27 Emacs major mode for perl -emacs/perldb.el 24 Emacs debugging -emacs/perldb.pl 27 Emacs debugging -emacs/tedstuff 33 Some optional patches -eval.c:AA 7 The expression evaluator -eval.c:AB 30 -form.c 34 Format processing -form.h 43 Public declarations for the above -gettest 43 A little script to test the get* routines -h2ph.SH 36 A thing to turn C .h file into perl .ph files -h2pl/README 2 How to turn .ph files into .pl files -h2pl/cbreak.pl 43 cbreak routines using .ph -h2pl/cbreak2.pl 43 cbreak routines using .pl -h2pl/eg/sizeof.ph 44 Sample sizeof array initialization -h2pl/eg/sys/errno.pl 41 Sample translated errno.pl -h2pl/eg/sys/ioctl.pl 38 Sample translated ioctl.pl -h2pl/eg/sysexits.pl 44 Sample translated sysexits.pl -h2pl/getioctlsizes 44 Program to extract types from ioctl.h -h2pl/mksizes 43 Program to make %sizeof array. -h2pl/mkvars 43 Program to make .pl from .ph files -h2pl/tcbreak 29 cbreak test routine using .ph -h2pl/tcbreak2 22 cbreak test routine using .pl -handy.h 38 Handy definitions -hash.c 26 Associative arrays -hash.h 41 Public declarations for the above -hints/3b1.sh 44 -hints/3b1cc 41 -hints/3b2.sh 44 -hints/aix_rs.sh 44 -hints/aix_rt.sh 44 -hints/altos486.sh 44 -hints/apollo_C6_7.sh 32 -hints/apollo_C6_8.sh 43 -hints/aux.sh 44 -hints/cray.sh 44 -hints/dgux.sh 44 -hints/dnix.sh 44 -hints/dynix.sh 44 -hints/fps.sh 24 -hints/genix.sh 44 -hints/greenhills.sh 44 -hints/hp9000_300.sh 44 -hints/hp9000_400.sh 44 -hints/hp9000_700.sh 44 -hints/hp9000_800.sh 44 -hints/hpux.sh 44 -hints/i386.sh 44 -hints/isc_3_2_2.sh 44 -hints/isc_3_2_3.sh 44 -hints/mc6000.sh 44 -hints/mips.sh 44 -hints/mpc.sh 44 -hints/ncr_tower.sh 44 -hints/next.sh 44 -hints/opus.sh 44 -hints/osf1.sh 44 -hints/sco_2_3_0.sh 44 -hints/sco_2_3_1.sh 1 -hints/sco_2_3_2.sh 44 -hints/sco_2_3_3.sh 44 -hints/sco_2_3_4.sh 44 -hints/sco_3.sh 44 -hints/sgi.sh 44 -hints/solaris_2_0.sh 44 -hints/stellar.sh 44 -hints/sunos_3_4.sh 44 -hints/sunos_3_5.sh 44 -hints/sunos_4_0_1.sh 44 -hints/sunos_4_0_2.sh 44 -hints/svr4.sh 15 -hints/ti1500.sh 44 -hints/titan.sh 42 -hints/ultrix_1.sh 44 -hints/ultrix_3.sh 44 -hints/ultrix_4.sh 16 -hints/unisysdynix.sh 44 -hints/utekv.sh 43 -hints/uts.sh 44 -hints/vax.sh 33 -installperl 37 Perl script to do "make install" dirty work -ioctl.pl 39 Sample ioctl.pl -lib/abbrev.pl 43 An abbreviation table builder -lib/assert.pl 42 assertion and panic with stack trace -lib/bigfloat.pl 36 An arbitrary precision floating point package -lib/bigint.pl 34 An arbitrary precision integer arithmetic package -lib/bigrat.pl 31 An arbitrary precision rational arithmetic package -lib/cacheout.pl 43 Manages output filehandles when you need too many -lib/chat2.pl 35 Randal's famous expect-ish routines -lib/complete.pl 40 A command completion subroutine -lib/ctime.pl 41 A ctime workalike -lib/dumpvar.pl 43 A variable dumper -lib/exceptions.pl 36 catch and throw routines -lib/fastcwd.pl 43 a faster but more dangerous getcwd -lib/find.pl 40 A find emulator--used by find2perl -lib/finddepth.pl 40 A depth-first find emulator--used by find2perl -lib/flush.pl 44 Routines to do single flush -lib/getcwd.pl 42 a getcwd() emulator -lib/getopt.pl 42 Perl library supporting option parsing -lib/getopts.pl 42 Perl library supporting option parsing -lib/importenv.pl 44 Perl routine to get environment into variables -lib/look.pl 42 A "look" equivalent -lib/newgetopt.pl 35 A perl library supporting long option parsing -lib/open2.pl 41 -lib/perldb.pl 23 Perl debugging routines -lib/pwd.pl 42 Routines to keep track of PWD environment variable -lib/shellwords.pl 43 Perl library to split into words with shell quoting -lib/stat.pl 43 Perl library supporting stat function -lib/syslog.pl 35 Perl library supporting syslogging -lib/termcap.pl 39 Perl library supporting termcap usage -lib/timelocal.pl 40 Perl library supporting inverse of localtime, gmtime -lib/validate.pl 39 Perl library supporting wholesale file mode validation -makedepend.SH 37 Precursor to makedepend -makedir.SH 42 Precursor to makedir -malloc.c 32 A version of malloc you might not want -msdos/Changes.dds 41 Expanation of MS-DOS patches by Diomidis Spinellis -msdos/Makefile 40 MS-DOS makefile -msdos/README.msdos 1 Compiling and usage information -msdos/Wishlist.dds 43 My wishlist -msdos/chdir.c 41 A chdir that can change drives -msdos/config.h 21 Definitions for msdos -msdos/dir.h 42 MS-DOS header for directory access functions -msdos/directory.c 38 MS-DOS directory access functions. -msdos/eg/crlf.bat 43 Convert files from unix to MS-DOS line termination -msdos/eg/drives.bat 42 List the system drives and their characteristics -msdos/eg/lf.bat 43 Convert files from MS-DOS to Unix line termination -msdos/glob.c 44 A command equivalent to csh glob -msdos/msdos.c 37 MS-DOS ioctl, sleep, gete?[gu]if, spawn, aspawn -msdos/popen.c 39 My_popen and my_pclose for MS-DOS -msdos/usage.c 41 How to invoke perl under MS-DOS -os2/Makefile 42 Makefile for OS/2 -os2/README.OS2 1 Notes for OS/2 -os2/a2p.cs 42 Compiler script for a2p -os2/a2p.def 44 Linker defs for a2p -os2/alarm.c 38 An implementation of alarm() -os2/alarm.h 44 Header file for same -os2/config.h 24 Configuration file for OS/2 -os2/crypt.c 35 -os2/dir.h 41 Directory header -os2/director.c 38 Directory routines -os2/eg/alarm.pl 44 Example of alarm code -os2/eg/os2.pl 41 Sample script for OS/2 -os2/eg/syscalls.pl 19 Example of syscall on OS/2 -os2/glob.c 44 Globbing routines -os2/makefile 39 Make file -os2/mktemp.c 44 Mktemp() using TMP -os2/os2.c 36 Unix compatibility functions -os2/perl.bad 44 names of protect-only API calls for BIND -os2/perl.cs 43 Compiler script for perl -os2/perl.def 23 Linker defs for perl -os2/perldb.dif 30 Changes to make the debugger work -os2/perlglob.bad 44 names of protect-only API calls for BIND -os2/perlglob.cs 44 Compiler script for perlglob -os2/perlglob.def 44 Linker defs for perlglob -os2/perlsh.cmd 44 Poor man's shell for os2 -os2/popen.c 26 Code for opening pipes -os2/s2p.cmd 18 s2p as command file -os2/selfrun.bat 44 A self running perl script for DOS -os2/selfrun.cmd 44 Example of extproc feature -os2/suffix.c 38 Code for creating backup filenames -os2/tests.dif 20 -patchlevel.h 44 The current patch level of perl -perl.c 15 main() -perl.h 29 Global declarations -perl.man:AA 9 The manual page(s) -perl.man:AB 10 -perl.man:AC 6 -perl.man:AD 11 -perl.man:AE 41 -perlsh 44 A poor man's perl shell -perly.fixer 24 A program to remove yacc stack limitations -perly.y 30 Yacc grammar for perl -regcomp.c 2 Regular expression compiler -regcomp.h 35 Private declarations for above -regexec.c 28 Regular expression evaluator -regexp.h 39 Public declarations for the above -server 43 A server to test sockets -spat.h 38 Search pattern declarations -stab.c 29 Symbol table stuff -stab.h 25 Public declarations for the above -str.c 18 String handling package -str.h 36 Public declarations for the above -t/README 1 Instructions for regression tests -t/TEST 41 The regression tester -t/base/cond.t 44 See if conditionals work -t/base/if.t 44 See if if works -t/base/lex.t 40 See if lexical items work -t/base/pat.t 44 See if pattern matching works -t/base/term.t 43 See if various terms work -t/cmd/elsif.t 43 See if else-if works -t/cmd/for.t 43 See if for loops work -t/cmd/mod.t 43 See if statement modifiers work -t/cmd/subval.t 13 See if subroutine values work -t/cmd/switch.t 41 See if switch optimizations work -t/cmd/while.t 40 See if while loops work -t/comp/cmdopt.t 39 See if command optimization works -t/comp/cpp.t 43 See if C preprocessor works -t/comp/decl.t 44 See if declarations work -t/comp/multiline.t 43 See if multiline strings work -t/comp/package.t 43 See if packages work -t/comp/script.t 44 See if script invokation works -t/comp/term.t 42 See if more terms work -t/io/argv.t 43 See if ARGV stuff works -t/io/dup.t 43 See if >& works right -t/io/fs.t 39 See if directory manipulations work -t/io/inplace.t 44 See if inplace editing works -t/io/pipe.t 43 See if secure pipes work -t/io/print.t 44 See if print commands work -t/io/tell.t 42 See if file seeking works -t/lib/big.t 38 See if lib/bigint.pl works -t/op/append.t 44 See if . works -t/op/array.t 39 See if array operations work -t/op/auto.t 21 See if autoincrement et all work -t/op/chop.t 43 See if chop works -t/op/cond.t 44 See if conditional expressions work -t/op/dbm.t 40 See if dbm binding works -t/op/delete.t 43 See if delete works -t/op/do.t 42 See if subroutines work -t/op/each.t 42 See if associative iterators work -t/op/eval.t 42 See if eval operator works -t/op/exec.t 43 See if exec and system work -t/op/exp.t 43 See if math functions work -t/op/flip.t 43 See if range operator works -t/op/fork.t 44 See if fork works -t/op/glob.t 44 See if <*> works -t/op/goto.t 43 See if goto works -t/op/groups.t 43 See if $( works -t/op/index.t 12 See if index works -t/op/int.t 44 See if int works -t/op/join.t 44 See if join works -t/op/list.t 40 See if array lists work -t/op/local.t 43 See if local works -t/op/magic.t 42 See if magic variables work -t/op/mkdir.t 44 See if mkdir works -t/op/oct.t 44 See if oct and hex work -t/op/ord.t 44 See if ord works -t/op/pack.t 43 See if pack and unpack work -t/op/pat.t 38 See if esoteric patterns work -t/op/push.t 42 See if push and pop work -t/op/range.t 43 See if .. works -t/op/re_tests 32 Input file for op.regexp -t/op/read.t 44 See if read() works -t/op/readdir.t 44 See if readdir() works -t/op/regexp.t 43 See if regular expressions work -t/op/repeat.t 42 See if x operator works -t/op/s.t 38 See if substitutions work -t/op/sleep.t 44 See if sleep works -t/op/sort.t 42 See if sort works -t/op/split.t 41 See if split works -t/op/sprintf.t 44 See if sprintf works -t/op/stat.t 37 See if stat works -t/op/study.t 41 See if study works -t/op/substr.t 2 See if substr works -t/op/time.t 42 See if time functions work -t/op/undef.t 42 See if undef works -t/op/unshift.t 44 See if unshift works -t/op/vec.t 43 See if vectors work -t/op/write.t 41 See if write works -toke.c:AA 3 The tokener -toke.c:AB 31 -usersub.c 39 User supplied (possibly proprietary) subroutines -usub/Makefile 44 Makefile for curseperl -usub/README 1 Instructions for user supplied subroutines -usub/bsdcurses.mus 32 what used to be curses.mus -usub/curses.mus 21 Glue routines for BSD curses -usub/man2mus 42 A manual page to .mus translator -usub/mus 40 A .mus to .c translator -usub/pager 39 A sample pager in curseperl -usub/usersub.c 41 An initialization file to call curses glue routines -util.c 16 Utility routines -util.h 42 Public declarations for the above -x2p/EXTERN.h 44 Same as above -x2p/INTERN.h 44 Same as above -x2p/Makefile.SH 23 Precursor to Makefile -x2p/a2p.h 14 Global declarations -x2p/a2p.man 36 Manual page for awk to perl translator -x2p/a2p.y 17 A yacc grammer for awk -x2p/a2py.c 28 Awk compiler, sort of -x2p/cflags.SH 41 A script that emits C compilation flags per file -x2p/find2perl.SH 33 A find to perl translator -x2p/handy.h 42 Handy definitions -x2p/hash.c 38 Associative arrays again -x2p/hash.h 42 Public declarations for the above -x2p/s2p.SH 31 Sed to perl translator -x2p/s2p.man 40 Manual page for sed to perl translator -x2p/str.c 16 String handling package -x2p/str.h 42 Public declarations for the above -x2p/util.c 37 Utility routines -x2p/util.h 42 Public declarations for the above -x2p/walk.c:AA 5 Parse tree walker -x2p/walk.c:AB 42 diff --git a/POSIX.c b/POSIX.c index bfd6ac3036..b5036e5bc3 100644 --- a/POSIX.c +++ b/POSIX.c @@ -13,7 +13,9 @@ #include #include #include +#ifdef I_PWD #include +#endif #include #include #ifdef I_STDARG @@ -30,7 +32,7 @@ #include #include #include -#ifndef CR3 +#if defined(I_TERMIOS) && !defined(CR3) #include #endif #include @@ -44,7 +46,7 @@ typedef HV* POSIX__SigAction; #define HAS_UNAME #ifndef HAS_GETPGRP -#define getpgrp(a,b) not_here("getpgrp") +#define getpgrp() not_here("getpgrp") #endif #ifndef HAS_NICE #define nice(a) not_here("nice") @@ -55,9 +57,6 @@ typedef HV* POSIX__SigAction; #ifndef HAS_SETPGID #define setpgid(a,b) not_here("setpgid") #endif -#ifndef HAS_SETPGRP -#define setpgrp(a,b) not_here("setpgrp") -#endif #ifndef HAS_SETSID #define setsid() not_here("setsid") #endif @@ -2074,8 +2073,11 @@ register int items; { POSIX__SigSet sigset; - if (SvROK(ST(1))) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (SvROK(ST(1))) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not a reference"); safefree(sigset); @@ -2097,8 +2099,11 @@ register int items; int sig = (int)SvIV(ST(2)); SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -2128,8 +2133,11 @@ register int items; int sig = (int)SvIV(ST(2)); SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -2158,8 +2166,11 @@ register int items; POSIX__SigSet sigset; SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -2188,8 +2199,11 @@ register int items; POSIX__SigSet sigset; SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -2219,8 +2233,11 @@ register int items; int sig = (int)SvIV(ST(2)); int RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -2266,7 +2283,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isalnum(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2289,7 +2306,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isalpha(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2312,7 +2329,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!iscntrl(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2335,7 +2352,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isdigit(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2358,7 +2375,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isgraph(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2381,7 +2398,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!islower(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2404,7 +2421,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isprint(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2427,7 +2444,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!ispunct(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2450,7 +2467,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isspace(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2473,7 +2490,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isupper(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2496,7 +2513,7 @@ register int items; int RETVAL; char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isxdigit(*s)) RETVAL = 0; ST(0) = sv_newmortal(); @@ -2652,12 +2669,12 @@ register int items; croak("Usage: POSIX::acos(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = acos(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2672,12 +2689,12 @@ register int items; croak("Usage: POSIX::asin(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = asin(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2692,12 +2709,12 @@ register int items; croak("Usage: POSIX::atan(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = atan(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2712,12 +2729,12 @@ register int items; croak("Usage: POSIX::ceil(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = ceil(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2732,12 +2749,12 @@ register int items; croak("Usage: POSIX::cosh(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = cosh(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2752,12 +2769,12 @@ register int items; croak("Usage: POSIX::floor(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = floor(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2772,13 +2789,13 @@ register int items; croak("Usage: POSIX::fmod(x,y)"); } { - double x = SvNV(ST(1)); - double y = SvNV(ST(2)); + double x = (double)SvNV(ST(1)); + double y = (double)SvNV(ST(2)); double RETVAL; RETVAL = fmod(x, y); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2793,7 +2810,7 @@ register int items; croak("Usage: POSIX::frexp(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); dSP; int expvar; sp--; @@ -2815,13 +2832,13 @@ register int items; croak("Usage: POSIX::ldexp(x,exp)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); int exp = (int)SvIV(ST(2)); double RETVAL; RETVAL = ldexp(x, exp); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2836,12 +2853,12 @@ register int items; croak("Usage: POSIX::log10(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = log10(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2856,7 +2873,7 @@ register int items; croak("Usage: POSIX::modf(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); dSP; double intvar; sp--; @@ -2878,12 +2895,12 @@ register int items; croak("Usage: POSIX::sinh(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = sinh(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2898,12 +2915,12 @@ register int items; croak("Usage: POSIX::tanh(x)"); } { - double x = SvNV(ST(1)); + double x = (double)SvNV(ST(1)); double RETVAL; RETVAL = tanh(x); ST(0) = sv_newmortal(); - sv_setnv(ST(0), RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -2939,7 +2956,7 @@ register int items; if (!siggv) - gv_fetchpv("SIG", TRUE); + gv_fetchpv("SIG", TRUE, SVt_PVHV); { struct sigaction act; @@ -2975,7 +2992,7 @@ register int items; act.sa_mask = *sigset; } else - sigemptyset(act.sa_mask); + sigemptyset(& act.sa_mask); /* Set up any desired flags. */ svp = hv_fetch(action, "FLAGS", 5, FALSE); @@ -2984,11 +3001,11 @@ register int items; /* Now work around sigaction oddities */ if (action && oldaction) - RETVAL = sigaction(sig, act, oact); + RETVAL = sigaction(sig, & act, & oact); else if (action) - RETVAL = sigaction(sig, act, (struct sigaction*)0); + RETVAL = sigaction(sig, & act, (struct sigaction*)0); else if (oldaction) - RETVAL = sigaction(sig, (struct sigaction*)0, oact); + RETVAL = sigaction(sig, (struct sigaction*)0, & oact); if (oldaction) { /* Get back the mask. */ @@ -3030,8 +3047,11 @@ register int items; POSIX__SigSet sigset; SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); @@ -3062,16 +3082,22 @@ register int items; POSIX__SigSet oldsigset; SysRet RETVAL; - if (sv_isa(ST(2), "POSIX::SigSet")) - sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(2))); + if (sv_isa(ST(2), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(2))); + sigset = (POSIX__SigSet) tmp; + } else croak("sigset is not of type POSIX::SigSet"); if (items < 3) oldsigset = 0; else { - if (sv_isa(ST(3), "POSIX::SigSet")) - oldsigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(3))); + if (sv_isa(ST(3), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(3))); + oldsigset = (POSIX__SigSet) tmp; + } else croak("oldsigset is not of type POSIX::SigSet"); } @@ -3101,8 +3127,11 @@ register int items; POSIX__SigSet signal_mask; SysRet RETVAL; - if (sv_isa(ST(1), "POSIX::SigSet")) - signal_mask = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "POSIX::SigSet")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + signal_mask = (POSIX__SigSet) tmp; + } else croak("signal_mask is not of type POSIX::SigSet"); @@ -3146,11 +3175,16 @@ register int items; } { int fd = (int)SvIV(ST(1)); - int RETVAL; + SysRet RETVAL; RETVAL = close(fd); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3166,11 +3200,16 @@ register int items; } { int fd = (int)SvIV(ST(1)); - int RETVAL; + SysRet RETVAL; RETVAL = dup(fd); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3187,72 +3226,16 @@ register int items; { int fd1 = (int)SvIV(ST(1)); int fd2 = (int)SvIV(ST(2)); - int RETVAL; + SysRet RETVAL; RETVAL = dup2(fd1, fd2); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_fstat(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 2) { - croak("Usage: POSIX::fstat(fd, buf)"); - } - { - int fd = (int)SvIV(ST(1)); - struct stat * buf = (struct stat*)sv_grow(ST(2),sizeof(struct stat)); - int RETVAL; - - RETVAL = fstat(fd, buf); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - SvCUR(ST(2)) = sizeof(struct stat); - } - return ax; -} - -static int -XS_POSIX_getpgrp(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 1) { - croak("Usage: POSIX::getpgrp(pid)"); - } - { - int pid = (int)SvIV(ST(1)); - int RETVAL; - - RETVAL = getpgrp(pid); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_link(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::link()"); - } - { - int RETVAL; - - RETVAL = link(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3267,49 +3250,19 @@ register int items; croak("Usage: POSIX::lseek()"); } { - int RETVAL; + int; + Off_t; + int; + SysRet RETVAL; RETVAL = lseek(); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_lstat(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::lstat()"); - } - { - int RETVAL; - - RETVAL = lstat(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_mkdir(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::mkdir()"); - } - { - int RETVAL; - - RETVAL = mkdir(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3325,11 +3278,16 @@ register int items; } { int incr = (int)SvIV(ST(1)); - int RETVAL; + SysRet RETVAL; RETVAL = nice(incr); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3345,10 +3303,15 @@ register int items; } { int RETVAL; - - RETVAL = pipe(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + dSP; + int fds[2]; + sp--; + if (pipe(fds) != -1) { + EXTEND(sp,2); + PUSHs(sv_2mortal(newSViv(fds[0]))); + PUSHs(sv_2mortal(newSViv(fds[1]))); + } + ax = sp - stack_base; } return ax; } @@ -3363,49 +3326,20 @@ register int items; croak("Usage: POSIX::read()"); } { - int RETVAL; - - RETVAL = read(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_rename(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::rename()"); - } - { - int RETVAL; - - RETVAL = rename(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_rmdir(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::rmdir()"); - } - { - int RETVAL; + SysRet RETVAL; + int fd; + char * buffer; + size_t nbytes; - RETVAL = rmdir(); + RETVAL = read(fd, buffer, nbytes); + croak("POSIX::read() not implemented yet\n"); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3416,15 +3350,21 @@ register int ix; register int ax; register int items; { - if (items != 0) { - croak("Usage: POSIX::setgid()"); + if (items != 1) { + croak("Usage: POSIX::setgid(gid)"); } { - int RETVAL; + Gid_t gid = (Gid_t)SvNV(ST(1)); + SysRet RETVAL; - RETVAL = setgid(); + RETVAL = setgid(gid); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3439,34 +3379,18 @@ register int items; croak("Usage: POSIX::setpgid(pid, pgid)"); } { - pid_t pid = (int)SvIV(ST(1)); - pid_t pgid = (int)SvIV(ST(2)); - int RETVAL; + pid_t pid = (pid_t)SvNV(ST(1)); + pid_t pgid = (pid_t)SvNV(ST(2)); + SysRet RETVAL; RETVAL = setpgid(pid, pgid); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_setpgrp(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 2) { - croak("Usage: POSIX::setpgrp(pid, pgrp)"); - } - { - int pid = (int)SvIV(ST(1)); - int pgrp = (int)SvIV(ST(2)); - int RETVAL; - - RETVAL = setpgrp(pid, pgrp); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3485,7 +3409,7 @@ register int items; RETVAL = setsid(); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -3496,72 +3420,21 @@ register int ix; register int ax; register int items; { - if (items != 0) { - croak("Usage: POSIX::setuid()"); - } - { - int RETVAL; - - RETVAL = setuid(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_stat(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::stat()"); - } - { - int RETVAL; - - RETVAL = stat(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_symlink(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::symlink()"); - } - { - int RETVAL; - - RETVAL = symlink(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_system(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::system()"); + if (items != 1) { + croak("Usage: POSIX::setuid(uid)"); } { - int RETVAL; + Uid_t uid = (Uid_t)SvNV(ST(1)); + SysRet RETVAL; - RETVAL = system(); + RETVAL = setuid(uid); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3581,7 +3454,7 @@ register int items; RETVAL = tcgetpgrp(fd); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + sv_setnv(ST(0), (double)RETVAL); } return ax; } @@ -3597,52 +3470,17 @@ register int items; } { int fd = (int)SvIV(ST(1)); - pid_t pgrp_id = (int)SvIV(ST(2)); - int RETVAL; + pid_t pgrp_id = (pid_t)SvNV(ST(2)); + SysRet RETVAL; RETVAL = tcsetpgrp(fd, pgrp_id); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_times(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 1) { - croak("Usage: POSIX::times(tms)"); - } - { - struct tms * tms = (struct tms*)sv_grow(ST(1), sizeof(struct tms)); - int RETVAL; - - RETVAL = times(tms); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - SvCUR(ST(1)) = sizeof(struct tms); - } - return ax; -} - -static int -XS_POSIX_umask(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::umask()"); - } - { - int RETVAL; - - RETVAL = umask(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3657,101 +3495,23 @@ register int items; croak("Usage: POSIX::uname()"); } { + int RETVAL; dSP; - struct utsname utsname; + struct utsname buf; sp--; - if (uname(&utsname) >= 0) { + if (uname(&buf) >= 0) { EXTEND(sp, 5); - PUSHs(sv_2mortal(newSVpv(utsname.sysname, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.nodename, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.release, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.version, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.machine, 0))); + PUSHs(sv_2mortal(newSVpv(buf.sysname, 0))); + PUSHs(sv_2mortal(newSVpv(buf.nodename, 0))); + PUSHs(sv_2mortal(newSVpv(buf.release, 0))); + PUSHs(sv_2mortal(newSVpv(buf.version, 0))); + PUSHs(sv_2mortal(newSVpv(buf.machine, 0))); } ax = sp - stack_base; } return ax; } -static int -XS_POSIX_unlink(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::unlink()"); - } - { - int RETVAL; - - RETVAL = unlink(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_utime(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::utime()"); - } - { - int RETVAL; - - RETVAL = utime(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_wait(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 0) { - croak("Usage: POSIX::wait()"); - } - { - int RETVAL; - - RETVAL = wait(); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - -static int -XS_POSIX_waitpid(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items != 3) { - croak("Usage: POSIX::waitpid(pid, statusp, options)"); - } - { - int pid = (int)SvIV(ST(1)); - int statusp = (int)SvIV(ST(2)); - int options = (int)SvIV(ST(3)); - int RETVAL; - - RETVAL = waitpid(pid, &statusp, options); - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); - } - return ax; -} - static int XS_POSIX_write(ix, ax, items) register int ix; @@ -3762,11 +3522,20 @@ register int items; croak("Usage: POSIX::write()"); } { - int RETVAL; + SysRet RETVAL; + int fd; + char * buffer; + size_t nbytes; - RETVAL = write(); + RETVAL = write(fd, buffer, nbytes); + croak("POSIX::write() not implemented yet\n"); ST(0) = sv_newmortal(); - sv_setiv(ST(0), (I32)RETVAL); + if (RETVAL != -1) { + if (RETVAL == 0) + sv_setpvn(ST(0), "0 but true", 10); + else + sv_setiv(ST(0), (I32)RETVAL); + } } return ax; } @@ -3821,33 +3590,16 @@ int items; newXSUB("POSIX::close", 0, XS_POSIX_close, file); newXSUB("POSIX::dup", 0, XS_POSIX_dup, file); newXSUB("POSIX::dup2", 0, XS_POSIX_dup2, file); - newXSUB("POSIX::fstat", 0, XS_POSIX_fstat, file); - newXSUB("POSIX::getpgrp", 0, XS_POSIX_getpgrp, file); - newXSUB("POSIX::link", 0, XS_POSIX_link, file); newXSUB("POSIX::lseek", 0, XS_POSIX_lseek, file); - newXSUB("POSIX::lstat", 0, XS_POSIX_lstat, file); - newXSUB("POSIX::mkdir", 0, XS_POSIX_mkdir, file); newXSUB("POSIX::nice", 0, XS_POSIX_nice, file); newXSUB("POSIX::pipe", 0, XS_POSIX_pipe, file); newXSUB("POSIX::read", 0, XS_POSIX_read, file); - newXSUB("POSIX::rename", 0, XS_POSIX_rename, file); - newXSUB("POSIX::rmdir", 0, XS_POSIX_rmdir, file); newXSUB("POSIX::setgid", 0, XS_POSIX_setgid, file); newXSUB("POSIX::setpgid", 0, XS_POSIX_setpgid, file); - newXSUB("POSIX::setpgrp", 0, XS_POSIX_setpgrp, file); newXSUB("POSIX::setsid", 0, XS_POSIX_setsid, file); newXSUB("POSIX::setuid", 0, XS_POSIX_setuid, file); - newXSUB("POSIX::stat", 0, XS_POSIX_stat, file); - newXSUB("POSIX::symlink", 0, XS_POSIX_symlink, file); - newXSUB("POSIX::system", 0, XS_POSIX_system, file); newXSUB("POSIX::tcgetpgrp", 0, XS_POSIX_tcgetpgrp, file); newXSUB("POSIX::tcsetpgrp", 0, XS_POSIX_tcsetpgrp, file); - newXSUB("POSIX::times", 0, XS_POSIX_times, file); - newXSUB("POSIX::umask", 0, XS_POSIX_umask, file); newXSUB("POSIX::uname", 0, XS_POSIX_uname, file); - newXSUB("POSIX::unlink", 0, XS_POSIX_unlink, file); - newXSUB("POSIX::utime", 0, XS_POSIX_utime, file); - newXSUB("POSIX::wait", 0, XS_POSIX_wait, file); - newXSUB("POSIX::waitpid", 0, XS_POSIX_waitpid, file); newXSUB("POSIX::write", 0, XS_POSIX_write, file); } diff --git a/Quick b/Quick deleted file mode 100644 index 13d6ae0b92..0000000000 --- a/Quick +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/local/bin/perl5 -# -# This document is in the public domain. -# -# The purpose is to document by example some of the new Perl5 features. -# It also functions as a mini test suite; you can extracted the -# expected output using: -# perl -ne 'm/.*prints ``(.*)..$/ && print $1,"\n";' -# There are a couple of places that print out internal address so it's -# not perfect yet, those should be fixed. -# -# Thanks to the following for their input: -# Johan.Vromans@NL.net -# Daniel Faken -# Tom Christiansen -# Dean Roehrich -# Larry Wall -# -# TODO when I get perl5a6 to play with -# *foo = \&func; # replaces only function (etc) -# AUTOLOAD { ...; } # called if method not found -# goto &func; # goto's a function -# require FOOBAR; # loads FOOBAR.pm -# @ISA -# -# import()/@EXPORT/etc - -# my - # static scoping - sub samp1 { print $z,"\n"; } - sub samp2 { my($z) = "world"; &samp1; } - $z = "hello"; &samp2; # prints ``hello'' - -# package; - # for catching non-local variable references - sub samp3 { - my $x = shift; # local() would work also - package; # empty package - $main::count += $x; # this is ok. - # $y = 1; # compile time error - } - -# => - # works like comma (,); use for key/value pairs - # sometimes used to disambiguate the final expression in a block - # might someday supply warnings if you get out of sync - %foo = ( abc => foo ); - print $foo{abc},"\n"; # prints ``foo'' - -# :: - # works like tick (') (use of ' is deprecated in perl5) - print $main::foo{abc},"\n"; # prints ``foo'' - -# bless ref; - # Bless takes a reference and returns an "object" - $oref = bless \$scalar; - -# -> - # dereferences an "object" - $x = { def => bar }; # $x is ref to anonymous hash - print $x->{def},"\n"; # prints ``bar'' - - # method derefs must be bless'ed - { - package sample; - sub samp4 { my($this) = shift; print $this->{def},"\n"; } - sub samp5 { print "samp5: @_\n"; } - $main::y = bless $main::x; # $x is ref, $y is "object" - } - $y->samp4(); # prints ``bar'' - - # indirect object calls - samp5 $y arglist; # prints ``samp5: sample=HASH(0xa85e0) arglist'' - - # static method calls (often used for constructors, see below) - samp5 sample arglist; # prints ``samp5: sample arglist'' - -# function calls without & - sub samp6 { print "look ma\n"; } - samp6; # prints ``look ma'' - -# ref - # returns "object" type - { - package OBJ1; - $x = bless \$y; # returns "object" $x in "class" OBJ1 - print ref $x,"\n"; # prints ``OBJ1'' - } - - # and non-references return undef. - $z = 1; - print "non-ref\n" if !defined(ref $z); # prints ``non-ref'' - - # ref's to "builtins" return type - print ref \$ascalar,"\n"; # prints ``SCALAR'' - print ref \@array,"\n"; # prints ``ARRAY'' - print ref \%hash,"\n"; # prints ``HASH'' - sub func { print shift,"\n"; } - print ref \&func,"\n"; # prints ``CODE'' - print ref \\$scalar,"\n"; # prints ``REF'' - -# tie - # bind a variable to a package with magic functions: - # new, fetch, store, delete, firstkey, nextkey (XXX: others???) - # Usage: tie variable, PackageName, ARGLIST - { - package TIEPACK; - sub new { print "NEW: @_\n"; my($class, $x) = @_; bless \$x } - sub fetch { print "fetch @_\n"; my($this) = @_; ${$this} } - sub store { print "store @_\n"; my($this, $x) = @_; ${$this} = $x } - sub DESTROY { print "DESTROY @_\n" } - } - tie $h, TIEPACK, "black_tie"; # prints ``NEW: TIEPACK black_tie'' - print $h, "\n"; # prints ``fetch TIEPACK=SCALAR(0x882a0)'' - # prints ``black_tie'' - $h = 'bar'; # prints ``store TIEPACK=SCALAR(0x882a0) bar'' - untie $h; # DESTROY (XXX: broken in perl5a5???) - -# References and Anonymous data-structures - $sref = \$scalar; # $$sref is scalar - $aref = \@array; # @$aref is array - $href = \%hash; # %$href is hash table - $fref = \&func; # &$fref is function - $refref = \$fref; # ref to ref to function - &$$refref("call the function"); # prints ``call the function'' - - %hash = ( abc => foo ); # hash (just like perl4) - print $hash{abc},"\n"; # prints ``foo'' - $ref = { abc => bar }; # reference to anon hash - print $ref->{abc},"\n"; # prints ``bar'' - - @ary = ( 0, 1, 2 ); # array (just like perl4) - print $ary[1],"\n"; # prints ``1'' - $ref = [ 3, 4, 5 ]; # reference to anon array - print $ref->[1],"\n"; # prints ``4'' - -# Nested data-structures - @foo = ( 0, { name => foobar }, 2, 3 ); # $#foo == 3 - $aref = [ 0, { name => foobar }, 2, 3 ]; # ref to anon array - $href = { # ref to hash of arrays - John => [ Mary, Pat, Blanch ], - Paul => [ Sally, Jill, Jane ], - Mark => [ Ann, Bob, Dawn ], - }; - print $href->{Paul}->[0], "\n"; # prints ``Sally'' - print $href->{Paul}[0],"\n"; # shorthand version, prints ``Sally'' - -# Multiple Inheritence (get rich quick :-) - { - package OBJ2; sub abc { print "abc\n"; } - package OBJ3; sub def { print "def\n"; } - package OBJ4; @ISA = ("OBJ2", "OBJ3"); - $x = bless { foo => bar }; - $x->abc; # prints ``abc'' - $x->def; # prints ``def'' - } - -# Packages, Classes, Objects, Methods, Constructors, Destructors, etc. - # XXX: I'll add more explinations/samples about the above here - { - package OBJ5; - sub new { print "NEW: @_\n"; my($x) = "empty"; bless \$x } - sub DESTROY { print "DESTROY\n" } - sub output { my($this) = shift; print "value = $$this\n"; } - } - # Constructors are often written as static method calls: - $x = new OBJ5; # prints ``NEW: OBJ5'' - $x->output; # prints ``value = empty'' - # The destructor is responsible for calling any base class destructors. - undef $x; diff --git a/README.Conf b/README.Conf index 0ceab96a1c..807b457afc 100644 --- a/README.Conf +++ b/README.Conf @@ -1,4 +1,86 @@ -From: doughera@lafcol.lafayette.edu (Andy Dougherty +From: doughera@lafcol.lafayette.edu (Andy Dougherty) +Subject: RE: First stab at Configure Support for perl5alpha +Date: Fri Apr 29 16:43:18 EDT 1994 + +I have incorporated various fixes/suggestions into the Configure +support for perl5alpha8. The main changes are the following: + -Better incorporation of extensions in Makefile.SH. + -miniperlmain.c no longer requires dynamic loading. + -perl can use dynamic loading if available, but extensions can + also be compiled in statically, if desired. + -perlmain.c now built from miniperlmain.c by writemain.SH, + which is called in the makefile. Only the requested extensions + are compiled in. + -dynamic loading broken up into dl_sunos.c, dl_next.c, dl_hpux.c. + Configure will look for dl_$osname.c, where osname is determined + at the same time as hints are suggested. + -Configure support added for sdbm library (ext/dbm/sdbm/libsdbm.a). + This still needs testing. + -Tests for extensions now check in %Config to see if that extension + is available. Note, however, the sdbm is not an *optional* + extension, so it will fail (and make test will complain) + if sdbm is not installed. Thus perl programmers can safely assume + that at least sdbm is available. + -configpm now correctly handles comments at the end of config.sh + (which Configure places there if a hints file tries to propagate + unknown variables, such as libswanted). + -makedepend now works in UU/ subdirectory (so it doesn't delete + miniperlmain.c on systems with 14-character file name limits). + -ext/typemap: My compiler couldn't handle some of the more complex + casts, so an intermediate unsigned long variable has been introduced. + I should probably re-do this in terms of a CRIPPLED_CC macro in + XSUB.h, but it's not clear to me that it's worth it. + -some new or updated hints files. + -miscellaneous bug fixes. + +Problems remaining: + + -POSIX module is still under construction. + -Dynamic loading of extensions works on SunOS 4.1.3, but it + might need modifications to work with other systems. + -It is possible to do mixed dynamic/static loading, that is, + load commonly used modules statically and other modules + dynamically. Currently, this must be done by hand by setting + extobj in makefile and hand-editing perlmain.c. + The newXSUB line for the static module must be moved into + the #ifdef USE_DYNAMIC_LOADING section in perlmain.c, and the + module .o file must be added to the extobj= line in makefile. + -lib/[sn]dbm.t tests create a new file with a hard-wired set of + flags. These should be replaced with O_CREAT | O_RDWR, which + will be available from POSIX.pm, once it is up and running. + For now, you might have to change the 0x202 to 0x102 (or perhaps + 0x402) in lib/[sn]dbm.t for the tests to succeed. + -I have applied several suggested fixes for use on the DEC alpha, + but I haven't been able to keep up with all of them. + -Though CRIPPLED_CC works, it might be desireable to have Configure + try to figure it out. + +To apply: Obtain a clean copy of perl5alpha8 + cd + patch -p1 < + +As before, I am willing to continue to coordinate and develop the +Configure support. + +Thanks to the following for various and often quite substantial +patches and suggestions: + Peter Galbavy + Jarkko Hietaniemi + Andreas Koenig + Raphael Manfredi + David Meyer + Jeff Okamoto + John Stoffel + Larry Wall (lwall@netlabs.com> + + Andy Dougherty doughera@lafcol.lafayette.edu + Dept. of Physics Phone: (610) 250-5212 + Lafayette College FAX: (610) 250-9263 + Easton, PA 18042-1782 + +================================================================= + +From: doughera@lafcol.lafayette.edu (Andy Dougherty) Subject: First stab at Configure Support for perl5alpha Date: Mon Apr 4 15:13:50 EDT 1994 diff --git a/SDBM_File.c b/SDBM_File.c index 631a01bb5b..fcf2259448 100644 --- a/SDBM_File.c +++ b/SDBM_File.c @@ -42,8 +42,11 @@ register int items; { SDBM_File db; - if (SvROK(ST(1))) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (SvROK(ST(1))) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not a reference"); sdbm_close(db); @@ -65,8 +68,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -96,8 +102,11 @@ register int items; int flags; int RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -134,8 +143,11 @@ register int items; datum key; int RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -162,8 +174,11 @@ register int items; SDBM_File db; datum RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -188,8 +203,11 @@ register int items; datum key; datum RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -216,8 +234,11 @@ register int items; SDBM_File db; int RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); @@ -241,8 +262,11 @@ register int items; SDBM_File db; int RETVAL; - if (sv_isa(ST(1), "SDBM_File")) - db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1))); + if (sv_isa(ST(1), "SDBM_File")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV(ST(1))); + db = (SDBM_File) tmp; + } else croak("db is not of type SDBM_File"); diff --git a/TCL b/TCL deleted file mode 100644 index 5409bbf430..0000000000 --- a/TCL +++ /dev/null @@ -1,169 +0,0 @@ -Article 1475 of comp.lang.tcl: -Path: netlabs!news!usc!cs.utexas.edu!sun-barr!ames!agate!sprite.Berkeley.EDU!ouster -From: ouster@sprite.Berkeley.EDU (John Ousterhout) -Newsgroups: comp.lang.tcl -Subject: Planning for Tcl 7.0 -Message-ID: <1avu22INN5ao@agate.berkeley.edu> -Date: 8 Oct 92 00:06:26 GMT -Organization: U.C. Berkeley Sprite Project -Lines: 156 -NNTP-Posting-Host: tyranny.berkeley.edu - - -For the last year I've made only small changes to Tcl while focussing -on the canvas and text widgets for Tk. I'm now making plans to catch -up on a bunch of much-needed bug fixes and enhancements to Tcl. Some -of the changes I'm considering are not backwards-compatible. The -purpose of this message is to let know know what changes I'm considering -for Tcl 7.0 and to solicit feedback. I'm particularly interested in -comments on the changes that are incompatible: I'll probably drop -the changes for which I get lots of negative feedback and not much -positive feedback. If there are other changes that you think are -important but aren't contained on this list, let me know and I may add -them. - -Incompatible changes: ---------------------- - -The changes listed below are likely to require changes to existing -scripts and/or C code. Each change includes an explanation of why the -change might be useful. I'd like to know whether or not you think the change -is useful enough to justify the incompatibility. - -1. Eliminate the "|" option in the "open" command. Instead, add a -"popen" command that does the same thing. Rationale: in the current -implementation you can't open a file whose name begins with "|". -Also, I think the "popen" command would be more logical. - -2. Eliminate the Tcl_WaitPids procedure and use the waitpid POSIX call -instead. Also change the wait code to periodically poll for dead -child processes so that zombie processes don't get left around forever. -Rationale: the current code tends to leave zombies around in some -situations. Switching to waitpid should solve this problem in a -relatively portable fashion. The only incompatibility will be for -C procedures that call Tcl_WaitPids; they'll have to switch to call -waitpid instead. I'll provide a compatibility version of waitpid for -use on systems that don't have it yet. - -3. Clean up backslash processing in several ways: - - Change backslash-newline to eat up all the whitespace following the - newline and replace the sequence with a single whitespace character. - Right now it only eats up the newline character and replaces it - with an empty string. Rationale: this would be more consistent - with other programs that process backslash-newline sequences. - - Eliminate the sequences \Mxx, \Cxxx, and \e. - Rationale: these sequences are left around from ancient times. - They're not particular compatible with any other program. I - should have removed them in Tcl 6.0 but didn't. They did get - removed from the documentation, however, so no-one should be - using them (?). - - Change \x (where x is not one of the characters that gets special - backslash treatment) to expand to x, not \x. - Rationale: the current behavior is inconsistent with all other - programs I know of that handle backslashes, and I think it's - confusing. - - Change "format" so it doesn't do an additional layer of backslash - processing on its format string. - Rationale: I don't know why it currently behaves as it does, and - I think it's confusing. - -4. Change "regsub" so that when no match occurs it sets the result -variable to the original string, rather than leaving it unmodified. -Rationale: the current behavior results in extra tests of the regsub -result that could sometimes be avoided with the proposed new behavior. -I doubt that there's much code that will break with the change (this -would have to be code that depends on the result variable *not* being -modified). - -5. Change the name "UNIX" in the "errorCode" variable to "POSIX". -Rationale: I suspect that I'm eventually going to get a call from the -USL lawyers on this one if I don't change it. Better to change it now -in an orderly fashion so I don't have change it hastily in the future. - -6. Change glob to return only the names of existing files. -Rationale: at present "glob */foo" expands * and generates a result -without checking to see if each directory has a "foo" file in it. This -makes the current behavior incompatible with csh, for example. One -question is whether constructs like "glob {a,b}.c" should also check for -the existence of each of the files. At present they don't (i.e. a.c and -b.c will be returned even if they don't exist), but neither does csh. My -inclination is to make the behavior match csh (names containing *?[] are -checked for existence, others aren't). I'd be interested to hear -opinions on this one: check all names for existence, check only names -including *?[] (for csh compatibility), or keep it as it is? - -7. Change "gets" so it returns 1 for success and 0 for failure. At present -it returns the line length for success and -1 for failure. -Rationale: this would allow slightly simple Tcl scripts: you could just -say - while [gets $f line] {...} -instead of - while {[gets $f line] >= 0} {...} -I'm not really convinced that this one is important enough to justify the -incompatibility, so it won't take much negative feedback to kill it. - -Other changes: --------------- - -The changes listed below shouldn't introduce substantial compatibility -problems. Of course, any change can potentially cause scripts to stop -working (e.g. almost any change will break the test suite), but very -few if any people should be affected by these changes. - -8. Implement Tcl_CreateExternVar() procedure along lines proposed by -Andreas Stolcke to tie a C variable to a Tcl variable with automatic -updates between them. - -9. Changes to exec: - - Allow redirection to an existing file descriptor in "exec", - with a mechanism like >&1 or >& stdout. - - Allow file names immediately after ">" and "<" without - intervening spaces. - -10. Changes related to files: - - Fix Scott Bolte bug (closing stdin and stdout). - - Move TclGetOpenFile and OpenFile stuff to tcl.h so that they're - accessible to applications. - - Extend access modes in open to include the complete set of POSIX - access modes (such as O_EXCL and O_NONBLOCK). - -11. Re-instate Tcl_WatchInterp to notify application when an interpreter -is deleted. - -12. Add "elseif" mechanism to "if" command for chaining "else {if ..." -constructs more cleanly. Require exact matches on "then" and "else" -keywords. - -13. Remove UNIX system call declarations from tclUnix.h. Use them from -unistd.h instead, and provide a default version of unistd.h for systems -that don't have one. - -14. Changes in the expr command, mostly following suggestions made by -George Howlett a long time ago: - - Increase precision of floating-point results. - - Make floating-point numbers always print with a point. - - Add transcendental functions like sin and exp. - - Add explicit integer and floating conversion operations. - - Don't promote large integers to floating-point automatically. - - Allow multiple arguments to expr command. - -15. Extend lsort to allow alternate sorting mechanisms, like numeric, -or client-supplied. - -16. Allow alternate pattern-matching forms (e.g. exact or regexp) for -lsearch and case. - -17. Add XPG/3 positional argument specifiers to format (code contributed -by Mark Diekhans). - -18. Change "file readlink" to return an error on systems that don't -support it rather than removing the option entirely. - -19. Add a mechanism for scheduling a Tcl command to be executed when the -interpreter reaches a clean point. This is needed for things like -signal support. - -20. Change upvar so that you can refer to an element of an array as -well as a whole array. - - diff --git a/Todo b/Todo index 16255eaa09..6e75f7ea37 100755 --- a/Todo +++ b/Todo @@ -11,9 +11,8 @@ Tie Modules Bugs Make yyparse recursion longjmp() proof. Make "delete $array{$key} while ($key) = each %array" safe - Wrong line reported for runtime elsif condition error - TOOSTRICT is not too strict - recv and sysread should taint + <$handle> doesn't work intuitively if $handle is ARGV + Anything in the Bugs directory Regexp extensions /m for multiline @@ -27,6 +26,7 @@ Regexp extensions Would be nice to have Profiler pack "(stuff)*" + Contiguous bitfields in pack/unpack lexperl Bundled perl preprocessor Make $[ compile-time instead of run-time @@ -42,11 +42,12 @@ Would be nice to have Multiple levels of warning .= shouldn't complain about undefined under -w report HANDLE [formats]. + tie(FILEHANDLE, ...) + __DATA__ -Pragmas ("assume" maybe?) - integer, float - nodebug, debug - autocroak? +Possible averments + debugger + optimize Optimizations Optimize switch statements @@ -80,3 +81,4 @@ Vague possibilities compile to real threaded code structured types paren counting in tokener to queue remote expectations + autocroak? diff --git a/U/Extensions.U b/U/Extensions.U index 3e10a38f31..ec14205ac1 100644 --- a/U/Extensions.U +++ b/U/Extensions.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: Extensions.U,v$ ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, @@ -17,31 +8,63 @@ ?RCS: ?RCS: $Log: Extensions.U,v $ ?RCS: -?MAKE:extensions : find package +?MAKE:extensions : find Myread i_dbm i_ndbm i_gdbm i_sdbm ?MAKE: -pick add $@ %< ?S:extensions: ?S: This variable holds a list of extension files we want to ?S: include in perl. ?S:. +?T:xxx ?INIT:: List of extensions we want: ?INIT:extensions='' ?X: -echo " " case "$extensions" in ' '|'') echo "Looking for extensions..." case "$find" in *find*) cd .. - dflt="`$find ext -type f -name \*.xs -print`" + extensions=`$find ext -type f -name \*.xs -print` + set X $extensions + shift + extensions="$*" cd UU ;; - *) dflt='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs' + *) extensions='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs' ;; esac ;; -none) dflt='' ;; -*) dflt="$extensions" ;; +none) extensions='' ;; +*) ;; esac +: Now see which are supported on this system. +dflt="" +for xxx in $extensions ; do + case "$xxx" in + *ODBM*) case "$i_dbm" in + define) dflt="$dflt $xxx" ;; + *) ;; + esac + ;; + *NDBM*) case "$i_ndbm" in + define) dflt="$dflt $xxx" ;; + *) ;; + esac + ;; + *GDBM*) case "$i_gdbm" in + define) dflt="$dflt $xxx" ;; + *) ;; + esac + ;; + *SDBM*) case "$i_sdbm" in + define) dflt="$dflt $xxx" ;; + *) ;; + esac + ;; + *) dflt="$dflt $xxx" + ;; + esac +done + rp="What extensions do you wish to include?" . ./myread extensions="$ans" diff --git a/U/Guess.U b/U/Guess.U new file mode 100644 index 0000000000..c7566db87b --- /dev/null +++ b/U/Guess.U @@ -0,0 +1,153 @@ +?RCS: $Id: Guess.U,v 3.0.1.3 1993/12/15 08:14:35 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: Guess.U,v $ +?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram +?RCS: patch15: variable d_bsd was not always set properly +?RCS: +?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram +?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol +?RCS: patch8: no more ugly messages when no /usr/include/ctype.h +?RCS: +?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram +?RCS: patch7: added support for OSF/1 machines +?RCS: +?RCS: Revision 3.0 1993/08/18 12:04:57 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: This unit hazards some guesses as to what the general nature of the system +?X: is. The information it collects here is used primarily to establish default +?X: answers to other questions. +?X: +?MAKE:Guess d_eunice d_xenix: cat test echo n c contains rm Loc eunicefix +?MAKE: -pick add $@ %< +?S:d_eunice: +?S: This variable conditionally defines the symbols EUNICE and VAX, which +?S: alerts the C program that it must deal with ideosyncracies of VMS. +?S:. +?S:d_xenix: +?S: This variable conditionally defines the symbol XENIX, which alerts +?S: the C program that it runs under Xenix. +?S:. +?X:We don't use BSD in the source. It's too vague, and often defined +?X:in header files anyway (e.g. NetBSD). +?X:?S:d_bsd: +?X:?S: This symbol conditionally defines the symbol BSD when running on a +?X:?S: BSD system. +?X:?S:. +?C:EUNICE: +?C: This symbol, if defined, indicates that the program is being compiled +?C: under the EUNICE package under VMS. The program will need to handle +?C: things like files that don't go away the first time you unlink them, +?C: due to version numbering. It will also need to compensate for lack +?C: of a respectable link() command. +?C:. +?C:VMS: +?C: This symbol, if defined, indicates that the program is running under +?C: VMS. It is currently only set in conjunction with the EUNICE symbol. +?C:. +?C:XENIX: +?C: This symbol, if defined, indicates thet the program is running under +?C: Xenix (at least 3.0 ?). +?C:. +?X:We don't use BSD in the source. It's too vague. +?X:?C:BSD: +?X:?C: This symbol, if defined, indicates that the program is running under +?X:?C: a BSD system. +?X:?C:. +?H:#$d_eunice EUNICE /**/ +?H:#$d_eunice VMS /**/ +?H:#$d_xenix XENIX /**/ +?X:?H:#$d_bsd BSD /**/ +?H:. +?T:xxx +: make some quick guesses about what we are up against +echo " " +$echo $n "Hmm... $c" +echo exit 1 >bsd +echo exit 1 >usg +echo exit 1 >v7 +echo exit 1 >osf1 +echo exit 1 >eunice +echo exit 1 >xenix +echo exit 1 >venix +?X: +?X: Do not use 'usrinc', or we get a circular dependency. because +?X: usrinc is defined in usrinc.U, which relies on us... +?X: +$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null +if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 +then + echo "Looks kind of like an OSF/1 system, but we'll see..." + echo exit 0 >osf1 +elif test `echo abc | tr a-z A-Z` = Abc ; then + xxx=`./loc addbib blurfl $pth` + if $test -f $xxx; then + echo "Looks kind of like a USG system with BSD features, but we'll see..." + echo exit 0 >bsd + echo exit 0 >usg + else + if $contains SIGTSTP foo >/dev/null 2>&1 ; then + echo "Looks kind of like an extended USG system, but we'll see..." + else + echo "Looks kind of like a USG system, but we'll see..." + fi + echo exit 0 >usg + fi +elif $contains SIGTSTP foo >/dev/null 2>&1 ; then + echo "Looks kind of like a BSD system, but we'll see..." + echo exit 0 >bsd +else + echo "Looks kind of like a Version 7 system, but we'll see..." + echo exit 0 >v7 +fi +case "$eunicefix" in +*unixtovms*) + $cat <<'EOI' +There is, however, a strange, musty smell in the air that reminds me of +something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. +EOI + echo exit 0 >eunice + d_eunice="$define" +: it so happens the Eunice I know will not run shell scripts in Unix format + ;; +*) + echo " " + echo "Congratulations. You aren't running Eunice." + d_eunice="$undef" + ;; +esac +if test -f /xenix; then + echo "Actually, this looks more like a XENIX system..." + echo exit 0 >xenix + d_xenix="$define" +else + echo " " + echo "It's not Xenix..." + d_xenix="$undef" +fi +chmod +x xenix +$eunicefix xenix +if test -f /venix; then + echo "Actually, this looks more like a VENIX system..." + echo exit 0 >venix +else + echo " " + if xenix; then + : null + else + echo "Nor is it Venix..." + fi +fi +chmod +x bsd usg v7 osf1 eunice xenix venix +$eunicefix bsd usg v7 osf1 eunice xenix venix +$rm -f foo + diff --git a/U/Loc.U b/U/Loc.U index 79096ef45f..fcb7a64403 100644 --- a/U/Loc.U +++ b/U/Loc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: Loc.U,v 3.0.1.3 1994/01/24 14:01:44 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -165,11 +156,12 @@ trylist=" ?vi:vi ?zcat:zcat " -?LINT:set Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp cpio cpp \ - csh date echo egrep emacs expr flex gcc grep inews ksh less line lint ln \ - lp lpr ls mail mailx make mkdir more mv nroff perl pg pmake pr rm rmail \ - sed sendmail sh shar sleep smail sort submit tail tar tbl test touch tr \ - troff uname uniq uuname vi zcat +?LINT:set Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp \ + cpio cpp csh date echo egrep emacs expr find flex gcc grep inews \ + ksh less line lint ln lp lpr ls mail mailx make mkdir more mv \ + nroff perl pg pmake pr rm rmail sed sendmail sh shar sleep \ + smail sort submit tail tar tbl test touch tr troff uname uniq \ + uuname vi zcat pth=`echo $PATH | sed -e 's/:/ /g'` pth="$pth /lib /usr/lib" for file in $loclist; do diff --git a/U/Oldconfig.U b/U/Oldconfig.U index 18c2a811b0..2b6d3a0157 100644 --- a/U/Oldconfig.U +++ b/U/Oldconfig.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: Oldconfig.U,v 3.0.1.2 1994/01/24 14:05:02 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -34,8 +25,8 @@ ?X: This unit tries to remember what we did last time we ran Configure, mostly ?X: for the sake of setting defaults. ?X: -?MAKE:Oldconfig hint myuname: Instruct Myread uname sed test cat rm n c \ - contains Loc Options +?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \ + sed test cat rm n c contains Loc Options ?MAKE: -pick wipe $@ %< ?S:myuname: ?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix, @@ -46,7 +37,18 @@ ?S: Gives the type of hints used for previous answers. May be one of ?S: "default", "recommended" or "previous". ?S:. -?T:tmp file oldmyuname tans _ +?S:osname: +?S: This variable contains the operating system name (e.g. sunos, +?S: solaris, hpux, etc.). It can be useful later on for setting +?S: defaults. It is set to '' if we can't figure it out. +?S:. +?S:osvers: +?S: This variable contains the operating system version (e.g. +?S: 4.1.3, 5.2, etc.). It is primarily used for helping select +?S: an appropriate hints file, but might be useful elsewhere for +?S: setting defaults. It is set to '' if we can't figure it out. +?S:. +?T:tmp file oldmyuname hintfile tans _ ?LINT:change n c : Try to determine whether config.sh was made on this system case "$config_sh" in @@ -112,13 +114,13 @@ EOM : Half the following guesses are probably wrong... If you have better : tests or hints, please send them to : The metaconfig authors would also appreciate a copy... - $test -f /irix && dflt="$dflt sgi" - $test -f /xenix && dflt="$dflt sco_xenix" - $test -f /dynix && dflt="$dflt dynix" - $test -f /dnix && dflt="$dflt dnix" - $test -f /bin/mips && /bin/mips && dflt="$dflt mips" - $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next" - $test -d /usr/include/minix && dflt="$dflt minix" + $test -f /irix && osname=sgi + $test -f /xenix && osname=sco_xenix + $test -f /dynix && osname=dynix + $test -f /dnix && osname=dnix + $test -f /bin/mips && /bin/mips && osname=mips + $test -d /NextApps && test -f /usr/adm/software_version && osname=next + $test -d /usr/include/minix && osname=minix ?X: If we have uname, we already computed a suitable uname -a output, correctly ?X: formatted for Xenix, and it lies in $myuname. if $test -f $uname; then @@ -128,63 +130,80 @@ EOM $test -f $5.sh && dflt="$dflt $5" case "$5" in - fps*) dflt="$dflt fps";; + fps*) osname=fps ;; mips*) case "$4" in - umips) dflt="$dflt umips";; - *) dflt="$dflt mips";; + umips) osname=umips ;; + *) osname=mips ;; esac;; - [23]100) dflt="$dflt mips";; - next*) dflt="$dflt next" ;; - news*) dflt="$dflt news" ;; + [23]100) osname=mips ;; + next*) osname=next ;; + news*) osname=news ;; i386*) if $test -f /etc/kconfig; then + osname=isc if $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then - dflt="$dflt isc_3_2_3" + osvers=3.2.3 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then - dflt="$dflt isc_3_2_2" + osvers=3.2.2 fi - : i386.sh hint is wrong for Interactive. - dflt=`echo $dflt | $sed 's/i386//'` fi ;; esac case "$1" in - aix) dflt="$dflt aix_rs" ;; - sun[Oo][Ss]) case "$3" in - [34]*) vers=`echo $3 | $sed 's/\./_/g'` - dflt="$dflt sunos_$vers" ;; - 5*) vers=`echo $3 | $sed 's/^5/2/g'` - dflt="$dflt solaris_$vers" ;; + aix) osname=aix_rs ;; + sunos) osname=sunos + case "$3" in + [34]*) osvers=$3 ;; + 5*) osname=solaris + osvers=`echo $3 | $sed 's/^5/2/g'` ;; + esac + ;; + solaris) osname=solaris + case "$3" in + 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; esac ;; - [sS]olaris) case "$3" in - 5*) vers=`echo $3 | $sed 's/^5/2/g'` - dflt="$dflt solaris_$vers" ;; + dnix) osname=dnix ;; + dgux) osname=dgux ;; + genix) osname=genix ;; + hp*ux) osname=hpux ;; + next) osname=next ;; + irix) osname=sgi ;; + ultrix) osname=ultrix + case "$3" in + 1*) osvers=1 ;; + 2*) osvers=2 ;; + 3*) osvers=3 ;; + 4*) osvers=4 ;; esac ;; - dnix) dflt="$dflt dnix" ;; - dgux) dflt="$dflt dgux" ;; - genix) dflt="$dflt genix" ;; - hp*ux) dflt="$dflt hpux" ;; - next) dflt="$dflt next" ;; - irix) dflt="$dflt sgi" ;; - ultrix) case "$3" in - 3*) dflt="$dflt ultrix_3" ;; - 4*) dflt="$dflt ultrix_4" ;; + osf1) case "$5" in + alpha) osname=dec_osf + case "$3" in + [vt]1\.*) osvers=1 ;; + [vt]2\.*) osvers=2 ;; + [vt]3\.*) osvers=3 ;; + esac + ;; + hp*) osname=hp_osf1 ;; # TR + mips) osname=mips_osf1 ;; # TR + # TR = Technology Releases: (un^N)supported esac ;; - uts) dflt="$dflt uts" ;; - $2) case "$dflt" in + uts) osname=uts ;; + $2) case "$osname" in *isc*) ;; *) if test -f /etc/systemid; then + osname=sco + : Does anyone know if these next gyrations are needed set `echo $3 | $sed 's/\./ /g'` $4 if $test -f sco_$1_$2_$3.sh; then - dflt="$dflt sco_$1_$2_$3" + osvers=$1.$2.$3 elif $test -f sco_$1_$2.sh; then - dflt="$dflt sco_$1_$2" + osvers=$1.$2 elif $test -f sco_$1.sh; then - dflt="$dflt sco_$1" + osvers=$1 fi fi ;; @@ -196,25 +215,31 @@ EOM if test -f /vmunix -a -f news_os.sh; then (what /vmunix | tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1 if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then - dflt="$dflt news_os" + osname=news_os fi $rm -f ../UU/kernel.what fi fi - set X `echo $dflt | tr ' ' '\012' | sort | uniq` - shift - dflt='' - for file in $*; do - if $test -f "$file.sh"; then - dflt="$dflt $file" - fi - done - set X $dflt - shift - dflt=${1+"$@"} - case "$dflt" in - '') dflt=none;; + + : Now look for a hint file osname_osvers + file=`echo "${osname}_${osvers}" | sed -e 's@\.@_@g' -e 's@_$@@'` + case "$file" in + '') dflt=none ;; + *) case "$osvers" in + '') dflt=$file + ;; + *) if $test -f $file.sh ; then + dflt=$file + elif $test -f "${osname}.sh" ; then + dflt="${osname}" + else + dflt=none + fi + ;; + esac + ;; esac + $cat <> ../UU/config.sh - elif $test X$ans = X -o X$ans = Xnone ; then + elif $test X$tans = X -o X$tans = Xnone ; then : nothing else - echo "$file.sh does not exist -- ignored" + : Give one chance to correct a possible typo. + echo "$file.sh does not exist" + dflt=$file + rp="hint to use instead?" + . ../UU/myread + for file in $ans; do + if $test -f "$file.sh"; then + . ./$file.sh + $cat $file.sh >> ../UU/config.sh + elif $test X$ans = X -o X$ans = Xnone ; then + : nothing + else + echo "$file.sh does not exist -- ignored." + fi + done fi done + hint=recommended + : Remember our hint file for later. + if $test -f "$file.sh" ; then + hintfile="$file.sh" + else + hintfile=none + fi + cd .. fi cd UU @@ -282,3 +330,40 @@ for file in $loclist $trylist; do eval $file="\$_$file" done +cat << EOM +Configure uses the operating system name and version to set some defaults. +Say "none" to leave it blank. +EOM + +case "$osname" in + ''|' ') + case "$hintfile" in + none) dflt=none ;; + *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/_.*$//'` ;; + esac + ;; + *) dflt="$osname" ;; +esac +rp="Operating system name?" +. ./myread +case "$ans" in + none) osname='' ;; + *) osname="$ans" ;; +esac + +case "$osvers" in + ''|' ') + case "$hintfile" in + none) dflt=none ;; + *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/^[^_]*//'` + dflt=`echo $dflt | sed -e 's/^_//' -e 's/_/./g'` ;; + esac + ;; + *) dflt="$osvers" ;; +esac +rp="Operating system version?" +. ./myread +case "$ans" in + none) osvers='' ;; + *) osvers="$ans" ;; +esac diff --git a/U/alignbytes.U b/U/alignbytes.U new file mode 100644 index 0000000000..38526465a0 --- /dev/null +++ b/U/alignbytes.U @@ -0,0 +1,57 @@ +?RCS: $Id: alignbytes.U,v 3.0 1993/08/18 12:05:23 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: alignbytes.U,v $ +?RCS: Revision 3.0 1993/08/18 12:05:23 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:memalignbytes: Myread cat cc ccflags rm +?MAKE: -pick add $@ %< +?S:memalignbytes: +?S: This variable holds the number of bytes required to align a +?S: double. Usual values are 2, 4 and 8. +?S:. +?X: This used to be called ALIGNBYTES, but that conflicts with +?X: in NetBSD. +?C:MEM_ALIGNBYTES (ALIGNBYTES): +?C: This symbol contains the number of bytes required to align a +?C: double. Usual values are 2, 4 and 8. +?C:. +?H:#define MEM_ALIGNBYTES $memalignbytes /**/ +?H:. +: check for alignment requirements +echo " " +case "$memalignbytes" in +'') echo "Checking alignment constraints..." >&4 + $cat >try.c <<'EOCP' +struct foobar { + char foo; + double bar; +} try; +main() +{ + printf("%d\n", (char *)&try.bar - (char *)&try.foo); +} +EOCP + if $cc $ccflags try.c -o try >/dev/null 2>&1; then + dflt=`./try` + else + dflt='8' + echo"(I can't seem to compile the test program...)" + fi + ;; +*) dflt="$memalignbytes" + ;; +esac +rp="Doubles must be aligned on a how-many-byte boundary?" +. ./myread +memalignbytes="$ans" +$rm -f try.c try + diff --git a/U/cc.U b/U/cc.U index 63a621b03b..04950176c0 100644 --- a/U/cc.U +++ b/U/cc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: cc.U,v 3.0 1993/08/18 12:05:30 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -21,7 +12,7 @@ ?RCS: Revision 3.0 1993/08/18 12:05:30 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:gccversion cc: cat contains sysman +large cpp \ +?MAKE:gccversion cc: cat contains sysman +large cpp rm test \ Mcc Myread Guess Oldconfig Loc ?MAKE: -pick add $@ %< ?S:cc: @@ -33,6 +24,7 @@ ?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to ?S: indicate whether the compiler is version 1 or 2. This is used in ?S: setting some of the default cflags. +?S:. ?D:cc='cc' ?INIT:gccversion='' ?LINT:change cpp @@ -105,7 +97,7 @@ return 1; #endif } EOM - if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then + if $cc -o gccvers gccvers.c >/dev/null 2>&1; then gccversion=`./gccvers` echo "You appear to have version $gccversion." else diff --git a/U/ccflags.U b/U/ccflags.U index e9e33042e2..1b9bf39829 100644 --- a/U/ccflags.U +++ b/U/ccflags.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: ccflags.U,v 3.0.1.3 1993/09/13 15:58:29 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -83,12 +74,12 @@ case "$optimize" in 'none') optimize=" ";; esac +dflt='' case "$ccflags" in '') case "$cc" in *gcc*) if $test "$gccversion" = "1"; then dflt='-fpcc-struct-return' fi ;; - *) dflt='';; esac case "$optimize" in *-g*) dflt="$dflt -DDEBUGGING";; @@ -103,7 +94,6 @@ case "$ccflags" in ;; esac ;; -*) dflt="$ccflags" ;; esac ?X: In USG mode, a MIPS system may need some BSD includes @@ -153,6 +143,10 @@ set signal.h _NO_PROTO; eval $inctest case "$dflt" in '') dflt=none;; esac +case "$ccflags" in +'') ;; +*) dflt="$ccflags";; +esac $cat <&4 -if $test "$intsize" -ge 4; then +if $test "$intsize" -eq 4; then xxx=int else xxx=long @@ -83,4 +74,4 @@ case "$yyy" in esac set d_casti32 eval $setvar -$rm -f try.* +$rm -f try try.* diff --git a/U/d_htonl.U b/U/d_htonl.U new file mode 100644 index 0000000000..0cb16479d4 --- /dev/null +++ b/U/d_htonl.U @@ -0,0 +1,76 @@ +?RCS: $Id: d_htonl.U,v 3.0 1993/08/18 12:06:22 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_htonl.U,v $ +?RCS: Revision 3.0 1993/08/18 12:06:22 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:d_htonl: cc ccflags Inlibc i_niin i_sysin rm +?MAKE: -pick add $@ %< +?S:d_htonl: +?S: This variable conditionally defines HAS_HTONL if htonl() and its +?S: friends are available to do network order byte swapping. +?S:. +?C:HAS_HTONL (HTONL): +?C: This symbol, if defined, indicates that the htonl() routine (and +?C: friends htons() ntohl() ntohs()) are available to do network +?C: order byte swapping. +?C:. +?C:HAS_HTONS (HTONS): +?C: This symbol, if defined, indicates that the htons() routine (and +?C: friends htonl() ntohl() ntohs()) are available to do network +?C: order byte swapping. +?C:. +?C:HAS_NTOHL (NTOHL): +?C: This symbol, if defined, indicates that the ntohl() routine (and +?C: friends htonl() htons() ntohs()) are available to do network +?C: order byte swapping. +?C:. +?C:HAS_NTOHS (NTOHS): +?C: This symbol, if defined, indicates that the ntohs() routine (and +?C: friends htonl() htons() ntohl()) are available to do network +?C: order byte swapping. +?C:. +?H:#$d_htonl HAS_HTONL /**/ +?H:#$d_htonl HAS_HTONS /**/ +?H:#$d_htonl HAS_NTOHL /**/ +?H:#$d_htonl HAS_NTOHS /**/ +?H:. +?LINT:set d_htonl +: see if htonl --and friends-- exists +set htonl d_htonl +eval $inlibc +: Maybe they are macros. +case "$d_htonl" in +'define') ;; +*) cat > try.c < +#include +#$i_niin I_NETINET_IN +#$i_sysin I_SYS_IN +#ifdef I_NETINET_IN +# include +#endif +#ifdef I_SYS_IN +# include +#endif +int main() +{ + int x; + printf("x = ", htonl(7)); +} +EOM + if $cc $ccflags -c try.c >/dev/null 2>&1; then + d_htonl="$define" + echo "But it seems to be defined as a macro." + fi + $rm -f try.* try + ;; +esac diff --git a/U/d_isascii.U b/U/d_isascii.U index 6a461c39dc..70fba1998a 100644 --- a/U/d_isascii.U +++ b/U/d_isascii.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: d_isascii.U,v 3.0 1993/08/18 12:06:44 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -21,7 +12,7 @@ ?RCS: Revision 3.0 1993/08/18 12:06:44 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:d_isascii: test cc cat cppflags libs rm Setvar Findhdr +?MAKE:d_isascii: cc cat cppflags rm Setvar Findhdr ?MAKE: -pick add $@ %< ?S:d_isascii: ?S: This variable conditionally defines the HAS_ISASCII manifest constant, diff --git a/U/d_readdir.U b/U/d_readdir.U new file mode 100644 index 0000000000..e9364b4121 --- /dev/null +++ b/U/d_readdir.U @@ -0,0 +1,70 @@ +?RCS: $Id: d_readdir.U,v 3.0 1993/08/18 12:06:52 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_readdir.U,v $ +?RCS: Revision 3.0 1993/08/18 12:06:52 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: Force checking for inclusion +?X:INC: i_dirent +?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Inlibc +?MAKE: -pick add $@ %< +?S:d_readdir: +?S: This variable conditionally defines HAS_READDIR if readdir() is +?S: available to read directory entries. +?S:. +?C:HAS_READDIR (READDIR): +?C: This symbol, if defined, indicates that the readdir routine is +?C: available to read directory entries. You may have to include +?C: . See I_DIRENT. +?C:. +?H:#$d_readdir HAS_READDIR /**/ +?H:. +?S:d_seekdir: +?S: This variable conditionally defines HAS_SEEKDIR if seekdir() is +?S: available. +?S:. +?C:HAS_SEEKDIR: +?C: This symbol, if defined, indicates that the seekdir routine is +?C: available. You may have to include . See I_DIRENT. +?C:. +?H:#$d_seekdir HAS_SEEKDIR /**/ +?H:. +?S:d_telldir: +?S: This variable conditionally defines HAS_TELLDIR if telldir() is +?S: available. +?S:. +?C:HAS_TELLDIR: +?C: This symbol, if defined, indicates that the telldir routine is +?C: available. You may have to include . See I_DIRENT. +?C:. +?H:#$d_telldir HAS_TELLDIR /**/ +?H:. +?S:d_rewinddir: +?S: This variable conditionally defines HAS_REWINDDIR if rewinddir() is +?S: available. +?S:. +?C:HAS_REWINDDIR: +?C: This symbol, if defined, indicates that the rewinddir routine is +?C: available. You may have to include . See I_DIRENT. +?C:. +?H:#$d_rewinddir HAS_REWINDDIR /**/ +?H:. +?LINT:set d_readdir d_seekdir d_telldir d_rewinddir +: see if readdir and friends exist +set readdir d_readdir +eval $inlibc +set seekdir d_seekdir +eval $inlibc +set telldir d_telldir +eval $inlibc +set rewinddir d_rewinddir +eval $inlibc + diff --git a/U/d_safebcpy.U b/U/d_safebcpy.U new file mode 100644 index 0000000000..b7373a0791 --- /dev/null +++ b/U/d_safebcpy.U @@ -0,0 +1,81 @@ +?RCS: $Id: d_safebcpy.U,v 3.0 1993/08/18 12:06:58 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_safebcpy.U,v $ +?RCS: +?RCS: Copy "abcde..." string to char abc[] so that gcc doesn't +?RCS: try to store the string in read-only memory. +?RCS: +?RCS: Revision 3.0 1993/08/18 12:06:58 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:d_safebcpy: cat d_bcopy +cc +ccflags +libs rm Oldconfig Setvar +?MAKE: -pick add $@ %< +?S:d_safebcpy: +?S: This variable conditionally defines the HAS_SAFE_BCOPY symbol if +?S: the bcopy() routine can do overlapping copies. +?S:. +?C:HAS_SAFE_BCOPY (SAFE_BCOPY): +?C: This symbol, if defined, indicates that the bcopy routine is available +?C: to copy potentially overlapping memory blocks. Otherwise you should +?C: probably use memmove() or memcpy(). If neither is defined, roll your +?C: own version. +?C:. +?H:#$d_safebcpy HAS_SAFE_BCOPY /**/ +?H:. +?LINT: set d_safebcpy +: can bcopy handle overlapping blocks? +?X: assume the worst +val="$undef" +case "$d_bcopy" in +"$define") + echo " " + echo "Checking to see if your bcopy() can do overlapping copies..." >&4 + $cat >foo.c <<'EOCP' +main() +{ +char buf[128], abc[128]; +char *b; +int len; +int off; +int align; +bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36); + +for (align = 7; align >= 0; align--) { + for (len = 36; len; len--) { + b = buf+align; + bcopy(abc, b, len); + for (off = 1; off <= len; off++) { + bcopy(b, b+off, len); + bcopy(b+off, b, len); + if (bcmp(b, abc, len)) + exit(1); + } + } +} +exit(0); +} +EOCP + if $cc foo.c -o safebcpy $ccflags $libs >/dev/null 2>&1 ; then + if ./safebcpy 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi + else + echo "(I can't compile the test program, so we'll assume not...)" + fi + ;; +esac +$rm -f foo.* safebcpy core +set d_safebcpy +eval $setvar + diff --git a/U/d_safemcpy.U b/U/d_safemcpy.U new file mode 100644 index 0000000000..2f32680709 --- /dev/null +++ b/U/d_safemcpy.U @@ -0,0 +1,82 @@ +?RCS: $Id: d_safemcpy.U,v 3.0 1993/08/18 12:06:58 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_safemcpy.U,v $ +?RCS: +?RCS: Copy "abcde..." string to char abc[] so that +?RCS: gcc doesn't try to store the string in read-only memory. +?RCS: +?RCS: Revision 3.0 1993/08/18 12:06:58 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:d_safemcpy: cat d_memcpy +cc +ccflags +libs rm Oldconfig Setvar +?MAKE: -pick add $@ %< +?S:d_safemcpy: +?S: This variable conditionally defines the HAS_SAFE_MEMCPY symbol if +?S: the memcpy() routine can do overlapping copies. +?S:. +?C:HAS_SAFE_MEMCPY (SAFE_MEMCPY): +?C: This symbol, if defined, indicates that the memcpy routine is available +?C: to copy potentially overlapping memory blocks. Otherwise you should +?C: probably use memmove() or memcpy(). If neither is defined, roll your +?C: own version. +?C:. +?H:#$d_safemcpy HAS_SAFE_MEMCPY /**/ +?H:. +?LINT: set d_safemcpy +: can memcpy handle overlapping blocks? +?X: assume the worst +val="$undef" +case "$d_memcpy" in +"$define") + echo " " + echo "Checking to see if your memcpy() can do overlapping copies..." >&4 + $cat >foo.c <<'EOCP' +main() +{ +char buf[128], abc[128]; +char *b; +int len; +int off; +int align; + +memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36); + +for (align = 7; align >= 0; align--) { + for (len = 36; len; len--) { + b = buf+align; + memcpy(abc, b, len); + for (off = 1; off <= len; off++) { + memcpy(b, b+off, len); + memcpy(b+off, b, len); + if (memcmp(b, abc, len)) + exit(1); + } + } +} +exit(0); +} +EOCP + if $cc foo.c -o safemcpy $ccflags $libs >/dev/null 2>&1 ; then + if ./safemcpy 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi + else + echo "(I can't compile the test program, so we'll assume not...)" + fi + ;; +esac +$rm -f foo.* safemcpy core +set d_safemcpy +eval $setvar + diff --git a/U/d_setlocale.U b/U/d_setlocale.U index 81b2d611fe..14ce63890e 100644 --- a/U/d_setlocale.U +++ b/U/d_setlocale.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: d_setlocale.U,v 3.0 1993/08/18 12:07:36 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi diff --git a/U/d_shmat.U b/U/d_shmat.U new file mode 100644 index 0000000000..e3f8097a0d --- /dev/null +++ b/U/d_shmat.U @@ -0,0 +1,54 @@ +?RCS: $Id: d_shmat.U,v 3.0 1993/08/18 12:07:18 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_shmat.U,v $ +?RCS: Revision 3.0 1993/08/18 12:07:18 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:d_shmat d_voidshmat: Inlibc cppstdin cppflags cppminus usrinc \ + contains +?MAKE: -pick add $@ %< +?S:d_shmat: +?S: This variable conditionally defines the HAS_SHMAT symbol, which +?S: indicates to the C program that the shmat() routine is available. +?S:. +?S:d_voidshmat: +?S: This symbol, if defined, indicates that the shmat() routine +?S: returns a pointer of type void*. Otherwise, char* is assumed. +?S:. +?C:HAS_SHMAT: +?C: This symbol, if defined, indicates that the shmat() routine is +?C: available to attach a shared memory segment to the process space. +?C:. +?H:#$d_shmat HAS_SHMAT /**/ +?H:. +?C:VOIDSHMAT: +?C: This symbol, if defined, indicates that the shmat() routine +?C: returns a pointer of type void*. Otherwise, char* is assumed. +?C:. +?H:#$d_voidshmat VOIDSHMAT /**/ +?H:. +?LINT:set d_shmat d_voidshmat +: see if shmat exists +set shmat d_shmat +eval $inlibc +: see what shmat returns +d_voidshmat="$undef" +case "$d_shmat" in +define) + $cppstdin $cppflags $cppminus < $usrinc/sys/shm.h >voidshmat.txt 2>/dev/null + if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then + echo "and shmat returns (void*)" + d_voidshmat="$define" + else + echo "and shmat returns (char*)" + fi + ;; +esac diff --git a/U/d_strerror.U b/U/d_strerror.U index 4a4a61849f..252d9df296 100644 --- a/U/d_strerror.U +++ b/U/d_strerror.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: d_strerror.U,v 3.0.1.1 1994/01/24 14:08:56 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi diff --git a/U/d_vfork.U b/U/d_vfork.U new file mode 100644 index 0000000000..fb674340e2 --- /dev/null +++ b/U/d_vfork.U @@ -0,0 +1,56 @@ +?RCS: $Id: d_vfork.U,v 3.0.1.2 1993/10/16 13:49:39 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_vfork.U,v $ +?RCS: Revision 3.0.1.2 1993/10/16 13:49:39 ram +?RCS: patch12: added magic for vfork() +?RCS: +?RCS: Revision 3.0.1.1 1993/09/13 16:06:57 ram +?RCS: patch10: removed automatic remapping of vfork on fork (WAD) +?RCS: patch10: added compatibility code for older config.sh (WAD) +?RCS: +?RCS: Revision 3.0 1993/08/18 12:07:55 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:d_vfork: Inlibc +?MAKE: -pick add $@ %< +?S:d_vfork: +?S: This variable conditionally defines the HAS_VFORK symbol, which +?S: indicates the vfork() routine is available. +?S:. +?C:HAS_VFORK (VFORK): +?C: This symbol, if defined, indicates that vfork() exists. +?C:. +?H:#$d_vfork HAS_VFORK /**/ +?H:. +?M:vfork: HAS_VFORK +?M:#ifndef HAS_VFORK +?M:#define vfork fork +?M:#endif +?M:. +?LINT:set d_vfork +: see if there is a vfork +set vfork d_vfork +eval $inlibc +: But do we want to use it. vfork is reportedly unreliable in +: perl in Solaris 2.x, and probably elsewhere. +case "$d_vfork" in +define) + dflt='n' + rp="Some systems have problems with vork. Do you want to use it?" + . ./myread + case "$ans" in + y|Y) ;; + *) echo "Ok, we won't use vfork." + d_vfork="$undef" + ;; + esac + ;; +esac diff --git a/U/dlsrc.U b/U/dlsrc.U index e67e1fdce0..616818d346 100644 --- a/U/dlsrc.U +++ b/U/dlsrc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: dlsrc.U,v$ ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, @@ -17,50 +8,223 @@ ?RCS: ?RCS: $Log: dlsrc.U,v $ ?RCS: -?MAKE:dlsrc dlobj usedl: Myread Oldconfig package \ - Guess test rm cat i_dlfcn cc ccflags Findhdr +?X: hpux support thanks to Jeff Okamoto +?X: +?X: To create a shared library, you must compile ALL source files in the +?X: library with +z (or possibly +Z if the library is whopping huge), +?X: then link the library with -b. Example: +?X: cc -c +z module_a.c +?X: cc -c +z module_b.c +?X: ld -b module_a.o module_b.o -o module.sl +?X: +?MAKE:usedl dlsrc dlobj dldir cccdlflags lddlflags ccdlflags \ + shlibsuffix: Getfile Myread test osname sed i_dlfcn Findhdr cc ?MAKE: -pick add $@ %< ?S:usedl: ?S: This variable contains indicates if the the system supports dynamic ?S: loading of some sort. See also dlsrc and dlobj. ?S:. ?S:dlsrc: -?S: This variable contains the name of the dynamic loading file that +?S: This variable contains the name of the dynamic loading file that ?S: will be used with the package. ?S:. ?S:dlobj: ?S: This variable contains the name of the dynamic loading object -?S: file that will be used with the package. +?S: file that will be used with the package. This is used in Makefile. +?S:. +?S:dldir: +?S: This variable contains the directory from which to fetch dlsrc. +?S: It is up to the makefile to use it. +?S:. +?S:cccdlflags: +?S: This variable contains any special flags that might need to be +?S: passed with cc -c to compile modules to be used to create a shared +?S: library that will be used for dynamic loading. For hpux, this +?S: should be +z. It is up to the makefile to use it. +?S:. +?S:lddlflags: +?S: This variable contains any special flags that might need to be +?S: passed to ld to create a shared library suitable for dynamic +?S: loading. It is up to the makefile to use it. For hpux, it +?S: should be -b. For sunos 4.1, it is empty. +?S:. +?S:ccdlflags: +?S: This variable contains any special flags that might need to be +?S: passed to cc to link with a shared library for dynamic loading. +?S: It is up to the makefile to use it. For sunos 4.1, it should +?S: be empty. ?S:. -?C:USE_DYNAMIC_LOADING~%<: +?S:shlibsuffix: +?S: Shared libraries are built by Makefile in the form +?S: lib/auto/xxx/xxx${shsuffix}, where xxx is +?S: the name of the library, e.g. /lib/auto/POSIX/POSIX.so +?S:. +?C:USE_DYNAMIC_LOADING ~ %<: ?C: This symbol, if defined, indicates that dynamic loading of ?C: some sort is available. ?C:. ?H:?%<:#$usedl USE_DYNAMIC_LOADING /**/ ?H:. ?W:%<:dlopen -?INIT: usedl='' -?X: -?X: Can anyone suggest a test for whether this works on a given system? -?X: +?INIT:: File to use for dynamic loading +?INIT:usedl='' +?T:xxx +?X: +?X: We select a default of 'define' for usedl if either dl_$osname.c +?X: exists or if i_dlfcn is defined (which probably means dl_sunos.c +?X: will work.) +?X: : determine which dynamic loading, if any, to compile in echo " " case "$usedl" in -'') - case "$i_dlfcn" in - 'define') dflt='y' ;; - *) dflt='n' ;; - esac - ;; -'define') dflt='y' ;; -'y') dflt='y' - usedl='define' ;; -*) dflt='n' ;; +'') case "$i_dlfcn" in + define) dflt='y' ;; + *) dflt='n' ;; + esac + : Does a dl.c file exist for this operating system + $test -f ../ext/dl/dl_${osname}.c && dflt='y' + ;; +define|y|true) dflt='y' + usedl="$define" + ;; +*) dflt='n' + ;; esac rp="Do you wish to attempt to use dynamic loading?" . ./myread usedl="$ans" case "$ans" in -y*) usedl='define'; dlsrc='dl.c'; dlobj='dl.o';; -*) usedl='undef'; dlsrc=''; dlobj='';; +y*) usedl="$define" + if $test -f ../ext/dl/dl_${osname}.c ; then + dflt="ext/dl/dl_${osname}.c" + else + dflt='ext/dl/dl.c' + fi + echo "The following dynamic loading files are available:" + cd ..; ls -C ext/dl/dl*.c; cd UU + rp="Source file to use for dynamic loading" + fn="fne~" + . ./getfile + : emulate basename and dirname + xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'` + dlobj=$xxx.o + dlsrc=$xxx.c + dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'` + case "$dldir" in + '') dldir="." ;; + *) ;; + esac + if $test -f ../$dldir/$dlsrc; then + usedl="$define" + else + echo "File $dlsrc does not exist -- ignored" + usedl="$undef" + fi + + cat << EOM + +Some systems may require passing special flags to $cc -c to +compile modules that will be used to create a shared library. +To use no flags, say "none". +EOM + case "$cccdlflags" in + ''|' ') case "$osname" in + hpux) dflt='+z' ;; + next) dflt='none' ;; + sunos) dflt='none' ;; + *) dflt='none' ;; + esac + ;; + *) dflt="$cccdlflags" ;; + esac + rp="Any special flags to pass to $cc -c to compile shared library modules?" + . ./myread + case "$ans" in + none) cccdlflags='' ;; + *) cccdlflags="$ans" ;; + esac + + cat << 'EOM' + +Some systems may require passing special flags to ld to +create a shared library. To use no flags, say "none". +EOM +?X: I have received one report that NeXT requires -r here. +?X: On SunOS 4.1.3, that makes the library no longer shared. + case "$lddlflags" in + ''|' ') case "$osname" in + hpux) dflt='-b' ;; + next) dflt='none' ;; + sunos) dflt='none' ;; + *) dflt='none' ;; + esac + ;; + *) dflt="$lddlflags" ;; + esac + rp="Any special flags to pass to ld to create a shared library?" + . ./myread + case "$ans" in + none) lddlflags='' ;; + *) lddlflags="$ans" ;; + esac + + cat < exists and should +?S: be included. +?S:. +?C:I_NET_ERRNO: +?C: This symbol, if defined, indicates that exists and +?C: should be included. +?C:. +?H:#$i_neterrno I_NET_ERRNO /**/ +?H:. +?LINT:set i_neterrno +: see if net/errno.h is available +set net/errno.h i_neterrno +eval $inhdr +: Unfortunately, it causes problems on some systems. Arrgh. +case '$i_neterrno' in +'define') echo " found." + cat > try.c <<'EOM' +#include +#include +#include +int func() +{ +int x; +x = ENOTSOCK; +return x; +} +EOM + if $cc $ccflags -c try.c >/dev/null 2>&1; then + i_neterrno="$define" + else + echo "But it causes problems, so we won't include it" + i_neterrno="$undef" + fi + $rm -f try.* try + ;; +esac diff --git a/U/i_pwd.U b/U/i_pwd.U new file mode 100644 index 0000000000..69aa030706 --- /dev/null +++ b/U/i_pwd.U @@ -0,0 +1,134 @@ +?RCS: $Id: i_pwd.U,v 3.0 1993/08/18 12:08:25 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: i_pwd.U,v $ +?RCS: Revision 3.0 1993/08/18 12:08:25 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: This unit looks wether there is a pwd system or not +?X: +?MAKE:i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment: \ + test contains rm cppstdin cppflags cppminus Findhdr +?MAKE: -pick add $@ %< +?S:i_pwd: +?S: This variable conditionally defines I_PWD, which indicates +?S: to the C program that it should include . +?S:. +?S:d_pwquota: +?S: This varaible conditionally defines PWQUOTA, which indicates +?S: that struct passwd contains pw_quota. +?S:. +?S:d_pwage: +?S: This varaible conditionally defines PWAGE, which indicates +?S: that struct passwd contains pw_age. +?S:. +?S:d_pwchange: +?S: This varaible conditionally defines PWCHANGE, which indicates +?S: that struct passwd contains pw_change. +?S:. +?S:d_pwclass: +?S: This varaible conditionally defines PWCLASS, which indicates +?S: that struct passwd contains pw_class. +?S:. +?S:d_pwexpire: +?S: This varaible conditionally defines PWEXPIRE, which indicates +?S: that struct passwd contains pw_expire. +?S:. +?S:d_pwcomment: +?S: This varaible conditionally defines PWCOMMENT, which indicates +?S: that struct passwd contains pw_comment. +?S:. +?C:I_PWD: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?C:PWQUOTA: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_quota. +?C:. +?C:PWAGE: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_age. +?C:. +?C:PWCHANGE: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_change. +?C:. +?C:PWCLASS: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_class. +?C:. +?C:PWEXPIRE: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_expire. +?C:. +?C:PWCOMMENT: +?C: This symbol, if defined, indicates to the C program that struct passwd +?C: contains pw_comment. +?C:. +?H:#$i_pwd I_PWD /**/ +?H:#$d_pwquota PWQUOTA /**/ +?H:#$d_pwage PWAGE /**/ +?H:#$d_pwchange PWCHANGE /**/ +?H:#$d_pwclass PWCLASS /**/ +?H:#$d_pwexpire PWEXPIRE /**/ +?H:#$d_pwcomment PWCOMMENT /**/ +?H:. +?T:xxx +: see if this is a pwd system +echo " " +xxx=`./findhdr pwd.h` +if $test "$xxx"; then + i_pwd="$define" + echo " found." >&4 + $cppstdin $cppflags $cppminus < $xxx >$$.h + if $contains 'pw_quota' $$.h >/dev/null 2>&1; then + d_pwquota="$define" + else + d_pwquota="$undef" + fi + if $contains 'pw_age' $$.h >/dev/null 2>&1; then + d_pwage="$define" + else + d_pwage="$undef" + fi + if $contains 'pw_change' $$.h >/dev/null 2>&1; then + d_pwchange="$define" + else + d_pwchange="$undef" + fi + if $contains 'pw_class' $$.h >/dev/null 2>&1; then + d_pwclass="$define" + else + d_pwclass="$undef" + fi + if $contains 'pw_expire' $$.h >/dev/null 2>&1; then + d_pwexpire="$define" + else + d_pwexpire="$undef" + fi + if $contains 'pw_comment' $$.h >/dev/null 2>&1; then + d_pwcomment="$define" + else + d_pwcomment="$undef" + fi + $rm -f $$.h +else + i_pwd="$undef" + d_pwquota="$undef" + d_pwage="$undef" + d_pwchange="$undef" + d_pwclass="$undef" + d_pwexpire="$undef" + d_pwcomment="$undef" + echo " NOT found." >&4 +fi + diff --git a/U/i_sdbm.U b/U/i_sdbm.U new file mode 100644 index 0000000000..3e01615670 --- /dev/null +++ b/U/i_sdbm.U @@ -0,0 +1,37 @@ +?RCS: $Id: i_sdbm.U,v $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: i_sdbm.U,v $ +?RCS: +?MAKE:i_sdbm: Inhdr package Setvar +?MAKE: -pick add $@ %< +?S:i_sdbm: +?S: This variable conditionally defines the I_SDBM symbol, which +?S: indicates to the C program that sdbm.h exists and should +?S: be included. +?S:. +?C:I_SDBM (HAS_SDBM): +?C: This symbol, if defined, indicates that sdbm.h exists and should +?C: be included. +?C:. +?H:#$i_sdbm I_SDBM /**/ +?H:. +?LINT:set i_sdbm +: see if sdbm.h is wanted +?X: Since perl includes sdbm, don't ask here. Always include it. +?X: But, we'll allow a hints file to over-rule us. +echo " " +echo "$package includes an implementation of sdbm in ext/dbm/sdbm." +case "$i_sdbm" in + ''|' ') val="$define" ;; + *) val="$i_sdbm" ;; +esac +set i_sdbm +eval $setvar diff --git a/U/i_sgtty.U b/U/i_sgtty.U new file mode 100644 index 0000000000..b890d78811 --- /dev/null +++ b/U/i_sgtty.U @@ -0,0 +1,128 @@ +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr +?MAKE:i_sgtty: Inhdr +?MAKE: -pick add $@ %< +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_SGTTY: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_sgtty I_SGTTY /**/ +?H:. +?LINT:set i_sgtty +: see if this is a sgtty.h system +set sgtty.h i_sgtty +eval $inhdr diff --git a/U/i_termio.U b/U/i_termio.U new file mode 100644 index 0000000000..f1eb947503 --- /dev/null +++ b/U/i_termio.U @@ -0,0 +1,117 @@ +?RCS: $Id: i_termio.U,v 3.0 1993/08/18 12:08:44 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: i_termio.U,v $ +?RCS: Revision 3.0 1993/08/18 12:08:44 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: Include all three (possible) definitions in config_h.SH. +?X: There are enough implementations of posix termios.h out there +?X: that do not work well with other system headers or are +?X: incomplete. This makes it easier for the user to back off +?X: and try sgtty.h or i_termio.h instead. +?X: +?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr +?MAKE: -pick add $@ %< +?S:i_termio: +?S: This variable conditionally defines the I_TERMIO symbol, which +?S: indicates to the C program that it should include rather +?S: than . +?S:. +?S:i_termios: +?S: This variable conditionally defines the I_TERMIOS symbol, which +?S: indicates to the C program that the POSIX file is +?S: to be included. +?S:. +?S:i_sgtty: +?S: This variable conditionally defines the I_SGTTY symbol, which +?S: indicates to the C program that it should include rather +?S: than . +?S:. +?C:I_TERMIO ~ %<: +?C: This symbol, if defined, indicates that the program should include +?C: rather than . There are also differences in +?C: the ioctl() calls that depend on the value of this symbol. +?C:. +?C:I_TERMIOS ~ %<: +?C: This symbol, if defined, indicates that the program should include +?C: the POSIX termios.h rather than sgtty.h or termio.h. +?C: There are also differences in the ioctl() calls that depend on the +?C: value of this symbol. +?C:. +?C:I_SGTTY ~ %<: +?C: This symbol, if defined, indicates that the program should include +?C: rather than . There are also differences in +?C: the ioctl() calls that depend on the value of this symbol. +?C:. +?H:?%<:#$i_termio I_TERMIO /**/ +?H:?%<:#$i_termios I_TERMIOS /**/ +?H:?%<:#$i_sgtty I_SGTTY /**/ +?H:. +?T:val2 val3 +?LINT:set i_termio i_sgtty i_termios +: see if this is a termio system +val="$undef" +val2="$undef" +val3="$undef" +?X: Prefer POSIX-approved termios.h over all else +if $test `./findhdr termios.h`; then + set tcsetattr i_termios + eval $inlibc + val3="$i_termios" +fi +echo " " +case "$val3" in +"$define") echo "You have POSIX termios.h... good!" >&4;; +*) if Cppsym pyr; then + case "`/bin/universe`" in + ucb) if $test `./findhdr sgtty.h`; then + val2="$define" + echo " found." >&4 + else + echo "System is pyramid with BSD universe." + echo " not found--you could have problems." >&4 + fi;; + *) if $test `./findhdr termio.h`; then + val="$define" + echo " found." >&4 + else + echo "System is pyramid with USG universe." + echo " not found--you could have problems." >&4 + fi;; + esac +?X: Start with USG to avoid problems if both usg/bsd was guessed + elif usg; then + if $test `./findhdr termio.h`; then + echo " found." >&4 + val="$define" + elif $test `./findhdr sgtty.h`; then + echo " found." >&4 + val2="$define" + else +echo "Neither nor found--you could have problems." >&4 + fi + else + if $test `./findhdr sgtty.h`; then + echo " found." >&4 + val2="$define" + elif $test `./findhdr termio.h`; then + echo " found." >&4 + val="$define" + else +echo "Neither nor found--you could have problems." >&4 + fi + fi;; +esac +set i_termio; eval $setvar +val=$val2; set i_sgtty; eval $setvar +val=$val3; set i_termios; eval $setvar + diff --git a/U/i_termios.U b/U/i_termios.U new file mode 100644 index 0000000000..f676710e40 --- /dev/null +++ b/U/i_termios.U @@ -0,0 +1,64 @@ +?MAKE:i_termios: Inhdr +?MAKE: -pick add $@ %< +?S:i_termios: +?S: This variable conditionally defines the I_TERMIOS symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_TERMIOS: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_termios I_TERMIOS /**/ +?H:. +?LINT:set i_termios +: see if this is a termios.h system +set termios.h i_termios +eval $inhdr +?MAKE:i_termios: Inhdr +?MAKE: -pick add $@ %< +?S:i_termios: +?S: This variable conditionally defines the I_TERMIOS symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_TERMIOS: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_termios I_TERMIOS /**/ +?H:. +?LINT:set i_termios +: see if this is a termios.h system +set termios.h i_termios +eval $inhdr +?MAKE:i_termios: Inhdr +?MAKE: -pick add $@ %< +?S:i_termios: +?S: This variable conditionally defines the I_TERMIOS symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_TERMIOS: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_termios I_TERMIOS /**/ +?H:. +?LINT:set i_termios +: see if this is a termios.h system +set termios.h i_termios +eval $inhdr +?MAKE:i_termios: Inhdr +?MAKE: -pick add $@ %< +?S:i_termios: +?S: This variable conditionally defines the I_TERMIOS symbol, and +?S: indicates whether a C program should include . +?S:. +?C:I_TERMIOS: +?C: This symbol, if defined, indicates to the C program that it should +?C: include . +?C:. +?H:#$i_termios I_TERMIOS /**/ +?H:. +?LINT:set i_termios +: see if this is a termios.h system +set termios.h i_termios +eval $inhdr diff --git a/U/i_vfork.U b/U/i_vfork.U new file mode 100644 index 0000000000..19af424af1 --- /dev/null +++ b/U/i_vfork.U @@ -0,0 +1,34 @@ +?RCS: $Id: i_vfork.U,v 3.0 1993/08/18 12:08:50 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: i_vfork.U,v $ +?RCS: Revision 3.0 1993/08/18 12:08:50 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:i_vfork: Inhdr d_vfork +?MAKE: -pick add $@ %< +?S:i_vfork: +?S: This variable conditionally defines the I_VFORK symbol, and indicates +?S: whether a C program should include vfork.h. +?S:. +?C:I_VFORK: +?C: This symbol, if defined, indicates to the C program that it should +?C: include vfork.h. +?C:. +?H:#$i_vfork I_VFORK /**/ +?H:. +?LINT:set i_vfork +: see if this is a vfork system +case "$d_vfork" in +define) set vfork.h i_vfork + eval $inhdr + ;; +*) i_vfork="$undef";; +esac diff --git a/U/libc.U b/U/libc.U index 54879b1112..9f497f1ba0 100644 --- a/U/libc.U +++ b/U/libc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: libc.U,v 3.0.1.3 1994/01/24 14:12:17 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi diff --git a/U/libpth.U b/U/libpth.U index 99cf22ccf5..2c030c296c 100644 --- a/U/libpth.U +++ b/U/libpth.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: libpth.U,v 3.0 1993/08/18 12:09:02 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -32,7 +23,7 @@ ?S:. ?S:plibpth: ?S: Holds the private path used by Configure to find out the libraries. -?S: Its value is prepend to libpth. This variable takes care of special +?S: Its value is prepended to libpth. This variable takes care of special ?S: machines, like the mips. Usually, it should be empty. ?S:. ?T: xxx yyy diff --git a/U/libs.U b/U/libs.U index c1f951abb0..45625abc1b 100644 --- a/U/libs.U +++ b/U/libs.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: libs.U,v 3.0.1.1 1993/08/25 14:02:31 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -37,9 +28,17 @@ ?X: -lBSD, -lPW, and -lx only get used if there are unresolved ?X: routines at link time. Usually, these are backwards compatability ?X: libraries, and may not be as reliable as the standard c library. +?X: +?X: The -lsocket -linet -lnsl order has been reported to be necessary +?X: for at least one SVR4 implementation. +?X: ?X: The ordering of c_s, posix, and cposix is a guess and almost ?X: certainly wrong on about half of all systems. -?INIT:libswanted="net socket nsl inet nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x" +?X: +?X: The extra space at the beginning and end is for some old hints +?X: files which assumed there was always a space around each library. +?X: +?INIT:libswanted=" net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x " ?INIT: : Looking for optional libraries echo " " @@ -55,27 +54,27 @@ for thislib in $libswanted; do case "$thislib" in dbm) thatlib=ndbm;; *_s) thatlib=NONE;; - *) thatlib="${thislib}_s";; + *) thatlib=${thislib}_s;; esac xxx=`./loc lib$thislib.a X $libpth` yyy=`./loc lib$thatlib.a X $libpth` - zzz=`./loc lib$thislib.so.[0-9]'*' $libpth` + zzz=`./loc lib$thislib.so.[0-9]'*' X $libpth` if $test -f $xxx; then echo "Found -l$thislib." case "$dflt" in - "*-l$thislib *.*"|"*-l$thatlib *.*") ;; + *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;; *) dflt="$dflt -l$thislib";; esac elif $test -f $yyy; then echo "Found -l$thatlib." case "$dflt" in - "*-l$thislib *.*"|"*-l$thatlib *.*") ;; + *"-l$thatlib "*|*-l$thatlib) ;; *) dflt="$dflt -l$thatlib";; esac elif $test -f $zzz; then echo "Found -$thislib." case "$dflt" in - "*-l$thislib *.*"|"*-l$thatlib *.*") ;; + *"-l$thislib "*|*-l$thislib) ;; *) dflt="$dflt -l$thislib";; esac else @@ -84,13 +83,13 @@ for thislib in $libswanted; do if $test -f $xxx; then echo "Found -l$thislib." case "$dflt" in - "*-l$thislib *.*"|"*-l$thatlib *.*") ;; + *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;; *) dflt="$dflt -l$thislib";; esac elif $test -f $yyy; then echo "Found -l$thatlib." case "$dflt" in - "*-l$thislib *.*"|"*-l$thatlib *.*") ;; + *"-l$thatlib "*|*-l$thatlib) ;; *) dflt="$dflt -l$thatlib";; esac else diff --git a/U/libyacc.U b/U/libyacc.U index cfee077823..c12e5a5ad1 100644 --- a/U/libyacc.U +++ b/U/libyacc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: libyacc.U,v 3.0.1.1 1994/01/24 14:13:49 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi diff --git a/U/lns.U b/U/lns.U new file mode 100644 index 0000000000..fcefb1fa32 --- /dev/null +++ b/U/lns.U @@ -0,0 +1,21 @@ +?RCS: $Id: lns.U,v $ +?RCS: +?RCS: $Log: lns.U,v $ +?RCS: +?MAKE:lns: ln touch +?MAKE: -pick add $@ %< +?S:lns: +?S: This variable holds the name of the command to make +?S: symbolic links (if they are supported). It can be used +?S: in the Makefile. It is either 'ln -s' or 'ln' +?S:. +?X: We can't rely on d_symlink because that may be listed in the +?X: C library but unimplemented. +: determine whether symbolic links are supported +$touch blurfl +if $ln -s blurfl sym > /dev/null 2>&1 ; then + lns="$ln -s" +else + lns="$ln" +fi +rm -f blurfl sym diff --git a/U/loc_sed.U b/U/loc_sed.U new file mode 100644 index 0000000000..9eb8b21e14 --- /dev/null +++ b/U/loc_sed.U @@ -0,0 +1,10 @@ +?RCS: $Id: loc_sed.U,v $ +?RCS: +?MAKE:: sed +?MAKE: -pick add $@ %< +?C:LOC_SED: +?C: This symbol holds the complete pathname to the sed program. +?C:. +?H:#define LOC_SED "$sed" /**/ +?H:. +?X: This is used in perl.c. diff --git a/U/mallocsrc.U b/U/mallocsrc.U index 3fc4ee7c6e..9fd5382533 100644 --- a/U/mallocsrc.U +++ b/U/mallocsrc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: mallocsrc.U,v 3.0 1993/08/18 12:09:12 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -21,8 +12,8 @@ ?RCS: Revision 3.0 1993/08/18 12:09:12 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:mallocsrc mallocobj usemymalloc malloctype: Myread Oldconfig package \ - Guess test rm cat +cc +ccflags Findhdr +?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc: Myread Oldconfig package \ + Guess Setvar test rm cat +cc +ccflags Findhdr ?MAKE: -pick add $@ %< ?S:usemymalloc: ?S: This variable contains y if the malloc that comes with this package @@ -36,6 +27,11 @@ ?S: Otherwise the value is null. This variable is intended for generating ?S: Makefiles. ?S:. +?S:d_mymalloc: +?S: This variable conditionally defines MYMALLOC in case other parts +?S: of the source want to take special action if MYMALLOC is used. +?S: This may include different sorts of profiling or error detection. +?S:. ?S:mallocobj: ?S: This variable contains the name of the malloc.o that this package ?S: generates, if that malloc.o is preferred over the system malloc. @@ -50,6 +46,11 @@ ?C:. ?H:#define Malloc_t $malloctype /**/ ?H:. +?C:MYMALLOC: +?C: This symbol, if defined, indicates that we're using our own malloc. +?C:. +?H:#$d_mymalloc MYMALLOC /**/ +?H:. ?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in ?X: the interpreter which defines all the names, even though they are not used. @if mallocobj @@ -71,11 +72,17 @@ rp="Do you wish to attempt to use the malloc that comes with $package?" . ./myread usemymalloc="$ans" case "$ans" in -y*) mallocsrc='malloc.c'; mallocobj='malloc.o';; -*) mallocsrc=''; mallocobj='';; +y*) mallocsrc='malloc.c' + mallocobj='malloc.o' + d_mymalloc="$define" + ;; +*) mallocsrc='' + mallocobj='' + d_mymalloc="$undef" + ;; esac - @end + @if MALLOCPTRTYPE || Malloc_t : compute the type returned by malloc echo " " diff --git a/U/prototype.U b/U/prototype.U index 8fa80e8852..b0332f5655 100644 --- a/U/prototype.U +++ b/U/prototype.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: prototype.U,v 3.0.1.2 1994/01/24 14:15:36 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi diff --git a/U/sig_name.U b/U/sig_name.U new file mode 100644 index 0000000000..9b3f9e3440 --- /dev/null +++ b/U/sig_name.U @@ -0,0 +1,86 @@ +?RCS: $Id: sig_name.U,v 3.0 1993/08/18 12:09:47 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: sig_name.U,v $ +?RCS: Revision 3.0 1993/08/18 12:09:47 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?MAKE:sig_name: awk rm Findhdr +?MAKE: -pick add $@ %< +?S:sig_name: +?S: This variable holds the signal names, space separated. The leading +?S: SIG in signals name is removed. +?S:. +?C:SIG_NAME: +?C: This symbol contains a list of signal names in order. This is intended +?C: to be used as a static array initialization, like this: +?C: char *sig_name[] = { SIG_NAME }; +?C: The signals in the list are separated with commas, and each signal +?C: is surrounded by double quotes. There is no leading SIG in the signal +?C: name, i.e. SIGQUIT is known as "QUIT". +?C:. +?H:#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/ +?H:. +?T:xxx +: generate list of signal names +echo " " +case "$sig_name" in +'') + echo "Generating a list of signal names..." >&4 + xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h` + set X `cat $xxx 2>&1 | $awk ' +$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ { + sig[$3] = substr($2,4,20) + if (max < $3 && $3 < 60) { + max = $3 + } +} + +END { + for (i = 1; i <= max; i++) { + if (sig[i] == "") + printf "%d", i + else + printf "%s", sig[i] + if (i < max) + printf " " + } + printf "\n" +} +'` + shift + case $# in + 0) + echo 'kill -l' >/tmp/foo$$ + set X `csh -f 70) + { + printf "\n" + linelen = length(name) + } + printf "%s", name } }' diff --git a/U/voidflags.U b/U/voidflags.U index 50b5d9285b..7d9a0d06ba 100644 --- a/U/voidflags.U +++ b/U/voidflags.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: voidflags.U,v 3.0 1993/08/18 12:10:01 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -47,11 +38,7 @@ ?C: level of void support necessary is not present, defines void to int. ?C:. ?H:?%<:#ifndef VOIDUSED -?H:?%<:# ifdef VOIDWANT -?H:?%<:# define VOIDUSED VOIDWANT -?H:?%<:# else -?H:?%<:# define VOIDUSED $defvoidused -?H:?%<:# endif +?H:?%<:# define VOIDUSED $defvoidused ?H:?%<:#endif ?H:?%<:#define VOIDFLAGS $voidflags ?H:?%<:#if (VOIDFLAGS & VOIDUSED) != VOIDUSED @@ -62,7 +49,7 @@ ?H:?%<:# define VOID void ?H:?%<:#endif ?H:. -?W:%<:void VOID VOIDWANT +?W:%<:void VOID VOIDUSED ?INIT:: full support for void wanted by default ?INIT:defvoidused=15 ?INIT: diff --git a/U/yacc.U b/U/yacc.U index 0b777a780f..679970c34e 100644 --- a/U/yacc.U +++ b/U/yacc.U @@ -1,12 +1,3 @@ -?X: These units are based on the ones supplied with dist-3.0 -?X: patchlevel 22. They have been changed or enhanced to work with -?X: perl5alpha. I would appreciate hearing about any changes, -?X: corrections, or enhancements. -?X: Andy Dougherty doughera@lafcol.lafayette.edu -?X: Dept. of Physics -?X: Lafayette College -?X: Easton, PA 18042-1782 -?X: Sat Apr 2 15:45:17 EST 1994 ?RCS: $Id: yacc.U,v 3.0 1993/08/18 12:10:03 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi @@ -21,7 +12,7 @@ ?RCS: Revision 3.0 1993/08/18 12:10:03 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test +?MAKE:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test package ?MAKE: -pick add $@ %< ?S:yacc: ?S: This variable holds the name of the compiler compiler we @@ -48,8 +39,7 @@ if $test -f "$bison"; then rp="$rp or bison -y" fi $cat < DONE - FLAGS = (UNKNOWN,KIDS) - { - TYPE = line sequence ===> (8) - FLAGS = (UNKNOWN,KIDS,PARENS) - { -1 TYPE = next statement ===> 2 - FLAGS = (SCALAR) - LINE = 4 - } - { -3 TYPE = require ===> 4 - FLAGS = (SCALAR,KIDS) - { - TYPE = scalar ===> (3) - FLAGS = (SCALAR,KIDS) - { - TYPE = null operation ===> (2) - (was pushmark) - FLAGS = (SCALAR) - } - { -2 TYPE = constant item ===> 3 - FLAGS = (SCALAR) - SV = PV("stat.pl") - } - } - } - { -4 TYPE = next statement ===> 5 - FLAGS = (SCALAR) - LINE = 5 - } - { -7 TYPE = print ===> 8 - FLAGS = (SCALAR,KIDS) - { -5 TYPE = pushmark ===> 6 - FLAGS = (SCALAR) - } - { - TYPE = scalar ===> (7) - FLAGS = (SCALAR,KIDS) - { - TYPE = null operation ===> (6) - (was pushmark) - FLAGS = (SCALAR) - } - { -6 TYPE = constant item ===> 7 - FLAGS = (SCALAR) - SV = PV("here -") - } - } - } - } -} -{ -111 TYPE = eval exit ===> DONE - FLAGS = (UNKNOWN,KIDS) - { - TYPE = line sequence ===> (111) - FLAGS = (UNKNOWN,KIDS) - { -31 TYPE = next statement ===> 32 - LINE = 8 - } - { -36 TYPE = scalar assignment ===> 37 - FLAGS = (SCALAR,KIDS,STACKED) - { -34 TYPE = addition ===> 35 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -32 TYPE = constant item ===> 33 - FLAGS = (SCALAR) - SV = IV(0) - } - { - TYPE = null operation ===> (34) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -33 TYPE = scalar variable ===> 34 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (36) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -35 TYPE = scalar variable ===> 36 - FLAGS = (SCALAR) - GV = main::ST_DEV - } - } - } - { -37 TYPE = next statement ===> 38 - LINE = 9 - } - { -42 TYPE = scalar assignment ===> 43 - FLAGS = (SCALAR,KIDS,STACKED) - { -40 TYPE = addition ===> 41 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -38 TYPE = constant item ===> 39 - FLAGS = (SCALAR) - SV = IV(1) - } - { - TYPE = null operation ===> (40) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -39 TYPE = scalar variable ===> 40 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (42) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -41 TYPE = scalar variable ===> 42 - FLAGS = (SCALAR) - GV = main::ST_INO - } - } - } - { -43 TYPE = next statement ===> 44 - LINE = 10 - } - { -48 TYPE = scalar assignment ===> 49 - FLAGS = (SCALAR,KIDS,STACKED) - { -46 TYPE = addition ===> 47 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -44 TYPE = constant item ===> 45 - FLAGS = (SCALAR) - SV = IV(2) - } - { - TYPE = null operation ===> (46) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -45 TYPE = scalar variable ===> 46 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (48) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -47 TYPE = scalar variable ===> 48 - FLAGS = (SCALAR) - GV = main::ST_MODE - } - } - } - { -49 TYPE = next statement ===> 50 - LINE = 11 - } - { -54 TYPE = scalar assignment ===> 55 - FLAGS = (SCALAR,KIDS,STACKED) - { -52 TYPE = addition ===> 53 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -50 TYPE = constant item ===> 51 - FLAGS = (SCALAR) - SV = IV(3) - } - { - TYPE = null operation ===> (52) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -51 TYPE = scalar variable ===> 52 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (54) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -53 TYPE = scalar variable ===> 54 - FLAGS = (SCALAR) - GV = main::ST_NLINK - } - } - } - { -55 TYPE = next statement ===> 56 - LINE = 12 - } - { -60 TYPE = scalar assignment ===> 61 - FLAGS = (SCALAR,KIDS,STACKED) - { -58 TYPE = addition ===> 59 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -56 TYPE = constant item ===> 57 - FLAGS = (SCALAR) - SV = IV(4) - } - { - TYPE = null operation ===> (58) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -57 TYPE = scalar variable ===> 58 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (60) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -59 TYPE = scalar variable ===> 60 - FLAGS = (SCALAR) - GV = main::ST_UID - } - } - } - { -61 TYPE = next statement ===> 62 - LINE = 13 - } - { -66 TYPE = scalar assignment ===> 67 - FLAGS = (SCALAR,KIDS,STACKED) - { -64 TYPE = addition ===> 65 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -62 TYPE = constant item ===> 63 - FLAGS = (SCALAR) - SV = IV(5) - } - { - TYPE = null operation ===> (64) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -63 TYPE = scalar variable ===> 64 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (66) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -65 TYPE = scalar variable ===> 66 - FLAGS = (SCALAR) - GV = main::ST_GID - } - } - } - { -67 TYPE = next statement ===> 68 - LINE = 14 - } - { -72 TYPE = scalar assignment ===> 73 - FLAGS = (SCALAR,KIDS,STACKED) - { -70 TYPE = addition ===> 71 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -68 TYPE = constant item ===> 69 - FLAGS = (SCALAR) - SV = IV(6) - } - { - TYPE = null operation ===> (70) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -69 TYPE = scalar variable ===> 70 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (72) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -71 TYPE = scalar variable ===> 72 - FLAGS = (SCALAR) - GV = main::ST_RDEV - } - } - } - { -73 TYPE = next statement ===> 74 - LINE = 15 - } - { -78 TYPE = scalar assignment ===> 79 - FLAGS = (SCALAR,KIDS,STACKED) - { -76 TYPE = addition ===> 77 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -74 TYPE = constant item ===> 75 - FLAGS = (SCALAR) - SV = IV(7) - } - { - TYPE = null operation ===> (76) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -75 TYPE = scalar variable ===> 76 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (78) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -77 TYPE = scalar variable ===> 78 - FLAGS = (SCALAR) - GV = main::ST_SIZE - } - } - } - { -79 TYPE = next statement ===> 80 - LINE = 16 - } - { -84 TYPE = scalar assignment ===> 85 - FLAGS = (SCALAR,KIDS,STACKED) - { -82 TYPE = addition ===> 83 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -80 TYPE = constant item ===> 81 - FLAGS = (SCALAR) - SV = IV(8) - } - { - TYPE = null operation ===> (82) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -81 TYPE = scalar variable ===> 82 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (84) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -83 TYPE = scalar variable ===> 84 - FLAGS = (SCALAR) - GV = main::ST_ATIME - } - } - } - { -85 TYPE = next statement ===> 86 - LINE = 17 - } - { -90 TYPE = scalar assignment ===> 91 - FLAGS = (SCALAR,KIDS,STACKED) - { -88 TYPE = addition ===> 89 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -86 TYPE = constant item ===> 87 - FLAGS = (SCALAR) - SV = IV(9) - } - { - TYPE = null operation ===> (88) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -87 TYPE = scalar variable ===> 88 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (90) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -89 TYPE = scalar variable ===> 90 - FLAGS = (SCALAR) - GV = main::ST_MTIME - } - } - } - { -91 TYPE = next statement ===> 92 - LINE = 18 - } - { -96 TYPE = scalar assignment ===> 97 - FLAGS = (SCALAR,KIDS,STACKED) - { -94 TYPE = addition ===> 95 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -92 TYPE = constant item ===> 93 - FLAGS = (SCALAR) - SV = IV(10) - } - { - TYPE = null operation ===> (94) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS) - { -93 TYPE = scalar variable ===> 94 - FLAGS = (SCALAR) - GV = main::[ - } - } - } - { - TYPE = null operation ===> (96) - (was ref-to-scalar cast) - FLAGS = (SCALAR,KIDS,LVAL,SPECIAL) - { -95 TYPE = scalar variable ===> 96 - FLAGS = (SCALAR) - GV = main::ST_CTIME - } - } - } - { -97 TYPE = next statement ===> 98 - LINE = 19 - } - { -102 TYPE = scalar assignment ===> 103 - FLAGS = (SCALAR,KIDS,STACKED) - { -100 TYPE = addition ===> 101 - TARG = 1 - FLAGS = (SCALAR,KIDS) - { -98 TYPE = constant item ===> 99 - FLAGS = (SCALAR) - SV = IV(11) - } diff --git a/bar.pm b/bar.pm deleted file mode 100755 index 330c168f11..0000000000 --- a/bar.pm +++ /dev/null @@ -1,10 +0,0 @@ -#!./perl - -print ""; -@c = caller; -print "@c"; -__END__ - -require POSIX; import POSIX getpid; - -print &getpid, "\n"; diff --git a/byacc b/byacc new file mode 120000 index 0000000000..14034ef03e --- /dev/null +++ b/byacc @@ -0,0 +1 @@ +../perl-byacc1.8.2/byacc \ No newline at end of file diff --git a/client b/client deleted file mode 100755 index 5900c90d09..0000000000 --- a/client +++ /dev/null @@ -1,34 +0,0 @@ -#!./perl - -$pat = 'S n C4 x8'; -$inet = 2; -$echo = 7; -$smtp = 25; -$nntp = 119; -$test = 2345; - -$SIG{'INT'} = 'dokill'; - -$this = pack($pat,$inet,0, 128,149,13,43); -$that = pack($pat,$inet,$test,127,0,0,1); - -if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; } -if (bind(S,$this)) { print "bind ok\n"; } else { die $!; } -if (connect(S,$that)) { print "connect ok\n"; } else { die $!; } - -select(S); $| = 1; select(stdout); - -if ($child = fork) { - while () { - print S; - } - sleep 3; - do dokill(); -} -else { - while () { - print; - } -} - -sub dokill { kill 9,$child if $child; } diff --git a/config.H b/config.H index d3a0e57208..22594b7568 100644 --- a/config.H +++ b/config.H @@ -1,112 +1,87 @@ -#ifndef config_h -#define config_h -/* config.h - * This file was produced by running the config.h.SH script, which +/* config.H: This is a sample config.h file. config.h is produced + from config_h.SH by Configure. This file is intended only for + those having problems with the regular Configure process. +*/ +/* + * This file was produced by running the config_h.SH script, which * gets its values from config.sh, which is generally produced by * running Configure. * * Feel free to modify any of this as the need arises. Note, however, * that running config.h.SH again will wipe out any changes you've made. * For a more permanent change edit config.sh and rerun config.h.SH. + * + * $Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $ */ - /*SUPPRESS 460*/ - - -/* EUNICE - * This symbol, if defined, indicates that the program is being compiled - * under the EUNICE package under VMS. The program will need to handle - * things like files that don't go away the first time you unlink them, - * due to version numbering. It will also need to compensate for lack - * of a respectable link() command. - */ -/* VMS - * This symbol, if defined, indicates that the program is running under - * VMS. It is currently only set in conjunction with the EUNICE symbol. - */ -/*#undef EUNICE /**/ -/*#undef VMS /**/ -/* LOC_SED - * This symbol holds the complete pathname to the sed program. +/* Configuration time: Thu Apr 28 11:13:38 EDT 1994 + * Configured by: doughera + * Target system: sunos einstein 4.1.3 3 sun4c */ -#define LOC_SED "/bin/sed" /**/ -/* ALIGNBYTES - * This symbol contains the number of bytes required to align a double. - * Usual values are 2, 4, and 8. - */ -#define ALIGNBYTES 8 /**/ +#ifndef _config_h_ +#define _config_h_ -/* BIN - * This symbol holds the name of the directory in which the user wants - * to keep publicly executable images for the package in question. It - * is most often a local directory such as /usr/local/bin. +/* BIN: + * This symbol holds the path of the bin directory where the package will + * be installed. Program must be prepared to deal with ~name substitution. */ -#define BIN "/usr/local/bin" /**/ +#define BIN "/usr/local/bin" /**/ -/* BYTEORDER - * This symbol contains an encoding of the order of bytes in a long. - * Usual values (in hex) are 0x1234, 0x4321, 0x2143, 0x3412... +/* BYTEORDER: + * This symbol hold the hexadecimal constant defined in byteorder, + * i.e. 0x1234 or 0x4321, etc... */ -#define BYTEORDER 0x4321 /**/ +#define BYTEORDER 0x4321 /* large digits for MSB */ -/* CPPSTDIN +/* CPPSTDIN: * This symbol contains the first part of the string which will invoke * the C preprocessor on the standard input and produce to standard - * output. Typical value of "cc -E" or "/lib/cpp". + * output. Typical value of "cc -E" or "/lib/cpp", but it can also + * call a wrapper. See CPPRUN. */ -/* CPPMINUS +/* CPPMINUS: * This symbol contains the second part of the string which will invoke * the C preprocessor on the standard input and produce to standard * output. This symbol will have the value "-" if CPPSTDIN needs a minus * to specify standard input, otherwise the value is "". */ -#define CPPSTDIN "/usr/lib/cpp" +#define CPPSTDIN "/home/doughera/src/perl5a8-ad/cppstdin" #define CPPMINUS "" -/* HAS_BCMP - * This symbol, if defined, indicates that the bcmp routine is available - * to compare blocks of memory. If undefined, use memcmp. If that's - * not available, roll your own. +/* HAS_BCMP: + * This symbol is defined if the bcmp() routine is available to + * compare blocks of memory. */ -#define HAS_BCMP /**/ +#define HAS_BCMP /**/ -/* HAS_BCOPY - * This symbol, if defined, indicates that the bcopy routine is available - * to copy blocks of memory. Otherwise you should probably use memcpy(). - * If neither is defined, roll your own. - */ -/* SAFE_BCOPY - * This symbol, if defined, indicates that the bcopy routine is available - * to copy potentially overlapping copy blocks of bcopy. Otherwise you - * should probably use memmove() or memcpy(). If neither is defined, - * roll your own. +/* HAS_BCOPY: + * This symbol is defined if the bcopy() routine is available to + * copy blocks of memory. */ -#define HAS_BCOPY /**/ -#define SAFE_BCOPY /**/ +#define HAS_BCOPY /**/ -/* HAS_BZERO - * This symbol, if defined, indicates that the bzero routine is available - * to zero blocks of memory. Otherwise you should probably use memset() - * or roll your own. +/* HAS_BZERO: + * This symbol is defined if the bzero() routine is available to + * set a memory block to 0. */ -#define HAS_BZERO /**/ +#define HAS_BZERO /**/ -/* CASTNEGFLOAT - * This symbol, if defined, indicates that this C compiler knows how to - * cast negative or large floating point numbers to unsigned longs, ints - * and shorts. +/* CASTNEGFLOAT: + * This symbol is defined if the C compiler can cast negative + * numbers to unsigned longs, ints and shorts. */ -/* CASTFLAGS +/* CASTFLAGS: * This symbol contains flags that say what difficulties the compiler * has casting odd floating values to unsigned long: + * 0 = ok * 1 = couldn't cast < 0 * 2 = couldn't cast >= 0x80000000 */ -#define CASTNEGFLOAT /**/ -#define CASTFLAGS 0 /**/ +#define CASTNEGFLOAT /**/ +#define CASTFLAGS 0 /**/ -/* CHARSPRINTF +/* CHARSPRINTF: * This symbol is defined if this system declares "char *sprintf()" in * stdio.h. The trend seems to be to declare it as "int sprintf()". It * is up to the package author to declare sprintf correctly based on the @@ -114,25 +89,36 @@ */ #define CHARSPRINTF /**/ -/* HAS_CHSIZE +/* HAS_CHSIZE: * This symbol, if defined, indicates that the chsize routine is available * to truncate files. You might need a -lx to get this routine. */ -/*#undef HAS_CHSIZE /**/ +/*#define HAS_CHSIZE /**/ + +/* HASCONST: + * This symbol, if defined, indicates that this C compiler knows about + * the const type. There is no need to actually test for that symbol + * within your programs. The mere use of the "const" keyword will + * trigger the necessary tests. + */ +/*#define HASCONST /**/ +#ifndef HASCONST +#define const +#endif -/* HAS_CRYPT +/* HAS_CRYPT: * This symbol, if defined, indicates that the crypt routine is available * to encrypt passwords and the like. */ -#define HAS_CRYPT /**/ +#define HAS_CRYPT /**/ -/* CSH +/* CSH: * This symbol, if defined, indicates that the C-shell exists. * If defined, contains the full pathname of csh. */ -#define CSH "/bin/csh" /**/ +#define CSH "/usr/bin/csh" /**/ -/* DOSUID +/* DOSUID: * This symbol, if defined, indicates that the C program should * check the script that it is executing for setuid/setgid bits, and * attempt to emulate setuid/setgid on systems that have disabled @@ -145,698 +131,916 @@ * subprocesses to which it must pass the filename rather than the * file descriptor of the script to be executed. */ -/*#undef DOSUID /**/ +/*#define DOSUID /**/ -/* HAS_DUP2 - * This symbol, if defined, indicates that the dup2 routine is available - * to dup file descriptors. Otherwise you should use dup(). +/* HAS_DUP2: + * This symbol, if defined, indicates that the dup2 routine is + * available to duplicate file descriptors. */ -#define HAS_DUP2 /**/ +#define HAS_DUP2 /**/ -/* HAS_FCHMOD +/* HAS_FCHMOD: * This symbol, if defined, indicates that the fchmod routine is available * to change mode of opened files. If unavailable, use chmod(). */ -#define HAS_FCHMOD /**/ +#define HAS_FCHMOD /**/ -/* HAS_FCHOWN +/* HAS_FCHOWN: * This symbol, if defined, indicates that the fchown routine is available * to change ownership of opened files. If unavailable, use chown(). */ -#define HAS_FCHOWN /**/ +#define HAS_FCHOWN /**/ -/* HAS_FCNTL +/* HAS_FCNTL: * This symbol, if defined, indicates to the C program that * the fcntl() function exists. */ -#define HAS_FCNTL /**/ +#define HAS_FCNTL /**/ -/* FLEXFILENAMES +/* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #define FLEXFILENAMES /**/ -/* HAS_FLOCK - * This symbol, if defined, indicates that the flock() routine is +/* HAS_FLOCK: + * This symbol, if defined, indicates that the flock routine is * available to do file locking. */ -#define HAS_FLOCK /**/ +#define HAS_FLOCK /**/ -/* HAS_GETGROUPS +/* HAS_GETGROUPS: * This symbol, if defined, indicates that the getgroups() routine is * available to get the list of process groups. If unavailable, multiple * groups are probably not supported. */ -#define HAS_GETGROUPS /**/ +#define HAS_GETGROUPS /**/ -/* HAS_GETHOSTENT - * This symbol, if defined, indicates that the gethostent() routine is +/* HAS_GETHOSTENT: + * This symbol, if defined, indicates that the gethostent routine is * available to lookup host names in some data base or other. */ -#define HAS_GETHOSTENT /**/ +#define HAS_GETHOSTENT /**/ + +/* HAS_UNAME: + * This symbol, if defined, indicates that the C program may use the + * uname() routine to derive the host name. See also HAS_GETHOSTNAME + * and PHOSTNAME. + */ +#define HAS_UNAME /**/ -/* HAS_GETPGRP - * This symbol, if defined, indicates that the getpgrp() routine is +/* HAS_GETPGRP: + * This symbol, if defined, indicates that the getpgrp routine is * available to get the current process group. */ -#define HAS_GETPGRP /**/ +#define HAS_GETPGRP /**/ -/* HAS_GETPGRP2 +/* HAS_GETPGRP2: * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX) * routine is available to get the current process group. */ -/*#undef HAS_GETPGRP2 /**/ +/*#define HAS_GETPGRP2 /**/ -/* HAS_GETPRIORITY - * This symbol, if defined, indicates that the getpriority() routine is +/* HAS_GETPRIORITY: + * This symbol, if defined, indicates that the getpriority routine is * available to get a process's priority. */ -#define HAS_GETPRIORITY /**/ - -/* HAS_HTONS - * This symbol, if defined, indicates that the htons routine (and friends) - * are available to do network order byte swapping. - */ -/* HAS_HTONL - * This symbol, if defined, indicates that the htonl routine (and friends) - * are available to do network order byte swapping. - */ -/* HAS_NTOHS - * This symbol, if defined, indicates that the ntohs routine (and friends) - * are available to do network order byte swapping. - */ -/* HAS_NTOHL - * This symbol, if defined, indicates that the ntohl routine (and friends) - * are available to do network order byte swapping. - */ -#define HAS_HTONS /**/ -#define HAS_HTONL /**/ -#define HAS_NTOHS /**/ -#define HAS_NTOHL /**/ +#define HAS_GETPRIORITY /**/ -/* index - * This preprocessor symbol is defined, along with rindex, if the system - * uses the strchr and strrchr routines instead. - */ -/* rindex - * This preprocessor symbol is defined, along with index, if the system - * uses the strchr and strrchr routines instead. - */ -/*#undef index strchr /* cultural */ -/*#undef rindex strrchr /* differences? */ - -/* HAS_ISASCII - * This symbol, if defined, indicates that the isascii routine is available - * to test characters for asciiness. - */ -#define HAS_ISASCII /**/ - -/* HAS_KILLPG +/* HAS_KILLPG: * This symbol, if defined, indicates that the killpg routine is available * to kill process groups. If unavailable, you probably should use kill * with a negative process number. */ -#define HAS_KILLPG /**/ +#define HAS_KILLPG /**/ -/* HAS_LSTAT - * This symbol, if defined, indicates that the lstat() routine is - * available to stat symbolic links. +/* HAS_LINK: + * This symbol, if defined, indicates that the link routine is + * available to create hard links. */ -#define HAS_LSTAT /**/ +#define HAS_LINK /**/ -/* HAS_MEMCMP - * This symbol, if defined, indicates that the memcmp routine is available - * to compare blocks of memory. If undefined, roll your own. +/* HAS_LSTAT: + * This symbol, if defined, indicates that the lstat routine is + * available to do file stats on symbolic links. */ -#define HAS_MEMCMP /**/ +#define HAS_LSTAT /**/ -/* HAS_MEMCPY - * This symbol, if defined, indicates that the memcpy routine is available - * to copy blocks of memory. Otherwise you should probably use bcopy(). - * If neither is defined, roll your own. +/* HAS_MEMCMP: + * This symbol, if defined, indicates that the memcmp routine is available + * to compare blocks of memory. */ -/* SAFE_MEMCPY +#define HAS_MEMCMP /**/ + +/* HAS_MEMCPY: * This symbol, if defined, indicates that the memcpy routine is available - * to copy potentially overlapping copy blocks of memory. Otherwise you - * should probably use memmove() or bcopy(). If neither is defined, - * roll your own. + * to copy blocks of memory. */ -#define HAS_MEMCPY /**/ -/*#undef SAFE_MEMCPY /**/ +#define HAS_MEMCPY /**/ -/* HAS_MEMMOVE +/* HAS_MEMMOVE: * This symbol, if defined, indicates that the memmove routine is available - * to move potentially overlapping blocks of memory. Otherwise you - * should use bcopy() or roll your own. + * to copy potentially overlapping blocks of memory. This should be used + * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your + * own version. */ -/*#undef HAS_MEMMOVE /**/ +/*#define HAS_MEMMOVE /**/ -/* HAS_MEMSET +/* HAS_MEMSET: * This symbol, if defined, indicates that the memset routine is available - * to set a block of memory to a character. If undefined, roll your own. + * to set blocks of memory. */ -#define HAS_MEMSET /**/ +#define HAS_MEMSET /**/ -/* HAS_MKDIR +/* HAS_MKDIR: * This symbol, if defined, indicates that the mkdir routine is available * to create directories. Otherwise you should fork off a new process to * exec /bin/mkdir. */ -#define HAS_MKDIR /**/ +#define HAS_MKDIR /**/ -/* HAS_MSG +/* HAS_MSG: * This symbol, if defined, indicates that the entire msg*(2) library is - * supported. + * supported (IPC mechanism based on message queues). */ -#define HAS_MSG /**/ +#define HAS_MSG /**/ -/* HAS_MSGCTL +/* HAS_MSGCTL: * This symbol, if defined, indicates that the msgctl() routine is - * available to control message passing. + * available to perform message control operations. */ -#define HAS_MSGCTL /**/ +#define HAS_MSGCTL /**/ -/* HAS_MSGGET +/* HAS_MSGGET: * This symbol, if defined, indicates that the msgget() routine is - * available to get messages. + * available to get a new message queue. */ -#define HAS_MSGGET /**/ +#define HAS_MSGGET /**/ -/* HAS_MSGRCV +/* HAS_MSGRCV: * This symbol, if defined, indicates that the msgrcv() routine is - * available to receive messages. + * available to extract a message from the message queue. */ -#define HAS_MSGRCV /**/ +#define HAS_MSGRCV /**/ -/* HAS_MSGSND +/* HAS_MSGSND: * This symbol, if defined, indicates that the msgsnd() routine is - * available to send messages. - */ -#define HAS_MSGSND /**/ - -/* HAS_NDBM - * This symbol, if defined, indicates that ndbm.h exists and should - * be included. - */ -#define HAS_NDBM /**/ - -/* HAS_ODBM - * This symbol, if defined, indicates that dbm.h exists and should - * be included. + * available to send a message into the message queue. */ -#define HAS_ODBM /**/ +#define HAS_MSGSND /**/ -/* HAS_OPEN3 +/* HAS_OPEN3: * This manifest constant lets the C program know that the three * argument form of open(2) is available. */ -#define HAS_OPEN3 /**/ +#define HAS_OPEN3 /**/ -/* HAS_READDIR - * This symbol, if defined, indicates that the readdir routine is available - * from the C library to read directories. - */ -#define HAS_READDIR /**/ - -/* HAS_RENAME +/* HAS_RENAME: * This symbol, if defined, indicates that the rename routine is available * to rename files. Otherwise you should do the unlink(), link(), unlink() * trick. */ -#define HAS_RENAME /**/ +#define HAS_RENAME /**/ -/* HAS_REWINDDIR - * This symbol, if defined, indicates that the rewindir routine is - * available to rewind directories. +/* HAS_RMDIR: + * This symbol, if defined, indicates that the rmdir routine is + * available to remove directories. Otherwise you should fork off a + * new process to exec /bin/rmdir. */ -#define HAS_REWINDDIR /**/ +#define HAS_RMDIR /**/ -/* HAS_RMDIR - * This symbol, if defined, indicates that the rmdir routine is available - * to remove directories. Otherwise you should fork off a new process to - * exec /bin/rmdir. - */ -#define HAS_RMDIR /**/ - -/* HAS_SEEKDIR - * This symbol, if defined, indicates that the seekdir routine is - * available to seek into directories. +/* HAS_SELECT: + * This symbol, if defined, indicates that the select routine is + * available to select active file descriptors. If the timeout field + * is used, may need to be included. */ -#define HAS_SEEKDIR /**/ +#define HAS_SELECT /**/ -/* HAS_SELECT - * This symbol, if defined, indicates that the select() subroutine - * exists. - */ -#define HAS_SELECT /**/ - -/* HAS_SEM +/* HAS_SEM: * This symbol, if defined, indicates that the entire sem*(2) library is * supported. */ -#define HAS_SEM /**/ +#define HAS_SEM /**/ -/* HAS_SEMCTL +/* HAS_SEMCTL: * This symbol, if defined, indicates that the semctl() routine is - * available to control semaphores. + * available to perform semaphore control operations. */ -#define HAS_SEMCTL /**/ +#define HAS_SEMCTL /**/ -/* HAS_SEMGET +/* HAS_SEMGET: * This symbol, if defined, indicates that the semget() routine is - * available to get semaphores ids. + * available to get a set of semaphores. */ -#define HAS_SEMGET /**/ +#define HAS_SEMGET /**/ -/* HAS_SEMOP +/* HAS_SEMOP: * This symbol, if defined, indicates that the semop() routine is - * available to perform semaphore operations. + * available to execute semaphore operations. */ -#define HAS_SEMOP /**/ +#define HAS_SEMOP /**/ -/* HAS_SETEGID +/* HAS_SETEGID: * This symbol, if defined, indicates that the setegid routine is available * to change the effective gid of the current program. */ -#define HAS_SETEGID /**/ +#define HAS_SETEGID /**/ -/* HAS_SETEUID +/* HAS_SETEUID: * This symbol, if defined, indicates that the seteuid routine is available * to change the effective uid of the current program. */ -#define HAS_SETEUID /**/ +#define HAS_SETEUID /**/ + +/* HAS_SETPGID: + * This symbol, if defined, indicates that the setpgid routine is + * available to set process group ID. + */ +#define HAS_SETPGID /**/ -/* HAS_SETPGRP - * This symbol, if defined, indicates that the setpgrp() routine is +/* HAS_SETPGRP: + * This symbol, if defined, indicates that the setpgrp routine is * available to set the current process group. */ -#define HAS_SETPGRP /**/ +#define HAS_SETPGRP /**/ -/* HAS_SETPGRP2 +/* HAS_SETPGRP2: * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX) * routine is available to set the current process group. */ -/*#undef HAS_SETPGRP2 /**/ +/*#define HAS_SETPGRP2 /**/ -/* HAS_SETPRIORITY - * This symbol, if defined, indicates that the setpriority() routine is +/* HAS_SETPRIORITY: + * This symbol, if defined, indicates that the setpriority routine is * available to set a process's priority. */ -#define HAS_SETPRIORITY /**/ +#define HAS_SETPRIORITY /**/ -/* HAS_SETREGID +/* HAS_SETREGID: * This symbol, if defined, indicates that the setregid routine is - * available to change the real and effective gid of the current program. + * available to change the real and effective gid of the current + * process. */ -/* HAS_SETRESGID +/* HAS_SETRESGID: * This symbol, if defined, indicates that the setresgid routine is * available to change the real, effective and saved gid of the current - * program. + * process. */ -#define HAS_SETREGID /**/ -/*#undef HAS_SETRESGID /**/ +#define HAS_SETREGID /**/ +/*#define HAS_SETRESGID /**/ -/* HAS_SETREUID +/* HAS_SETREUID: * This symbol, if defined, indicates that the setreuid routine is - * available to change the real and effective uid of the current program. + * available to change the real and effective uid of the current + * process. */ -/* HAS_SETRESUID +/* HAS_SETRESUID: * This symbol, if defined, indicates that the setresuid routine is * available to change the real, effective and saved uid of the current - * program. + * process. */ -#define HAS_SETREUID /**/ -/*#undef HAS_SETRESUID /**/ +#define HAS_SETREUID /**/ +/*#define HAS_SETRESUID /**/ -/* HAS_SETRGID +/* HAS_SETRGID: * This symbol, if defined, indicates that the setrgid routine is available * to change the real gid of the current program. */ -#define HAS_SETRGID /**/ +#define HAS_SETRGID /**/ -/* HAS_SETRUID +/* HAS_SETRUID: * This symbol, if defined, indicates that the setruid routine is available * to change the real uid of the current program. */ -#define HAS_SETRUID /**/ +#define HAS_SETRUID /**/ -/* HAS_SHM - * This symbol, if defined, indicates that the entire shm*(2) library is - * supported. +/* HAS_SETSID: + * This symbol, if defined, indicates that the setsid routine is + * available to set the process group ID. */ -#define HAS_SHM /**/ +#define HAS_SETSID /**/ -/* HAS_SHMAT - * This symbol, if defined, indicates that the shmat() routine is - * available to attach a shared memory segment. - */ -/* VOID_SHMAT - * This symbol, if defined, indicates that the shmat() routine - * returns a pointer of type void*. +/* HAS_SHM: + * This symbol, if defined, indicates that the entire shm*(2) library is + * supported. */ -#define HAS_SHMAT /**/ +#define HAS_SHM /**/ -/*#undef VOIDSHMAT /**/ - -/* HAS_SHMCTL +/* HAS_SHMCTL: * This symbol, if defined, indicates that the shmctl() routine is - * available to control a shared memory segment. + * available to perform shared memory control operations. */ -#define HAS_SHMCTL /**/ +#define HAS_SHMCTL /**/ -/* HAS_SHMDT +/* HAS_SHMDT: * This symbol, if defined, indicates that the shmdt() routine is - * available to detach a shared memory segment. + * available to detach a shared memory segment from the process space. */ -#define HAS_SHMDT /**/ +#define HAS_SHMDT /**/ -/* HAS_SHMGET +/* HAS_SHMGET: * This symbol, if defined, indicates that the shmget() routine is - * available to get a shared memory segment id. + * available to request a shared memory segment from the kernel. */ -#define HAS_SHMGET /**/ +#define HAS_SHMGET /**/ -/* HAS_SOCKET +/* HAS_SOCKET: * This symbol, if defined, indicates that the BSD socket interface is * supported. */ -/* HAS_SOCKETPAIR - * This symbol, if defined, indicates that the BSD socketpair call is +/* HAS_SOCKETPAIR: + * This symbol, if defined, indicates that the BSD socketpair() call is * supported. */ -/* OLDSOCKET +/* USE_OLDSOCKET: * This symbol, if defined, indicates that the 4.1c BSD socket interface - * is supported instead of the 4.2/4.3 BSD socket interface. + * is supported instead of the 4.2/4.3 BSD socket interface. For instance, + * there is no setsockopt() call. */ -#define HAS_SOCKET /**/ - -#define HAS_SOCKETPAIR /**/ +#define HAS_SOCKET /**/ +#define HAS_SOCKETPAIR /**/ +/*#define USE_OLDSOCKET /**/ -/*#undef OLDSOCKET /**/ - -/* STATBLOCKS +/* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. */ -#define STATBLOCKS /**/ +#define USE_STAT_BLOCKS /**/ -/* STDSTDIO +/* USE_STD_STDIO: * This symbol is defined if this system has a FILE structure declaring * _ptr and _cnt in stdio.h. */ -#define STDSTDIO /**/ +#define USE_STD_STDIO /**/ -/* STRUCTCOPY +/* USE_STRUCT_COPY: * This symbol, if defined, indicates that this C compiler knows how * to copy structures. If undefined, you'll need to use a block copy * routine of some sort instead. */ -#define STRUCTCOPY /**/ - -/* HAS_STRERROR - * This symbol, if defined, indicates that the strerror() routine is - * available to translate error numbers to strings. - */ -/*#undef HAS_STRERROR /**/ +#define USE_STRUCT_COPY /**/ -/* HAS_SYMLINK +/* HAS_SYMLINK: * This symbol, if defined, indicates that the symlink routine is available * to create symbolic links. */ -#define HAS_SYMLINK /**/ +#define HAS_SYMLINK /**/ -/* HAS_SYSCALL - * This symbol, if defined, indicates that the syscall routine is available - * to call arbitrary system calls. If undefined, that's tough. +/* HAS_SYSCALL: + * This symbol, if defined, indicates that the syscall routine is + * available to call arbitrary system calls. If undefined, that's tough. */ -#define HAS_SYSCALL /**/ +#define HAS_SYSCALL /**/ -/* HAS_TELLDIR - * This symbol, if defined, indicates that the telldir routine is - * available to tell your location in directories. +/* HAS_SYSTEM: + * This symbol, if defined, indicates that the system routine is + * available to issue a shell command. */ -#define HAS_TELLDIR /**/ +#define HAS_SYSTEM /**/ -/* HAS_TRUNCATE +/* Time_t: + * This symbol holds the type returned by time(). It can be long, + * or time_t on BSD sites (in which case should be + * included). + */ +#define Time_t long /* Time type */ + +/* HAS_TIMES: + * This symbol, if defined, indicates that the times() routine exists. + * Note that this became obsolete on some systems (SUNOS), which now + * use getrusage(). It may be necessary to include . + */ +#define HAS_TIMES /**/ + +/* HAS_TRUNCATE: * This symbol, if defined, indicates that the truncate routine is * available to truncate files. */ -#define HAS_TRUNCATE /**/ +#define HAS_TRUNCATE /**/ -/* HAS_VFORK - * This symbol, if defined, indicates that vfork() exists. +/* I_NDIR: + * This symbol, if defined, indicates that the program should include the + * system's version of ndir.h, rather than the one with this package. */ -#define HAS_VFORK /**/ +/*#define I_NDIR /**/ -/* VOIDSIG - * This symbol is defined if this system declares "void (*signal())()" in - * signal.h. The old way was to declare it as "int (*signal())()". It +/* VOIDSIG: + * This symbol is defined if this system declares "void (*signal(...))()" in + * signal.h. The old way was to declare it as "int (*signal(...))()". It * is up to the package author to declare things correctly based on the * symbol. */ -/* TO_SIGNAL - * This symbol's value is either "void" or "int", corresponding to the - * appropriate return "type" of a signal handler. Thus, one can declare - * a signal handler using "TO_SIGNAL (*handler())()", and define the - * handler using "TO_SIGNAL handler(sig)". - */ -#define VOIDSIG /**/ -#define TO_SIGNAL int /**/ +#define VOIDSIG /**/ -/* HASVOLATILE +/* HASVOLATILE: * This symbol, if defined, indicates that this C compiler knows about * the volatile declaration. */ -/*#undef HASVOLATILE /**/ +/*#define HASVOLATILE /**/ +#ifndef HASVOLATILE +#define volatile +#endif -/* HAS_VPRINTF +/* HAS_VPRINTF: * This symbol, if defined, indicates that the vprintf routine is available * to printf with a pointer to an argument list. If unavailable, you * may need to write your own, probably in terms of _doprnt(). */ -/* CHARVSPRINTF +/* USE_CHAR_VSPRINTF: * This symbol is defined if this system has vsprintf() returning type * (char*). The trend seems to be to declare it as "int vsprintf()". It * is up to the package author to declare vsprintf correctly based on the * symbol. */ -#define HAS_VPRINTF /**/ -#define CHARVSPRINTF /**/ +#define HAS_VPRINTF /**/ +#define USE_CHAR_VSPRINTF /**/ -/* HAS_WAIT4 +/* HAS_WAIT4: * This symbol, if defined, indicates that wait4() exists. */ -#define HAS_WAIT4 /**/ +#define HAS_WAIT4 /**/ -/* HAS_WAITPID - * This symbol, if defined, indicates that waitpid() exists. +/* HAS_WAITPID: + * This symbol, if defined, indicates that the waitpid routine is + * available to wait for child process. */ -#define HAS_WAITPID /**/ +#define HAS_WAITPID /**/ -/* GIDTYPE - * This symbol has a value like gid_t, int, ushort, or whatever type is - * used to declare group ids in the kernel. +/* I_DBM: + * This symbol, if defined, indicates to the C program that it should + * include . */ -#define GIDTYPE gid_t /**/ +#define I_DBM /**/ -/* GROUPSTYPE - * This symbol has a value like gid_t, int, ushort, or whatever type is - * used in the return value of getgroups(). +/* I_DIRENT: + * This symbol, if defined, indicates to the C program that it should + * include . Using this symbol also triggers the definition + * of the Direntry_t define which ends up being 'struct dirent' or + * 'struct direct' depending on the availability of . + */ +/* DIRNAMLEN: + * This symbol, if defined, indicates to the C program that the length + * of directory entry names is provided by a d_namlen field. Otherwise + * you need to do strlen() on the d_name field. */ -#define GROUPSTYPE int /**/ +#define I_DIRENT /**/ +/*#define DIRNAMLEN /**/ +#ifdef I_DIRENT +#define Direntry_t struct dirent +#else +#define Direntry_t struct direct +#endif -/* I_FCNTL +/* I_FCNTL: * This manifest constant tells the C program to include . */ -/*#undef I_FCNTL /**/ +/*#define I_FCNTL /**/ -/* I_GDBM +/* I_GDBM: * This symbol, if defined, indicates that gdbm.h exists and should * be included. */ -/*#undef I_GDBM /**/ +/*#define I_GDBM /**/ -/* I_GRP +/* I_GRP: * This symbol, if defined, indicates to the C program that it should - * include grp.h. + * include . */ -#define I_GRP /**/ +#define I_GRP /**/ -/* I_NETINET_IN - * This symbol, if defined, indicates to the C program that it should - * include netinet/in.h. - */ -/* I_SYS_IN - * This symbol, if defined, indicates to the C program that it should - * include sys/in.h. +/* I_NDBM: + * This symbol, if defined, indicates that ndbm.h exists and should + * be included. */ -#define I_NETINET_IN /**/ -/*#undef I_SYS_IN /**/ +#define I_NDBM /**/ -/* I_PWD +/* I_NETINET_IN: * This symbol, if defined, indicates to the C program that it should - * include pwd.h. - */ -/* PWQUOTA - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_quota. + * include . Otherwise, you may try . */ -/* PWAGE - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_age. +/* I_SYS_IN: + * This symbol, if defined, indicates to the C program that it should + * include instead of . */ -/* PWCHANGE - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_change. +#define I_NETINET_IN /**/ +/*#define I_SYS_IN /**/ + +/* I_STDARG: + * This symbol, if defined, indicates that exists and should + * be included. */ -/* PWCLASS - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_class. +/*#define I_STDARG /**/ + +/* I_STDDEF: + * This symbol, if defined, indicates that exists and should + * be included. */ -/* PWEXPIRE - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_expire. +#define I_STDDEF /**/ + +/* I_STRING: + * This symbol, if defined, indicates to the C program that it should + * include (USG systems) instead of (BSD systems). */ -/* PWCOMMENT - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_comment. +#define I_STRING /**/ + +/* I_SYS_DIR: + * This symbol, if defined, indicates to the C program that it should + * include . */ -#define I_PWD /**/ -/*#undef PWQUOTA /**/ -#define PWAGE /**/ -/*#undef PWCHANGE /**/ -/*#undef PWCLASS /**/ -/*#undef PWEXPIRE /**/ -#define PWCOMMENT /**/ +#define I_SYS_DIR /**/ -/* I_SYS_FILE - * This manifest constant tells the C program to include . +/* I_SYS_FILE: + * This symbol, if defined, indicates to the C program that it should + * include to get definition of R_OK and friends. */ -#define I_SYS_FILE /**/ +#define I_SYS_FILE /**/ -/* I_SYSIOCTL - * This symbol, if defined, indicates that sys/ioctl.h exists and should - * be included. +/* I_SYS_IOCTL: + * This symbol, if defined, indicates that exists and should + * be included. Otherwise, include or . */ -#define I_SYSIOCTL /**/ +#define I_SYS_IOCTL /**/ -/* I_TIME - * This symbol is defined if the program should include . +/* I_SYS_NDIR: + * This symbol, if defined, indicates to the C program that it should + * include . */ -/* I_SYS_TIME - * This symbol is defined if the program should include . +/*#define I_SYS_NDIR /**/ + +/* I_SYS_SELECT: + * This symbol, if defined, indicates to the C program that it should + * include in order to get definition of struct timeval. */ -/* SYSTIMEKERNEL - * This symbol is defined if the program should include - * with KERNEL defined. +/*#define I_SYS_SELECT /**/ + +/* I_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . */ -/* I_SYS_SELECT - * This symbol is defined if the program should include . +/* I_SYS_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . */ -/*#undef I_TIME /**/ -#define I_SYS_TIME /**/ -/*#undef SYSTIMEKERNEL /**/ -/*#undef I_SYS_SELECT /**/ - -/* I_UTIME +/* I_SYS_TIME_KERNEL: * This symbol, if defined, indicates to the C program that it should - * include utime.h. + * include with KERNEL defined. */ -#define I_UTIME /**/ +/*#define I_TIME /**/ +#define I_SYS_TIME /**/ +/*#define I_SYS_TIME_KERNEL /**/ -/* I_VARARGS +/* I_UTIME: * This symbol, if defined, indicates to the C program that it should - * include varargs.h. + * include . */ -#define I_VARARGS /**/ +#define I_UTIME /**/ -/* I_VFORK +/* I_VARARGS: * This symbol, if defined, indicates to the C program that it should - * include vfork.h. + * include . */ -#define I_VFORK /**/ +#define I_VARARGS /**/ -/* INTSIZE +/* INTSIZE: * This symbol contains the size of an int, so that the C preprocessor * can make decisions based on it. */ #define INTSIZE 4 /**/ -/* I_DIRENT - * This symbol, if defined, indicates that the program should use the - * P1003-style directory routines, and include . +/* Off_t: + * This symbol holds the type used to declare offsets in the kernel. + * It can be int, long, off_t, etc... It may be necessary to include + * to get any typedef'ed information. */ -/* I_SYS_DIR - * This symbol, if defined, indicates that the program should use the - * directory functions by including . +#define Off_t off_t /* type */ + +/* PRIVLIB: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. */ -/* I_NDIR - * This symbol, if defined, indicates that the program should include the - * system's version of ndir.h, rather than the one with this package. +#define PRIVLIB "/usr/local/lib/perl" /**/ + +/* RANDBITS: + * This symbol contains the number of bits of random number the rand() + * function produces. Usual values are 15, 16, and 31. */ -/* I_SYS_NDIR - * This symbol, if defined, indicates that the program should include the - * system's version of sys/ndir.h, rather than the one with this package. +#define RANDBITS 31 /**/ + +/* SCRIPTDIR: + * This symbol holds the name of the directory in which the user wants + * to put publicly executable scripts for the package in question. It + * is often a directory that is mounted across diverse architectures. + * Programs must be prepared to deal with ~name expansion. */ -/* I_MY_DIR - * This symbol, if defined, indicates that the program should compile - * the ndir.c code provided with the package. +#define SCRIPTDIR "/usr/local/bin" /**/ + +/* STDCHAR: + * This symbol is defined to be the type of char used in stdio.h. + * It has the values "unsigned char" or "char". */ -/* DIRNAMLEN - * This symbol, if defined, indicates to the C program that the length - * of directory entry names is provided by a d_namlen field. Otherwise - * you need to do strlen() on the d_name field. +#define STDCHAR unsigned char /**/ + +/* Uid_t: + * This symbol holds the type used to declare user ids in the kernel. + * It can be int, ushort, uid_t, etc... It may be necessary to include + * to get any typedef'ed information. */ -#define I_DIRENT /**/ -/*#undef I_SYS_DIR /**/ -/*#undef I_NDIR /**/ -/*#undef I_SYS_NDIR /**/ -/*#undef I_MY_DIR /**/ -/*#undef DIRNAMLEN /**/ +#define Uid_t uid_t /* UID type */ -/* MYMALLOC - * This symbol, if defined, indicates that we're using our own malloc. +/* EUNICE: + * This symbol, if defined, indicates that the program is being compiled + * under the EUNICE package under VMS. The program will need to handle + * things like files that don't go away the first time you unlink them, + * due to version numbering. It will also need to compensate for lack + * of a respectable link() command. */ -/* MALLOCPTRTYPE - * This symbol defines the kind of ptr returned by malloc and realloc. +/* VMS: + * This symbol, if defined, indicates that the program is running under + * VMS. It is currently only set in conjunction with the EUNICE symbol. */ -#define MYMALLOC /**/ +/*#define EUNICE /**/ +/*#define VMS /**/ -#define MALLOCPTRTYPE char /**/ +/* MEM_ALIGNBYTES: + * This symbol contains the number of bytes required to align a + * double. Usual values are 2, 4 and 8. + */ +#define MEM_ALIGNBYTES 8 /**/ +/* CASTI32: + * This symbol is defined if the C compiler can cast negative + * or large floating point numbers to 32-bit ints. + */ +#define CASTI32 /**/ -/* RANDBITS - * This symbol contains the number of bits of random number the rand() - * function produces. Usual values are 15, 16, and 31. +/* HAS_HTONL: + * This symbol, if defined, indicates that the htonl() routine (and + * friends htons() ntohl() ntohs()) are available to do network + * order byte swapping. */ -#define RANDBITS 31 /**/ +/* HAS_HTONS: + * This symbol, if defined, indicates that the htons() routine (and + * friends htonl() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHL: + * This symbol, if defined, indicates that the ntohl() routine (and + * friends htonl() htons() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHS: + * This symbol, if defined, indicates that the ntohs() routine (and + * friends htonl() htons() ntohl()) are available to do network + * order byte swapping. + */ +#define HAS_HTONL /**/ +#define HAS_HTONS /**/ +#define HAS_NTOHL /**/ +#define HAS_NTOHS /**/ -/* SCRIPTDIR - * This symbol holds the name of the directory in which the user wants - * to keep publicly executable scripts for the package in question. It - * is often a directory that is mounted across diverse architectures. +/* HAS_ISASCII: + * This manifest constant lets the C program know that the + * isascii is available. */ -#define SCRIPTDIR "/usr/local/bin" /**/ +#define HAS_ISASCII /**/ -/* SIG_NAME - * This symbol contains an list of signal names in order. +/* HAS_READDIR: + * This symbol, if defined, indicates that the readdir routine is + * available to read directory entries. You may have to include + * . See I_DIRENT. */ -#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","LOST","USR1","USR2" /**/ +#define HAS_READDIR /**/ -/* STDCHAR - * This symbol is defined to be the type of char used in stdio.h. - * It has the values "unsigned char" or "char". +/* HAS_SEEKDIR: + * This symbol, if defined, indicates that the seekdir routine is + * available. You may have to include . See I_DIRENT. */ -#define STDCHAR unsigned char /**/ +#define HAS_SEEKDIR /**/ + +/* HAS_TELLDIR: + * This symbol, if defined, indicates that the telldir routine is + * available. You may have to include . See I_DIRENT. + */ +#define HAS_TELLDIR /**/ + +/* HAS_REWINDDIR: + * This symbol, if defined, indicates that the rewinddir routine is + * available. You may have to include . See I_DIRENT. + */ +#define HAS_REWINDDIR /**/ + +/* HAS_SAFE_BCOPY: + * This symbol, if defined, indicates that the bcopy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +#define HAS_SAFE_BCOPY /**/ + +/* HAS_SAFE_MEMCPY: + * This symbol, if defined, indicates that the memcpy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +/*#define HAS_SAFE_MEMCPY /**/ -/* UIDTYPE - * This symbol has a value like uid_t, int, ushort, or whatever type is - * used to declare user ids in the kernel. +/* HAS_SETLOCALE: + * This symbol, if defined, indicates that the setlocale routine is + * available to handle locale-specific ctype implementations. */ -#define UIDTYPE uid_t /**/ +#define HAS_SETLOCALE /**/ -/* VOIDHAVE +/* HAS_SHMAT: + * This symbol, if defined, indicates that the shmat() routine is + * available to attach a shared memory segment to the process space. + */ +#define HAS_SHMAT /**/ + +/* VOIDSHMAT: + * This symbol, if defined, indicates that the shmat() routine + * returns a pointer of type void*. Otherwise, char* is assumed. + */ +/*#define VOIDSHMAT /**/ + +/* HAS_STRERROR: + * This symbol, if defined, indicates that the strerror routine is + * available to translate error numbers to strings. See the writeup + * of Strerror() in this file before you try to define your own. + */ +/* HAS_SYS_ERRLIST: + * This symbol, if defined, indicates that the sys_errlist array is + * available to translate error numbers to strings. The extern int + * sys_nerr gives the size of that table. + */ +/* Strerror: + * This preprocessor symbol is defined as a macro if strerror() is + * not available to translate error numbers to strings but sys_errlist[] + * array is there. + */ +/*#define HAS_STRERROR /**/ +#define HAS_SYS_ERRLIST /**/ +#ifdef HAS_STRERROR +# define Strerror strerror +#else +#define Strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/ +#endif + +/* HAS_VFORK: + * This symbol, if defined, indicates that vfork() exists. + */ +/*#define HAS_VFORK /**/ + +/* USE_DYNAMIC_LOADING: + * This symbol, if defined, indicates that dynamic loading of + * some sort is available. + */ +#define USE_DYNAMIC_LOADING /**/ + +/* Gid_t: + * This symbol holds the return type of getgid() and the type of + * argument to setrgid() and related functions. Typically, + * it is the type of group ids in the kernel. + * It can be int, ushort, uid_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Gid_t gid_t /* Type for getgid(), etc... */ + +/* GROUPSTYPE: + * This symbol holds the type used for the second argument to + * getgroups(). Usually, this is the same of gidtype, but + * sometimes it isn't. It can be int, ushort, uid_t, etc... + * It may be necessary to include to get any + * typedef'ed information. This is only required if you have + * getgroups(). + */ +#ifdef HAS_GETGROUPS +#define GROUPSTYPE int /* Type for 2nd arg to getgroups() */ +#endif + +/* I_DLFCN: + * This symbol, if defined, indicates that exists and should + * be included. + */ +#define I_DLFCN /**/ + +/* I_MEMORY: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#define I_MEMORY /**/ + +/* I_NET_ERRNO: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_NET_ERRNO /**/ + +/* I_PWD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* PWQUOTA: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_quota. + */ +/* PWAGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_age. + */ +/* PWCHANGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_change. + */ +/* PWCLASS: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_class. + */ +/* PWEXPIRE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_expire. + */ +/* PWCOMMENT: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_comment. + */ +#define I_PWD /**/ +/*#define PWQUOTA /**/ +#define PWAGE /**/ +/*#define PWCHANGE /**/ +/*#define PWCLASS /**/ +/*#define PWEXPIRE /**/ +#define PWCOMMENT /**/ + +/* I_TERMIO: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/* I_TERMIOS: + * This symbol, if defined, indicates that the program should include + * the POSIX termios.h rather than sgtty.h or termio.h. + * There are also differences in the ioctl() calls that depend on the + * value of this symbol. + */ +/* I_SGTTY: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/*#define I_TERMIO /**/ +#define I_TERMIOS /**/ +/*#define I_SGTTY /**/ + +/* I_VFORK: + * This symbol, if defined, indicates to the C program that it should + * include vfork.h. + */ +/*#define I_VFORK /**/ + +/* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */ +#define LOC_SED "/usr/bin/sed" /**/ + +/* Malloc_t: + * This symbol is the type of pointer returned by malloc and realloc. + */ +#define Malloc_t char * /**/ + +/* MYMALLOC: + * This symbol, if defined, indicates that we're using our own malloc. + */ +#define MYMALLOC /**/ + +/* CAN_PROTOTYPE: + * If defined, this macro indicates that the C compiler can handle + * function prototypes. + */ +/*#define CAN_PROTOTYPE /**/ +#ifdef CAN_PROTOTYPE +#else +#endif + +/* PTRSIZE: + * This symbol contains the size of a pointer to a long so that + * the C preprocessor can make decisions based on it. + */ +#define PTRSIZE 4 /**/ + +/* SIG_NAME: + * This symbol contains a list of signal names in order. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + */ +#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","LOST","USR1","USR2" /**/ + +/* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: * @@ -844,49 +1048,95 @@ * 2 = supports arrays of pointers to functions returning void * 4 = supports comparisons between pointers to void functions and * addresses of void functions + * 8 = suports declaration of generic void pointers * - * The package designer should define VOIDWANT to indicate the requirements - * of the package. This can be done either by #defining VOIDWANT before - * including config.h, or by defining voidwant in Myinit.U. If the level - * of void support necessary is not present, config.h defines void to "int", - * VOID to the empty string, and VOIDP to "char *". - */ -/* void - * This symbol is used for void casts. On implementations which support - * void appropriately, its value is "void". Otherwise, its value maps - * to "int". - */ -/* VOID - * This symbol's value is "void" if the implementation supports void - * appropriately. Otherwise, its value is the empty string. The primary - * use of this symbol is in specifying void parameter lists for function - * prototypes. - */ -/* VOIDP - * This symbol is used for casting generic pointers. On implementations - * which support void appropriately, its value is "void *". Otherwise, - * its value is "char *". - */ -#ifndef VOIDWANT -#define VOIDWANT 7 + * The package designer should define VOIDUSED to indicate the requirements + * of the package. This can be done either by #defining VOIDUSED before + * including config.h, or by defining defvoidused in Myinit.U. If the + * latter approach is taken, only those flags will be tested. If the + * level of void support necessary is not present, defines void to int. + */ +#ifndef VOIDUSED +# define VOIDUSED 15 #endif -#define VOIDHAVE 7 -#if (VOIDHAVE & VOIDWANT) != VOIDWANT -#define void int /* is void to be avoided? */ -#define VOID -#define VOIDP (char *) -#define M_VOID /* Xenix strikes again */ +#define VOIDFLAGS 15 +#if (VOIDFLAGS & VOIDUSED) != VOIDUSED +# define void int /* is void to be avoided? */ +# define M_VOID /* Xenix strikes again */ +# define VOID #else -#define VOID void -#define VOIDP (void *) +# define VOID void #endif -/* PRIVLIB - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. +/* + * The following symbols are obsolete. They are mapped to the the new + * symbols only to ease the transition process. The sources should be + * updated so as to use the new symbols only, as the support for these + * obsolete symbols may end without notice. */ -#define PRIVLIB "/usr/local/lib/perl" /**/ + +#ifdef MEM_ALIGNBYTES +#define ALIGNBYTES MEM_ALIGNBYTES +#endif + +#ifdef USE_CHAR_VSPRINTF +#define CHARVSPRINTF USE_CHAR_VSPRINTF +#endif + +#ifdef Gid_t +#define GIDTYPE Gid_t +#endif + +#ifdef I_GDBM +#define HAS_GDBM I_GDBM +#endif + +#ifdef I_NDBM +#define HAS_NDBM I_NDBM +#endif + +#ifdef I_DBM +#define HAS_ODBM I_DBM +#endif + +#ifdef I_SYS_IOCTL +#define I_SYSIOCTL I_SYS_IOCTL +#endif + +#ifdef Malloc_t +#define MALLOCPTRTYPE Malloc_t +#endif + +#ifdef USE_OLDSOCKET +#define OLDSOCKET USE_OLDSOCKET +#endif + +#ifdef HAS_SAFE_BCOPY +#define SAFE_BCOPY HAS_SAFE_BCOPY +#endif + +#ifdef HAS_SAFE_MEMCPY +#define SAFE_MEMCPY HAS_SAFE_MEMCPY +#endif + +#ifdef USE_STAT_BLOCKS +#define STATBLOCKS USE_STAT_BLOCKS +#endif + +#ifdef USE_STD_STDIO +#define STDSTDIO USE_STD_STDIO +#endif + +#ifdef USE_STRUCT_COPY +#define STRUCTCOPY USE_STRUCT_COPY +#endif + +#ifdef Uid_t +#define UIDTYPE Uid_t +#endif + +#ifdef HAS_SYSTEM +#define SYSTEM HAS_SYSTEM +#endif #endif diff --git a/config.h b/config.h index be6ef1c378..d4252a3d22 100644 --- a/config.h +++ b/config.h @@ -10,7 +10,7 @@ * $Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $ */ -/* Configuration time: Mon Apr 4 15:17:26 PDT 1994 +/* Configuration time: Wed May 4 15:10:39 PDT 1994 * Configured by: lwall * Target system: sunos scalpel 4.1.3 3 sun4c */ @@ -18,31 +18,6 @@ #ifndef _config_h_ #define _config_h_ -/* EUNICE: - * This symbol, if defined, indicates that the program is being compiled - * under the EUNICE package under VMS. The program will need to handle - * things like files that don't go away the first time you unlink them, - * due to version numbering. It will also need to compensate for lack - * of a respectable link() command. - */ -/* VMS: - * This symbol, if defined, indicates that the program is running under - * VMS. It is currently only set in conjunction with the EUNICE symbol. - */ -/* BSD: - * This symbol, if defined, indicates that the program is running under - * a BSD system. - */ -/*#define EUNICE /**/ -/*#define VMS /**/ -#define BSD /**/ - -/* ALIGNBYTES: - * This symbol contains the number of bytes required to align a - * double. Usual values are 2, 4 and 8. - */ -#define ALIGNBYTES 8 /**/ - /* BIN: * This symbol holds the path of the bin directory where the package will * be installed. Program must be prepared to deal with ~name substitution. @@ -67,7 +42,7 @@ * output. This symbol will have the value "-" if CPPSTDIN needs a minus * to specify standard input, otherwise the value is "". */ -#define CPPSTDIN "/tmp_mnt/vol/src/local/lwall/perl5/cppstdin" +#define CPPSTDIN "/tmp_mnt/net/vaccine/export/src/local/lwall/perl5/cppstdin" #define CPPMINUS "" /* HAS_BCMP: @@ -137,7 +112,7 @@ * This symbol, if defined, indicates that the C-shell exists. * If defined, contains the full pathname of csh. */ -/*#define CSH "csh" /**/ +#define CSH "/bin/csh" /**/ /* DOSUID: * This symbol, if defined, indicates that the C program should @@ -228,31 +203,6 @@ */ #define HAS_GETPRIORITY /**/ -/* HAS_HTONL: - * This symbol, if defined, indicates that the htonl() routine (and - * friends htons() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_HTONS: - * This symbol, if defined, indicates that the htons() routine (and - * friends htonl() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHL: - * This symbol, if defined, indicates that the ntohl() routine (and - * friends htonl() htons() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHS: - * This symbol, if defined, indicates that the ntohs() routine (and - * friends htonl() htons() ntohl()) are available to do network - * order byte swapping. - */ -#define HAS_HTONL /**/ -#define HAS_HTONS /**/ -#define HAS_NTOHL /**/ -#define HAS_NTOHS /**/ - /* HAS_KILLPG: * This symbol, if defined, indicates that the killpg routine is available * to kill process groups. If unavailable, you probably should use kill @@ -341,13 +291,6 @@ */ #define HAS_OPEN3 /**/ -/* HAS_READDIR: - * This symbol, if defined, indicates that the readdir routine is - * available to read directory entries. You may have to include - * . See I_DIRENT. - */ -#define HAS_READDIR /**/ - /* HAS_RENAME: * This symbol, if defined, indicates that the rename routine is available * to rename files. Otherwise you should do the unlink(), link(), unlink() @@ -362,22 +305,6 @@ */ #define HAS_RMDIR /**/ -/* HAS_SAFE_BCOPY: - * This symbol, if defined, indicates that the bcopy routine is available - * to copy potentially overlapping memory blocks. Otherwise you should - * probably use memmove() or memcpy(). If neither is defined, roll your - * own version. - */ -#define HAS_SAFE_BCOPY /**/ - -/* HAS_SAFE_MEMCPY: - * This symbol, if defined, indicates that the memcpy routine is available - * to copy potentially overlapping memory blocks. Otherwise you should - * probably use memmove() or memcpy(). If neither is defined, roll your - * own version. - */ -/*#define HAS_SAFE_MEMCPY /**/ - /* HAS_SELECT: * This symbol, if defined, indicates that the select routine is * available to select active file descriptors. If the timeout field @@ -495,12 +422,6 @@ */ #define HAS_SHM /**/ -/* HAS_SHMAT: - * This symbol, if defined, indicates that the shmat() routine is - * available to attach a shared memory segment to the process space. - */ -#define HAS_SHMAT /**/ - /* HAS_SHMCTL: * This symbol, if defined, indicates that the shmctl() routine is * available to perform shared memory control operations. @@ -573,6 +494,13 @@ */ #define HAS_SYSTEM /**/ +/* Time_t: + * This symbol holds the type returned by time(). It can be long, + * or time_t on BSD sites (in which case should be + * included). + */ +#define Time_t long /* Time type */ + /* HAS_TIMES: * This symbol, if defined, indicates that the times() routine exists. * Note that this became obsolete on some systems (SUNOS), which now @@ -592,11 +520,6 @@ */ /*#define I_NDIR /**/ -/* HAS_VFORK: - * This symbol, if defined, indicates that vfork() exists. - */ -#define HAS_VFORK /**/ - /* VOIDSIG: * This symbol is defined if this system declares "void (*signal(...))()" in * signal.h. The old way was to declare it as "int (*signal(...))()". It @@ -698,42 +621,6 @@ #define I_NETINET_IN /**/ /*#define I_SYS_IN /**/ -/* I_PWD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* PWQUOTA: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_quota. - */ -/* PWAGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_age. - */ -/* PWCHANGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_change. - */ -/* PWCLASS: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_class. - */ -/* PWEXPIRE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_expire. - */ -/* PWCOMMENT: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_comment. - */ -#define I_PWD /**/ -/*#define PWQUOTA /**/ -#define PWAGE /**/ -/*#define PWCHANGE /**/ -/*#define PWCLASS /**/ -/*#define PWEXPIRE /**/ -#define PWCOMMENT /**/ - /* I_STDARG: * This symbol, if defined, indicates that exists and should * be included. @@ -746,6 +633,12 @@ */ #define I_STDDEF /**/ +/* I_STRING: + * This symbol, if defined, indicates to the C program that it should + * include (USG systems) instead of (BSD systems). + */ +#define I_STRING /**/ + /* I_SYS_DIR: * This symbol, if defined, indicates to the C program that it should * include . @@ -784,8 +677,19 @@ * This symbol, if defined, indicates to the C program that it should * include . */ +/* I_SYS_TIME_KERNEL: + * This symbol, if defined, indicates to the C program that it should + * include with KERNEL defined. + */ /*#define I_TIME /**/ #define I_SYS_TIME /**/ +/*#define I_SYS_TIME_KERNEL /**/ + +/* I_UNISTD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#define I_UNISTD /**/ /* I_UTIME: * This symbol, if defined, indicates to the C program that it should @@ -799,18 +703,19 @@ */ #define I_VARARGS /**/ -/* I_VFORK: - * This symbol, if defined, indicates to the C program that it should - * include vfork.h. - */ -#define I_VFORK /**/ - /* INTSIZE: * This symbol contains the size of an int, so that the C preprocessor * can make decisions based on it. */ #define INTSIZE 4 /**/ +/* Off_t: + * This symbol holds the type used to declare offsets in the kernel. + * It can be int, long, off_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Off_t off_t /* type */ + /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's @@ -819,6 +724,12 @@ */ #define PRIVLIB "/usr/local/lib/perl" /**/ +/* PTRSIZE: + * This symbol contains the size of a pointer, so that the C preprocessor + * can make decisions based on it. + */ +#define PTRSIZE 4 /**/ + /* RANDBITS: * This symbol contains the number of bits of random number the rand() * function produces. Usual values are 15, 16, and 31. @@ -833,16 +744,6 @@ */ #define SCRIPTDIR "/usr/local/bin" /**/ -/* SIG_NAME: - * This symbol contains a list of signal names in order. This is intended - * to be used as a static array initialization, like this: - * char *sig_name[] = { SIG_NAME }; - * The signals in the list are separated with commas, and each signal - * is surrounded by double quotes. There is no leading SIG in the signal - * name, i.e. SIGQUIT is known as "QUIT". - */ -#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","LOST","USR1","USR2" /**/ - /* STDCHAR: * This symbol is defined to be the type of char used in stdio.h. * It has the values "unsigned char" or "char". @@ -856,24 +757,122 @@ */ #define Uid_t uid_t /* UID type */ +/* EUNICE: + * This symbol, if defined, indicates that the program is being compiled + * under the EUNICE package under VMS. The program will need to handle + * things like files that don't go away the first time you unlink them, + * due to version numbering. It will also need to compensate for lack + * of a respectable link() command. + */ +/* VMS: + * This symbol, if defined, indicates that the program is running under + * VMS. It is currently only set in conjunction with the EUNICE symbol. + */ +/*#define EUNICE /**/ +/*#define VMS /**/ + +/* MEM_ALIGNBYTES: + * This symbol contains the number of bytes required to align a + * double. Usual values are 2, 4 and 8. + */ +#define MEM_ALIGNBYTES 8 /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. */ #define CASTI32 /**/ +/* HAS_HTONL: + * This symbol, if defined, indicates that the htonl() routine (and + * friends htons() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_HTONS: + * This symbol, if defined, indicates that the htons() routine (and + * friends htonl() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHL: + * This symbol, if defined, indicates that the ntohl() routine (and + * friends htonl() htons() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHS: + * This symbol, if defined, indicates that the ntohs() routine (and + * friends htonl() htons() ntohl()) are available to do network + * order byte swapping. + */ +#define HAS_HTONL /**/ +#define HAS_HTONS /**/ +#define HAS_NTOHL /**/ +#define HAS_NTOHS /**/ + /* HAS_ISASCII: * This manifest constant lets the C program know that the * isascii is available. */ #define HAS_ISASCII /**/ +/* HAS_READDIR: + * This symbol, if defined, indicates that the readdir routine is + * available to read directory entries. You may have to include + * . See I_DIRENT. + */ +#define HAS_READDIR /**/ + +/* HAS_SEEKDIR: + * This symbol, if defined, indicates that the seekdir routine is + * available. You may have to include . See I_DIRENT. + */ +#define HAS_SEEKDIR /**/ + +/* HAS_TELLDIR: + * This symbol, if defined, indicates that the telldir routine is + * available. You may have to include . See I_DIRENT. + */ +#define HAS_TELLDIR /**/ + +/* HAS_REWINDDIR: + * This symbol, if defined, indicates that the rewinddir routine is + * available. You may have to include . See I_DIRENT. + */ +#define HAS_REWINDDIR /**/ + +/* HAS_SAFE_BCOPY: + * This symbol, if defined, indicates that the bcopy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +#define HAS_SAFE_BCOPY /**/ + +/* HAS_SAFE_MEMCPY: + * This symbol, if defined, indicates that the memcpy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +/*#define HAS_SAFE_MEMCPY /**/ + /* HAS_SETLOCALE: * This symbol, if defined, indicates that the setlocale routine is * available to handle locale-specific ctype implementations. */ #define HAS_SETLOCALE /**/ +/* HAS_SHMAT: + * This symbol, if defined, indicates that the shmat() routine is + * available to attach a shared memory segment to the process space. + */ +#define HAS_SHMAT /**/ + +/* VOIDSHMAT: + * This symbol, if defined, indicates that the shmat() routine + * returns a pointer of type void*. Otherwise, char* is assumed. + */ +/*#define VOIDSHMAT /**/ + /* HAS_STRERROR: * This symbol, if defined, indicates that the strerror routine is * available to translate error numbers to strings. See the writeup @@ -897,6 +896,11 @@ #define Strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/ #endif +/* HAS_VFORK: + * This symbol, if defined, indicates that vfork() exists. + */ +/*#define HAS_VFORK /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. @@ -924,11 +928,101 @@ #define GROUPSTYPE int /* Type for 2nd arg to getgroups() */ #endif +/* I_DLFCN: + * This symbol, if defined, indicates that exists and should + * be included. + */ +#define I_DLFCN /**/ + +/* I_MEMORY: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#define I_MEMORY /**/ + +/* I_NET_ERRNO: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_NET_ERRNO /**/ + +/* I_PWD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* PWQUOTA: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_quota. + */ +/* PWAGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_age. + */ +/* PWCHANGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_change. + */ +/* PWCLASS: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_class. + */ +/* PWEXPIRE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_expire. + */ +/* PWCOMMENT: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_comment. + */ +#define I_PWD /**/ +/*#define PWQUOTA /**/ +#define PWAGE /**/ +/*#define PWCHANGE /**/ +/*#define PWCLASS /**/ +/*#define PWEXPIRE /**/ +#define PWCOMMENT /**/ + +/* I_TERMIO: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/* I_TERMIOS: + * This symbol, if defined, indicates that the program should include + * the POSIX termios.h rather than sgtty.h or termio.h. + * There are also differences in the ioctl() calls that depend on the + * value of this symbol. + */ +/* I_SGTTY: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/*#define I_TERMIO /**/ +#define I_TERMIOS /**/ +/*#define I_SGTTY /**/ + +/* I_VFORK: + * This symbol, if defined, indicates to the C program that it should + * include vfork.h. + */ +/*#define I_VFORK /**/ + +/* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */ +#define LOC_SED "/bin/sed" /**/ + /* Malloc_t: * This symbol is the type of pointer returned by malloc and realloc. */ #define Malloc_t char * /**/ +/* MYMALLOC: + * This symbol, if defined, indicates that we're using our own malloc. + */ +#define MYMALLOC /**/ + /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle * function prototypes. @@ -938,6 +1032,16 @@ #else #endif +/* SIG_NAME: + * This symbol contains a list of signal names in order. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + */ +#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","LOST","USR1","USR2" /**/ + /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: @@ -955,11 +1059,7 @@ * level of void support necessary is not present, defines void to int. */ #ifndef VOIDUSED -# ifdef VOIDWANT -# define VOIDUSED VOIDWANT -# else -# define VOIDUSED 15 -# endif +# define VOIDUSED 15 #endif #define VOIDFLAGS 15 #if (VOIDFLAGS & VOIDUSED) != VOIDUSED @@ -977,6 +1077,10 @@ * obsolete symbols may end without notice. */ +#ifdef MEM_ALIGNBYTES +#define ALIGNBYTES MEM_ALIGNBYTES +#endif + #ifdef USE_CHAR_VSPRINTF #define CHARVSPRINTF USE_CHAR_VSPRINTF #endif @@ -989,10 +1093,34 @@ #define HAS_GDBM I_GDBM #endif +#ifdef I_NDBM +#define HAS_NDBM I_NDBM +#endif + +#ifdef I_DBM +#define HAS_ODBM I_DBM +#endif + +#ifdef I_SYS_IOCTL +#define I_SYSIOCTL I_SYS_IOCTL +#endif + +#ifdef Malloc_t +#define MALLOCPTRTYPE Malloc_t +#endif + +#ifdef USE_OLDSOCKET +#define OLDSOCKET USE_OLDSOCKET +#endif + #ifdef HAS_SAFE_BCOPY #define SAFE_BCOPY HAS_SAFE_BCOPY #endif +#ifdef HAS_SAFE_MEMCPY +#define SAFE_MEMCPY HAS_SAFE_MEMCPY +#endif + #ifdef USE_STAT_BLOCKS #define STATBLOCKS USE_STAT_BLOCKS #endif @@ -1001,6 +1129,14 @@ #define STDSTDIO USE_STD_STDIO #endif +#ifdef USE_STRUCT_COPY +#define STRUCTCOPY USE_STRUCT_COPY +#endif + +#ifdef HAS_SYSTEM +#define SYSTEM HAS_SYSTEM +#endif + #ifdef Uid_t #define UIDTYPE Uid_t #endif diff --git a/config.sh b/config.sh index 97429bb236..640042f7fc 100644 --- a/config.sh +++ b/config.sh @@ -6,86 +6,83 @@ # instead choose to run each of the .SH files by yourself, or "Configure -S". # -# Configuration time: Mon Apr 4 15:17:26 PDT 1994 +# Configuration time: Wed May 4 15:10:39 PDT 1994 # Configured by: lwall # Target system: sunos scalpel 4.1.3 3 sun4c -extensions='ext/dbm/NDBM_File.xs -ext/dbm/ODBM_File.xs -ext/dbm/GDBM_File.xs -ext/dbm/SDBM_File.xs -ext/posix/POSIX.xs' -d_bsd='define' +extensions=' ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs' d_eunice='undef' d_xenix='undef' eunicefix=':' Mcc='Mcc' -awk='awk' +awk='/bin/awk' bash='' -bison='bison' +bison='/usr/local/bin/bison' byacc='byacc' -cat='cat' +cat='/bin/cat' chgrp='' chmod='' chown='' compress='' -cp='cp' +cp='/bin/cp' cpio='' -cpp='cpp' -csh='csh' -date='date' -echo='echo' -egrep='egrep' +cpp='/usr/lib/cpp' +csh='/bin/csh' +date='/bin/date' +echo='/bin/echo' +egrep='/bin/egrep' emacs='' -expr='expr' -find='find' +expr='/bin/expr' +find='/bin/find' flex='' gcc='' -grep='grep' +grep='/bin/grep' inews='' ksh='' less='' -line='line' +line='/bin/line' lint='' -ln='' +ln='/bin/ln' lp='' lpr='' ls='' mail='' mailx='' make='' -mkdir='mkdir' +mkdir='/bin/mkdir' more='' -mv='mv' -nroff='nroff' -perl='perl' +mv='/bin/mv' +nroff='/bin/nroff' +perl='/home/netlabs1/lwall/pl/perl' pg='' pmake='' pr='' -rm='rm' +rm='/bin/rm' rmail='' -sed='sed' +sed='/bin/sed' sendmail='' sh='' shar='' sleep='' smail='' -sort='sort' +sort='/bin/sort' submit='' tail='' tar='' tbl='' test='test' -touch='' -tr='tr' +touch='/bin/touch' +tr='/bin/tr' troff='' -uname='uname' -uniq='uniq' +uname='/bin/uname' +uniq='/bin/uniq' uuname='' vi='' zcat='' hint='recommended' myuname='sunos scalpel 4.1.3 3 sun4c ' +osname='sunos' +osvers='4.1.3' Author='' Date='$Date' Header='' @@ -97,7 +94,7 @@ Revision='$Revision' Source='' State='' afs='false' -alignbytes='8' +memalignbytes='8' bin='/usr/local/bin' binexp='/usr/local/bin' installbin='/usr/local/bin' @@ -110,12 +107,12 @@ ldflags='' lkflags='' optimize='-g' cf_by='lwall' -cf_time='Mon Apr 4 15:17:26 PDT 1994' +cf_time='Wed May 4 15:10:39 PDT 1994' contains='grep' cpplast='' cppminus='' -cpprun='cpp' -cppstdin='/tmp_mnt/vol/src/local/lwall/perl5/cppstdin' +cpprun='/usr/lib/cpp' +cppstdin='/tmp_mnt/net/vaccine/export/src/local/lwall/perl5/cppstdin' d_access='define' d_bcmp='define' d_bcopy='define' @@ -128,7 +125,7 @@ d_chsize='undef' d_const='undef' cryptlib='' d_crypt='define' -d_csh='undef' +d_csh='define' d_dosuid='undef' d_dup2='define' d_fchmod='define' @@ -161,8 +158,11 @@ d_msgget='define' d_msgrcv='define' d_msgsnd='define' d_open3='define' -d_portable='define' +d_portable='undef' d_readdir='define' +d_rewinddir='define' +d_seekdir='define' +d_telldir='define' d_rename='define' d_rmdir='define' d_safebcpy='define' @@ -189,6 +189,7 @@ d_setruid='define' d_setsid='define' d_shm='define' d_shmat='define' +d_voidshmat='undef' d_shmctl='define' d_shmdt='define' d_shmget='define' @@ -209,6 +210,8 @@ d_syserrlst='define' d_symlink='define' d_syscall='define' d_system='define' +d_time='define' +timetype='long' clocktype='long' d_times='define' d_truncate='define' @@ -217,7 +220,7 @@ i_ndir='undef' ndirc='' ndirlib='' ndiro='' -d_vfork='define' +d_vfork='undef' d_voidsig='define' signal_t='void' d_volatile='undef' @@ -225,8 +228,13 @@ d_charvspr='define' d_vprintf='define' d_wait4='define' d_waitpid='define' -dlobj='dl.o' -dlsrc='dl.c' +cccdlflags='' +ccdlflags='' +dldir='ext/dl' +dlobj='dl_sunos.o' +dlsrc='dl_sunos.c' +lddlflags='' +shlibsuffix='.so' usedl='define' gidtype='gid_t' groupstype='int' @@ -239,7 +247,9 @@ i_dlfcn='define' i_fcntl='undef' i_gdbm='undef' i_grp='define' +i_memory='define' i_ndbm='define' +i_neterrno='undef' i_niin='define' i_sysin='undef' d_pwage='define' @@ -249,6 +259,7 @@ d_pwcomment='define' d_pwexpire='undef' d_pwquota='undef' i_pwd='define' +i_sdbm='define' i_stdarg='undef' i_stddef='define' i_string='define' @@ -268,10 +279,11 @@ i_systime='define' i_systimek='undef' i_time='undef' timeincl='/usr/include/sys/time.h ' +i_unistd='define' i_utime='define' i_varargs='define' i_varhdr='varargs.h' -i_vfork='define' +i_vfork='undef' intsize='4' lib='/usr/local/lib' libexp='/usr/local/lib' @@ -280,6 +292,9 @@ libpth=' /lib /usr/lib /usr/ucblib /usr/local/lib' plibpth='' xlibpth='/usr/lib/386 /lib/386' libs='-ldbm -ldl -lm -lposix' +lns='/bin/ln -s' +lseektype='off_t' +d_mymalloc='define' mallocobj='malloc.o' mallocsrc='malloc.c' malloctype='char *' @@ -302,12 +317,15 @@ n='-n' groupcat='' hostcat='ypcat hosts' passcat='' +orderlib='false' +ranlib='/usr/bin/ranlib' package='perl' spackage='' installprivlib='/usr/local/lib/perl' privlib='/usr/local/lib/perl' privlibexp='/usr/local/lib/perl' prototype='undef' +ptrsize='4' randbits='31' installscript='/usr/local/bin' scriptdir='/usr/local/bin' diff --git a/config_h.SH b/config_h.SH index 8c63a9f290..65b8f9f4cd 100755 --- a/config_h.SH +++ b/config_h.SH @@ -36,31 +36,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #ifndef _config_h_ #define _config_h_ -/* EUNICE: - * This symbol, if defined, indicates that the program is being compiled - * under the EUNICE package under VMS. The program will need to handle - * things like files that don't go away the first time you unlink them, - * due to version numbering. It will also need to compensate for lack - * of a respectable link() command. - */ -/* VMS: - * This symbol, if defined, indicates that the program is running under - * VMS. It is currently only set in conjunction with the EUNICE symbol. - */ -/* BSD: - * This symbol, if defined, indicates that the program is running under - * a BSD system. - */ -#$d_eunice EUNICE /**/ -#$d_eunice VMS /**/ -#$d_bsd BSD /**/ - -/* ALIGNBYTES: - * This symbol contains the number of bytes required to align a - * double. Usual values are 2, 4 and 8. - */ -#define ALIGNBYTES $alignbytes /**/ - /* BIN: * This symbol holds the path of the bin directory where the package will * be installed. Program must be prepared to deal with ~name substitution. @@ -246,31 +221,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$d_getprior HAS_GETPRIORITY /**/ -/* HAS_HTONL: - * This symbol, if defined, indicates that the htonl() routine (and - * friends htons() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_HTONS: - * This symbol, if defined, indicates that the htons() routine (and - * friends htonl() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHL: - * This symbol, if defined, indicates that the ntohl() routine (and - * friends htonl() htons() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHS: - * This symbol, if defined, indicates that the ntohs() routine (and - * friends htonl() htons() ntohl()) are available to do network - * order byte swapping. - */ -#$d_htonl HAS_HTONL /**/ -#$d_htonl HAS_HTONS /**/ -#$d_htonl HAS_NTOHL /**/ -#$d_htonl HAS_NTOHS /**/ - /* HAS_KILLPG: * This symbol, if defined, indicates that the killpg routine is available * to kill process groups. If unavailable, you probably should use kill @@ -359,13 +309,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$d_open3 HAS_OPEN3 /**/ -/* HAS_READDIR: - * This symbol, if defined, indicates that the readdir routine is - * available to read directory entries. You may have to include - * . See I_DIRENT. - */ -#$d_readdir HAS_READDIR /**/ - /* HAS_RENAME: * This symbol, if defined, indicates that the rename routine is available * to rename files. Otherwise you should do the unlink(), link(), unlink() @@ -380,22 +323,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$d_rmdir HAS_RMDIR /**/ -/* HAS_SAFE_BCOPY: - * This symbol, if defined, indicates that the bcopy routine is available - * to copy potentially overlapping memory blocks. Otherwise you should - * probably use memmove() or memcpy(). If neither is defined, roll your - * own version. - */ -#$d_safebcpy HAS_SAFE_BCOPY /**/ - -/* HAS_SAFE_MEMCPY: - * This symbol, if defined, indicates that the memcpy routine is available - * to copy potentially overlapping memory blocks. Otherwise you should - * probably use memmove() or memcpy(). If neither is defined, roll your - * own version. - */ -#$d_safemcpy HAS_SAFE_MEMCPY /**/ - /* HAS_SELECT: * This symbol, if defined, indicates that the select routine is * available to select active file descriptors. If the timeout field @@ -513,12 +440,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$d_shm HAS_SHM /**/ -/* HAS_SHMAT: - * This symbol, if defined, indicates that the shmat() routine is - * available to attach a shared memory segment to the process space. - */ -#$d_shmat HAS_SHMAT /**/ - /* HAS_SHMCTL: * This symbol, if defined, indicates that the shmctl() routine is * available to perform shared memory control operations. @@ -591,6 +512,13 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$d_system HAS_SYSTEM /**/ +/* Time_t: + * This symbol holds the type returned by time(). It can be long, + * or time_t on BSD sites (in which case should be + * included). + */ +#define Time_t $timetype /* Time type */ + /* HAS_TIMES: * This symbol, if defined, indicates that the times() routine exists. * Note that this became obsolete on some systems (SUNOS), which now @@ -610,11 +538,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$i_ndir I_NDIR /**/ -/* HAS_VFORK: - * This symbol, if defined, indicates that vfork() exists. - */ -#$d_vfork HAS_VFORK /**/ - /* VOIDSIG: * This symbol is defined if this system declares "void (*signal(...))()" in * signal.h. The old way was to declare it as "int (*signal(...))()". It @@ -716,42 +639,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #$i_niin I_NETINET_IN /**/ #$i_sysin I_SYS_IN /**/ -/* I_PWD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* PWQUOTA: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_quota. - */ -/* PWAGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_age. - */ -/* PWCHANGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_change. - */ -/* PWCLASS: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_class. - */ -/* PWEXPIRE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_expire. - */ -/* PWCOMMENT: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_comment. - */ -#$i_pwd I_PWD /**/ -#$d_pwquota PWQUOTA /**/ -#$d_pwage PWAGE /**/ -#$d_pwchange PWCHANGE /**/ -#$d_pwclass PWCLASS /**/ -#$d_pwexpire PWEXPIRE /**/ -#$d_pwcomment PWCOMMENT /**/ - /* I_STDARG: * This symbol, if defined, indicates that exists and should * be included. @@ -764,6 +651,12 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$i_stddef I_STDDEF /**/ +/* I_STRING: + * This symbol, if defined, indicates to the C program that it should + * include (USG systems) instead of (BSD systems). + */ +#$i_string I_STRING /**/ + /* I_SYS_DIR: * This symbol, if defined, indicates to the C program that it should * include . @@ -802,8 +695,19 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' * This symbol, if defined, indicates to the C program that it should * include . */ +/* I_SYS_TIME_KERNEL: + * This symbol, if defined, indicates to the C program that it should + * include with KERNEL defined. + */ #$i_time I_TIME /**/ #$i_systime I_SYS_TIME /**/ +#$i_systimek I_SYS_TIME_KERNEL /**/ + +/* I_UNISTD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_unistd I_UNISTD /**/ /* I_UTIME: * This symbol, if defined, indicates to the C program that it should @@ -817,18 +721,19 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$i_varargs I_VARARGS /**/ -/* I_VFORK: - * This symbol, if defined, indicates to the C program that it should - * include vfork.h. - */ -#$i_vfork I_VFORK /**/ - /* INTSIZE: * This symbol contains the size of an int, so that the C preprocessor * can make decisions based on it. */ #define INTSIZE $intsize /**/ +/* Off_t: + * This symbol holds the type used to declare offsets in the kernel. + * It can be int, long, off_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Off_t $lseektype /* type */ + /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's @@ -837,6 +742,12 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #define PRIVLIB "$privlib" /**/ +/* PTRSIZE: + * This symbol contains the size of a pointer, so that the C preprocessor + * can make decisions based on it. + */ +#define PTRSIZE $ptrsize /**/ + /* RANDBITS: * This symbol contains the number of bits of random number the rand() * function produces. Usual values are 15, 16, and 31. @@ -851,16 +762,6 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #define SCRIPTDIR "$scriptdir" /**/ -/* SIG_NAME: - * This symbol contains a list of signal names in order. This is intended - * to be used as a static array initialization, like this: - * char *sig_name[] = { SIG_NAME }; - * The signals in the list are separated with commas, and each signal - * is surrounded by double quotes. There is no leading SIG in the signal - * name, i.e. SIGQUIT is known as "QUIT". - */ -#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/ - /* STDCHAR: * This symbol is defined to be the type of char used in stdio.h. * It has the values "unsigned char" or "char". @@ -874,24 +775,122 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #define Uid_t $uidtype /* UID type */ +/* EUNICE: + * This symbol, if defined, indicates that the program is being compiled + * under the EUNICE package under VMS. The program will need to handle + * things like files that don't go away the first time you unlink them, + * due to version numbering. It will also need to compensate for lack + * of a respectable link() command. + */ +/* VMS: + * This symbol, if defined, indicates that the program is running under + * VMS. It is currently only set in conjunction with the EUNICE symbol. + */ +#$d_eunice EUNICE /**/ +#$d_eunice VMS /**/ + +/* MEM_ALIGNBYTES: + * This symbol contains the number of bytes required to align a + * double. Usual values are 2, 4 and 8. + */ +#define MEM_ALIGNBYTES $memalignbytes /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. */ #$d_casti32 CASTI32 /**/ +/* HAS_HTONL: + * This symbol, if defined, indicates that the htonl() routine (and + * friends htons() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_HTONS: + * This symbol, if defined, indicates that the htons() routine (and + * friends htonl() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHL: + * This symbol, if defined, indicates that the ntohl() routine (and + * friends htonl() htons() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHS: + * This symbol, if defined, indicates that the ntohs() routine (and + * friends htonl() htons() ntohl()) are available to do network + * order byte swapping. + */ +#$d_htonl HAS_HTONL /**/ +#$d_htonl HAS_HTONS /**/ +#$d_htonl HAS_NTOHL /**/ +#$d_htonl HAS_NTOHS /**/ + /* HAS_ISASCII: * This manifest constant lets the C program know that the * isascii is available. */ #$d_isascii HAS_ISASCII /**/ +/* HAS_READDIR: + * This symbol, if defined, indicates that the readdir routine is + * available to read directory entries. You may have to include + * . See I_DIRENT. + */ +#$d_readdir HAS_READDIR /**/ + +/* HAS_SEEKDIR: + * This symbol, if defined, indicates that the seekdir routine is + * available. You may have to include . See I_DIRENT. + */ +#$d_seekdir HAS_SEEKDIR /**/ + +/* HAS_TELLDIR: + * This symbol, if defined, indicates that the telldir routine is + * available. You may have to include . See I_DIRENT. + */ +#$d_telldir HAS_TELLDIR /**/ + +/* HAS_REWINDDIR: + * This symbol, if defined, indicates that the rewinddir routine is + * available. You may have to include . See I_DIRENT. + */ +#$d_rewinddir HAS_REWINDDIR /**/ + +/* HAS_SAFE_BCOPY: + * This symbol, if defined, indicates that the bcopy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +#$d_safebcpy HAS_SAFE_BCOPY /**/ + +/* HAS_SAFE_MEMCPY: + * This symbol, if defined, indicates that the memcpy routine is available + * to copy potentially overlapping memory blocks. Otherwise you should + * probably use memmove() or memcpy(). If neither is defined, roll your + * own version. + */ +#$d_safemcpy HAS_SAFE_MEMCPY /**/ + /* HAS_SETLOCALE: * This symbol, if defined, indicates that the setlocale routine is * available to handle locale-specific ctype implementations. */ #$d_setlocale HAS_SETLOCALE /**/ +/* HAS_SHMAT: + * This symbol, if defined, indicates that the shmat() routine is + * available to attach a shared memory segment to the process space. + */ +#$d_shmat HAS_SHMAT /**/ + +/* VOIDSHMAT: + * This symbol, if defined, indicates that the shmat() routine + * returns a pointer of type void*. Otherwise, char* is assumed. + */ +#$d_voidshmat VOIDSHMAT /**/ + /* HAS_STRERROR: * This symbol, if defined, indicates that the strerror routine is * available to translate error numbers to strings. See the writeup @@ -915,6 +914,11 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #$d_strerrm Strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/ #endif +/* HAS_VFORK: + * This symbol, if defined, indicates that vfork() exists. + */ +#$d_vfork HAS_VFORK /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. @@ -942,11 +946,101 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #define GROUPSTYPE $groupstype /* Type for 2nd arg to getgroups() */ #endif +/* I_DLFCN: + * This symbol, if defined, indicates that exists and should + * be included. + */ +#$i_dlfcn I_DLFCN /**/ + +/* I_MEMORY: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_memory I_MEMORY /**/ + +/* I_NET_ERRNO: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_neterrno I_NET_ERRNO /**/ + +/* I_PWD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* PWQUOTA: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_quota. + */ +/* PWAGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_age. + */ +/* PWCHANGE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_change. + */ +/* PWCLASS: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_class. + */ +/* PWEXPIRE: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_expire. + */ +/* PWCOMMENT: + * This symbol, if defined, indicates to the C program that struct passwd + * contains pw_comment. + */ +#$i_pwd I_PWD /**/ +#$d_pwquota PWQUOTA /**/ +#$d_pwage PWAGE /**/ +#$d_pwchange PWCHANGE /**/ +#$d_pwclass PWCLASS /**/ +#$d_pwexpire PWEXPIRE /**/ +#$d_pwcomment PWCOMMENT /**/ + +/* I_TERMIO: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/* I_TERMIOS: + * This symbol, if defined, indicates that the program should include + * the POSIX termios.h rather than sgtty.h or termio.h. + * There are also differences in the ioctl() calls that depend on the + * value of this symbol. + */ +/* I_SGTTY: + * This symbol, if defined, indicates that the program should include + * rather than . There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +#$i_termio I_TERMIO /**/ +#$i_termios I_TERMIOS /**/ +#$i_sgtty I_SGTTY /**/ + +/* I_VFORK: + * This symbol, if defined, indicates to the C program that it should + * include vfork.h. + */ +#$i_vfork I_VFORK /**/ + +/* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */ +#define LOC_SED "$sed" /**/ + /* Malloc_t: * This symbol is the type of pointer returned by malloc and realloc. */ #define Malloc_t $malloctype /**/ +/* MYMALLOC: + * This symbol, if defined, indicates that we're using our own malloc. + */ +#$d_mymalloc MYMALLOC /**/ + /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle * function prototypes. @@ -956,6 +1050,16 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #else #endif +/* SIG_NAME: + * This symbol contains a list of signal names in order. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + */ +#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/ + /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: @@ -973,11 +1077,7 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' * level of void support necessary is not present, defines void to int. */ #ifndef VOIDUSED -# ifdef VOIDWANT -# define VOIDUSED VOIDWANT -# else -# define VOIDUSED $defvoidused -# endif +# define VOIDUSED $defvoidused #endif #define VOIDFLAGS $voidflags #if (VOIDFLAGS & VOIDUSED) != VOIDUSED @@ -995,6 +1095,10 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' * obsolete symbols may end without notice. */ +#ifdef MEM_ALIGNBYTES +#define ALIGNBYTES MEM_ALIGNBYTES +#endif + #ifdef USE_CHAR_VSPRINTF #define CHARVSPRINTF USE_CHAR_VSPRINTF #endif @@ -1007,10 +1111,34 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #define HAS_GDBM I_GDBM #endif +#ifdef I_NDBM +#define HAS_NDBM I_NDBM +#endif + +#ifdef I_DBM +#define HAS_ODBM I_DBM +#endif + +#ifdef I_SYS_IOCTL +#define I_SYSIOCTL I_SYS_IOCTL +#endif + +#ifdef Malloc_t +#define MALLOCPTRTYPE Malloc_t +#endif + +#ifdef USE_OLDSOCKET +#define OLDSOCKET USE_OLDSOCKET +#endif + #ifdef HAS_SAFE_BCOPY #define SAFE_BCOPY HAS_SAFE_BCOPY #endif +#ifdef HAS_SAFE_MEMCPY +#define SAFE_MEMCPY HAS_SAFE_MEMCPY +#endif + #ifdef USE_STAT_BLOCKS #define STATBLOCKS USE_STAT_BLOCKS #endif @@ -1019,6 +1147,14 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' #define STDSTDIO USE_STD_STDIO #endif +#ifdef USE_STRUCT_COPY +#define STRUCTCOPY USE_STRUCT_COPY +#endif + +#ifdef HAS_SYSTEM +#define SYSTEM HAS_SYSTEM +#endif + #ifdef Uid_t #define UIDTYPE Uid_t #endif diff --git a/configpm b/configpm index 31585c4398..95fa9491af 100755 --- a/configpm +++ b/configpm @@ -2,13 +2,6 @@ @ARGV = "./config.sh"; -undef $/; -$_ = <>; -s:^#!/bin/sh\n::; -s/'undef'/undef/g; -s/\n(\w+)=/;\n\$Config{'$1'} = /g; -s/;\n\$Config/\n\$Config/; - open STDOUT, ">lib/Config.pm" or die "Can't open lib/Config.pm: $!\n"; $myver = sprintf("%.3f", $]); @@ -23,5 +16,13 @@ require Exporter; ENDOFBEG -print $_; - +while (<>) { + s:^#!/bin/sh::; + s/'undef'/undef/; # So we can say "if $Config{'foo'}". + s/=true$/='true'/; # Catch CONFIG=true line from Configure. + s/^(\w+)=/\$Config{'$1'} = /; + s/$/;/ unless (/^#/ || /^$/); + print $_; +} +print "1;\n"; +exit 0; diff --git a/debstack b/debstack deleted file mode 100644 index f0af5eaa9f..0000000000 --- a/debstack +++ /dev/null @@ -1,14 +0,0 @@ - if (debug & 4) { -/* fprintf(stderr, "%8lx %8lx %8ld %8ld %8ld\n", - stack, stack_base, *markstack_ptr, stack_sp-stack_base, stack_max-stack_base); - fprintf(stderr, "%8lx %8lx %8ld %l8d %8ld\n", - curstack, stack->av_array, curstack, stack->av_fill, stack->av_max); -*/ - fprintf(stderr, "STACK"); - for (i = 0; i <= 30; i++) { - if (stack->av_array[i] || stack->av_array[i+1] || stack->av_array[i+2]) - fprintf(stderr, "\t%s%s", SvPEEK(stack->av_array[i]), - stack_sp == &stack->av_array[i] ? " *" : ""); - } - fprintf(stderr, "\n"); - } diff --git a/dl_sunos.c b/dl_sunos.c new file mode 100644 index 0000000000..badd66d678 --- /dev/null +++ b/dl_sunos.c @@ -0,0 +1,56 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifdef I_DLFCN +# include +#endif + +static int +XS_DynamicLoader_bootstrap(ix, ax, items) +register int ix; +register int ax; +register int items; +{ + if (items < 1 || items > 1) { + croak("Usage: DynamicLoader::bootstrap(package)"); + } + { + char* package = SvPV(ST(1),na); + void* obj = 0; + int (*bootproc)(); + char tmpbuf[1024]; + char tmpbuf2[128]; + AV *av = GvAVn(incgv); + I32 i; + + for (i = 0; i <= AvFILL(av); i++) { + (void)sprintf(tmpbuf, "%s/auto/%s/%s.so", + SvPVx(*av_fetch(av, i, TRUE), na), package, package); + if (obj = dlopen(tmpbuf,1)) + break; + } + if (!obj) + croak("Can't find loadable object for package %s in @INC", package); + + sprintf(tmpbuf2, "boot_%s", package); + bootproc = (int (*)())dlsym(obj, tmpbuf2); + if (!bootproc) + croak("Shared object %s contains no %s function", tmpbuf, tmpbuf2); + bootproc(); + + ST(0) = sv_mortalcopy(&sv_yes); + } + return ax; +} + +int +boot_DynamicLoader(ix,sp,items) +int ix; +int sp; +int items; +{ + char* file = __FILE__; + + newXSUB("DynamicLoader::bootstrap", 0, XS_DynamicLoader_bootstrap, file); +} diff --git a/dlperl/Makefile b/dlperl/Makefile deleted file mode 100644 index 64cfc76f06..0000000000 --- a/dlperl/Makefile +++ /dev/null @@ -1,51 +0,0 @@ - -# perl -# - location of uperl.o and include files -PERL = ../perl-lib -# - libraries required by perl - from config.sh -PERL_LIBS = -ldbm -lm -lposix - -UPERL = $(PERL)/uperl4.035.o -UPERL = ../sybperl/uperl2.o - -DP_C = \ - dlperl.c \ - usersub.c - -DP_H = - - -CC = gcc-2.2.2 -CPPFLAGS= -I$(PERL) -#CFLAGS = -g - -ALL = \ - dlperl - - -all: $(ALL) tags - -dlperl: $(UPERL) $(DP_C:.c=.o) - $(LINK.c) -o dlperl $(UPERL) $(DP_C:.c=.o) \ - $(PERL_LIBS) \ - -ldl -lc.1.6 - ld-rules -clobber dlperl - -dlperl.s: dlperl.c - $(COMPILE.c) -S $(OUTPUT_OPTION) dlperl.c - -tags: $(DP_C) $(DP_H) - ctags $(DP_C) $(DP_H) - -lint: - $(LINT.c) $(DP_C) $(LINT_LN) - -clean: - rm -f core *.o - -clobber: clean - rm -f $(ALL) tags - -install: - -.KEEP_STATE: diff --git a/dlperl/dlperl.c b/dlperl/dlperl.c deleted file mode 100644 index 49d48bb197..0000000000 --- a/dlperl/dlperl.c +++ /dev/null @@ -1,1037 +0,0 @@ -static char sccsid[] = "@(#)dlperl.c 1.2 10/12/92 (DLPERL)"; - -/* - * name: dlperl.c - * synopsis: dlperl - perl interface to dynamically linked usubs - * sccsid: @(#)dlperl.c 1.2 10/12/92 - */ - -/* - * NOTE: this code is *not* portable - * - uses SPARC assembler with gcc asm extensions - * - is SPARC ABI specific - * - uses SunOS 4.x dlopen - * - * NOTE: not all types are currently implemented - * - multiple indirections (pointers to pointers, etc.) - * - structures - * - quad-precison (long double) - */ - -#include -#include -#include - -/* perl */ -#include "EXTERN.h" -#include "perl.h" - -/* globals */ -int Dl_warn = 1; -int Dl_errno; -#define DL_ERRSTR_SIZ 256 -char Dl_errstr[DL_ERRSTR_SIZ]; -#define WORD_SIZE (sizeof(int)) - -static int userval(); -static int userset(); -static int usersub(); - - -/* - * glue perl subroutines and variables to dlperl functions - */ -enum usersubs { - US_dl_open, - US_dl_sym, - US_dl_call, - US_dl_close, -}; - -enum uservars { - UV_DL_VERSION, - UV_DL_WARN, - UV_dl_errno, - UV_dl_errstr, -}; - - -int -dlperl_init() -{ - struct ufuncs uf; - char *file = "dlperl.c"; - - uf.uf_val = userval; - uf.uf_set = userset; - -#define MAGICVAR(name, ix) uf.uf_index = ix, magicname(name, &uf, sizeof uf) - - /* subroutines */ - make_usub("dl_open", US_dl_open, usersub, file); - make_usub("dl_sym", US_dl_sym, usersub, file); - make_usub("dl_call", US_dl_call, usersub, file); - make_usub("dl_close", US_dl_close, usersub, file); - - /* variables */ - MAGICVAR("DL_VERSION", (int) UV_DL_VERSION); - MAGICVAR("DL_WARN", (int) UV_DL_WARN); - MAGICVAR("dl_errno", (int) UV_dl_errno); - MAGICVAR("dl_errstr", (int) UV_dl_errstr); - - return 0; -} - - -/* - * USERVAL AND USERSET - */ - -/* - * assign dlperl variables to perl variables - */ -/*ARGSUSED*/ -static int -userval(ix, str) -int ix; -STR *str; -{ - switch(ix) { - case UV_DL_VERSION: - str_set(str, sccsid); - break; - case UV_DL_WARN: - str_numset(str, (double) Dl_warn); - break; - case UV_dl_errno: - str_numset(str, (double) Dl_errno); - break; - case UV_dl_errstr: - str_set(str, Dl_errstr); - break; - default: - fatal("dlperl: unimplemented userval"); - break; - } - return 0; -} - -/* - * assign perl variables to dlperl variables - */ -static int -userset(ix, str) -int ix; -STR *str; -{ - switch(ix) { - case UV_DL_WARN: - Dl_warn = (int) str_gnum(str); - break; - default: - fatal("dlperl: unimplemented userset"); - break; - } - return 0; -} - - -/* - * USERSUBS - */ -static int -usersub(ix, sp, items) -int ix; -register int sp; -register int items; -{ - int oldsp = sp; - STR **st = stack->ary_array + sp; - register STR *Str; /* used in str_get and str_gnum macros */ - - Dl_errno = 0; - *Dl_errstr = '\0'; - - switch(ix) { - case US_dl_open: - { - char *file; - void *dl_so; - - if(items != 1) { - fatal("Usage: $dl_so = &dl_open($file)"); - return oldsp; - } - - file = str_get(st[1]); - dl_so = dlopen(file, 1); - - --sp; - if(dl_so == NULL) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, "&dl_open: %s", dlerror()); - if(Dl_warn) warn(Dl_errstr); - - astore(stack, ++sp, str_mortal(&str_undef)); - } else { - astore(stack, ++sp, str_2mortal(str_make( - (char *) &dl_so, sizeof(void *)))); - } - break; - } - case US_dl_sym: - { - void *dl_so; - char *symbol; - void *dl_func; - - if(items != 2) { - fatal("Usage: $dl_func = &dl_sym($dl_so, $symbol)"); - return oldsp; - } - - dl_so = *(void **) str_get(st[1]); - symbol = str_get(st[2]); - dl_func = dlsym(dl_so, symbol); - - --sp; - if(dl_func == NULL) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, "&dl_sym: %s", dlerror()); - if(Dl_warn) warn(Dl_errstr); - - astore(stack, ++sp, str_mortal(&str_undef)); - } else { - astore(stack, ++sp, str_2mortal(str_make( - (char *) &dl_func, sizeof(void *)))); - } - break; - } - case US_dl_call: - { - void *dl_func; - char *parms_desc, *return_desc; - int nstack, nparm, narr, nlen, nrep; - int f_indirect, f_no_parm, f_result; - char c, *c_p; int c_pn = 0; - unsigned char C, *C_p; int C_pn = 0; - short s, *s_p; int s_pn = 0; - unsigned short S, *S_p; int S_pn = 0; - int i, *i_p; int i_pn = 0; - unsigned int I, *I_p; int I_pn = 0; - long l, *l_p; int l_pn = 0; - unsigned long L, *L_p; int L_pn = 0; - float f, *f_p; int f_pn = 0; - double d, *d_p; int d_pn = 0; - char *a, **a_p; int a_pn = 0; - char *p, **p_p; int p_pn = 0; - unsigned int *stack_base, *stack_p; - unsigned int *xp; - void (*func)(); - unsigned int ret_o; - double ret_fd; - float ret_f; - char *c1; - int n1, n2; - - if(items < 3) { -fatal("Usage: @vals = &dl_call($dl_func, $parms_desc, $return_desc, @parms)"); - return oldsp; - } - dl_func = *(void **) str_get(st[1]); - parms_desc = str_get(st[2]); - return_desc = str_get(st[3]); - - /* determine size of stack and temporaries */ -# define CNT_STK_TMP(PN, SN) \ - n2 = 0; do { \ - if(f_indirect) { \ - PN += narr; \ - ++nstack; \ - if(!f_no_parm) \ - nparm += narr; \ - } else { \ - nstack += SN; \ - if(!f_no_parm) \ - ++nparm; \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_no_parm = narr = nrep = 0; - - nstack = 0; - nparm = 0; - f_indirect = f_no_parm = narr = nrep = 0; - for(c1 = parms_desc;*c1;++c1) { - switch(*c1) { - case ' ': - case '\t': - break; - - case 'c': /* signed char */ - CNT_STK_TMP(c_pn, 1); - break; - case 'C': /* unsigned char */ - CNT_STK_TMP(C_pn, 1); - break; - case 's': /* signed short */ - CNT_STK_TMP(s_pn, 1); - break; - case 'S': /* unsigned short */ - CNT_STK_TMP(S_pn, 1); - break; - case 'i': /* signed int */ - CNT_STK_TMP(i_pn, 1); - break; - case 'I': /* unsigned int */ - CNT_STK_TMP(I_pn, 1); - break; - case 'l': /* signed long */ - CNT_STK_TMP(l_pn, 1); - break; - case 'L': /* unsigned long */ - CNT_STK_TMP(L_pn, 1); - break; - case 'f': /* float */ - CNT_STK_TMP(f_pn, 1); - break; - case 'd': /* double */ - CNT_STK_TMP(d_pn, 2); - break; - case 'a': /* ascii (null-terminated) string */ - CNT_STK_TMP(a_pn, 1); - break; - case 'p': /* pointer to buffer */ - CNT_STK_TMP(p_pn, 1); - break; - - case '&': /* pointer = [1] */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - narr = 1; - break; - case '[': /* array */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - narr = narr * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != ']') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected ]", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '<': /* length */ - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != '>') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected >", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '+': - break; - case '-': - f_no_parm = 1; - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if(nrep) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: too many repeats"); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - while(isdigit(*c1)) { - nrep = nrep * 10 + (*c1 - '0'); - ++c1; - } - --c1; - break; - default: - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - } - /* trailing &[]<>+-0-9 is ignored */ - if(nparm != items - 3) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: bad parameter count %d, expected %d", - items - 3, nparm); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - nparm = 4; - - /* allocate temporaries */ - if((c_pn && (c_p = (char *) - alloca(c_pn * sizeof(char))) == NULL) || - (C_pn && (C_p = (unsigned char *) - alloca(C_pn * sizeof(unsigned char))) == NULL) || - (s_pn && (s_p = (short *) - alloca(s_pn * sizeof(short))) == NULL) || - (S_pn && (S_p = (unsigned short *) - alloca(S_pn * sizeof(unsigned short))) == NULL) || - (i_pn && (i_p = (int *) - alloca(i_pn * sizeof(int))) == NULL) || - (I_pn && (I_p = (unsigned int *) - alloca(I_pn * sizeof(unsigned int))) == NULL) || - (l_pn && (l_p = (long *) - alloca(l_pn * sizeof(long))) == NULL) || - (L_pn && (L_p = (unsigned long *) - alloca(L_pn * sizeof(unsigned long))) == NULL) || - (f_pn && (f_p = (float *) - alloca(f_pn * sizeof(float))) == NULL) || - (d_pn && (d_p = (double *) - alloca(d_pn * sizeof(double))) == NULL) || - (a_pn && (a_p = (char **) - alloca(a_pn * sizeof(char *))) == NULL) || - (p_pn && (p_p = (char **) - alloca(p_pn * sizeof(char *))) == NULL)) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, "&dl_call: bad alloca"); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - - /* grow stack - maintains stack alignment (double word) */ - /* NOTE: no functions should be called otherwise the stack */ - /* that is being built will be corrupted */ - /* NOTE: some of the stack is pre-allocated, but is not */ - /* reused here */ - if(alloca(nstack * WORD_SIZE) == NULL) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, "&dl_call: bad alloca"); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - - /* stack base */ -#if !defined(lint) - asm("add %%sp,68,%%o0;st %%o0,%0" : - "=g" (stack_base) : /* input */ : "%%o0"); -#else - stack_base = 0; -#endif - stack_p = stack_base; - - /* layout stack */ -# define LAY_STK_NUM(T, P, PN) \ - n2 = 0; do { \ - if(f_indirect) { \ - *stack_p++ = (unsigned int) &P[PN]; \ - if(f_no_parm) { \ - PN += narr; \ - } else { \ - for(n1 = 0;n1 < narr;++n1) { \ - P[PN++] = (T) \ - str_gnum(st[nparm++]); \ - } \ - } \ - } else { \ - if(f_no_parm) { \ - ++stack_p; \ - } else { \ - *stack_p++ = (T) \ - str_gnum(st[nparm++]); \ - } \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_no_parm = narr = nrep = 0; - -# define LAY_STK_DOUBLE(T, P, PN) \ - n2 = 0; do { \ - if(f_indirect) { \ - *stack_p++ = (unsigned int) &P[PN]; \ - if(f_no_parm) { \ - PN += narr; \ - } else { \ - for(n1 = 0;n1 < narr;++n1) { \ - P[PN++] = (T) \ - str_gnum(st[nparm++]); \ - } \ - } \ - } else { \ - if(f_no_parm) { \ - stack_p += 2; \ - } else { \ - d = (T) str_gnum(st[nparm++]); \ - xp = (unsigned int *) &d; \ - *stack_p++ = *xp++; \ - *stack_p++ = *xp; \ - } \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_no_parm = narr = nrep = 0; - -# define LAY_STK_STR(P, PN) \ - n2 = 0; do { \ - if(f_indirect) { \ - *stack_p++ = (unsigned int) &P[PN]; \ - if(f_no_parm) { \ - PN += narr; \ - } else { \ - for(n1 = 0;n1 < narr;++n1) { \ - P[PN++] = \ - str_get(st[nparm++]); \ - } \ - } \ - } else { \ - if(f_no_parm) { \ - ++stack_p; \ - } else { \ - *stack_p++ = (unsigned int) \ - str_get(st[nparm++]); \ - } \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_no_parm = narr = nrep = 0; - - c_pn = C_pn = s_pn = S_pn = i_pn = I_pn = l_pn = L_pn = 0; - f_pn = d_pn = a_pn = p_pn = 0; - f_indirect = f_no_parm = narr = nrep = 0; - for(c1 = parms_desc;*c1;++c1) { - switch(*c1) { - case ' ': - case '\t': - break; - - case 'c': /* signed char */ - LAY_STK_NUM(char, c_p, c_pn); - break; - case 'C': /* unsigned char */ - LAY_STK_NUM(unsigned char, C_p, C_pn); - break; - case 's': /* signed short */ - LAY_STK_NUM(short, s_p, s_pn); - break; - case 'S': /* unsigned short */ - LAY_STK_NUM(unsigned short, S_p, S_pn); - break; - case 'i': /* signed int */ - LAY_STK_NUM(int, i_p, i_pn); - break; - case 'I': /* unsigned int */ - LAY_STK_NUM(unsigned int, I_p, I_pn); - break; - case 'l': /* signed long */ - LAY_STK_NUM(long, l_p, l_pn); - break; - case 'L': /* unsigned long */ - LAY_STK_NUM(unsigned long, L_p, L_pn); - break; - case 'f': /* float */ - LAY_STK_NUM(float, f_p, f_pn); - break; - case 'd': /* double */ - LAY_STK_DOUBLE(double, d_p, d_pn); - break; - case 'a': /* ascii (null-terminated) string */ - LAY_STK_STR(a_p, a_pn); - break; - case 'p': /* pointer to buffer */ - LAY_STK_STR(p_p, p_pn); - break; - - case '&': /* pointer = [1] */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - narr = 1; - break; - case '[': /* array */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - narr = narr * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != ']') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected ]", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '<': /* length */ - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != '>') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected >", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '+': - break; - case '-': - f_no_parm = 1; - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if(nrep) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: too many repeats"); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - while(isdigit(*c1)) { - nrep = nrep * 10 + (*c1 - '0'); - ++c1; - } - --c1; - break; - default: - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - } - /* trailing &[]<>+-0-9 is ignored */ - - /* call function */ - /* NOTE: the first 6 words are passed in registers %o0 - %o5 */ - /* %sp+68 to %sp+92 are vacant, but allocated */ - /* and shadow %o0 - %o5 */ - /* above stack_base starts at %sp+68 and the function */ - /* call below sets up %o0 - %o5 from stack_base */ - func = (void (*)()) dl_func; - (*func)(stack_base[0], stack_base[1], stack_base[2], - stack_base[3], stack_base[4], stack_base[5]); - - /* save return value */ - /* NOTE: return values are either in %o0 or %f0 */ -#if !defined(lint) - asm("st %%o0,%0" : "=g" (ret_o) : /* input */); - asm("std %%f0,%0" : "=g" (ret_fd) : /* input */); - asm("st %%f0,%0" : "=g" (ret_f) : /* input */); -#else - ret_o = 0; ret_fd = 0.0; ret_f = 0.0; -#endif - - /* parameter results */ -# define RES_NUM(P, PN, SN) \ - n2 = 0; do { \ - if(f_indirect) { \ - ++nstack; \ - if(f_result) { \ - for(n1 = 0;n1 < narr;++n1) { \ - astore(stack, ++sp, str_2mortal( \ - str_nmake((double) P[PN++]))); \ - } \ - } else { \ - PN += narr; \ - } \ - } else { \ - nstack += SN; \ - if(f_result) { \ - astore(stack, ++sp, \ - str_mortal(&str_undef));\ - } \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_result = narr = nlen = nrep = 0; - -# define RES_STR(P, PN, L, SN) \ - n2 = 0; do { \ - if(f_indirect) { \ - ++nstack; \ - if(f_result) { \ - for(n1 = 0;n1 < narr;++n1) { \ - astore(stack, ++sp, str_2mortal( \ - str_make(P[PN++], L))); \ - } \ - } else { \ - PN += narr; \ - } \ - } else { \ - if(f_result) { \ - astore(stack, ++sp, str_2mortal(\ - str_make((char *) \ - stack_base[nstack], L))); \ - } \ - nstack += SN; \ - } \ - } while(++n2 < nrep); \ - f_indirect = f_result = narr = nlen = nrep = 0; - - --sp; - nstack = 0; - c_pn = C_pn = s_pn = S_pn = i_pn = I_pn = l_pn = L_pn = 0; - f_pn = d_pn = a_pn = p_pn = 0; - f_indirect = f_result = narr = nlen = nrep = 0; - for(c1 = parms_desc;*c1;++c1) { - switch(*c1) { - case ' ': - case '\t': - break; - - case 'c': /* signed char */ - RES_NUM(c_p, c_pn, 1); - break; - case 'C': /* unsigned char */ - RES_NUM(C_p, C_pn, 1); - break; - case 's': /* signed short */ - RES_NUM(s_p, s_pn, 1); - break; - case 'S': /* unsigned short */ - RES_NUM(S_p, S_pn, 1); - break; - case 'i': /* signed int */ - RES_NUM(i_p, i_pn, 1); - break; - case 'I': /* unsigned int */ - RES_NUM(I_p, I_pn, 1); - break; - case 'l': /* signed long */ - RES_NUM(l_p, l_pn, 1); - break; - case 'L': /* unsigned long */ - RES_NUM(L_p, L_pn, 1); - break; - case 'f': /* float */ - RES_NUM(f_p, f_pn, 1); - break; - case 'd': /* double */ - RES_NUM(d_p, d_pn, 2); - break; - case 'a': /* ascii (null-terminated) string */ - RES_STR(a_p, a_pn, 0, 1); - break; - case 'p': /* pointer to buffer */ - RES_STR(p_p, p_pn, nlen, 1); - break; - - case '&': /* pointer = [1] */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - narr = 1; - break; - case '[': /* array */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: too many indirections, with char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - narr = narr * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != ']') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected ]", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '<': /* length */ - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - nlen = nlen * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != '>') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c, expected >", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '+': - f_result = 1; - break; - case '-': - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if(nrep) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: too many repeats"); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - while(isdigit(*c1)) { - nrep = nrep * 10 + (*c1 - '0'); - ++c1; - } - --c1; - break; - default: - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: parms_desc %s: bad char %c", - parms_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - } - /* trailing &[]<>+-0-9 is ignored */ - - /* return value */ -# define RET_NUM(T, S, P, R) \ - if(f_indirect) { \ - P = (T *) ret_o; \ - for(n1 = 0;n1 < narr;++n1) { \ - S = *P++; \ - astore(stack, ++sp, str_2mortal( \ - str_nmake((double) S))); \ - } \ - } else { \ - S = (T) R; \ - astore(stack, ++sp, str_2mortal( \ - str_nmake((double) S))); \ - } - -# define RET_STR(S, P, L) \ - if(f_indirect) { \ - P = (char **) ret_o; \ - for(n1 = 0;n1 < narr;++n1) { \ - S = *P++; \ - astore(stack, ++sp, str_2mortal( \ - str_make((char *) S, L))); \ - } \ - } else { \ - S = (char *) ret_o; \ - astore(stack, ++sp, str_2mortal( \ - str_make((char *) S, L))); \ - } - - f_indirect = nlen = narr = 0; - for(c1 = return_desc;*c1;++c1) { - switch(*c1) { - case ' ': - case '\t': - break; - - case 'c': /* signed char */ - RET_NUM(char, c, c_p, ret_o); - goto ret_exit; - case 'C': /* unsigned char */ - RET_NUM(unsigned char, C, C_p, ret_o); - goto ret_exit; - case 's': /* signed short */ - RET_NUM(short, s, s_p, ret_o); - goto ret_exit; - case 'S': /* unsigned short */ - RET_NUM(unsigned short, S, S_p, ret_o); - goto ret_exit; - case 'i': /* signed int */ - RET_NUM(int, i, i_p, ret_o); - goto ret_exit; - case 'I': /* unsigned int */ - RET_NUM(unsigned int, I, I_p, ret_o); - goto ret_exit; - case 'l': /* signed long */ - RET_NUM(long, l, l_p, ret_o); - goto ret_exit; - case 'L': /* unsigned long */ - RET_NUM(unsigned long, L, L_p, ret_o); - goto ret_exit; - case 'f': /* float */ - RET_NUM(float, f, f_p, ret_f); - break; - case 'd': /* double */ - RET_NUM(double, d, d_p, ret_fd); - goto ret_exit; - case 'a': /* ascii (null-terminated) string */ - RET_STR(a, a_p, 0); - goto ret_exit; - case 'p': /* pointer to buffer */ - RET_STR(p, p_p, nlen); - goto ret_exit; - - case '&': /* pointer = [1] */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: return_desc %s: too many indirections, with char %c", - return_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - narr = 1; - break; - case '[': /* array */ - if(f_indirect) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: return_desc %s: too many indirections, with char %c", - return_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - f_indirect = 1; - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - narr = narr * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != ']') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: return_desc %s: bad char %c, expected ]", - return_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - case '<': /* length */ - ++c1; - while(*c1 == ' ' && *c1 == '\t') - ++c1; - while(isdigit(*c1)) { - nlen = nlen * 10 + (*c1 - '0'); - ++c1; - } - while(*c1 == ' ' && *c1 == '\t') - ++c1; - if(*c1 != '>') { - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: return_desc %s: bad char %c, expected >", - return_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - break; - default: - Dl_errno = 1; - (void) sprintf(Dl_errstr, - "&dl_call: return_desc %s: bad char %c", - return_desc, *c1); - if(Dl_warn) warn(Dl_errstr); - return oldsp; - } - } -ret_exit: /* anything beyond first [cCsSiIlLdfap] is ignored */ - break; - } - case US_dl_close: - { - void *dl_so; - int dl_err; - - if(items != 1) { - fatal("Usage: $dl_err = &dl_close($dl_so)"); - return oldsp; - } - - dl_so = *(void **) str_get(st[1]); - dl_err = dlclose(dl_so); - - --sp; - if(dl_err) { - Dl_errno = 1; - (void) sprintf(Dl_errstr, "&dl_close: %s", dlerror()); - if(Dl_warn) warn(Dl_errstr); - } - astore(stack, ++sp, str_2mortal(str_nmake((double) dl_err))); - break; - } - default: - fatal("dlperl: unimplemented usersub"); - break; - } - return sp; -} diff --git a/dlperl/dlperl.doc b/dlperl/dlperl.doc deleted file mode 100644 index 7da0dfe1d8..0000000000 --- a/dlperl/dlperl.doc +++ /dev/null @@ -1,264 +0,0 @@ - - - -DLPERL(1) USER COMMANDS DLPERL(1) - - - -NAME - dlperl - dynamic link-editor subroutines for perl - -SYNOPSIS - $dl_so = &dl_open($file) - $dl_func = &dl_sym($dl_so, $symbol) - @vals = &dl_call($dl_func, $parms_desc, $return_desc, @parms) - $dl_err = &dl_close($dl_so) - - $DL_VERSION - $DL_WARN - $dl_errno - $dl_errstr - -DESCRIPTION - _D_l_p_e_r_l is _p_e_r_l plus user defined subroutines (_u_s_u_b_s) that - interface to the dynamic link-editor and can call most C and - Fortran functions whose object code has been linked into a - shared object file. - - Subroutines - - All _d_l_p_e_r_l subroutines set the two predefined names - $dl_errno and $dl_errstr. Only partial descriptions of - &dl_open, &dl_sym and &dl_close appear below, see _d_l_o_p_e_n(_3_x) - for a complete description. The following subroutines are - defined by _d_l_p_e_r_l: - - &dl_open($file) - Adds the shared object $_f_i_l_e to _d_l_p_e_r_l's address - space. Returns a descriptor that can be used for - later reference to the object in calls to &dl_sym - and &dl_close. When an error occurs an undef value - is returned. - - &dl_sym($dl_so, $symbol) - Obtains an address binding for the function $_s_y_m_b_o_l - as it occurs in the shared object identified by - $_d_l__s_o. When an error occurs an undef value is - returned. - - &dl_call($dl_func, $parms_desc, $return_desc, @parms) - Calls the function identified by $_d_l__f_u_n_c. The - function's entry parameters are described by - $_p_a_r_m_s__d_e_s_c and assigned values from @_p_a_r_m_s. The - function's exit value is described by $_r_e_t_u_r_n__d_e_s_c. - An array is returned that contains the values of any - result parameters and the return value. When an - error occurs because of a problem parsing the - descriptions or because of an incorrect parameter - count no values are returned (although the underly- - ing function may have been called). - - - -Sun Release 4.1 Last change: 10/16/92 1 - - - - - - -DLPERL(1) USER COMMANDS DLPERL(1) - - - - The descriptions are sequences of characters that - give the order and type of parameters: - - c A signed char value. - C An unsigned char value. - s A signed short value. - S An unsigned short value. - i A signed integer value. - I An unsigned integer value. - l A signed long value. - L An unsigned long value. - f A single-precision float. - d A double-precision float. - a An ascii (null-terminated) string. - p A pointer to buffer. - - Each letter may optionally be preceded by a number - that gives a repeat count. An array is specified by - a preceding [_a_r_r_a_y__s_i_z_e] (or & as a shorthand for - [_1]). (Multi-dimension arrays are not currently - supported.) Each scalar or array element is ini- - tialized from @_p_a_r_m_s. A preceding - leaves the - parameter uninitialized. Type _p expects a preceding - <_b_u_f_f_e_r__l_e_n_g_t_h>. A preceding + specifies that after - the function is called that particular parameter's - value is to be returned (multiple values are - returned for array types, a + with a integral type - like _i returns an undef value). The $_r_e_t_u_r_n__d_e_s_c - contains only one letter with no repeat count, - or - +. - - An undef or zero-length $_p_a_r_m__d_e_s_c means the func- - tion has no parameters. An undef or a zero-length - $_r_e_t_u_r_n__d_e_s_c means the function returns void. - Strings or buffers that must be a specific length - (because the values are overwritten) must be pre- - extended. Although type _f is supported, compilers - typically pass floats as doubles. - - &dl_close($dl_so) - Removes the shared object identified by $_d_l__s_o from - _d_l_p_e_r_l's address space. If successful, a value of - zero is returned. When an error occurs a non-zero - value is returned. - - Predefined Names - - The following names have special meaning to _d_l_p_e_r_l. - - $DL_VERSION - The version of _d_l_p_e_r_l. This variable is read-only. - - - - -Sun Release 4.1 Last change: 10/16/92 2 - - - - - - -DLPERL(1) USER COMMANDS DLPERL(1) - - - - $DL_WARN - The current value of the _d_l_p_e_r_l warning flag. - Default is 1. If non-zero, when errors occur warn- - ings are sent to standard error. The warning is the - same information that is stored in $dl_errstr. - - $dl_errno - The error number for the error that occurred. If a - _d_l_p_e_r_l subroutine completes successfully $dl_errno - is set to zero. This variable is read-only. - - $dl_errstr - The error message for the error that occurred. If a - _d_l_p_e_r_l subroutine completes successfully $dl_errstr - is set to a zero length string. This variable is - read-only. - -EXAMPLES - This is an example of calling a simple C function: - - open(OUT, ">example.c"); - print OUT <<'EOC'; - void - example(a1, a2, i1, d1, a3) - char *a1[2]; - char *a2[2]; - int i1; - double *d1; - char *a3[4]; - { - a3[i1 + (int) *d1] = a1[0]; - a3[i1 * (int) *d1] = a1[1]; - a3[(int) *d1 - i1] = a2[0]; - a3[(int) *d1 - 2 * i1] = a2[1]; - } - EOC - close(OUT); - - system("cc -c example.c;ld -o example.so example.o"); - - $dl_so = &dl_open("example.so"); - die "$0: $dl_errstr" if($dl_errno); - - $dl_func = &dl_sym($dl_so, "example"); - die "$0: $dl_errstr" if($dl_errno); - - $dl_func =~ s/(['\\])/\\$1/g; - eval < - -SEE ALSO - perl(1), dlopen(3X), ld(1) - -BUGS - Additional parameter types should be implemented to support - structures, multi-dimension arrays, pointers to arrays, - pointers to functions, etc. - - Unlike the _p_a_c_k operator, the repeat count precedes the - letter in the $_p_a_r_m__d_e_s_c syntax. The array size preceding - the parameter letter is also unconventional. - - All errors set $dl_errno to 1. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Sun Release 4.1 Last change: 10/16/92 4 - - - diff --git a/dlperl/dlperl.man b/dlperl/dlperl.man deleted file mode 100644 index 8879133ca2..0000000000 --- a/dlperl/dlperl.man +++ /dev/null @@ -1,219 +0,0 @@ -.\" -.\" name: dlperl.man -.\" synopsis: dlperl man page -.\" sccsid: @(#)dlperl.man 1.4 10/16/92 (DLPERL) -.\" -.ds RP 10/16/92 -.rn '' }` -.de Sh -.br -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp -.if t .sp .5v -.if n .sp -.. -.de Ip -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -''' -''' Set up \*(-- to give an unbreakable dash; -''' string Tr holds user defined translation string. -''' Bell System Logo is used as a dummy character. -''' -.tr \(*W-|\(bv\*(Tr -.ie n \{\ -.ds -- \(*W- -.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -.ds L" "" -.ds R" "" -.ds L' ' -.ds R' ' -'br\} -.el\{\ -.ds -- \(em\| -.tr \*(Tr -.ds L" `` -.ds R" '' -.ds L' ` -.ds R' ' -'br\} -.TH DLPERL 1 "\*(RP" -.UC -.SH NAME -dlperl \- dynamic link-editor subroutines for perl -.SH SYNOPSIS -.nf -.ft B -$dl_so = &dl_open($file) -$dl_func = &dl_sym($dl_so, $symbol) -@vals = &dl_call($dl_func, $parms_desc, $return_desc, @parms) -$dl_err = &dl_close($dl_so) -.ft -.fi -.LP -.nf -.ft B -$DL_VERSION -$DL_WARN -$dl_errno -$dl_errstr -.ft -.fi -.SH DESCRIPTION -.I Dlperl -is \fIperl\fP plus user defined subroutines (\fIusubs\fP) that -interface to the dynamic link-editor and can call most C and Fortran -functions whose object code has been linked into a shared object file. -.Sh "Subroutines" -All \fIdlperl\fP subroutines set the two predefined names $dl_errno and -$dl_errstr. Only partial descriptions of &dl_open, &dl_sym and -&dl_close appear below, see \fIdlopen(3x)\fP for a complete -description. The following subroutines are defined by \fIdlperl\fP: -.Ip "&dl_open($file)" 8 2 -Adds the shared object \fI$file\fP to \fIdlperl\fP's address space. -Returns a descriptor that can be used for later reference to the object -in calls to &dl_sym and &dl_close. When an error occurs -an undef value is returned. -.Ip "&dl_sym($dl_so, $symbol)" 8 2 -Obtains an address binding for the function \fI$symbol\fP as it occurs -in the shared object identified by \fI$dl_so\fP. When an error occurs -an undef value is returned. -.Ip "&dl_call($dl_func, $parms_desc, $return_desc, @parms)" 8 2 -Calls the function identified by \fI$dl_func\fP. The function's entry -parameters are described by \fI$parms_desc\fP and assigned values from -\fI@parms\fP. The function's exit value is described by -\fI$return_desc\fP. An array is returned that contains the values of -any result parameters and the return value. When an error occurs -because of a problem parsing the descriptions or because of an -incorrect parameter count no values are returned (although the -underlying function may have been called). -.Sp -The descriptions are sequences of characters that give the order and -type of parameters: -.nf - - c A signed char value. - C An unsigned char value. - s A signed short value. - S An unsigned short value. - i A signed integer value. - I An unsigned integer value. - l A signed long value. - L An unsigned long value. - f A single-precision float. - d A double-precision float. - a An ascii (null-terminated) string. - p A pointer to buffer. - -.fi -Each letter may optionally be preceded by a number that gives a repeat -count. An array is specified by a preceding \fI[array_size\fP] (or -\fI&\fP as a shorthand for \fI[1]\fP). (Multi-dimension arrays are not -currently supported.) Each scalar or array element is initialized from -\fI@parms\fP. A preceding \fI-\fP leaves the parameter uninitialized. -Type \fIp\fP expects a preceding \fI\fP. A preceding -\fI+\fP specifies that after the function is called that particular -parameter's value is to be returned (multiple values are returned for -array types, a \fI+\fP with a integral type like \fIi\fP returns an -undef value). The \fI$return_desc\fP contains only one letter with no -repeat count, \fI-\fP or \fI+\fP. -.Sp -An undef or zero-length \fI$parm_desc\fP means the function has no -parameters. An undef or a zero-length \fI$return_desc\fP means the -function returns void. Strings or buffers that must be a specific -length (because the values are overwritten) must be pre-extended. -Although type \fIf\fP is supported, compilers typically pass floats as -doubles. -.Ip "&dl_close($dl_so)" 8 2 -Removes the shared object identified by \fI$dl_so\fP from -\fIdlperl\fP's address space. If successful, a value of zero is -returned. When an error occurs a non-zero value is returned. -.Sh "Predefined Names" -The following names have special meaning to \fIdlperl\fP. -.Ip $DL_VERSION 8 -The version of \fIdlperl\fP. This variable is read-only. -.Ip $DL_WARN 8 -The current value of the \fIdlperl\fP warning flag. Default is 1. If -non-zero, when errors occur warnings are sent to standard error. The -warning is the same information that is stored in $dl_errstr. -.Ip $dl_errno 8 -The error number for the error that occurred. If a \fIdlperl\fP -subroutine completes successfully $dl_errno is set to zero. This variable -is read-only. -.Ip $dl_errstr 8 -The error message for the error that occurred. If a \fIdlperl\fP -subroutine completes successfully $dl_errstr is set to a zero length -string. This variable is read-only. -.SH EXAMPLES -This is an example of calling a simple C function: -.Sp -.nf - open(OUT, ">example.c"); - print OUT <<'EOC'; - void - example(a1, a2, i1, d1, a3) - char *a1[2]; - char *a2[2]; - int i1; - double *d1; - char *a3[4]; - { - a3[i1 + (int) *d1] = a1[0]; - a3[i1 * (int) *d1] = a1[1]; - a3[(int) *d1 - i1] = a2[0]; - a3[(int) *d1 - 2 * i1] = a2[1]; - } - EOC - close(OUT); - - system("cc -c example.c;ld -o example.so example.o"); - - $dl_so = &dl_open("example.so"); - die "$0: $dl_errstr" if($dl_errno); - - $dl_func = &dl_sym($dl_so, "example"); - die "$0: $dl_errstr" if($dl_errno); - - $dl_func =~ s/(['\e\e])/\e\e$1/g; - eval < -.SH SEE ALSO -.BR perl (1), -.BR dlopen (3X), -.BR ld (1) -.SH BUGS -Additional parameter types should be implemented to support structures, -multi-dimension arrays, pointers to arrays, pointers to functions, etc. -.LP -Unlike the \fIpack\fP operator, the repeat count precedes the letter in -the \fI$parm_desc\fP syntax. The array size preceding the parameter -letter is also unconventional. -.LP -All errors set $dl_errno to 1. -.rn }` '' diff --git a/dlperl/usersub.c b/dlperl/usersub.c deleted file mode 100644 index 4ba3d6d639..0000000000 --- a/dlperl/usersub.c +++ /dev/null @@ -1,72 +0,0 @@ -/* $RCSfile: usersub.c,v $$Revision: 4.0.1.1 $$Date: 91/11/05 19:07:24 $ - * - * $Log: usersub.c,v $ - * Revision 4.0.1.1 91/11/05 19:07:24 lwall - * patch11: there are now subroutines for calling back from C into Perl - * - * Revision 4.0 91/03/20 01:56:34 lwall - * 4.0 baseline. - * - * Revision 3.0.1.1 90/08/09 04:06:10 lwall - * patch19: Initial revision - * - */ - -#include "EXTERN.h" -#include "perl.h" - -int -userinit() -{ - dlperl_init(); -} - -/* Be sure to refetch the stack pointer after calling these routines. */ - -int -callback(subname, sp, gimme, hasargs, numargs) -char *subname; -int sp; /* stack pointer after args are pushed */ -int gimme; /* called in array or scalar context */ -int hasargs; /* whether to create a @_ array for routine */ -int numargs; /* how many args are pushed on the stack */ -{ - static ARG myarg[3]; /* fake syntax tree node */ - int arglast[3]; - - arglast[2] = sp; - sp -= numargs; - arglast[1] = sp--; - arglast[0] = sp; - - if (!myarg[0].arg_ptr.arg_str) - myarg[0].arg_ptr.arg_str = str_make("",0); - - myarg[1].arg_type = A_WORD; - myarg[1].arg_ptr.arg_stab = stabent(subname, FALSE); - - myarg[2].arg_type = hasargs ? A_EXPR : A_NULL; - - return do_subr(myarg, gimme, arglast); -} - -int -callv(subname, sp, gimme, argv) -char *subname; -register int sp; /* current stack pointer */ -int gimme; /* called in array or scalar context */ -register char **argv; /* null terminated arg list, NULL for no arglist */ -{ - register int items = 0; - int hasargs = (argv != 0); - - astore(stack, ++sp, Nullstr); /* reserve spot for 1st return arg */ - if (hasargs) { - while (*argv) { - astore(stack, ++sp, str_2mortal(str_make(*argv,0))); - items++; - argv++; - } - } - return callback(subname, sp, gimme, hasargs, items); -} diff --git a/doSH b/doSH old mode 100644 new mode 100755 index 1e95ad6367..e1760545f9 --- a/doSH +++ b/doSH @@ -1,48 +1,12 @@ -#!/bin/sh - -: if this fails, just run all the .SH files by hand -. ./config.sh - -( - cd x2p - rm -f config.sh - case "$d_symlink" in - *define*) ln -s ../config.sh . || ln ../config.sh .;; - *) ln ../config.sh . || ln -s ../config.sh . - esac -) - -cp cppstdin x2p - -echo " " -echo "Doing variable substitutions on .SH files..." -set x `awk '{print $1}' _cnt > 0) /* cheat a little, since */ return FALSE; /* this is the most usual case */ #endif @@ -590,7 +590,7 @@ GV *gv; (void)ungetc(ch, IoIFP(io)); return FALSE; } -#ifdef STDSTDIO +#ifdef USE_STD_STDIO if (IoIFP(io)->_cnt < -1) IoIFP(io)->_cnt = -1; #endif @@ -738,7 +738,7 @@ SV *argstr; I32 chsize(fd, length) I32 fd; /* file descriptor */ -off_t length; /* length to set file to */ +Off_t length; /* length to set file to */ { extern long lseek(); struct flock fl; @@ -1524,7 +1524,7 @@ SV **sp; STRLEN len; struct shmid_ds shmds; #ifndef VOIDSHMAT - extern char *shmat(); + extern char *shmat P((int, char *, int)); #endif id = SvIVx(*++mark); diff --git a/dump.c b/dump.c index 19633dc50e..932e1a2c40 100644 --- a/dump.c +++ b/dump.c @@ -61,6 +61,8 @@ HV* stash; HV *hv; if (GvCV(gv)) dump_sub(gv); + if (GvFORM(gv)) + dump_form(gv); if (*entry->hent_key == '_' && (hv = GvHV(gv)) && HvNAME(hv) && hv != defstash) dump_packsubs(hv); /* nested package */ @@ -73,18 +75,31 @@ dump_sub(gv) GV* gv; { SV *sv = sv_newmortal(); - if (GvCV(gv)) { - gv_fullname(sv,gv); - dump("\nSUB %s = ", SvPVX(sv)); - if (CvUSERSUB(GvCV(gv))) - dump("(xsub 0x%x %d)\n", - (long)CvUSERSUB(GvCV(gv)), - CvUSERINDEX(GvCV(gv))); - else if (CvROOT(GvCV(gv))) - dump_op(CvROOT(GvCV(gv))); - else - dump("\n"); - } + + gv_fullname(sv,gv); + dump("\nSUB %s = ", SvPVX(sv)); + if (CvUSERSUB(GvCV(gv))) + dump("(xsub 0x%x %d)\n", + (long)CvUSERSUB(GvCV(gv)), + CvUSERINDEX(GvCV(gv))); + else if (CvROOT(GvCV(gv))) + dump_op(CvROOT(GvCV(gv))); + else + dump("\n"); +} + +void +dump_form(gv) +GV* gv; +{ + SV *sv = sv_newmortal(); + + gv_fullname(sv,gv); + dump("\nFORMAT %s = ", SvPVX(sv)); + if (CvROOT(GvFORM(gv))) + dump_op(CvROOT(GvFORM(gv))); + else + dump("\n"); } void @@ -171,9 +186,22 @@ register OP *op; if (op->op_private & OPpREPEAT_DOLIST) (void)strcat(buf,"DOLIST,"); } - else if (op->op_type == OP_ENTERSUBR) { - if (op->op_private & OPpSUBR_DB) + else if (op->op_type == OP_ENTERSUBR || + op->op_type == OP_RV2SV || + op->op_type == OP_RV2AV || + op->op_type == OP_RV2HV || + op->op_type == OP_RV2GV || + op->op_type == OP_AELEM || + op->op_type == OP_HELEM ) + { + if (op->op_private & OPpDEREF_DB) (void)strcat(buf,"DB,"); + if (op->op_private & OPpDEREF_AV) + (void)strcat(buf,"AV,"); + if (op->op_private & OPpDEREF_HV) + (void)strcat(buf,"HV,"); + if (op->op_private & HINT_STRICT_REFS) + (void)strcat(buf,"STRICT_REFS,"); } else if (op->op_type == OP_CONST) { if (op->op_private & OPpCONST_BARE) diff --git a/eg/client b/eg/client new file mode 100755 index 0000000000..5900c90d09 --- /dev/null +++ b/eg/client @@ -0,0 +1,34 @@ +#!./perl + +$pat = 'S n C4 x8'; +$inet = 2; +$echo = 7; +$smtp = 25; +$nntp = 119; +$test = 2345; + +$SIG{'INT'} = 'dokill'; + +$this = pack($pat,$inet,0, 128,149,13,43); +$that = pack($pat,$inet,$test,127,0,0,1); + +if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; } +if (bind(S,$this)) { print "bind ok\n"; } else { die $!; } +if (connect(S,$that)) { print "connect ok\n"; } else { die $!; } + +select(S); $| = 1; select(stdout); + +if ($child = fork) { + while () { + print S; + } + sleep 3; + do dokill(); +} +else { + while () { + print; + } +} + +sub dokill { kill 9,$child if $child; } diff --git a/eg/server b/eg/server new file mode 100755 index 0000000000..49a140a4c2 --- /dev/null +++ b/eg/server @@ -0,0 +1,27 @@ +#!./perl + +$pat = 'S n C4 x8'; +$inet = 2; +$echo = 7; +$smtp = 25; +$nntp = 119; + +$this = pack($pat,$inet,2345, 0,0,0,0); +select(NS); $| = 1; select(stdout); + +if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; } +if (bind(S,$this)) { print "bind ok\n"; } else { die $!; } +if (listen(S,5)) { print "listen ok\n"; } else { die $!; } +for (;;) { + print "Listening again\n"; + if ($addr = accept(NS,S)) { print "accept ok\n"; } else { die $!; } + + @ary = unpack($pat,$addr); + $, = ' '; + print @ary; print "\n"; + + while () { + print; + print NS; + } +} diff --git a/embed.h b/embed.h index d94649d2ca..f7970786d5 100644 --- a/embed.h +++ b/embed.h @@ -40,7 +40,7 @@ #define freq perl_freq #define gid perl_gid #define hexdigit perl_hexdigit -#define in_format perl_in_format +#define hints perl_hints #define in_my perl_in_my #define know_next perl_know_next #define last_lop perl_last_lop @@ -57,7 +57,6 @@ #define multi_open perl_multi_open #define multi_start perl_multi_start #define na perl_na -#define needblockscope perl_needblockscope #define nexttype perl_nexttype #define nextval perl_nextval #define no_aelem perl_no_aelem @@ -185,7 +184,6 @@ #define av_fake perl_av_fake #define av_fetch perl_av_fetch #define av_fill perl_av_fill -#define av_free perl_av_free #define av_len perl_av_len #define av_make perl_av_make #define av_pop perl_av_pop @@ -232,7 +230,7 @@ #define cpy7bit perl_cpy7bit #define cpytill perl_cpytill #define croak perl_croak -#define cv_clear perl_cv_clear +#define cv_undef perl_cv_undef #define cxinc perl_cxinc #define deb perl_deb #define deb_growlevel perl_deb_growlevel @@ -302,11 +300,11 @@ #define gv_init perl_gv_init #define he_delayfree perl_he_delayfree #define he_free perl_he_free +#define hint perl_hint #define hoistmust perl_hoistmust #define hv_clear perl_hv_clear #define hv_delete perl_hv_delete #define hv_fetch perl_hv_fetch -#define hv_free perl_hv_free #define hv_iterinit perl_hv_iterinit #define hv_iterkey perl_hv_iterkey #define hv_iternext perl_hv_iternext @@ -577,7 +575,6 @@ #define pp_index perl_pp_index #define pp_indread perl_pp_indread #define pp_int perl_pp_int -#define pp_intadd perl_pp_intadd #define pp_interp perl_pp_interp #define pp_ioctl perl_pp_ioctl #define pp_iter perl_pp_iter diff --git a/ext/dbm/ODBM_File.xs b/ext/dbm/ODBM_File.xs index 74554c71e6..04d7b9e7cf 100644 --- a/ext/dbm/ODBM_File.xs +++ b/ext/dbm/ODBM_File.xs @@ -19,7 +19,9 @@ typedef void* ODBM_File; static int dbmrefcnt; +#ifndef DBM_REPLACE #define DBM_REPLACE 0 +#endif MODULE = ODBM_File PACKAGE = ODBM_File PREFIX = odbm_ diff --git a/ext/dbm/SDBM_File.so b/ext/dbm/SDBM_File.so new file mode 100755 index 0000000000..87f4749b2c Binary files /dev/null and b/ext/dbm/SDBM_File.so differ diff --git a/ext/dbm/perl b/ext/dbm/perl new file mode 120000 index 0000000000..899dc46edb --- /dev/null +++ b/ext/dbm/perl @@ -0,0 +1 @@ +../../perl \ No newline at end of file diff --git a/ext/dbm/sdbm/Makefile b/ext/dbm/sdbm/Makefile new file mode 100755 index 0000000000..80b09cd37b --- /dev/null +++ b/ext/dbm/sdbm/Makefile @@ -0,0 +1,47 @@ +# +# This Makefile is for the library part of sdbm. For the +# Full package, see makefile.sdbm. +# +# Makefile for public domain ndbm-clone: sdbm +# DUFF: use duff's device (loop unroll) in parts of the code +# +# +CC = cc +ranlib = /usr/bin/ranlib +TOP = ../../.. +LDFLAGS = +CLDFLAGS = +SMALL = +LARGE = + +# To use an alternate make, set in config.sh. +MAKE = make + +SHELL = /bin/sh +CCCMD = `sh $(shellflags) $(TOP)/cflags $@` + +.c.o: + $(CCCMD) -I$(TOP) -DSDBM -DDUFF $*.c + +LIBOBJS = sdbm.o pair.o hash.o +LIBSRCS = sdbm.c pair.c hash.c +HDRS = tune.h sdbm.h pair.h $(TOP)/config.h + +libsdbm.a: $(LIBOBJS) + ar cr libsdbm.a $(LIBOBJS) + $(ranlib) libsdbm.a + +$(LIBOBJS): $(HDRS) + +lint: + lint -abchx $(LIBSRCS) + +clean: + rm -f *.o *.a mon.out core + +realclean: clean + rm -f dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag + rm -f makefile Makefile + +purge: realclean + diff --git a/ext/dbm/sdbm/Makefile.SH b/ext/dbm/sdbm/Makefile.SH new file mode 100644 index 0000000000..9a19fa2ed5 --- /dev/null +++ b/ext/dbm/sdbm/Makefile.SH @@ -0,0 +1,80 @@ +if test -f config.sh; then TOP=.; +elif test -f ../config.sh; then TOP=..; +elif test -f ../../config.sh; then TOP=../..; +elif test -f ../../../config.sh; then TOP=../../..; +elif test -f ../../../../config.sh; then TOP=../../../..; +else + echo "Can't find config.sh."; exit 1 +fi +case $CONFIG in +'') + . $TOP/config.sh + ;; +esac +: This forces SH files to create target in same directory as SH file. +: This is so that make depend always knows where to find SH derivatives. + +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac + +echo "Extracting ext/dbm/sdbm/Makefile (with variable substitutions)" +: This section of the file will have variable substitutions done on it. +: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. +: Protect any dollar signs and backticks that you do not want interpreted +: by putting a backslash in front. You may delete these comments. +$spitshell >Makefile <>Makefile <<'!NO!SUBS!' +SHELL = /bin/sh +CCCMD = `sh $(shellflags) $(TOP)/cflags $@` + +.c.o: + $(CCCMD) -I$(TOP) -DSDBM -DDUFF $*.c + +LIBOBJS = sdbm.o pair.o hash.o +LIBSRCS = sdbm.c pair.c hash.c +HDRS = tune.h sdbm.h pair.h $(TOP)/config.h + +libsdbm.a: $(LIBOBJS) + ar cr libsdbm.a $(LIBOBJS) + $(ranlib) libsdbm.a + +$(LIBOBJS): $(HDRS) + +lint: + lint -abchx $(LIBSRCS) + +clean: + rm -f *.o *.a mon.out core + +realclean: clean + rm -f dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag + rm -f makefile Makefile + +purge: realclean + +!NO!SUBS! +chmod 755 Makefile +$eunicefix Makefile diff --git a/ext/dbm/sdbm/README.too b/ext/dbm/sdbm/README.too index d60ccf0f4b..c2d095944d 100644 --- a/ext/dbm/sdbm/README.too +++ b/ext/dbm/sdbm/README.too @@ -1,3 +1,9 @@ This version of sdbm merely has all the dbm_* names translated to sdbm_* so that we can link ndbm and sdbm into the same executable. (It also has the bad() macro redefined to allow a zero-length key.) + + +Fri Apr 15 10:15:30 EDT 1994. + +Additional portability/configuration changes for libsdbm by Andy Dougherty +doughera@lafcol.lafayette.edu. diff --git a/ext/dbm/sdbm/dbm.h b/ext/dbm/sdbm/dbm.h index dce48fed07..1196953d96 100644 --- a/ext/dbm/sdbm/dbm.h +++ b/ext/dbm/sdbm/dbm.h @@ -26,7 +26,9 @@ #define NULL ((char *) 0) #endif -#include +#ifdef I_NDBM +# include +#endif datum fetch(); datum firstkey(); diff --git a/ext/dbm/sdbm/hash.c b/ext/dbm/sdbm/hash.c index 9b55a7f571..eb585ac102 100644 --- a/ext/dbm/sdbm/hash.c +++ b/ext/dbm/sdbm/hash.c @@ -7,6 +7,7 @@ * hashing routine */ +#include "config.h" #include "sdbm.h" /* * polynomial conversion ignoring overflows diff --git a/ext/dbm/sdbm/libsdbm.a b/ext/dbm/sdbm/libsdbm.a new file mode 100644 index 0000000000..baf4b73942 Binary files /dev/null and b/ext/dbm/sdbm/libsdbm.a differ diff --git a/ext/dbm/sdbm/libsdbm_pure_q552_110.a b/ext/dbm/sdbm/libsdbm_pure_q552_110.a new file mode 100644 index 0000000000..3b426e8154 Binary files /dev/null and b/ext/dbm/sdbm/libsdbm_pure_q552_110.a differ diff --git a/ext/dbm/sdbm/makefile.sdbm b/ext/dbm/sdbm/makefile.sdbm new file mode 100644 index 0000000000..c959c1fab5 --- /dev/null +++ b/ext/dbm/sdbm/makefile.sdbm @@ -0,0 +1,55 @@ +# +# makefile for public domain ndbm-clone: sdbm +# DUFF: use duff's device (loop unroll) in parts of the code +# +CFLAGS = -O -DSDBM -DDUFF -DBSD42 -pic +#LDFLAGS = -p + +OBJS = sdbm.o pair.o hash.o +SRCS = sdbm.c pair.c hash.c dbu.c dba.c dbd.c util.c +HDRS = tune.h sdbm.h pair.h +MISC = README CHANGES COMPARE sdbm.3 dbe.c dbe.1 dbm.c dbm.h biblio \ + readme.ms readme.ps + +all: dbu dba dbd dbe + +dbu: dbu.o sdbm util.o + cc $(LDFLAGS) -o dbu dbu.o util.o libsdbm.a + +dba: dba.o util.o + cc $(LDFLAGS) -o dba dba.o util.o +dbd: dbd.o util.o + cc $(LDFLAGS) -o dbd dbd.o util.o +dbe: dbe.o sdbm + cc $(LDFLAGS) -o dbe dbe.o libsdbm.a + +sdbm: $(OBJS) + ar cr libsdbm.a $(OBJS) + ranlib libsdbm.a +### cp libsdbm.a /usr/lib/libsdbm.a + +dba.o: sdbm.h +dbu.o: sdbm.h +util.o:sdbm.h + +$(OBJS): sdbm.h tune.h pair.h + +# +# dbu using berkelezoid ndbm routines [if you have them] for testing +# +#x-dbu: dbu.o util.o +# cc $(CFLAGS) -o x-dbu dbu.o util.o +lint: + lint -abchx $(SRCS) + +clean: + rm -f *.o mon.out core + +purge: clean + rm -f dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag + +shar: + shar $(MISC) makefile $(SRCS) $(HDRS) >SDBM.SHAR + +readme: + nroff -ms readme.ms | col -b >README diff --git a/ext/dbm/sdbm/pair.c b/ext/dbm/sdbm/pair.c index a3941716d9..575b34c6c1 100644 --- a/ext/dbm/sdbm/pair.c +++ b/ext/dbm/sdbm/pair.c @@ -11,14 +11,11 @@ static char rcsid[] = "$Id: pair.c,v 1.10 90/12/13 13:00:35 oz Exp $"; #endif +#include "config.h" #include "sdbm.h" #include "tune.h" #include "pair.h" -#ifndef BSD42 -#include -#endif - #define exhash(item) sdbm_hash((item).dptr, (item).dsize) /* @@ -195,7 +192,7 @@ datum key; } } #else -#ifdef MEMMOVE +#ifdef HAS_MEMMOVE memmove(dst, src, m); #else while (m--) diff --git a/ext/dbm/sdbm/sdbm.c b/ext/dbm/sdbm/sdbm.c index d4ecdceb07..d09adccdd3 100644 --- a/ext/dbm/sdbm/sdbm.c +++ b/ext/dbm/sdbm/sdbm.c @@ -11,27 +11,22 @@ static char rcsid[] = "$Id: sdbm.c,v 1.16 90/12/13 13:01:31 oz Exp $"; #endif +#include "config.h" #include "sdbm.h" #include "tune.h" #include "pair.h" -#include -#include -#ifdef BSD42 -#include -#else -#include -#include +#ifdef I_FCNTL +# include #endif -#include -#include - -#ifdef __STDC__ -#include +#ifdef I_SYS_FILE +# include #endif -#ifndef NULL -#define NULL 0 +#ifdef I_STRING +# include +#else +# include #endif /* @@ -41,9 +36,9 @@ static char rcsid[] = "$Id: sdbm.c,v 1.16 90/12/13 13:01:31 oz Exp $"; extern int errno; #endif -extern char *malloc proto((unsigned int)); +extern Malloc_t malloc proto((MEM_SIZE)); extern void free proto((void *)); -extern long lseek(); +extern Off_t lseek(); /* * forward @@ -522,3 +517,4 @@ register DBM *db; return ioerr(db), nullitem; } + diff --git a/ext/dbm/sdbm/sdbm.h b/ext/dbm/sdbm/sdbm.h index e2fc762aab..f94b054999 100644 --- a/ext/dbm/sdbm/sdbm.h +++ b/ext/dbm/sdbm/sdbm.h @@ -89,3 +89,153 @@ extern long sdbm_hash proto((char *, int)); #define dbm_error sdbm_error; #define dbm_clearerr sdbm_clearerr; #endif + +/* Most of the following is stolen from perl.h. */ +#ifndef H_PERL /* Include guard */ + +/* + * The following contortions are brought to you on behalf of all the + * standards, semi-standards, de facto standards, not-so-de-facto standards + * of the world, as well as all the other botches anyone ever thought of. + * The basic theory is that if we work hard enough here, the rest of the + * code can be a lot prettier. Well, so much for theory. Sorry, Henry... + */ + +#include +#ifdef HAS_SOCKET +# ifdef I_NET_ERRNO +# include +# endif +#endif + +#ifdef MYMALLOC +# ifdef HIDEMYMALLOC +# define malloc Mymalloc +# define realloc Myremalloc +# define free Myfree +# endif +# define safemalloc malloc +# define saferealloc realloc +# define safefree free +#endif + +#if defined(__STDC__) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus) +# define STANDARD_C 1 +#endif + +#if defined(STANDARD_C) +# define P(args) args +#else +# define P(args) () +#endif + +#include +#include +#include + +#ifdef I_UNISTD +#include +#endif + +#ifndef MSDOS +# ifdef PARAM_NEEDS_TYPES +# include +# endif +# include +#endif + +#ifndef _TYPES_ /* If types.h defines this it's easy. */ +# ifndef major /* Does everyone's types.h define this? */ +# include +# endif +#endif + +#ifdef I_UNISTD +#include +#endif + +#include + +#ifndef SEEK_SET +# ifdef L_SET +# define SEEK_SET L_SET +# else +# define SEEK_SET 0 /* Wild guess. */ +# endif +#endif + +/* Use all the "standard" definitions? */ +#ifdef STANDARD_C +# include +# ifdef I_STRING +# include +# endif +# define MEM_SIZE size_t +#else +# ifdef I_MEMORY +# include +# endif + typedef unsigned int MEM_SIZE; +#endif /* STANDARD_C */ + +#if defined(HAS_MEMCMP) && defined(mips) && defined(ultrix) +# undef HAS_MEMCMP +#endif + +#ifdef HAS_MEMCPY +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) +# ifndef memcpy + extern char * memcpy P((char*, char*, int)); +# endif +# endif +#else +# ifndef memcpy +# ifdef HAS_BCOPY +# define memcpy(d,s,l) bcopy(s,d,l) +# else +# define memcpy(d,s,l) my_bcopy(s,d,l) +# endif +# endif +#endif /* HAS_MEMCPY */ + +#ifdef HAS_MEMSET +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) +# ifndef memset + extern char *memset P((char*, int, int)); +# endif +# endif +# define memzero(d,l) memset(d,0,l) +#else +# ifndef memzero +# ifdef HAS_BZERO +# define memzero(d,l) bzero(d,l) +# else +# define memzero(d,l) my_bzero(d,l) +# endif +# endif +#endif /* HAS_MEMSET */ + +#ifdef HAS_MEMCMP +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) +# ifndef memcmp + extern int memcmp P((char*, char*, int)); +# endif +# endif +#else +# ifndef memcmp +# define memcmp(s1,s2,l) my_memcmp(s1,s2,l) +# endif +#endif /* HAS_MEMCMP */ + +/* we prefer bcmp slightly for comparisons that don't care about ordering */ +#ifndef HAS_BCMP +# ifndef bcmp +# define bcmp(s1,s2,l) memcmp(s1,s2,l) +# endif +#endif /* HAS_BCMP */ + +#ifdef I_NETINET_IN +# include +#endif + +#endif /* Include guard */ diff --git a/ext/dbm/sdbm/tune.h b/ext/dbm/sdbm/tune.h index 9d8a35b90b..b95c8c8634 100644 --- a/ext/dbm/sdbm/tune.h +++ b/ext/dbm/sdbm/tune.h @@ -6,17 +6,6 @@ #define BYTESIZ 8 -#ifdef SVID -#include -#endif - -#ifdef BSD42 -#define SEEK_SET L_SET -#define memset(s,c,n) bzero(s, n) /* only when c is zero */ -#define memcpy(s1,s2,n) bcopy(s2, s1, n) -#define memcmp(s1,s2,n) bcmp(s1,s2,n) -#endif - /* * important tuning parms (hah) */ diff --git a/ext/dl/dl_hpux.c b/ext/dl/dl_hpux.c new file mode 100644 index 0000000000..57adcc6188 --- /dev/null +++ b/ext/dl/dl_hpux.c @@ -0,0 +1,71 @@ +/* +Date: Mon, 25 Apr 94 14:15:30 PDT +From: Jeff Okamoto +To: doughera@lafcol.lafayette.edu +Cc: okamoto@hpcc101.corp.hp.com, Jarkko.Hietaniemi@hut.fi, ram@acri.fr, + john@WPI.EDU, k@franz.ww.TU-Berlin.DE, dmm0t@rincewind.mech.virginia.edu, + lwall@netlabs.com +Subject: dl.c.hpux + +This is what I hacked around and came up with for HP-UX. (Or maybe it should +be called dl_hpux.c). Notice the change in suffix from .so to .sl (the +default suffix for HP-UX shared libraries). + +Jeff +*/ +#include + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +static int +XS_DynamicLoader_bootstrap(ix, ax, items) +register int ix; +register int ax; +register int items; +{ + if (items < 1 || items > 1) { + croak("Usage: DynamicLoader::bootstrap(package)"); + } + { + char* package = SvPV(ST(1),na); + shl_t obj = NULL; + int (*bootproc)(); + char tmpbuf[1024]; + char tmpbuf2[128]; + AV *av = GvAVn(incgv); + I32 i; + + for (i = 0; i <= AvFILL(av); i++) { + (void)sprintf(tmpbuf, "%s/auto/%s/%s.sl", + SvPVx(*av_fetch(av, i, TRUE), na), package, package); + if (obj = shl_load(tmpbuf, + BIND_IMMEDIATE | BIND_NONFATAL | BIND_NOSTART,0L)) + break; + } + if (obj != (shl_t) NULL) + croak("Can't find loadable object for package %s in @INC", package); + + sprintf(tmpbuf2, "boot_%s", package); + i = shl_findsym(&obj, tmpbuf2, TYPE_PROCEDURE, &bootproc); + if (i == -1) + croak("Shared object %s contains no %s function", tmpbuf, tmpbuf2); + bootproc(); + + ST(0) = sv_mortalcopy(&sv_yes); + } + return ax; +} + +int +boot_DynamicLoader(ix,sp,items) +int ix; +int sp; +int items; +{ + char* file = __FILE__; + + newXSUB("DynamicLoader::bootstrap", 0, XS_DynamicLoader_bootstrap, file); +} + diff --git a/ext/dl/dl_next.c b/ext/dl/dl_next.c new file mode 100644 index 0000000000..66e95121de --- /dev/null +++ b/ext/dl/dl_next.c @@ -0,0 +1,69 @@ +/* dl_next.c + Author: tom@smart.bo.open.de (Thomas Neumann). + Based on dl_sunos.c +*/ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#include +#include + +static int +XS_DynamicLoader_bootstrap(ix, ax, items) +register int ix; +register int ax; +register int items; +{ + if (items < 1 || items > 1) { + croak("Usage: DynamicLoader::bootstrap(package)"); + } + { + char* package = SvPV(ST(1),na); + int rld_success; + NXStream *nxerr = NXOpenFile(fileno(stderr), NX_READONLY); + int (*bootproc)(); + char tmpbuf[1024]; + char tmpbuf2[128]; + AV *av = GvAVn(incgv); + I32 i; + + for (i = 0; i <= AvFILL(av); i++) { + char *p[2]; + p[0] = tmpbuf; + p[1] = 0; + sprintf(tmpbuf, "%s/auto/%s/%s.so", + SvPVx(*av_fetch(av, i, TRUE), na), package, package); + if (rld_success = rld_load(nxerr, (struct mach_header **)0, p, + (const char *)0)) + { + break; + } + } + if (!rld_success) { + NXClose(nxerr); + croak("Can't find loadable object for package %s in @INC", package); + + } + sprintf(tmpbuf2, "_boot_%s", package); + if (!rld_lookup(nxerr, tmpbuf2, (unsigned long *)&bootproc)) { + NXClose(nxerr); + croak("Shared object %s contains no %s function", tmpbuf, tmpbuf2); + } + NXClose(nxerr); + (*bootproc)(); + ST(0) = sv_mortalcopy(&sv_yes); + } + return ax; +} + +int +boot_DynamicLoader(ix,sp,items) +int ix; +int sp; +int items; +{ + char* file = __FILE__; + + newXSUB("DynamicLoader::bootstrap", 0, XS_DynamicLoader_bootstrap, file); +} diff --git a/ext/dl/dl_sunos.c b/ext/dl/dl_sunos.c new file mode 100644 index 0000000000..badd66d678 --- /dev/null +++ b/ext/dl/dl_sunos.c @@ -0,0 +1,56 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifdef I_DLFCN +# include +#endif + +static int +XS_DynamicLoader_bootstrap(ix, ax, items) +register int ix; +register int ax; +register int items; +{ + if (items < 1 || items > 1) { + croak("Usage: DynamicLoader::bootstrap(package)"); + } + { + char* package = SvPV(ST(1),na); + void* obj = 0; + int (*bootproc)(); + char tmpbuf[1024]; + char tmpbuf2[128]; + AV *av = GvAVn(incgv); + I32 i; + + for (i = 0; i <= AvFILL(av); i++) { + (void)sprintf(tmpbuf, "%s/auto/%s/%s.so", + SvPVx(*av_fetch(av, i, TRUE), na), package, package); + if (obj = dlopen(tmpbuf,1)) + break; + } + if (!obj) + croak("Can't find loadable object for package %s in @INC", package); + + sprintf(tmpbuf2, "boot_%s", package); + bootproc = (int (*)())dlsym(obj, tmpbuf2); + if (!bootproc) + croak("Shared object %s contains no %s function", tmpbuf, tmpbuf2); + bootproc(); + + ST(0) = sv_mortalcopy(&sv_yes); + } + return ax; +} + +int +boot_DynamicLoader(ix,sp,items) +int ix; +int sp; +int items; +{ + char* file = __FILE__; + + newXSUB("DynamicLoader::bootstrap", 0, XS_DynamicLoader_bootstrap, file); +} diff --git a/ext/dl/eg/test b/ext/dl/eg/test new file mode 100755 index 0000000000..2a8b92570e Binary files /dev/null and b/ext/dl/eg/test differ diff --git a/ext/dl/eg/test1 b/ext/dl/eg/test1 new file mode 100755 index 0000000000..e9a37e9e53 Binary files /dev/null and b/ext/dl/eg/test1 differ diff --git a/ext/posix/POSIX.xs b/ext/posix/POSIX.xs index 0c48b9ef52..a439494dac 100644 --- a/ext/posix/POSIX.xs +++ b/ext/posix/POSIX.xs @@ -13,7 +13,9 @@ #include #include #include +#ifdef I_PWD #include +#endif #include #include #ifdef I_STDARG @@ -30,7 +32,7 @@ #include #include #include -#ifndef CR3 +#if defined(I_TERMIOS) && !defined(CR3) #include #endif #include @@ -44,7 +46,7 @@ typedef HV* POSIX__SigAction; #define HAS_UNAME #ifndef HAS_GETPGRP -#define getpgrp(a,b) not_here("getpgrp") +#define getpgrp() not_here("getpgrp") #endif #ifndef HAS_NICE #define nice(a) not_here("nice") @@ -55,9 +57,6 @@ typedef HV* POSIX__SigAction; #ifndef HAS_SETPGID #define setpgid(a,b) not_here("setpgid") #endif -#ifndef HAS_SETPGRP -#define setpgrp(a,b) not_here("setpgrp") -#endif #ifndef HAS_SETSID #define setsid() not_here("setsid") #endif @@ -2090,7 +2089,7 @@ isalnum(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isalnum(*s)) RETVAL = 0; OUTPUT: @@ -2102,7 +2101,7 @@ isalpha(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isalpha(*s)) RETVAL = 0; OUTPUT: @@ -2114,7 +2113,7 @@ iscntrl(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!iscntrl(*s)) RETVAL = 0; OUTPUT: @@ -2126,7 +2125,7 @@ isdigit(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isdigit(*s)) RETVAL = 0; OUTPUT: @@ -2138,7 +2137,7 @@ isgraph(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isgraph(*s)) RETVAL = 0; OUTPUT: @@ -2150,7 +2149,7 @@ islower(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!islower(*s)) RETVAL = 0; OUTPUT: @@ -2162,7 +2161,7 @@ isprint(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isprint(*s)) RETVAL = 0; OUTPUT: @@ -2174,7 +2173,7 @@ ispunct(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!ispunct(*s)) RETVAL = 0; OUTPUT: @@ -2186,7 +2185,7 @@ isspace(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isspace(*s)) RETVAL = 0; OUTPUT: @@ -2198,7 +2197,7 @@ isupper(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isupper(*s)) RETVAL = 0; OUTPUT: @@ -2210,7 +2209,7 @@ isxdigit(charstring) CODE: char *s; RETVAL = 1; - for (s = charstring; *s; s++) + for (s = charstring; *s && RETVAL; s++) if (!isxdigit(*s)) RETVAL = 0; OUTPUT: @@ -2370,7 +2369,7 @@ sigaction(sig, action, oldaction = 0) # interface look beautiful, which is hard. if (!siggv) - gv_fetchpv("SIG", TRUE); + gv_fetchpv("SIG", TRUE, SVt_PVHV); { struct sigaction act; @@ -2406,7 +2405,7 @@ sigaction(sig, action, oldaction = 0) act.sa_mask = *sigset; } else - sigemptyset(act.sa_mask); + sigemptyset(& act.sa_mask); /* Set up any desired flags. */ svp = hv_fetch(action, "FLAGS", 5, FALSE); @@ -2415,11 +2414,11 @@ sigaction(sig, action, oldaction = 0) /* Now work around sigaction oddities */ if (action && oldaction) - RETVAL = sigaction(sig, act, oact); + RETVAL = sigaction(sig, & act, & oact); else if (action) - RETVAL = sigaction(sig, act, (struct sigaction*)0); + RETVAL = sigaction(sig, & act, (struct sigaction*)0); else if (oldaction) - RETVAL = sigaction(sig, (struct sigaction*)0, oact); + RETVAL = sigaction(sig, (struct sigaction*)0, & oact); if (oldaction) { /* Get back the mask. */ @@ -2473,135 +2472,99 @@ void _exit(status) int status -int +SysRet close(fd) int fd -int +SysRet dup(fd) int fd -int +SysRet dup2(fd1, fd2) int fd1 int fd2 -int -fstat(fd, buf) - int fd - struct stat * buf = (struct stat*)sv_grow(ST(2),sizeof(struct stat)); - CLEANUP: - SvCUR(ST(2)) = sizeof(struct stat); - -int -getpgrp(pid) - int pid - -int -link() - -int +SysRet lseek() + int fd + Off_t offset + int whence -int -lstat() - -int -mkdir() - -int +SysRet nice(incr) int incr int pipe() + PPCODE: + int fds[2]; + sp--; + if (pipe(fds) != -1) { + EXTEND(sp,2); + PUSHs(sv_2mortal(newSViv(fds[0]))); + PUSHs(sv_2mortal(newSViv(fds[1]))); + } -int +SysRet read() + CODE: + int fd; + char * buffer; + size_t nbytes; -int -rename() - -int -rmdir() + RETVAL = read(fd, buffer, nbytes); + croak("POSIX::read() not implemented yet\n"); + OUTPUT: + RETVAL -int -setgid() +SysRet +setgid(gid) + Gid_t gid -int +SysRet setpgid(pid, pgid) pid_t pid pid_t pgid -int -setpgrp(pid, pgrp) - int pid - int pgrp - pid_t setsid() -int -setuid() - -int -stat() - -int -symlink() - -int -system() +SysRet +setuid(uid) + Uid_t uid pid_t tcgetpgrp(fd) int fd -int +SysRet tcsetpgrp(fd, pgrp_id) int fd pid_t pgrp_id int -times(tms) - struct tms * tms = (struct tms*)sv_grow(ST(1), sizeof(struct tms)); - CLEANUP: - SvCUR(ST(1)) = sizeof(struct tms); - -int -umask() - -void uname() PPCODE: - struct utsname utsname; + struct utsname buf; sp--; - if (uname(&utsname) >= 0) { + if (uname(&buf) >= 0) { EXTEND(sp, 5); - PUSHs(sv_2mortal(newSVpv(utsname.sysname, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.nodename, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.release, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.version, 0))); - PUSHs(sv_2mortal(newSVpv(utsname.machine, 0))); + PUSHs(sv_2mortal(newSVpv(buf.sysname, 0))); + PUSHs(sv_2mortal(newSVpv(buf.nodename, 0))); + PUSHs(sv_2mortal(newSVpv(buf.release, 0))); + PUSHs(sv_2mortal(newSVpv(buf.version, 0))); + PUSHs(sv_2mortal(newSVpv(buf.machine, 0))); } -int -unlink() - -int -utime() - -int -wait() - -int -waitpid(pid, statusp, options) - int pid - int &statusp - int options - OUTPUT: - statusp - -int +SysRet write() + CODE: + int fd; + char * buffer; + size_t nbytes; + RETVAL = write(fd, buffer, nbytes); + croak("POSIX::write() not implemented yet\n"); + OUTPUT: + RETVAL diff --git a/ext/posix/typemap b/ext/posix/typemap index 4cf2975c9d..e339f10c49 100644 --- a/ext/posix/typemap +++ b/ext/posix/typemap @@ -1,6 +1,10 @@ -mode_t T_INT -pid_t T_INT -fd T_INT +mode_t T_NV +pid_t T_NV +Uid_t T_NV +Time_t T_NV +Gid_t T_NV +Off_t T_NV +fd T_IV FILE * T_PTR FileHandle T_PTROBJ POSIX::SigSet T_PTROBJ diff --git a/ext/typemap b/ext/typemap index 24895dc890..1d0c9baef3 100644 --- a/ext/typemap +++ b/ext/typemap @@ -1,13 +1,14 @@ # $Header$ # basic C types -int T_INT -unsigned T_U_INT -unsigned int T_U_INT -long T_LONG -unsigned long T_U_LONG -short T_SHORT -unsigned short T_U_SHORT +int T_IV +unsigned T_IV +unsigned int T_IV +long T_NV +unsigned long T_NV +short T_IV +unsigned short T_IV char T_CHAR +unsigned char T_U_CHAR char * T_STRING unsigned char * T_STRING caddr_t T_STRING @@ -20,10 +21,12 @@ AV * T_AVOBJ HV * T_HVOBJ CV * T_CVOBJ -I32 T_LONG -I16 T_SHORT +I32 T_IV +I16 T_IV +I8 T_IV U32 T_U_LONG U16 T_U_SHORT +U8 T_IV Result T_U_CHAR Boolean T_U_CHAR double T_DOUBLE @@ -55,6 +58,8 @@ T_CVOBJ croak(\"$var is not of type ${ntype}\") T_SYSRET $var NOT IMPLEMENTED +T_IV + $var = ($type)SvIV($arg) T_INT $var = (int)SvIV($arg) T_ENUM @@ -75,37 +80,53 @@ T_U_CHAR $var = (unsigned char)SvIV($arg) T_FLOAT $var = (float)SvNV($arg) +T_NV + $var = ($type)SvNV($arg) T_DOUBLE - $var = SvNV($arg) + $var = (double)SvNV($arg) T_STRING $var = SvPV($arg,na) T_PTR $var = ($type)(unsigned long)SvNV($arg) T_PTRREF - if (SvROK($arg)) - $var = ($type)(unsigned long)SvNV((SV*)SvRV($arg)); + if (SvROK($arg)) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV($arg)); + $var = ($type) tmp; + } else croak(\"$var is not a reference\") T_PTROBJ - if (sv_isa($arg, \"${ntype}\")) - $var = ($type)(unsigned long)SvNV((SV*)SvRV($arg)); + if (sv_isa($arg, \"${ntype}\")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV($arg)); + $var = ($type) tmp; + } else croak(\"$var is not of type ${ntype}\") T_PTRDESC if (sv_isa($arg, \"${ntype}\")) { - ${type}_desc = (\U${type}_DESC\E*)(unsigned long)SvNV((SV*)SvRV($arg)); + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV($arg)); + ${type}_desc = (\U${type}_DESC\E*) tmp; $var = ${type}_desc->ptr; } else croak(\"$var is not of type ${ntype}\") T_REFREF - if (SvROK($arg)) - $var = *($type)(unsigned long)SvNV((SV*)SvRV($arg)); + if (SvROK($arg)) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV($arg)); + $var = *($type) tmp; + } else croak(\"$var is not a reference\") T_REFOBJ - if (sv_isa($arg, \"${ntype}\")) - $var = *($type)(unsigned long)SvNV((SV*)SvRV($arg)); + if (sv_isa($arg, \"${ntype}\")) { + unsigned long tmp; + tmp = (unsigned long)SvNV((SV*)SvRV($arg)); + $var = *($type) tmp; + } else croak(\"$var is not of type ${ntype}\") T_OPAQUE @@ -136,6 +157,8 @@ T_HVOBJ $arg = newRV((SV*)$var); T_CVOBJ $arg = newRV((SV*)$var); +T_IV + sv_setiv($arg, (I32)$var); T_INT sv_setiv($arg, (I32)$var); T_SYSRET @@ -163,8 +186,10 @@ T_U_CHAR sv_setiv($arg, (I32)$var); T_FLOAT sv_setnv($arg, (double)$var); +T_NV + sv_setnv($arg, (double)$var); T_DOUBLE - sv_setnv($arg, $var); + sv_setnv($arg, (double)$var); T_STRING sv_setpv($arg, $var); T_PTR diff --git a/fib4 b/fib4 new file mode 100755 index 0000000000..71b11f10b3 --- /dev/null +++ b/fib4 @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +sub fib +{ + local($a) = $_[0]; + ($a < 2) ? $a : &fib($a-1) + &fib($a-2); +} + +sub myruntime +{ + local(@t) = times; # in seconds + $t[0] + $t[1]; +} + +$x = (shift || 20); +print "Starting fib($x)\n"; +$before = &myruntime; +$y = &fib($x); +$after = &myruntime; +printf("Done. Result $y in %g cpu seconds.\n", $after-$before); + diff --git a/fixmac b/fixmac deleted file mode 100755 index c2f633b3fc..0000000000 --- a/fixmac +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/perl -i.bak - -while (<>) { - s/\bSvIV\b/SvIVX/g; - s/\bSvNV\b/SvNVX/g; - s/\bSvPV\b/SvPVX/g; - s/\bSvIVn/SvIV/g; - s/\bSvNVn/SvNV/g; - s/\bSvPVn/SvPV/g; - print; -} diff --git a/fixpp b/fixpp deleted file mode 100755 index f75a175fb1..0000000000 --- a/fixpp +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl - -@lines = <>; -for (@lines) { - $line++; - - if (/^PP\(pp_(\w+)/) { $newname = $1; $fixed = 1; $mark = 0; next; } - if (/^}/) { $fixed{$newname} = $fixed; $mark{$newname} = $mark; $newname=''} - - next unless $fixed; - - if (/^#ifdef NOTDEF/) { $fixed = 0; } - if (/MSP;/) { $mark = 1; } - - if (/\bMEXTEND/ && $mark == 0) { warn "Inconsistent mark line $line\n"; } - if (/\bMXPUSH/ && $mark == 0) { warn "Inconsistent mark line $line\n"; } - if (/\bMRETURN/ && $mark == 0) { warn "Inconsistent mark line $line\n"; } - - if (/\bEXTEND/ && $mark == 1) { warn "Inconsistent mark line $line\n"; } - if (/\bXPUSH/ && $mark == 1) { warn "Inconsistent mark line $line\n"; } - if (/\bRETURN/ && $mark == 1) { warn "Inconsistent mark line $line\n"; } - -} - -for (@lines) { - if (m#^ 0, /\* pp_(\w+)#) { - $_ = " pp_$1,\n" if $fixed{$1}; - } - elsif (m#^ [01], /\* (\w+)[^,]#) { - s/\d/$mark{$1} + 0/e; - } - last if /^PP/; -} - -print @lines; diff --git a/fo b/fo deleted file mode 100755 index b0619cbc2c..0000000000 --- a/fo +++ /dev/null @@ -1,179 +0,0 @@ -#!./perl - -print "1..37\n"; - -# Test glob operations. - -$bar = "ok 1\n"; -$foo = "ok 2\n"; -{ - local(*foo) = *bar; - print $foo; -} -print $foo; - -$baz = "ok 3\n"; -$foo = "ok 4\n"; -{ - local(*foo) = 'baz'; - print $foo; -} -print $foo; - -$foo = "ok 6\n"; -{ - local(*foo); - print $foo; - $foo = "ok 5\n"; - print $foo; -} -print $foo; - -# Test fake references. - -$baz = "ok 7\n"; -$bar = 'baz'; -$foo = 'bar'; -print $$$foo; - -# Test real references. - -$FOO = \$BAR; -$BAR = \$BAZ; -$BAZ = "ok 8\n"; -print $$$FOO; - -# Test references to real arrays. - -@ary = (9,10,11,12); -$ref[0] = \@a; -$ref[1] = \@b; -$ref[2] = \@c; -$ref[3] = \@d; -for $i (3,1,2,0) { - push(@{$ref[$i]}, "ok $ary[$i]\n"); -} -print @a; -print ${$ref[1]}[0]; -print @{$ref[2]}[0]; -print @{'d'}; - -# Test references to references. - -$refref = \\$x; -$x = "ok 13\n"; -print $$$refref; - -# Test nested anonymous lists. - -$ref = [[],2,[3,4,5,]]; -print scalar @$ref == 3 ? "ok 14\n" : "not ok 14\n"; -print $$ref[1] == 2 ? "ok 15\n" : "not ok 15\n"; -print ${$$ref[2]}[2] == 5 ? "ok 16\n" : "not ok 16\n"; -print scalar @{$$ref[0]} == 0 ? "ok 17\n" : "not ok 17\n"; - -print $ref->[1] == 2 ? "ok 18\n" : "not ok 18\n"; -print $ref->[2]->[0] == 3 ? "ok 19\n" : "not ok 18\n"; - -# Test references to hashes of references. - -$refref = \%whatever; -$refref->{"key"} = $ref; -print $refref->{"key"}->[2]->[0] == 3 ? "ok 20\n" : "not ok 20\n"; - -# Test to see if anonymous subarrays spring into existence. - -$spring[5]->[0] = 123; -$spring[5]->[1] = 456; -push(@{$spring[5]}, 789); -print join(':',@{$spring[5]}) eq "123:456:789" ? "ok 21\n" : "not ok 21\n"; - -# Test to see if anonymous subhashes spring into existence. - -@{$spring2{"foo"}} = (1,2,3); -$spring2{"foo"}->[3] = 4; -print join(':',@{$spring2{"foo"}}) eq "1:2:3:4" ? "ok 22\n" : "not ok 22\n"; - -# Test references to subroutines. - -sub mysub { print "ok 23\n" } -$subref = \&mysub; -&$subref; - -$subrefref = \\&mysub2; -&$$subrefref("ok 24\n"); -sub mysub2 { print shift } - -# Test the ref operator. - -print ref $subref eq CODE ? "ok 25\n" : "not ok 25\n"; -print ref $ref eq ARRAY ? "ok 26\n" : "not ok 26\n"; -print ref $refref eq HASH ? "ok 27\n" : "not ok 27\n"; - -# Test anonymous hash syntax. - -$anonhash = {}; -print ref $anonhash eq HASH ? "ok 28\n" : "not ok 28\n"; -$anonhash2 = {FOO => BAR, ABC => XYZ,}; -print join('', sort values %$anonhash2) eq BARXYZ ? "ok 29\n" : "not ok 29\n"; - -# Test bless operator. - -package MYHASH; - -$object = bless $main'anonhash2; -print ref $object eq MYHASH ? "ok 30\n" : "not ok 30\n"; -print $object->{ABC} eq XYZ ? "ok 31\n" : "not ok 31\n"; - -$object2 = bless {}; -print ref $object2 eq MYHASH ? "ok 32\n" : "not ok 32\n"; - -# Test ordinary call on object method. - -&mymethod($object,33); - -sub mymethod { - local($THIS, @ARGS) = @_; - die "Not a MYHASH" unless ref $THIS eq MYHASH; - print $THIS->{FOO} eq BAR ? "ok $ARGS[0]\n" : "not ok $ARGS[0]\n"; -} - -# Test automatic destructor call. - -$string = "not ok 34\n"; -$object = "foo"; -$string = "ok 34\n"; -$main'anonhash2 = "foo"; -$string = "not ok 34\n"; - -sub DESTROY { - print $string; - - # Test that the object has already been "cursed". - print ref shift eq HASH ? "ok 35\n" : "not ok 35\n"; -} - -# Now test inheritance of methods. - -package OBJ; - -@ISA = (BASEOBJ); - -$main'object = bless {FOO => foo, BAR => bar}; - -package main; - -# Test arrow-style method invocation. - -print $object->doit("BAR") eq bar ? "ok 36\n" : "not ok 36\n"; - -# Test indirect-object-style method invocation. - -$foo = doit $object "FOO"; -print $foo eq foo ? "ok 37\n" : "not ok 37\n"; - -sub BASEOBJ'doit { - local $ref = shift; - die "Not an OBJ" unless ref $ref eq OBJ; - $ref->{shift}; -} diff --git a/foo b/foo index 88dac06e79..fcd3091bdf 100755 --- a/foo +++ b/foo @@ -1,17 +1,5 @@ #!./perl -$foo = <cop_line++; - if (in_eval && !rsfp) { - eol = index(s,'\n'); - if (!eol++) - eol = bufend; - } - else - eol = bufend = linestr->sv_ptr + linestr->sv_cur; - if (perldb) { - SV *tmpstr = NEWSV(89,0); - - sv_setpvn(tmpstr, s, eol-s); - av_store(GvAV(curcop->cop_filegv), (int)curcop->cop_line,tmpstr); - } - if (*s == '.') { - /*SUPPRESS 530*/ - for (t = s+1; *t == ' ' || *t == '\t'; t++) ; - if (*t == '\n') { - bufptr = s; - return froot.ff_next; - } - } - if (*s == '#') { - s = eol; - continue; - } - flinebeg = Nullfield; - noblank = FALSE; - repeater = FALSE; - while (s < eol) { - Newz(804,fcmd,1,FF); - fprev->ff_next = fcmd; - fprev = fcmd; - for (t=s; t < eol && *t != '@' && *t != '^'; t++) { - if (*t == '~') { - noblank = TRUE; - *t = ' '; - if (t[1] == '~') { - repeater = TRUE; - t[1] = ' '; - } - } - } - fcmd->ff_pre = nsavestr(s, t-s); - fcmd->ff_presize = t-s; - s = t; - if (s >= eol) { - if (noblank) - fcmd->ff_flags |= FFf_NOBLANK; - if (repeater) - fcmd->ff_flags |= FFf_REPEAT; - break; - } - if (!flinebeg) - flinebeg = fcmd; /* start values here */ - if (*s++ == '^') - fcmd->ff_flags |= FFf_CHOP; /* for doing text filling */ - switch (*s) { - case '*': - fcmd->ff_type = FFt_LINES; - *s = '\0'; - break; - case '<': - fcmd->ff_type = FFt_LEFT; - while (*s == '<') - s++; - break; - case '>': - fcmd->ff_type = FFt_RIGHT; - while (*s == '>') - s++; - break; - case '|': - fcmd->ff_type = FFt_CENTER; - while (*s == '|') - s++; - break; - case '#': - case '.': - /* Catch the special case @... and handle it as a string - field. */ - if (*s == '.' && s[1] == '.') { - goto default_format; - } - fcmd->ff_type = FFt_DECIMAL; - { - char *p; - - /* Read a run_format in the form @####.####, where either group - of ### may be empty, or the final .### may be missing. */ - while (*s == '#') - s++; - if (*s == '.') { - s++; - p = s; - while (*s == '#') - s++; - fcmd->ff_decimals = s-p; - fcmd->ff_flags |= FFf_DP; - } else { - fcmd->ff_decimals = 0; - } - } - break; - default: - default_format: - fcmd->ff_type = FFt_LEFT; - break; - } - if (fcmd->ff_flags & FFf_CHOP && *s == '.') { - fcmd->ff_flags |= FFf_MORE; - while (*s == '.') - s++; - } - fcmd->ff_size = s-t; - } - if (flinebeg) { - again: - if (s >= bufend && - (!rsfp || (s = sv_gets(linestr, rsfp, 0)) == Nullch) ) - goto badform; - curcop->cop_line++; - if (in_eval && !rsfp) { - eol = index(s,'\n'); - if (!eol++) - eol = bufend; - } - else - eol = bufend = linestr->sv_ptr + linestr->sv_cur; - if (perldb) { - SV *tmpstr = NEWSV(90,0); - - sv_setpvn(tmpstr, s, eol-s); - av_store(GvAV(curcop->cop_filegv), - (int)curcop->cop_line,tmpstr); - } - if (strnEQ(s,".\n",2)) { - bufptr = s; - yyerror("Missing values line"); - return froot.ff_next; - } - if (*s == '#') { - s = eol; - goto again; - } - sv = flinebeg->ff_unparsed = NEWSV(91,eol - s); - sv->sv_u.sv_hv = curstash; - sv_setpvn(sv,"(",1); - flinebeg->ff_line = curcop->cop_line; - eol[-1] = '\0'; - if (!flinebeg->ff_next->ff_type || index(s, ',')) { - eol[-1] = '\n'; - sv_catpvn(sv, s, eol - s - 1); - sv_catpvn(sv,",$$);",5); - s = eol; - } - else { - eol[-1] = '\n'; - while (s < eol && isSPACE(*s)) - s++; - t = s; - while (s < eol) { - switch (*s) { - case ' ': case '\t': case '\n': case ';': - sv_catpvn(sv, t, s - t); - sv_catpvn(sv, "," ,1); - while (s < eol && (isSPACE(*s) || *s == ';')) - s++; - t = s; - break; - case '$': - sv_catpvn(sv, t, s - t); - t = s; - s = scan_ident(s,eol,tokenbuf,FALSE); - sv_catpvn(sv, t, s - t); - t = s; - if (s < eol && *s && index("$'\"",*s)) - sv_catpvn(sv, ",", 1); - break; - case '"': case '\'': - sv_catpvn(sv, t, s - t); - t = s; - s++; - while (s < eol && (*s != *t || s[-1] == '\\')) - s++; - if (s < eol) - s++; - sv_catpvn(sv, t, s - t); - t = s; - if (s < eol && *s && index("$'\"",*s)) - sv_catpvn(sv, ",", 1); - break; - default: - yyerror("Please use commas to separate fields"); - } - } - sv_catpvn(sv,"$$);",4); - } - } - } - badform: - bufptr = SvPV(linestr); - yyerror("Format not terminated"); - return froot.ff_next; -} - diff --git a/forop b/forop deleted file mode 100644 index d741d7af0a..0000000000 --- a/forop +++ /dev/null @@ -1,47 +0,0 @@ -OP * -newFOROP(label,forline,scalar,expr,block,cont) -char *label; -line_t forline; -OP *scalar; -OP *expr -OP *block -OP *cont; -{ - OP *newop; - - copline = forline; - - /* - * The following gobbledygook catches EXPRs that - * aren't explicit array refs and translates - * foreach VAR (EXPR) - * into - * @ary = EXPR; - * foreach VAR (@ary) - * where @ary is a hidden array made by newGVgen(). - * (Note that @ary may become a local array if - * it is determined that it might be called - * recursively. See cmd_tosave().) - */ - if (expr->op_type != OP_ARRAY) { - scrstab = gv_AVadd(newGVgen()); - newop = append_elem(OP_LINESEQ, - newSTATEOP(label, - newBINOP(OP_ASSIGN, - listref(newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab))), - forcelist(expr))), - loopscope(over(scalar,newSTATEOP(label, - newLOOPOP( 0, - newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab)), - block,cont))))); - newop->cop_line = forline; - newop->cop_head->cop_line = forline; - } - else { - newop = loopscope(over(scalar,newSTATEOP(label, - newLOOPOP(1,expr,block,cont) ))); - } - return newop; -} diff --git a/global.sym b/global.sym index 21c6ca6557..d496c9025b 100644 --- a/global.sym +++ b/global.sym @@ -37,7 +37,7 @@ fold freq gid hexdigit -in_format +hints in_my know_next last_lop @@ -54,7 +54,6 @@ multi_end multi_open multi_start na -needblockscope nexttype nextval no_aelem @@ -185,7 +184,6 @@ av_clear av_fake av_fetch av_fill -av_free av_len av_make av_pop @@ -232,7 +230,7 @@ convert cpy7bit cpytill croak -cv_clear +cv_undef cxinc deb deb_growlevel @@ -302,11 +300,11 @@ gv_fullname gv_init he_delayfree he_free +hint hoistmust hv_clear hv_delete hv_fetch -hv_free hv_iterinit hv_iterkey hv_iternext @@ -577,7 +575,6 @@ pp_hslice pp_index pp_indread pp_int -pp_intadd pp_interp pp_ioctl pp_iter diff --git a/goto b/goto deleted file mode 100755 index 7024b7f329..0000000000 --- a/goto +++ /dev/null @@ -1,10 +0,0 @@ -#!./perl -Dpxstl -#!./perl -w - -foo: while (1) { - bar: { - goto bar; - bar: ; - } - print "here\n"; -} diff --git a/gv.c b/gv.c index e5eee1c908..790e0be89d 100644 --- a/gv.c +++ b/gv.c @@ -71,7 +71,7 @@ char *name; GV *gv; sprintf(tmpbuf,"::_<%s", name); - gv = gv_fetchpv(tmpbuf, TRUE); + gv = gv_fetchpv(tmpbuf, TRUE, SVt_PVGV); sv_setpv(GvSV(gv), name); if (*name == '/') SvMULTI_on(gv); @@ -164,16 +164,17 @@ char* name; for (nend = name; *nend; nend++) { if (*nend == ':' || *nend == '\'') { - return gv_fetchpv(name, FALSE); + return gv_fetchpv(name, FALSE, SVt_PVCV); } } return gv_fetchmeth(stash, name, nend - name); } GV * -gv_fetchpv(nambeg,add) +gv_fetchpv(nambeg,add,svtype) char *nambeg; I32 add; +I32 svtype; { register char *name = nambeg; register GV *gv = 0; @@ -182,31 +183,35 @@ I32 add; register char *namend; HV *stash = 0; bool global = FALSE; - char tmpbuf[256]; + char *tmpbuf; for (namend = name; *namend; namend++) { if ((*namend == '\'' && namend[1]) || (*namend == ':' && namend[1] == ':')) { - len = namend - name; - *tmpbuf = '_'; - Copy(name, tmpbuf+1, len, char); - len++; - tmpbuf[len] = '\0'; if (!stash) stash = defstash; - if (len > 1) { + len = namend - name; + if (len > 0) { + New(601, tmpbuf, len+2, char); + *tmpbuf = '_'; + Copy(name, tmpbuf+1, len, char); + tmpbuf[++len] = '\0'; gvp = (GV**)hv_fetch(stash,tmpbuf,len,add); + Safefree(tmpbuf); if (!gvp || *gvp == (GV*)&sv_undef) return Nullgv; gv = *gvp; + if (SvTYPE(gv) == SVt_PVGV) SvMULTI_on(gv); else gv_init(gv, stash, nambeg, namend - nambeg, (add & 2)); + if (!(stash = GvHV(gv))) stash = GvHV(gv) = newHV(); + if (!HvNAME(stash)) HvNAME(stash) = nsavestr(nambeg, namend - nambeg); } @@ -250,8 +255,10 @@ I32 add; global = TRUE; if (global) stash = defstash; - else if ((COP*)curcop == &compiling) - stash = curstash; + else if ((COP*)curcop == &compiling) { + if (!(hints & HINT_STRICT_VARS) || svtype == SVt_PVCV) + stash = curstash; + } else stash = curcop->cop_stash; } @@ -291,6 +298,14 @@ I32 add; AV* av = GvAVn(gv); SvMULTI_on(gv); sv_magic((SV*)av, (SV*)gv, 'I', 0, 0); + if (add & 2 && strEQ(nambeg,"Any_DBM_File::ISA") && AvFILL(av) == -1) + { + av_push(av, newSVpv("NDBM_File",0)); + av_push(av, newSVpv("DB_File",0)); + av_push(av, newSVpv("GDBM_File",0)); + av_push(av, newSVpv("SDBM_File",0)); + av_push(av, newSVpv("ODBM_File",0)); + } } break; case 'S': @@ -445,7 +460,7 @@ newIO() sv_upgrade(io,SVt_PVIO); SvREFCNT(io) = 1; SvOBJECT_on(io); - iogv = gv_fetchpv("FileHandle::", TRUE); + iogv = gv_fetchpv("FileHandle::", TRUE, SVt_PVIO); SvSTASH(io) = (HV*)SvREFCNT_inc(GvHV(iogv)); return io; } @@ -486,7 +501,7 @@ GV * newGVgen() { (void)sprintf(tokenbuf,"_GEN_%d",gensym++); - return gv_fetchpv(tokenbuf,TRUE); + return gv_fetchpv(tokenbuf,TRUE, SVt_PVGV); } /* hopefully this is only called on local symbol table entries */ @@ -553,36 +568,3 @@ register GV *gv; return GvGP(gv_HVadd(gv))->gp_hv; } #endif /* Microport 2.4 hack */ - -GV * -fetch_gv(op,num) -OP *op; -I32 num; -{ - if (op->op_private < num) - return 0; - if (op->op_flags & OPf_STACKED) - return gv_fetchpv(SvPVx(*(stack_sp--), na),TRUE); - else - return cGVOP->op_gv; -} - -IO * -fetch_io(op,num) -OP *op; -I32 num; -{ - GV *gv; - - if (op->op_private < num) - return 0; - if (op->op_flags & OPf_STACKED) - gv = gv_fetchpv(SvPVx(*(stack_sp--), na),TRUE); - else - gv = cGVOP->op_gv; - - if (!gv) - return 0; - - return GvIOn(gv); -} diff --git a/handy.h b/handy.h index 102b840dea..a450b4c7b3 100644 --- a/handy.h +++ b/handy.h @@ -26,6 +26,7 @@ * */ +#if !defined(__STDC__) #ifdef NULL #undef NULL #endif @@ -34,6 +35,8 @@ #else # define NULL 0L #endif +#endif + #define Null(type) ((type)NULL) #define Nullch Null(char*) #define Nullfp Null(FILE*) @@ -54,6 +57,16 @@ #define TRUE (1) #define FALSE (0) +#ifdef UNICOS +#define I8 char +#define U8 unsigned char +#define I16 short +#define U16 unsigned short +#define I32 int +#define U32 unsigned int + +#else + typedef char I8; typedef unsigned char U8; @@ -61,13 +74,15 @@ typedef short I16; typedef unsigned short U16; #if INTSIZE == 4 -typedef int I32; -typedef unsigned int U32; + typedef int I32; + typedef unsigned int U32; #else -typedef long I32; -typedef unsigned long U32; + typedef long I32; + typedef unsigned long U32; #endif +#endif /* UNICOS */ + #define Ctl(ch) (ch & 037) #define strNE(s1,s2) (strcmp(s1,s2)) @@ -86,13 +101,13 @@ typedef unsigned long U32; #endif #if defined(CTYPE256) || (!defined(isascii) && !defined(HAS_ISASCII)) -#define isALNUM(c) (isalpha(c) || isdigit(c) || c == '_') -#define isIDFIRST(c) (isalpha(c) || (c) == '_') -#define isALPHA(c) isalpha(c) -#define isSPACE(c) isspace(c) -#define isDIGIT(c) isdigit(c) -#define isUPPER(c) isupper(c) -#define isLOWER(c) islower(c) +#define isALNUM(c) (isalpha((unsigned char)(c)) || isdigit((unsigned char)(c)) || c == '_') +#define isIDFIRST(c) (isalpha((unsigned char)(c)) || (c) == '_') +#define isALPHA(c) isalpha((unsigned char)(c)) +#define isSPACE(c) isspace((unsigned char)(c)) +#define isDIGIT(c) isdigit((unsigned char)(c)) +#define isUPPER(c) isupper((unsigned char)(c)) +#define isLOWER(c) islower((unsigned char)(c)) #else #define isALNUM(c) (isascii(c) && (isalpha(c) || isdigit(c) || c == '_')) #define isIDFIRST(c) (isascii(c) && (isalpha(c) || (c) == '_')) diff --git a/hints/3b1cc b/hints/3b1cc index 5570fbdccb..0001e046b8 100644 --- a/hints/3b1cc +++ b/hints/3b1cc @@ -1,5 +1,7 @@ # To incorporate the 7300/3b1 shared library, run this script in place # of 'CC'. +# You can skip this is you have the shcc program installed as cc in +# your path. # First: Run 'Configure' through to the end and run 'make depend'. # Second: Edit 'makefile' ( not Makefile ) and set CC = 3b1cc. # Third: Edit 'x2p/makefile' and set CC = 3b1cc. diff --git a/hints/aix_rs.sh b/hints/aix_rs.sh index 5bf193b380..b2bbb9be7e 100644 --- a/hints/aix_rs.sh +++ b/hints/aix_rs.sh @@ -4,7 +4,7 @@ d_setrgid='undef' d_setruid='undef' d_setegid='undef' d_seteuid='undef' -alignbytes=8 +memalignbytes=8 ccflags="$ccflags -D_NO_PROTO" cppstdin='/lib/cpp -D_AIX -D_IBMR2 -U__STR__' cppminus='' diff --git a/hints/cray.sh b/hints/cray.sh index 952a0219e1..2ce956695e 100644 --- a/hints/cray.sh +++ b/hints/cray.sh @@ -1,3 +1,8 @@ case `uname -r` in 6.1*) shellflags="-m+65536" ;; esac +ccflags="$ccflags -DUNICOS -h nomessage=118:151:172" +usemymalloc='n' +libswanted='malloc m' +d_setregid='undef' +d_setreuid='undef' diff --git a/hints/dec_osf_2_0.sh b/hints/dec_osf_2_0.sh new file mode 100644 index 0000000000..207e56540a --- /dev/null +++ b/hints/dec_osf_2_0.sh @@ -0,0 +1,13 @@ +# hints/dec_osf_2_0.sh +d_odbm='undef' # We don't need both odbm and ndbm +gidtype='gid_t' +groupstype='gid_t' +d_voidshmat='define' +clocktype='time_t' +libpth="$libpth /usr/shlib" # Use the shared libraries if possible +libc='/usr/shlib/libc.so' # The archive version is /lib/libc.a +case `uname -m` in + mips|alpha) optimize="$optimize -g" + ccflags="$ccflags -D_BSD -DSTANDARD_C -DDEBUGGING" ;; + *) ccflags="$ccflags -D_BSD -DSTANDARD_C -DDEBUGGING" ;; +esac diff --git a/hints/hp9000_700.sh b/hints/hp9000_700.sh index 5b15a893b5..eee8a4e1a6 100644 --- a/hints/hp9000_700.sh +++ b/hints/hp9000_700.sh @@ -1,5 +1,5 @@ libswanted='ndbm m' -ccflags="$ccflags -DJMPCLOBBER" +ccflags="$ccflags -Aa -D_POSIX_SOURCE -D_HPUX_SOURCE -DJMPCLOBBER" optimize='+O1' d_mymalloc=define -alignbytes=8 +memalignbytes=8 diff --git a/hints/isc_3_2_3.sh b/hints/isc_3_2_3.sh index cad7a5bfb0..5b99353d1c 100644 --- a/hints/isc_3_2_3.sh +++ b/hints/isc_3_2_3.sh @@ -1,2 +1,3 @@ -set `echo $libswanted | sed -e 's/ PW / /' -e 's/ x / /'` +set `echo "$libswanted" | sed -e 's/ PW / /' -e 's/ x / /'` libswanted="$*" +ccflags="$ccflags -DCRIPPLED_CC -DDEBUGGING" diff --git a/hints/next_3_2.sh b/hints/next_3_2.sh new file mode 100644 index 0000000000..a77e2ae217 --- /dev/null +++ b/hints/next_3_2.sh @@ -0,0 +1,8 @@ +hintfile='next_3_2' +ccflags='-posix -Disascii=NXIsAscii -DDEBUGGING -DHIDEMYMALLOC' +ldflags='-u libsys_s' +i_dirent='undef' +groupstype='int' +libs='-ldbm' +optimize='-O' +lddlflags='-r' diff --git a/hints/titan.sh b/hints/titan.sh index 0ed27e32ad..1801e82518 100644 --- a/hints/titan.sh +++ b/hints/titan.sh @@ -2,7 +2,7 @@ # Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991 bin='/usr/local/bin' installbin='/usr/local/bin' -alignbytes="8" +memalignbytes="8" byteorder="4321" cppstdin='/lib/cpp' cppminus='' diff --git a/hv.c b/hv.c index 2468e87839..3e0bed21a0 100644 --- a/hv.c +++ b/hv.c @@ -339,23 +339,16 @@ HV *hv; xhv = (XPVHV*)SvANY(hv); hfreeentries(hv); Safefree(xhv->xhv_array); + if (HvNAME(hv)) { + Safefree(HvNAME(hv)); + HvNAME(hv) = 0; + } xhv->xhv_array = 0; xhv->xhv_max = 7; /* it's a normal associative array */ xhv->xhv_fill = 0; (void)hv_iterinit(hv); /* so each() will start off right */ } -void -hv_free(hv) -register HV *hv; -{ - if (!hv) - return; - hfreeentries(hv); - Safefree(HvARRAY(hv)); - Safefree(hv); -} - I32 hv_iterinit(hv) HV *hv; diff --git a/installperl b/installperl index 4f3fc0004d..e4e0e44300 100755 --- a/installperl +++ b/installperl @@ -48,7 +48,6 @@ if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; } unless $installbin =~ m#^/afs/#; -x 'perl' || die "perl isn't executable!\n"; --x 'taintperl' || die "taintperl isn't executable!\n"; -x 'suidperl' || die "suidperl isn't executable!\n" if $d_dosuid; -x 't/TEST' || warn "WARNING: You've never run 'make test'!!!", @@ -59,10 +58,6 @@ if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; } &unlink("$installbin/perl$ver"); &cmd("cp perl $installbin/perl$ver"); -&unlink("$installbin/tperl$ver"); -&cmd("cp taintperl $installbin/tperl$ver"); -&chmod(0755, "$installbin/tperl$ver"); # force non-suid for security - &unlink("$installbin/sperl$ver"); if ($d_dosuid) { &cmd("cp suidperl $installbin/sperl$ver"); @@ -77,9 +72,8 @@ exit 0 if $versiononly; ($ddev,$dino) = stat('.'); if ($bdev != $ddev || $bino != $dino) { - &unlink("$installbin/perl", "$installbin/taintperl", "$installbin/suidperl"); + &unlink("$installbin/perl", "$installbin/suidperl"); &link("$installbin/perl$ver", "$installbin/perl"); - &link("$installbin/tperl$ver", "$installbin/taintperl"); &link("$installbin/sperl$ver", "$installbin/suidperl") if $d_dosuid; } @@ -145,6 +139,18 @@ if (chdir "lib") { ($ldev,$lino) = stat('.'); if ($pdev != $ldev || $pino != $lino) { + # Optimize for quick access. First the auto directory. + system "tar cf - auto | (cd $installprivlib; tar xvf -)"; + # Next the Perl modules. + foreach $file (<*.pm>) { + system "cmp", "-s", $file, "$privlib/$file"; + if ($?) { + &unlink("$installprivlib/$file"); + &cmd("cp $file $installprivlib"); + &chmod(0644, "$installprivlib/$file"); + } + } + # Finally the old library files. foreach $file (<*.pl>) { system "cmp", "-s", $file, "$privlib/$file"; if ($?) { @@ -160,8 +166,6 @@ else { warn "Can't cd to lib to install lib files: $!\n"; } -&chmod(0755, "usub/mus"); - print STDERR " Installation complete\n"; exit 0; diff --git a/interleave b/interleave deleted file mode 100755 index 6abe1ec72b..0000000000 --- a/interleave +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/perl - -while (<>) { - chop; - $stuff[$i++] .= $_; - $i = 0 if eof; -} - -$" = "\n"; print "@stuff\n"; diff --git a/keywords.h b/keywords.h index 54b629d402..14aa7322e6 100644 --- a/keywords.h +++ b/keywords.h @@ -17,215 +17,217 @@ #define KEY_alarm 16 #define KEY_and 17 #define KEY_atan2 18 -#define KEY_bind 19 -#define KEY_binmode 20 -#define KEY_bless 21 -#define KEY_caller 22 -#define KEY_chdir 23 -#define KEY_chmod 24 -#define KEY_chop 25 -#define KEY_chown 26 -#define KEY_chr 27 -#define KEY_chroot 28 -#define KEY_close 29 -#define KEY_closedir 30 -#define KEY_cmp 31 -#define KEY_connect 32 -#define KEY_continue 33 -#define KEY_cos 34 -#define KEY_crypt 35 -#define KEY_dbmclose 36 -#define KEY_dbmopen 37 -#define KEY_defined 38 -#define KEY_delete 39 -#define KEY_die 40 -#define KEY_do 41 -#define KEY_dump 42 -#define KEY_each 43 -#define KEY_else 44 -#define KEY_elsif 45 -#define KEY_endgrent 46 -#define KEY_endhostent 47 -#define KEY_endnetent 48 -#define KEY_endprotoent 49 -#define KEY_endpwent 50 -#define KEY_endservent 51 -#define KEY_eof 52 -#define KEY_eq 53 -#define KEY_eval 54 -#define KEY_exec 55 -#define KEY_exit 56 -#define KEY_exp 57 -#define KEY_fcntl 58 -#define KEY_fileno 59 -#define KEY_flock 60 -#define KEY_for 61 -#define KEY_foreach 62 -#define KEY_fork 63 -#define KEY_format 64 -#define KEY_formline 65 -#define KEY_ge 66 -#define KEY_getc 67 -#define KEY_getgrent 68 -#define KEY_getgrgid 69 -#define KEY_getgrnam 70 -#define KEY_gethostbyaddr 71 -#define KEY_gethostbyname 72 -#define KEY_gethostent 73 -#define KEY_getlogin 74 -#define KEY_getnetbyaddr 75 -#define KEY_getnetbyname 76 -#define KEY_getnetent 77 -#define KEY_getpeername 78 -#define KEY_getpgrp 79 -#define KEY_getppid 80 -#define KEY_getpriority 81 -#define KEY_getprotobyname 82 -#define KEY_getprotobynumber 83 -#define KEY_getprotoent 84 -#define KEY_getpwent 85 -#define KEY_getpwnam 86 -#define KEY_getpwuid 87 -#define KEY_getservbyname 88 -#define KEY_getservbyport 89 -#define KEY_getservent 90 -#define KEY_getsockname 91 -#define KEY_getsockopt 92 -#define KEY_glob 93 -#define KEY_gmtime 94 -#define KEY_goto 95 -#define KEY_grep 96 -#define KEY_gt 97 -#define KEY_hex 98 -#define KEY_if 99 -#define KEY_index 100 -#define KEY_int 101 -#define KEY_ioctl 102 -#define KEY_join 103 -#define KEY_keys 104 -#define KEY_kill 105 -#define KEY_last 106 -#define KEY_lc 107 -#define KEY_lcfirst 108 -#define KEY_le 109 -#define KEY_length 110 -#define KEY_link 111 -#define KEY_listen 112 -#define KEY_local 113 -#define KEY_localtime 114 -#define KEY_log 115 -#define KEY_lstat 116 -#define KEY_lt 117 -#define KEY_m 118 -#define KEY_mkdir 119 -#define KEY_msgctl 120 -#define KEY_msgget 121 -#define KEY_msgrcv 122 -#define KEY_msgsnd 123 -#define KEY_my 124 -#define KEY_ne 125 -#define KEY_next 126 -#define KEY_oct 127 -#define KEY_open 128 -#define KEY_opendir 129 -#define KEY_or 130 -#define KEY_ord 131 -#define KEY_pack 132 -#define KEY_package 133 -#define KEY_pipe 134 -#define KEY_pop 135 -#define KEY_print 136 -#define KEY_printf 137 -#define KEY_push 138 -#define KEY_q 139 -#define KEY_qq 140 -#define KEY_qw 141 -#define KEY_qx 142 -#define KEY_rand 143 -#define KEY_read 144 -#define KEY_readdir 145 -#define KEY_readline 146 -#define KEY_readlink 147 -#define KEY_readpipe 148 -#define KEY_recv 149 -#define KEY_redo 150 -#define KEY_ref 151 -#define KEY_rename 152 -#define KEY_require 153 -#define KEY_reset 154 -#define KEY_return 155 -#define KEY_reverse 156 -#define KEY_rewinddir 157 -#define KEY_rindex 158 -#define KEY_rmdir 159 -#define KEY_s 160 -#define KEY_scalar 161 -#define KEY_seek 162 -#define KEY_seekdir 163 -#define KEY_select 164 -#define KEY_semctl 165 -#define KEY_semget 166 -#define KEY_semop 167 -#define KEY_send 168 -#define KEY_setgrent 169 -#define KEY_sethostent 170 -#define KEY_setnetent 171 -#define KEY_setpgrp 172 -#define KEY_setpriority 173 -#define KEY_setprotoent 174 -#define KEY_setpwent 175 -#define KEY_setservent 176 -#define KEY_setsockopt 177 -#define KEY_shift 178 -#define KEY_shmctl 179 -#define KEY_shmget 180 -#define KEY_shmread 181 -#define KEY_shmwrite 182 -#define KEY_shutdown 183 -#define KEY_sin 184 -#define KEY_sleep 185 -#define KEY_socket 186 -#define KEY_socketpair 187 -#define KEY_sort 188 -#define KEY_splice 189 -#define KEY_split 190 -#define KEY_sprintf 191 -#define KEY_sqrt 192 -#define KEY_srand 193 -#define KEY_stat 194 -#define KEY_study 195 -#define KEY_sub 196 -#define KEY_substr 197 -#define KEY_symlink 198 -#define KEY_syscall 199 -#define KEY_sysread 200 -#define KEY_system 201 -#define KEY_syswrite 202 -#define KEY_tell 203 -#define KEY_telldir 204 -#define KEY_tie 205 -#define KEY_time 206 -#define KEY_times 207 -#define KEY_tr 208 -#define KEY_truncate 209 -#define KEY_uc 210 -#define KEY_ucfirst 211 -#define KEY_umask 212 -#define KEY_undef 213 -#define KEY_unless 214 -#define KEY_unlink 215 -#define KEY_unpack 216 -#define KEY_unshift 217 -#define KEY_untie 218 -#define KEY_until 219 -#define KEY_utime 220 -#define KEY_values 221 -#define KEY_vec 222 -#define KEY_wait 223 -#define KEY_waitpid 224 -#define KEY_wantarray 225 -#define KEY_warn 226 -#define KEY_while 227 -#define KEY_write 228 -#define KEY_x 229 -#define KEY_y 230 +#define KEY_aver 19 +#define KEY_bind 20 +#define KEY_binmode 21 +#define KEY_bless 22 +#define KEY_caller 23 +#define KEY_chdir 24 +#define KEY_chmod 25 +#define KEY_chop 26 +#define KEY_chown 27 +#define KEY_chr 28 +#define KEY_chroot 29 +#define KEY_close 30 +#define KEY_closedir 31 +#define KEY_cmp 32 +#define KEY_connect 33 +#define KEY_continue 34 +#define KEY_cos 35 +#define KEY_crypt 36 +#define KEY_dbmclose 37 +#define KEY_dbmopen 38 +#define KEY_defined 39 +#define KEY_delete 40 +#define KEY_deny 41 +#define KEY_die 42 +#define KEY_do 43 +#define KEY_dump 44 +#define KEY_each 45 +#define KEY_else 46 +#define KEY_elsif 47 +#define KEY_endgrent 48 +#define KEY_endhostent 49 +#define KEY_endnetent 50 +#define KEY_endprotoent 51 +#define KEY_endpwent 52 +#define KEY_endservent 53 +#define KEY_eof 54 +#define KEY_eq 55 +#define KEY_eval 56 +#define KEY_exec 57 +#define KEY_exit 58 +#define KEY_exp 59 +#define KEY_fcntl 60 +#define KEY_fileno 61 +#define KEY_flock 62 +#define KEY_for 63 +#define KEY_foreach 64 +#define KEY_fork 65 +#define KEY_format 66 +#define KEY_formline 67 +#define KEY_ge 68 +#define KEY_getc 69 +#define KEY_getgrent 70 +#define KEY_getgrgid 71 +#define KEY_getgrnam 72 +#define KEY_gethostbyaddr 73 +#define KEY_gethostbyname 74 +#define KEY_gethostent 75 +#define KEY_getlogin 76 +#define KEY_getnetbyaddr 77 +#define KEY_getnetbyname 78 +#define KEY_getnetent 79 +#define KEY_getpeername 80 +#define KEY_getpgrp 81 +#define KEY_getppid 82 +#define KEY_getpriority 83 +#define KEY_getprotobyname 84 +#define KEY_getprotobynumber 85 +#define KEY_getprotoent 86 +#define KEY_getpwent 87 +#define KEY_getpwnam 88 +#define KEY_getpwuid 89 +#define KEY_getservbyname 90 +#define KEY_getservbyport 91 +#define KEY_getservent 92 +#define KEY_getsockname 93 +#define KEY_getsockopt 94 +#define KEY_glob 95 +#define KEY_gmtime 96 +#define KEY_goto 97 +#define KEY_grep 98 +#define KEY_gt 99 +#define KEY_hex 100 +#define KEY_if 101 +#define KEY_index 102 +#define KEY_int 103 +#define KEY_ioctl 104 +#define KEY_join 105 +#define KEY_keys 106 +#define KEY_kill 107 +#define KEY_last 108 +#define KEY_lc 109 +#define KEY_lcfirst 110 +#define KEY_le 111 +#define KEY_length 112 +#define KEY_link 113 +#define KEY_listen 114 +#define KEY_local 115 +#define KEY_localtime 116 +#define KEY_log 117 +#define KEY_lstat 118 +#define KEY_lt 119 +#define KEY_m 120 +#define KEY_mkdir 121 +#define KEY_msgctl 122 +#define KEY_msgget 123 +#define KEY_msgrcv 124 +#define KEY_msgsnd 125 +#define KEY_my 126 +#define KEY_ne 127 +#define KEY_next 128 +#define KEY_oct 129 +#define KEY_open 130 +#define KEY_opendir 131 +#define KEY_or 132 +#define KEY_ord 133 +#define KEY_pack 134 +#define KEY_package 135 +#define KEY_pipe 136 +#define KEY_pop 137 +#define KEY_print 138 +#define KEY_printf 139 +#define KEY_push 140 +#define KEY_q 141 +#define KEY_qq 142 +#define KEY_qw 143 +#define KEY_qx 144 +#define KEY_rand 145 +#define KEY_read 146 +#define KEY_readdir 147 +#define KEY_readline 148 +#define KEY_readlink 149 +#define KEY_readpipe 150 +#define KEY_recv 151 +#define KEY_redo 152 +#define KEY_ref 153 +#define KEY_rename 154 +#define KEY_require 155 +#define KEY_reset 156 +#define KEY_return 157 +#define KEY_reverse 158 +#define KEY_rewinddir 159 +#define KEY_rindex 160 +#define KEY_rmdir 161 +#define KEY_s 162 +#define KEY_scalar 163 +#define KEY_seek 164 +#define KEY_seekdir 165 +#define KEY_select 166 +#define KEY_semctl 167 +#define KEY_semget 168 +#define KEY_semop 169 +#define KEY_send 170 +#define KEY_setgrent 171 +#define KEY_sethostent 172 +#define KEY_setnetent 173 +#define KEY_setpgrp 174 +#define KEY_setpriority 175 +#define KEY_setprotoent 176 +#define KEY_setpwent 177 +#define KEY_setservent 178 +#define KEY_setsockopt 179 +#define KEY_shift 180 +#define KEY_shmctl 181 +#define KEY_shmget 182 +#define KEY_shmread 183 +#define KEY_shmwrite 184 +#define KEY_shutdown 185 +#define KEY_sin 186 +#define KEY_sleep 187 +#define KEY_socket 188 +#define KEY_socketpair 189 +#define KEY_sort 190 +#define KEY_splice 191 +#define KEY_split 192 +#define KEY_sprintf 193 +#define KEY_sqrt 194 +#define KEY_srand 195 +#define KEY_stat 196 +#define KEY_study 197 +#define KEY_sub 198 +#define KEY_substr 199 +#define KEY_symlink 200 +#define KEY_syscall 201 +#define KEY_sysread 202 +#define KEY_system 203 +#define KEY_syswrite 204 +#define KEY_tell 205 +#define KEY_telldir 206 +#define KEY_tie 207 +#define KEY_time 208 +#define KEY_times 209 +#define KEY_tr 210 +#define KEY_truncate 211 +#define KEY_uc 212 +#define KEY_ucfirst 213 +#define KEY_umask 214 +#define KEY_undef 215 +#define KEY_unless 216 +#define KEY_unlink 217 +#define KEY_unpack 218 +#define KEY_unshift 219 +#define KEY_untie 220 +#define KEY_until 221 +#define KEY_utime 222 +#define KEY_values 223 +#define KEY_vec 224 +#define KEY_wait 225 +#define KEY_waitpid 226 +#define KEY_wantarray 227 +#define KEY_warn 228 +#define KEY_while 229 +#define KEY_write 230 +#define KEY_x 231 +#define KEY_y 232 diff --git a/lib/Config.pm b/lib/Config.pm index 5ea45e62f7..20df7e009d 100644 --- a/lib/Config.pm +++ b/lib/Config.pm @@ -6,6 +6,7 @@ require Exporter; $] == 5.000 or die sprintf "Perl lib version (5.000) doesn't match executable version (%.3f)\n", $]; + # # This file was produced by running the Configure script. It holds all the # definitions figured out by Configure. Should you modify one of these values, @@ -13,86 +14,83 @@ $] == 5.000 or die sprintf # instead choose to run each of the .SH files by yourself, or "Configure -S". # -# Configuration time: Mon Apr 4 15:17:26 PDT 1994 +# Configuration time: Wed May 4 15:10:39 PDT 1994 # Configured by: lwall # Target system: sunos scalpel 4.1.3 3 sun4c -$Config{'extensions'} = 'ext/dbm/NDBM_File.xs -ext/dbm/ODBM_File.xs -ext/dbm/GDBM_File.xs -ext/dbm/SDBM_File.xs -ext/posix/POSIX.xs'; -$Config{'d_bsd'} = 'define'; +$Config{'extensions'} = ' ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'; $Config{'d_eunice'} = undef; $Config{'d_xenix'} = undef; $Config{'eunicefix'} = ':'; $Config{'Mcc'} = 'Mcc'; -$Config{'awk'} = 'awk'; +$Config{'awk'} = '/bin/awk'; $Config{'bash'} = ''; -$Config{'bison'} = 'bison'; +$Config{'bison'} = '/usr/local/bin/bison'; $Config{'byacc'} = 'byacc'; -$Config{'cat'} = 'cat'; +$Config{'cat'} = '/bin/cat'; $Config{'chgrp'} = ''; $Config{'chmod'} = ''; $Config{'chown'} = ''; $Config{'compress'} = ''; -$Config{'cp'} = 'cp'; +$Config{'cp'} = '/bin/cp'; $Config{'cpio'} = ''; -$Config{'cpp'} = 'cpp'; -$Config{'csh'} = 'csh'; -$Config{'date'} = 'date'; -$Config{'echo'} = 'echo'; -$Config{'egrep'} = 'egrep'; +$Config{'cpp'} = '/usr/lib/cpp'; +$Config{'csh'} = '/bin/csh'; +$Config{'date'} = '/bin/date'; +$Config{'echo'} = '/bin/echo'; +$Config{'egrep'} = '/bin/egrep'; $Config{'emacs'} = ''; -$Config{'expr'} = 'expr'; -$Config{'find'} = 'find'; +$Config{'expr'} = '/bin/expr'; +$Config{'find'} = '/bin/find'; $Config{'flex'} = ''; $Config{'gcc'} = ''; -$Config{'grep'} = 'grep'; +$Config{'grep'} = '/bin/grep'; $Config{'inews'} = ''; $Config{'ksh'} = ''; $Config{'less'} = ''; -$Config{'line'} = 'line'; +$Config{'line'} = '/bin/line'; $Config{'lint'} = ''; -$Config{'ln'} = ''; +$Config{'ln'} = '/bin/ln'; $Config{'lp'} = ''; $Config{'lpr'} = ''; $Config{'ls'} = ''; $Config{'mail'} = ''; $Config{'mailx'} = ''; $Config{'make'} = ''; -$Config{'mkdir'} = 'mkdir'; +$Config{'mkdir'} = '/bin/mkdir'; $Config{'more'} = ''; -$Config{'mv'} = 'mv'; -$Config{'nroff'} = 'nroff'; -$Config{'perl'} = 'perl'; +$Config{'mv'} = '/bin/mv'; +$Config{'nroff'} = '/bin/nroff'; +$Config{'perl'} = '/home/netlabs1/lwall/pl/perl'; $Config{'pg'} = ''; $Config{'pmake'} = ''; $Config{'pr'} = ''; -$Config{'rm'} = 'rm'; +$Config{'rm'} = '/bin/rm'; $Config{'rmail'} = ''; -$Config{'sed'} = 'sed'; +$Config{'sed'} = '/bin/sed'; $Config{'sendmail'} = ''; $Config{'sh'} = ''; $Config{'shar'} = ''; $Config{'sleep'} = ''; $Config{'smail'} = ''; -$Config{'sort'} = 'sort'; +$Config{'sort'} = '/bin/sort'; $Config{'submit'} = ''; $Config{'tail'} = ''; $Config{'tar'} = ''; $Config{'tbl'} = ''; $Config{'test'} = 'test'; -$Config{'touch'} = ''; -$Config{'tr'} = 'tr'; +$Config{'touch'} = '/bin/touch'; +$Config{'tr'} = '/bin/tr'; $Config{'troff'} = ''; -$Config{'uname'} = 'uname'; -$Config{'uniq'} = 'uniq'; +$Config{'uname'} = '/bin/uname'; +$Config{'uniq'} = '/bin/uniq'; $Config{'uuname'} = ''; $Config{'vi'} = ''; $Config{'zcat'} = ''; $Config{'hint'} = 'recommended'; $Config{'myuname'} = 'sunos scalpel 4.1.3 3 sun4c '; +$Config{'osname'} = 'sunos'; +$Config{'osvers'} = '4.1.3'; $Config{'Author'} = ''; $Config{'Date'} = '$Date'; $Config{'Header'} = ''; @@ -104,7 +102,7 @@ $Config{'Revision'} = '$Revision'; $Config{'Source'} = ''; $Config{'State'} = ''; $Config{'afs'} = 'false'; -$Config{'alignbytes'} = '8'; +$Config{'memalignbytes'} = '8'; $Config{'bin'} = '/usr/local/bin'; $Config{'binexp'} = '/usr/local/bin'; $Config{'installbin'} = '/usr/local/bin'; @@ -117,12 +115,12 @@ $Config{'ldflags'} = ''; $Config{'lkflags'} = ''; $Config{'optimize'} = '-g'; $Config{'cf_by'} = 'lwall'; -$Config{'cf_time'} = 'Mon Apr 4 15:17:26 PDT 1994'; +$Config{'cf_time'} = 'Wed May 4 15:10:39 PDT 1994'; $Config{'contains'} = 'grep'; $Config{'cpplast'} = ''; $Config{'cppminus'} = ''; -$Config{'cpprun'} = 'cpp'; -$Config{'cppstdin'} = '/tmp_mnt/vol/src/local/lwall/perl5/cppstdin'; +$Config{'cpprun'} = '/usr/lib/cpp'; +$Config{'cppstdin'} = '/tmp_mnt/net/vaccine/export/src/local/lwall/perl5/cppstdin'; $Config{'d_access'} = 'define'; $Config{'d_bcmp'} = 'define'; $Config{'d_bcopy'} = 'define'; @@ -135,7 +133,7 @@ $Config{'d_chsize'} = undef; $Config{'d_const'} = undef; $Config{'cryptlib'} = ''; $Config{'d_crypt'} = 'define'; -$Config{'d_csh'} = undef; +$Config{'d_csh'} = 'define'; $Config{'d_dosuid'} = undef; $Config{'d_dup2'} = 'define'; $Config{'d_fchmod'} = 'define'; @@ -168,8 +166,11 @@ $Config{'d_msgget'} = 'define'; $Config{'d_msgrcv'} = 'define'; $Config{'d_msgsnd'} = 'define'; $Config{'d_open3'} = 'define'; -$Config{'d_portable'} = 'define'; +$Config{'d_portable'} = undef; $Config{'d_readdir'} = 'define'; +$Config{'d_rewinddir'} = 'define'; +$Config{'d_seekdir'} = 'define'; +$Config{'d_telldir'} = 'define'; $Config{'d_rename'} = 'define'; $Config{'d_rmdir'} = 'define'; $Config{'d_safebcpy'} = 'define'; @@ -196,6 +197,7 @@ $Config{'d_setruid'} = 'define'; $Config{'d_setsid'} = 'define'; $Config{'d_shm'} = 'define'; $Config{'d_shmat'} = 'define'; +$Config{'d_voidshmat'} = undef; $Config{'d_shmctl'} = 'define'; $Config{'d_shmdt'} = 'define'; $Config{'d_shmget'} = 'define'; @@ -216,6 +218,8 @@ $Config{'d_syserrlst'} = 'define'; $Config{'d_symlink'} = 'define'; $Config{'d_syscall'} = 'define'; $Config{'d_system'} = 'define'; +$Config{'d_time'} = 'define'; +$Config{'timetype'} = 'long'; $Config{'clocktype'} = 'long'; $Config{'d_times'} = 'define'; $Config{'d_truncate'} = 'define'; @@ -224,7 +228,7 @@ $Config{'i_ndir'} = undef; $Config{'ndirc'} = ''; $Config{'ndirlib'} = ''; $Config{'ndiro'} = ''; -$Config{'d_vfork'} = 'define'; +$Config{'d_vfork'} = undef; $Config{'d_voidsig'} = 'define'; $Config{'signal_t'} = 'void'; $Config{'d_volatile'} = undef; @@ -232,8 +236,13 @@ $Config{'d_charvspr'} = 'define'; $Config{'d_vprintf'} = 'define'; $Config{'d_wait4'} = 'define'; $Config{'d_waitpid'} = 'define'; -$Config{'dlobj'} = 'dl.o'; -$Config{'dlsrc'} = 'dl.c'; +$Config{'cccdlflags'} = ''; +$Config{'ccdlflags'} = ''; +$Config{'dldir'} = 'ext/dl'; +$Config{'dlobj'} = 'dl_sunos.o'; +$Config{'dlsrc'} = 'dl_sunos.c'; +$Config{'lddlflags'} = ''; +$Config{'shlibsuffix'} = '.so'; $Config{'usedl'} = 'define'; $Config{'gidtype'} = 'gid_t'; $Config{'groupstype'} = 'int'; @@ -246,7 +255,9 @@ $Config{'i_dlfcn'} = 'define'; $Config{'i_fcntl'} = undef; $Config{'i_gdbm'} = undef; $Config{'i_grp'} = 'define'; +$Config{'i_memory'} = 'define'; $Config{'i_ndbm'} = 'define'; +$Config{'i_neterrno'} = undef; $Config{'i_niin'} = 'define'; $Config{'i_sysin'} = undef; $Config{'d_pwage'} = 'define'; @@ -256,6 +267,7 @@ $Config{'d_pwcomment'} = 'define'; $Config{'d_pwexpire'} = undef; $Config{'d_pwquota'} = undef; $Config{'i_pwd'} = 'define'; +$Config{'i_sdbm'} = 'define'; $Config{'i_stdarg'} = undef; $Config{'i_stddef'} = 'define'; $Config{'i_string'} = 'define'; @@ -275,10 +287,11 @@ $Config{'i_systime'} = 'define'; $Config{'i_systimek'} = undef; $Config{'i_time'} = undef; $Config{'timeincl'} = '/usr/include/sys/time.h '; +$Config{'i_unistd'} = 'define'; $Config{'i_utime'} = 'define'; $Config{'i_varargs'} = 'define'; $Config{'i_varhdr'} = 'varargs.h'; -$Config{'i_vfork'} = 'define'; +$Config{'i_vfork'} = undef; $Config{'intsize'} = '4'; $Config{'lib'} = '/usr/local/lib'; $Config{'libexp'} = '/usr/local/lib'; @@ -287,6 +300,9 @@ $Config{'libpth'} = ' /lib /usr/lib /usr/ucblib /usr/local/lib'; $Config{'plibpth'} = ''; $Config{'xlibpth'} = '/usr/lib/386 /lib/386'; $Config{'libs'} = '-ldbm -ldl -lm -lposix'; +$Config{'lns'} = '/bin/ln -s'; +$Config{'lseektype'} = 'off_t'; +$Config{'d_mymalloc'} = 'define'; $Config{'mallocobj'} = 'malloc.o'; $Config{'mallocsrc'} = 'malloc.c'; $Config{'malloctype'} = 'char *'; @@ -309,12 +325,15 @@ $Config{'n'} = '-n'; $Config{'groupcat'} = ''; $Config{'hostcat'} = 'ypcat hosts'; $Config{'passcat'} = ''; +$Config{'orderlib'} = 'false'; +$Config{'ranlib'} = '/usr/bin/ranlib'; $Config{'package'} = 'perl'; $Config{'spackage'} = ''; $Config{'installprivlib'} = '/usr/local/lib/perl'; $Config{'privlib'} = '/usr/local/lib/perl'; $Config{'privlibexp'} = '/usr/local/lib/perl'; $Config{'prototype'} = undef; +$Config{'ptrsize'} = '4'; $Config{'randbits'} = '31'; $Config{'installscript'} = '/usr/local/bin'; $Config{'scriptdir'} = '/usr/local/bin'; @@ -339,4 +358,5 @@ $Config{'voidflags'} = '15'; $Config{'yacc'} = 'yacc'; $Config{'yaccflags'} = ''; $Config{'PATCHLEVEL'} = 0; -$Config{'CONFIG'} = true +$Config{'CONFIG'} = 'true'; +1; diff --git a/lib/English.pm b/lib/English.pm index ba89b164b5..79cceee53c 100644 --- a/lib/English.pm +++ b/lib/English.pm @@ -120,6 +120,7 @@ require Exporter; # Internals. *PERL_VERSION = \$] ; + *ACCUMULATOR = \$^A ; *DEBUGGING = \$^D ; *SYSTEM_FD_MAX = \$^F ; *INPLACE_EDIT = \$^I ; diff --git a/lib/Hostname.pm b/lib/Hostname.pm index 4a59695094..f61592eebe 100644 --- a/lib/Hostname.pm +++ b/lib/Hostname.pm @@ -22,14 +22,14 @@ sub hostname { syscall(&SYS_gethostname, $host, 65) == 0; } - # method 3 - sysV uname command + # method 3 - trusty old hostname command || eval { - $host = `uname -n 2>/dev/null`; ## sysVish + $host = `hostname 2>/dev/null`; # bsdish } - # method 4 - trusty old hostname command + # method 4 - sysV uname command (may truncate) || eval { - $host = `hostname 2>/dev/null`; # bsdish + $host = `uname -n 2>/dev/null`; ## sysVish } # method 5 - Apollo pre-SR10 diff --git a/lib/NDBM_File.pm b/lib/NDBM_File.pm new file mode 100644 index 0000000000..637001f71c --- /dev/null +++ b/lib/NDBM_File.pm @@ -0,0 +1,9 @@ +package NDBM_File; + +require Exporter; +@ISA = (Exporter, DynamicLoader); +@EXPORT = split(' ', 'new fetch store delete firstkey nextkey error clearerr'); + +bootstrap NDBM_File; + +1; diff --git a/lib/POSIX.pm b/lib/POSIX.pm index 4d08f25e5c..e2ccbccac0 100644 --- a/lib/POSIX.pm +++ b/lib/POSIX.pm @@ -521,8 +521,8 @@ sub remove { } sub rename { - unimpl "rename(xxx)", caller if @_ != 123; - rename($_[0]); + usage "rename(oldfilename, newfilename)", caller if @_ != 2; + rename($_[0], $_[1]); } sub rewind { @@ -707,7 +707,7 @@ sub stroul { } sub system { - unimpl "system(xxx)", caller if @_ != 123; + usage "system(command)", caller if @_ != 1; system($_[0]); } @@ -832,18 +832,22 @@ sub strxfrm { } sub chmod { - unimpl "chmod(xxx)", caller if @_ != 123; - chmod($_[0]); + usage "chmod(filename, mode)", caller if @_ != 2; + chmod($_[0], $_[1]); } sub fstat { - unimpl "fstat(xxx)", caller if @_ != 123; - fstat($_[0]); + usage "fstat(fd)", caller if @_ != 1; + local(*TMP); + open(TMP, "<&$_[0]"); # Gross. + local(@l) = stat(TMP); + close(TMP); + @l; } sub mkdir { - unimpl "mkdir(xxx)", caller if @_ != 123; - mkdir($_[0]); + usage "mkdir(directoryname, mode)", caller if @_ != 2; + mkdir($_[0], $_[1]); } sub mkfifo { @@ -852,28 +856,32 @@ sub mkfifo { } sub stat { - unimpl "stat(xxx)", caller if @_ != 123; + usage "stat(filename)", caller if @_ != 1; stat($_[0]); } sub umask { - unimpl "umask(xxx)", caller if @_ != 123; + usage "umask(mask)", caller if @_ != 1; umask($_[0]); } sub times { - unimpl "times(xxx)", caller if @_ != 123; - times($_[0]); + usage "times()", caller if @_ != 0; + times(); } sub wait { - unimpl "wait(xxx)", caller if @_ != 123; - wait($_[0]); + usage "wait(statusvariable)", caller if @_ != 1; + local $result = wait(); + $_[0] = $?; + $result; } sub waitpid { - unimpl "waitpid(xxx)", caller if @_ != 123; - waitpid($_[0]); + usage "waitpid(pid, statusvariable, options)", caller if @_ != 3; + local $result = waitpid($_[0], $_[2]); + $_[1] = $?; + $result; } sub cfgetispeed { @@ -1002,8 +1010,8 @@ sub chdir { } sub chown { - unimpl "chown(xxx)", caller if @_ != 123; - chown($_[0]); + usage "chown(filename, uid, gid)", caller if @_ != 3; + chown($_[0], $_[1], $_[2]); } sub close { @@ -1077,32 +1085,33 @@ sub getcwd { } sub getegid { - unimpl "getegid(xxx)", caller if @_ != 123; - getegid($_[0]); + usage "getegid()", caller if @_ != 0; + $) + 0; } sub geteuid { - unimpl "geteuid(xxx)", caller if @_ != 123; - geteuid($_[0]); + usage "geteuid()", caller if @_ != 0; + $> + 0; } sub getgid { - unimpl "getgid(xxx)", caller if @_ != 123; - getgid($_[0]); + usage "getgid()", caller if @_ != 0; + $( + 0; } sub getgroups { - unimpl "getgroups(xxx)", caller if @_ != 123; - getgroups($_[0]); + usage "getgroups()", caller if @_ != 0; + local(%seen) = (); + grep(!%seen{$_}++, split(' ', $) )); } sub getlogin { - unimpl "getlogin(xxx)", caller if @_ != 123; - getlogin($_[0]); + usage "getlogin(xxx)", caller if @_ != 0; + getlogin(); } sub getpgrp { - unimpl "getpgrp(xxx)", caller if @_ != 123; + usage "getpgrp()", caller if @_ != 0; getpgrp($_[0]); } @@ -1117,8 +1126,8 @@ sub getppid { } sub getuid { - unimpl "getuid(xxx)", caller if @_ != 123; - getuid($_[0]); + usage "getuid()", caller if @_ != 0; + $<; } sub isatty { @@ -1127,8 +1136,8 @@ sub isatty { } sub link { - unimpl "link(xxx)", caller if @_ != 123; - link($_[0]); + usage "link(oldfilename, newfilename)", caller if @_ != 2; + link($_[0], $_[1]); } sub lseek { @@ -1157,7 +1166,7 @@ sub read { } sub rmdir { - unimpl "rmdir(xxx)", caller if @_ != 123; + usage "rmdir(directoryname)", caller if @_ != 1; rmdir($_[0]); } @@ -1207,7 +1216,7 @@ sub ttyname { } sub unlink { - unimpl "unlink(xxx)", caller if @_ != 123; + usage "unlink(filename)", caller if @_ != 1; unlink($_[0]); } @@ -1217,7 +1226,7 @@ sub write { } sub utime { - unimpl "utime(xxx)", caller if @_ != 123; - utime($_[0]); + usage "utime(filename, atime, mtime)", caller if @_ != 3; + utime($_[1], $_[2], $_[0]); } diff --git a/lib/SDBM_File.pm b/lib/SDBM_File.pm index 470d891279..544f66f237 100644 --- a/lib/SDBM_File.pm +++ b/lib/SDBM_File.pm @@ -2,7 +2,7 @@ package SDBM_File; require Exporter; @ISA = (Exporter, DynamicLoader); -@EXPORT = split(' ', 'new fetch store delete firstkey nextkey error clearerr'); +@EXPORT = qw(new fetch store delete firstkey nextkey error clearerr); bootstrap SDBM_File; diff --git a/lib/Termcap.pm b/lib/Termcap.pm new file mode 100644 index 0000000000..da4c7ce2bc --- /dev/null +++ b/lib/Termcap.pm @@ -0,0 +1,174 @@ +package Termcap; + +require 5.000; +require Exporter; +@ISA = (Exporter); +@EXPORT = qw(&Tgetent $ispeed $ospeed &Tputs %TC &Tgoto); + + +;# Termcap.pm +;# +;# Usage: +;# require 'ioctl.pl'; +;# require Termcap; +;# import Termcap; +;# ioctl(TTY,$TIOCGETP,$foo); +;# ($ispeed,$ospeed) = unpack('cc',$foo); +;# &Tgetent('vt100'); # sets $TC{'cm'}, etc. +;# &Tputs(&Tgoto($TC{'cm'},$col,$row), 0, 'FILEHANDLE'); +;# &Tputs($TC{'dl'},$affcnt,'FILEHANDLE'); +;# +sub Tgetent { + local($TERM) = @_; + local($TERMCAP,$_,$entry,$loop,$field); + + warn "Tgetent: no ospeed set" unless $ospeed; + foreach $key (keys(%TC)) { + delete $TC{$key}; + } + $TERM = $ENV{'TERM'} unless $TERM; + $TERMCAP = $ENV{'TERMCAP'}; + $TERMCAP = '/etc/termcap' unless $TERMCAP; + if ($TERMCAP !~ m:^/:) { + if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) { + $TERMCAP = '/etc/termcap'; + } + } + if ($TERMCAP =~ m:^/:) { + $entry = ''; + do { + $loop = " + open(TERMCAP,'<$TERMCAP') || die \"Can't open $TERMCAP\"; + while () { + next if /^#/; + next if /^\t/; + if (/(^|\\|)$TERM\[:\\|]/) { + chop; + while (chop eq '\\\\') { + \$_ .= ; + chop; + } + \$_ .= ':'; + last; + } + } + close TERMCAP; + \$entry .= \$_; + "; + eval $loop; + } while s/:tc=([^:]+):/:/ && ($TERM = $1); + $TERMCAP = $entry; + } + + foreach $field (split(/:[\s:\\]*/,$TERMCAP)) { + if ($field =~ /^\w\w$/) { + $TC{$field} = 1; + } + elsif ($field =~ /^(\w\w)#(.*)/) { + $TC{$1} = $2 unless defined $TC{$1}; + } + elsif ($field =~ /^(\w\w)=(.*)/) { + $entry = $1; + $_ = $2; + s/\\E/\033/g; + s/\\(\d\d\d)/pack('c',$1 & 0177)/eg; + s/\\n/\n/g; + s/\\r/\r/g; + s/\\t/\t/g; + s/\\b/\b/g; + s/\\f/\f/g; + s/\\\^/\377/g; + s/\^\?/\177/g; + s/\^(.)/pack('c',ord($1) & 31)/eg; + s/\\(.)/$1/g; + s/\377/^/g; + $TC{$entry} = $_ unless defined $TC{$entry}; + } + } + $TC{'pc'} = "\0" unless defined $TC{'pc'}; + $TC{'bc'} = "\b" unless defined $TC{'bc'}; +} + +@Tputs = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2); + +sub Tputs { + local($string,$affcnt,$FH) = @_; + local($ms); + if ($string =~ /(^[\d.]+)(\*?)(.*)$/) { + $ms = $1; + $ms *= $affcnt if $2; + $string = $3; + $decr = $Tputs[$ospeed]; + if ($decr > .1) { + $ms += $decr / 2; + $string .= $TC{'pc'} x ($ms / $decr); + } + } + print $FH $string if $FH; + $string; +} + +sub Tgoto { + local($string) = shift(@_); + local($result) = ''; + local($after) = ''; + local($code,$tmp) = @_; + local(@tmp); + @tmp = ($tmp,$code); + local($online) = 0; + while ($string =~ /^([^%]*)%(.)(.*)/) { + $result .= $1; + $code = $2; + $string = $3; + if ($code eq 'd') { + $result .= sprintf("%d",shift(@tmp)); + } + elsif ($code eq '.') { + $tmp = shift(@tmp); + if ($tmp == 0 || $tmp == 4 || $tmp == 10) { + if ($online) { + ++$tmp, $after .= $TC{'up'} if $TC{'up'}; + } + else { + ++$tmp, $after .= $TC{'bc'}; + } + } + $result .= sprintf("%c",$tmp); + $online = !$online; + } + elsif ($code eq '+') { + $result .= sprintf("%c",shift(@tmp)+ord($string)); + $string = substr($string,1,99); + $online = !$online; + } + elsif ($code eq 'r') { + ($code,$tmp) = @tmp; + @tmp = ($tmp,$code); + $online = !$online; + } + elsif ($code eq '>') { + ($code,$tmp,$string) = unpack("CCa99",$string); + if ($tmp[$[] > $code) { + $tmp[$[] += $tmp; + } + } + elsif ($code eq '2') { + $result .= sprintf("%02d",shift(@tmp)); + $online = !$online; + } + elsif ($code eq '3') { + $result .= sprintf("%03d",shift(@tmp)); + $online = !$online; + } + elsif ($code eq 'i') { + ($code,$tmp) = @tmp; + @tmp = ($code+1,$tmp+1); + } + else { + return "OOPS"; + } + } + $result . $string . $after; +} + +1; diff --git a/lib/auto/NDBM_File.so b/lib/auto/NDBM_File.so new file mode 100755 index 0000000000..af2b0d3476 Binary files /dev/null and b/lib/auto/NDBM_File.so differ diff --git a/lib/auto/NDBM_File/NDBM_File.so b/lib/auto/NDBM_File/NDBM_File.so new file mode 100755 index 0000000000..49c04e6858 Binary files /dev/null and b/lib/auto/NDBM_File/NDBM_File.so differ diff --git a/lib/auto/ODBM_File.so b/lib/auto/ODBM_File.so new file mode 100755 index 0000000000..5044c8a1ab Binary files /dev/null and b/lib/auto/ODBM_File.so differ diff --git a/lib/auto/ODBM_File/ODBM_File.so b/lib/auto/ODBM_File/ODBM_File.so new file mode 100755 index 0000000000..f61231f38e Binary files /dev/null and b/lib/auto/ODBM_File/ODBM_File.so differ diff --git a/lib/auto/POSIX.so b/lib/auto/POSIX.so new file mode 100755 index 0000000000..7065a09cf1 Binary files /dev/null and b/lib/auto/POSIX.so differ diff --git a/lib/auto/POSIX/POSIX.so b/lib/auto/POSIX/POSIX.so new file mode 100755 index 0000000000..17560bd798 Binary files /dev/null and b/lib/auto/POSIX/POSIX.so differ diff --git a/lib/auto/POSIX/_exit.al b/lib/auto/POSIX/_exit.al new file mode 100644 index 0000000000..7666cebe6e --- /dev/null +++ b/lib/auto/POSIX/_exit.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub _exit { + unimpl "_exit(xxx)", caller if @_ != 123; + _exit($_[0]); +} + +1; diff --git a/lib/auto/POSIX/abort.al b/lib/auto/POSIX/abort.al new file mode 100644 index 0000000000..58e7ce915b --- /dev/null +++ b/lib/auto/POSIX/abort.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub abort { + unimpl "abort(xxx)", caller if @_ != 123; + abort($_[0]); +} + +1; diff --git a/lib/auto/POSIX/abs.al b/lib/auto/POSIX/abs.al new file mode 100644 index 0000000000..4a832b40d5 --- /dev/null +++ b/lib/auto/POSIX/abs.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub abs { + usage "abs(x)", caller if @_ != 1; + abs($_[0]); +} + +1; diff --git a/lib/auto/POSIX/access.al b/lib/auto/POSIX/access.al new file mode 100644 index 0000000000..89bbfb043a --- /dev/null +++ b/lib/auto/POSIX/access.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub access { + unimpl "access(xxx)", caller if @_ != 123; + access($_[0]); +} + +1; diff --git a/lib/auto/POSIX/alarm.al b/lib/auto/POSIX/alarm.al new file mode 100644 index 0000000000..183b6d965e --- /dev/null +++ b/lib/auto/POSIX/alarm.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub alarm { + unimpl "alarm(xxx)", caller if @_ != 123; + alarm($_[0]); +} + +1; diff --git a/lib/auto/POSIX/asctime.al b/lib/auto/POSIX/asctime.al new file mode 100644 index 0000000000..067e0f4211 --- /dev/null +++ b/lib/auto/POSIX/asctime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub asctime { + unimpl "asctime(xxx)", caller if @_ != 123; + asctime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/assert.al b/lib/auto/POSIX/assert.al new file mode 100644 index 0000000000..f32a8537ed --- /dev/null +++ b/lib/auto/POSIX/assert.al @@ -0,0 +1,12 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub assert { + usage "assert(expr)", caller if @_ != 1; + if (!$_[0]) { + local ($pack,$file,$line) = caller; + die "Assertion failed at $file line $line\n"; + } +} + +1; diff --git a/lib/auto/POSIX/atan2.al b/lib/auto/POSIX/atan2.al new file mode 100644 index 0000000000..1b2e23a533 --- /dev/null +++ b/lib/auto/POSIX/atan2.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub atan2 { + usage "atan2(x,y)", caller if @_ != 2; + atan2($_[0], $_[1]); +} + +1; diff --git a/lib/auto/POSIX/atexit.al b/lib/auto/POSIX/atexit.al new file mode 100644 index 0000000000..054d8da133 --- /dev/null +++ b/lib/auto/POSIX/atexit.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub atexit { + unimpl "atexit() is C-specific: use END {} instead", caller; +} + +1; diff --git a/lib/auto/POSIX/atof.al b/lib/auto/POSIX/atof.al new file mode 100644 index 0000000000..0875991941 --- /dev/null +++ b/lib/auto/POSIX/atof.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub atof { + unimpl "atof() is C-specific, stopped", caller; +} + +1; diff --git a/lib/auto/POSIX/atoi.al b/lib/auto/POSIX/atoi.al new file mode 100644 index 0000000000..6f18387899 --- /dev/null +++ b/lib/auto/POSIX/atoi.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub atoi { + unimpl "atoi() is C-specific, stopped", caller; +} + +1; diff --git a/lib/auto/POSIX/atol.al b/lib/auto/POSIX/atol.al new file mode 100644 index 0000000000..9393d21333 --- /dev/null +++ b/lib/auto/POSIX/atol.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub atol { + unimpl "atol() is C-specific, stopped", caller; +} + +1; diff --git a/lib/auto/POSIX/bsearch.al b/lib/auto/POSIX/bsearch.al new file mode 100644 index 0000000000..ed104adf41 --- /dev/null +++ b/lib/auto/POSIX/bsearch.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub bsearch { + unimpl "bsearch(xxx)", caller if @_ != 123; + bsearch($_[0]); +} + +1; diff --git a/lib/auto/POSIX/calloc.al b/lib/auto/POSIX/calloc.al new file mode 100644 index 0000000000..d53352385c --- /dev/null +++ b/lib/auto/POSIX/calloc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub calloc { + unimpl "calloc(xxx)", caller if @_ != 123; + calloc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cfgetispeed.al b/lib/auto/POSIX/cfgetispeed.al new file mode 100644 index 0000000000..a95efd6f54 --- /dev/null +++ b/lib/auto/POSIX/cfgetispeed.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cfgetispeed { + unimpl "cfgetispeed(xxx)", caller if @_ != 123; + cfgetispeed($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cfgetospeed.al b/lib/auto/POSIX/cfgetospeed.al new file mode 100644 index 0000000000..69e66ad76c --- /dev/null +++ b/lib/auto/POSIX/cfgetospeed.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cfgetospeed { + unimpl "cfgetospeed(xxx)", caller if @_ != 123; + cfgetospeed($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cfsetispeed.al b/lib/auto/POSIX/cfsetispeed.al new file mode 100644 index 0000000000..cbcc646b1e --- /dev/null +++ b/lib/auto/POSIX/cfsetispeed.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cfsetispeed { + unimpl "cfsetispeed(xxx)", caller if @_ != 123; + cfsetispeed($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cfsetospeed.al b/lib/auto/POSIX/cfsetospeed.al new file mode 100644 index 0000000000..7dae85c36a --- /dev/null +++ b/lib/auto/POSIX/cfsetospeed.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cfsetospeed { + unimpl "cfsetospeed(xxx)", caller if @_ != 123; + cfsetospeed($_[0]); +} + +1; diff --git a/lib/auto/POSIX/chdir.al b/lib/auto/POSIX/chdir.al new file mode 100644 index 0000000000..9e1f685dc9 --- /dev/null +++ b/lib/auto/POSIX/chdir.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub chdir { + unimpl "chdir(xxx)", caller if @_ != 123; + chdir($_[0]); +} + +1; diff --git a/lib/auto/POSIX/chmod.al b/lib/auto/POSIX/chmod.al new file mode 100644 index 0000000000..24fe4c5ab1 --- /dev/null +++ b/lib/auto/POSIX/chmod.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub chmod { + usage "chmod(filename, mode)", caller if @_ != 2; + chmod($_[0], $_[1]); +} + +1; diff --git a/lib/auto/POSIX/chown.al b/lib/auto/POSIX/chown.al new file mode 100644 index 0000000000..127d89861c --- /dev/null +++ b/lib/auto/POSIX/chown.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub chown { + usage "chown(filename, uid, gid)", caller if @_ != 3; + chown($_[0], $_[1], $_[2]); +} + +1; diff --git a/lib/auto/POSIX/clearerr.al b/lib/auto/POSIX/clearerr.al new file mode 100644 index 0000000000..412f521938 --- /dev/null +++ b/lib/auto/POSIX/clearerr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub clearerr { + usage "clearerr(filehandle)", caller if @_ != 1; + seek($_[0], 0, 1); +} + +1; diff --git a/lib/auto/POSIX/clock.al b/lib/auto/POSIX/clock.al new file mode 100644 index 0000000000..7fae255378 --- /dev/null +++ b/lib/auto/POSIX/clock.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub clock { + unimpl "clock(xxx)", caller if @_ != 123; + clock($_[0]); +} + +1; diff --git a/lib/auto/POSIX/close.al b/lib/auto/POSIX/close.al new file mode 100644 index 0000000000..ce471881d0 --- /dev/null +++ b/lib/auto/POSIX/close.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub close { + unimpl "close(xxx)", caller if @_ != 123; + close($_[0]); +} + +1; diff --git a/lib/auto/POSIX/closedir.al b/lib/auto/POSIX/closedir.al new file mode 100644 index 0000000000..bb12a2608d --- /dev/null +++ b/lib/auto/POSIX/closedir.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub closedir { + usage "closedir(dirhandle)", caller if @_ != 1; + closedir($_[0]); + ungensym($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cos.al b/lib/auto/POSIX/cos.al new file mode 100644 index 0000000000..4ea59dfb32 --- /dev/null +++ b/lib/auto/POSIX/cos.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cos { + usage "cos(x)", caller if @_ != 1; + cos($_[0]); +} + +1; diff --git a/lib/auto/POSIX/creat.al b/lib/auto/POSIX/creat.al new file mode 100644 index 0000000000..74656e7dd0 --- /dev/null +++ b/lib/auto/POSIX/creat.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub creat { + usage "creat(filename, mode)", caller if @_ != 2; + &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[2]); +} + +1; diff --git a/lib/auto/POSIX/ctermid.al b/lib/auto/POSIX/ctermid.al new file mode 100644 index 0000000000..37a8f71a14 --- /dev/null +++ b/lib/auto/POSIX/ctermid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ctermid { + unimpl "ctermid(xxx)", caller if @_ != 123; + ctermid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/ctime.al b/lib/auto/POSIX/ctime.al new file mode 100644 index 0000000000..d12aa4e64c --- /dev/null +++ b/lib/auto/POSIX/ctime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ctime { + unimpl "ctime(xxx)", caller if @_ != 123; + ctime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/cuserid.al b/lib/auto/POSIX/cuserid.al new file mode 100644 index 0000000000..546c3091fa --- /dev/null +++ b/lib/auto/POSIX/cuserid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub cuserid { + unimpl "cuserid(xxx)", caller if @_ != 123; + cuserid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/difftime.al b/lib/auto/POSIX/difftime.al new file mode 100644 index 0000000000..dd4b3db5db --- /dev/null +++ b/lib/auto/POSIX/difftime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub difftime { + unimpl "difftime(xxx)", caller if @_ != 123; + difftime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/div.al b/lib/auto/POSIX/div.al new file mode 100644 index 0000000000..0102b32fc9 --- /dev/null +++ b/lib/auto/POSIX/div.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub div { + unimpl "div(xxx)", caller if @_ != 123; + div($_[0]); +} + +1; diff --git a/lib/auto/POSIX/dup.al b/lib/auto/POSIX/dup.al new file mode 100644 index 0000000000..393119e5e0 --- /dev/null +++ b/lib/auto/POSIX/dup.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub dup { + unimpl "dup(xxx)", caller if @_ != 123; + dup($_[0]); +} + +1; diff --git a/lib/auto/POSIX/dup2.al b/lib/auto/POSIX/dup2.al new file mode 100644 index 0000000000..c85f16e9d5 --- /dev/null +++ b/lib/auto/POSIX/dup2.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub dup2 { + unimpl "dup2(xxx)", caller if @_ != 123; + dup2($_[0]); +} + +1; diff --git a/lib/auto/POSIX/errno.al b/lib/auto/POSIX/errno.al new file mode 100644 index 0000000000..971b7e8241 --- /dev/null +++ b/lib/auto/POSIX/errno.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub errno { + usage "errno()", caller if @_ != 0; + $! + 0; +} + +1; diff --git a/lib/auto/POSIX/execl.al b/lib/auto/POSIX/execl.al new file mode 100644 index 0000000000..c89c6fd8c0 --- /dev/null +++ b/lib/auto/POSIX/execl.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execl { + unimpl "execl(xxx)", caller if @_ != 123; + execl($_[0]); +} + +1; diff --git a/lib/auto/POSIX/execle.al b/lib/auto/POSIX/execle.al new file mode 100644 index 0000000000..530ac768dc --- /dev/null +++ b/lib/auto/POSIX/execle.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execle { + unimpl "execle(xxx)", caller if @_ != 123; + execle($_[0]); +} + +1; diff --git a/lib/auto/POSIX/execlp.al b/lib/auto/POSIX/execlp.al new file mode 100644 index 0000000000..ea78975435 --- /dev/null +++ b/lib/auto/POSIX/execlp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execlp { + unimpl "execlp(xxx)", caller if @_ != 123; + execlp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/execv.al b/lib/auto/POSIX/execv.al new file mode 100644 index 0000000000..382ec7dde6 --- /dev/null +++ b/lib/auto/POSIX/execv.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execv { + unimpl "execv(xxx)", caller if @_ != 123; + execv($_[0]); +} + +1; diff --git a/lib/auto/POSIX/execve.al b/lib/auto/POSIX/execve.al new file mode 100644 index 0000000000..9f5790a0f1 --- /dev/null +++ b/lib/auto/POSIX/execve.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execve { + unimpl "execve(xxx)", caller if @_ != 123; + execve($_[0]); +} + +1; diff --git a/lib/auto/POSIX/execvp.al b/lib/auto/POSIX/execvp.al new file mode 100644 index 0000000000..38677d8b7d --- /dev/null +++ b/lib/auto/POSIX/execvp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub execvp { + unimpl "execvp(xxx)", caller if @_ != 123; + execvp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/exit.al b/lib/auto/POSIX/exit.al new file mode 100644 index 0000000000..fc46de2cb8 --- /dev/null +++ b/lib/auto/POSIX/exit.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub exit { + unimpl "exit(xxx)", caller if @_ != 123; + exit($_[0]); +} + +1; diff --git a/lib/auto/POSIX/exp.al b/lib/auto/POSIX/exp.al new file mode 100644 index 0000000000..70683e072f --- /dev/null +++ b/lib/auto/POSIX/exp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub exp { + usage "exp(x)", caller if @_ != 1; + exp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fabs.al b/lib/auto/POSIX/fabs.al new file mode 100644 index 0000000000..5683d66ca5 --- /dev/null +++ b/lib/auto/POSIX/fabs.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fabs { + usage "fabs(x)", caller if @_ != 1; + abs($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fclose.al b/lib/auto/POSIX/fclose.al new file mode 100644 index 0000000000..493b964561 --- /dev/null +++ b/lib/auto/POSIX/fclose.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fclose { + unimpl "fclose() is C-specific--use close instead", caller; +} + +1; diff --git a/lib/auto/POSIX/fcntl.al b/lib/auto/POSIX/fcntl.al new file mode 100644 index 0000000000..8108a00fc6 --- /dev/null +++ b/lib/auto/POSIX/fcntl.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fcntl { + usage "fcntl(filehandle, cmd, arg)", caller if @_ != 3; + fcntl($_[0], $_[1], $_[2]); +} + +1; diff --git a/lib/auto/POSIX/fdopen.al b/lib/auto/POSIX/fdopen.al new file mode 100644 index 0000000000..23487cabdc --- /dev/null +++ b/lib/auto/POSIX/fdopen.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fdopen { + unimpl "fdopen(xxx)", caller if @_ != 123; + fdopen($_[0]); +} + +1; diff --git a/lib/auto/POSIX/feof.al b/lib/auto/POSIX/feof.al new file mode 100644 index 0000000000..895d58b7f0 --- /dev/null +++ b/lib/auto/POSIX/feof.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub feof { + usage "feof(filehandle)", caller if @_ != 1; + eof($_[0]); +} + +1; diff --git a/lib/auto/POSIX/ferror.al b/lib/auto/POSIX/ferror.al new file mode 100644 index 0000000000..0588424f06 --- /dev/null +++ b/lib/auto/POSIX/ferror.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ferror { + unimpl "ferror(xxx)", caller if @_ != 123; + ferror($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fflush.al b/lib/auto/POSIX/fflush.al new file mode 100644 index 0000000000..b7b767680c --- /dev/null +++ b/lib/auto/POSIX/fflush.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fflush { + unimpl "fflush(xxx)", caller if @_ != 123; + fflush($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fgetc.al b/lib/auto/POSIX/fgetc.al new file mode 100644 index 0000000000..41cd70f593 --- /dev/null +++ b/lib/auto/POSIX/fgetc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fgetc { + usage "fgetc(filehandle)", caller if @_ != 1; + getc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fgetpos.al b/lib/auto/POSIX/fgetpos.al new file mode 100644 index 0000000000..679fcd50dd --- /dev/null +++ b/lib/auto/POSIX/fgetpos.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fgetpos { + unimpl "fgetpos(xxx)", caller if @_ != 123; + fgetpos($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fgets.al b/lib/auto/POSIX/fgets.al new file mode 100644 index 0000000000..7a475b3778 --- /dev/null +++ b/lib/auto/POSIX/fgets.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fgets { + usage "fgets(filehandle)", caller if @_ != 1; + local($handle) = @_; + scalar <$handle>; +} + +1; diff --git a/lib/auto/POSIX/fileno.al b/lib/auto/POSIX/fileno.al new file mode 100644 index 0000000000..62c7c0aff8 --- /dev/null +++ b/lib/auto/POSIX/fileno.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fileno { + usage "fileno(filehandle)", caller if @_ != 1; + fileno($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fopen.al b/lib/auto/POSIX/fopen.al new file mode 100644 index 0000000000..f4394ad6cb --- /dev/null +++ b/lib/auto/POSIX/fopen.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fopen { + unimpl "fopen() is C-specific--use open instead", caller; +} + +1; diff --git a/lib/auto/POSIX/fork.al b/lib/auto/POSIX/fork.al new file mode 100644 index 0000000000..06466157e5 --- /dev/null +++ b/lib/auto/POSIX/fork.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fork { + usage "fork()", caller if @_ != 0; + fork; +} + +1; diff --git a/lib/auto/POSIX/fpathconf.al b/lib/auto/POSIX/fpathconf.al new file mode 100644 index 0000000000..533f906395 --- /dev/null +++ b/lib/auto/POSIX/fpathconf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fpathconf { + unimpl "fpathconf(xxx)", caller if @_ != 123; + fpathconf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fprintf.al b/lib/auto/POSIX/fprintf.al new file mode 100644 index 0000000000..b577f9ad35 --- /dev/null +++ b/lib/auto/POSIX/fprintf.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fprintf { + unimpl "fprintf() is C-specific--use printf instead", caller; +} + +1; diff --git a/lib/auto/POSIX/fputc.al b/lib/auto/POSIX/fputc.al new file mode 100644 index 0000000000..0cdf82c5a3 --- /dev/null +++ b/lib/auto/POSIX/fputc.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fputc { + unimpl "fputc() is C-specific--use print instead", caller; +} + +1; diff --git a/lib/auto/POSIX/fputs.al b/lib/auto/POSIX/fputs.al new file mode 100644 index 0000000000..208eea6ba9 --- /dev/null +++ b/lib/auto/POSIX/fputs.al @@ -0,0 +1,11 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fputs { + unimpl "fputs() is C-specific--use print instead", caller; + usage "fputs(string, handle)", caller if @_ != 2; + local($handle) = pop; + print $handle @_; +} + +1; diff --git a/lib/auto/POSIX/fread.al b/lib/auto/POSIX/fread.al new file mode 100644 index 0000000000..5b5c0c5fd7 --- /dev/null +++ b/lib/auto/POSIX/fread.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fread { + unimpl "fread() is C-specific--use read instead", caller; + unimpl "fread(xxx)", caller if @_ != 123; + fread($_[0]); +} + +1; diff --git a/lib/auto/POSIX/free.al b/lib/auto/POSIX/free.al new file mode 100644 index 0000000000..319a76d5a9 --- /dev/null +++ b/lib/auto/POSIX/free.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub free { + unimpl "free(xxx)", caller if @_ != 123; + free($_[0]); +} + +1; diff --git a/lib/auto/POSIX/freopen.al b/lib/auto/POSIX/freopen.al new file mode 100644 index 0000000000..ed4eca6d67 --- /dev/null +++ b/lib/auto/POSIX/freopen.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub freopen { + unimpl "freopen() is C-specific--use open instead", caller; + unimpl "freopen(xxx)", caller if @_ != 123; + freopen($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fscanf.al b/lib/auto/POSIX/fscanf.al new file mode 100644 index 0000000000..80a8e61454 --- /dev/null +++ b/lib/auto/POSIX/fscanf.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fscanf { + unimpl "fscanf() is C-specific--use <> and regular expressions instead", caller; + unimpl "fscanf(xxx)", caller if @_ != 123; + fscanf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fseek.al b/lib/auto/POSIX/fseek.al new file mode 100644 index 0000000000..55da72a549 --- /dev/null +++ b/lib/auto/POSIX/fseek.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fseek { + unimpl "fseek() is C-specific--use seek instead", caller; + unimpl "fseek(xxx)", caller if @_ != 123; + fseek($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fsetpos.al b/lib/auto/POSIX/fsetpos.al new file mode 100644 index 0000000000..9b59546e40 --- /dev/null +++ b/lib/auto/POSIX/fsetpos.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fsetpos { + unimpl "fsetpos() is C-specific--use seek instead", caller; + unimpl "fsetpos(xxx)", caller if @_ != 123; + fsetpos($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fstat.al b/lib/auto/POSIX/fstat.al new file mode 100644 index 0000000000..64ac1b6dad --- /dev/null +++ b/lib/auto/POSIX/fstat.al @@ -0,0 +1,13 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fstat { + usage "fstat(fd)", caller if @_ != 1; + local(*TMP); + open(TMP, "<&$_[0]"); # Gross. + local(@l) = stat(TMP); + close(TMP); + @l; +} + +1; diff --git a/lib/auto/POSIX/ftell.al b/lib/auto/POSIX/ftell.al new file mode 100644 index 0000000000..aa922c69b1 --- /dev/null +++ b/lib/auto/POSIX/ftell.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ftell { + unimpl "ftell() is C-specific--use tell instead", caller; + unimpl "ftell(xxx)", caller if @_ != 123; + ftell($_[0]); +} + +1; diff --git a/lib/auto/POSIX/fwrite.al b/lib/auto/POSIX/fwrite.al new file mode 100644 index 0000000000..09d8e7db55 --- /dev/null +++ b/lib/auto/POSIX/fwrite.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub fwrite { + unimpl "fwrite() is C-specific--use print instead", caller; + unimpl "fwrite(xxx)", caller if @_ != 123; + fwrite($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getc.al b/lib/auto/POSIX/getc.al new file mode 100644 index 0000000000..5919395af1 --- /dev/null +++ b/lib/auto/POSIX/getc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getc { + usage "getc(handle)", caller if @_ != 1; + getc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getchar.al b/lib/auto/POSIX/getchar.al new file mode 100644 index 0000000000..08e5111b60 --- /dev/null +++ b/lib/auto/POSIX/getchar.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getchar { + usage "getchar()", caller if @_ != 0; + getc(STDIN); +} + +1; diff --git a/lib/auto/POSIX/getcwd.al b/lib/auto/POSIX/getcwd.al new file mode 100644 index 0000000000..1e1ec7c688 --- /dev/null +++ b/lib/auto/POSIX/getcwd.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getcwd { + unimpl "getcwd(xxx)", caller if @_ != 123; + getcwd($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getegid.al b/lib/auto/POSIX/getegid.al new file mode 100644 index 0000000000..6f3719cc44 --- /dev/null +++ b/lib/auto/POSIX/getegid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getegid { + usage "getegid()", caller if @_ != 0; + $) + 0; +} + +1; diff --git a/lib/auto/POSIX/getenv.al b/lib/auto/POSIX/getenv.al new file mode 100644 index 0000000000..04fc148f23 --- /dev/null +++ b/lib/auto/POSIX/getenv.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getenv { + unimpl "getenv(xxx)", caller if @_ != 123; + getenv($_[0]); +} + +1; diff --git a/lib/auto/POSIX/geteuid.al b/lib/auto/POSIX/geteuid.al new file mode 100644 index 0000000000..74b10ff30f --- /dev/null +++ b/lib/auto/POSIX/geteuid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub geteuid { + usage "geteuid()", caller if @_ != 0; + $> + 0; +} + +1; diff --git a/lib/auto/POSIX/getgid.al b/lib/auto/POSIX/getgid.al new file mode 100644 index 0000000000..a106618fff --- /dev/null +++ b/lib/auto/POSIX/getgid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getgid { + usage "getgid()", caller if @_ != 0; + $( + 0; +} + +1; diff --git a/lib/auto/POSIX/getgrgid.al b/lib/auto/POSIX/getgrgid.al new file mode 100644 index 0000000000..485ed2b04c --- /dev/null +++ b/lib/auto/POSIX/getgrgid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getgrgid { + usage "getgrgid(gid)", caller if @_ != 1; + getgrgid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getgrnam.al b/lib/auto/POSIX/getgrnam.al new file mode 100644 index 0000000000..1dcbc69850 --- /dev/null +++ b/lib/auto/POSIX/getgrnam.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getgrnam { + usage "getgrnam(name)", caller if @_ != 1; + getgrnam($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getgroups.al b/lib/auto/POSIX/getgroups.al new file mode 100644 index 0000000000..34ae5e87cd --- /dev/null +++ b/lib/auto/POSIX/getgroups.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getgroups { + usage "getgroups()", caller if @_ != 0; + local(%seen) = (); + grep(!%seen{$_}++, split(' ', $) )); +} + +1; diff --git a/lib/auto/POSIX/getlogin.al b/lib/auto/POSIX/getlogin.al new file mode 100644 index 0000000000..8f61cb24f2 --- /dev/null +++ b/lib/auto/POSIX/getlogin.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getlogin { + usage "getlogin(xxx)", caller if @_ != 0; + getlogin(); +} + +1; diff --git a/lib/auto/POSIX/getpgrp.al b/lib/auto/POSIX/getpgrp.al new file mode 100644 index 0000000000..0364706e53 --- /dev/null +++ b/lib/auto/POSIX/getpgrp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getpgrp { + usage "getpgrp()", caller if @_ != 0; + getpgrp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getpid.al b/lib/auto/POSIX/getpid.al new file mode 100644 index 0000000000..51deea44db --- /dev/null +++ b/lib/auto/POSIX/getpid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getpid { + usage "getpid()", caller if @_ != 0; + $$; +} + +1; diff --git a/lib/auto/POSIX/getppid.al b/lib/auto/POSIX/getppid.al new file mode 100644 index 0000000000..95450e95ee --- /dev/null +++ b/lib/auto/POSIX/getppid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getppid { + usage "getppid()", caller if @_ != 0; + getppid; +} + +1; diff --git a/lib/auto/POSIX/getpwnam.al b/lib/auto/POSIX/getpwnam.al new file mode 100644 index 0000000000..d4cbc8d766 --- /dev/null +++ b/lib/auto/POSIX/getpwnam.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getpwnam { + usage "getpwnam(name)", caller if @_ != 1; + getpwnam($_[0]); +} + +1; diff --git a/lib/auto/POSIX/getpwuid.al b/lib/auto/POSIX/getpwuid.al new file mode 100644 index 0000000000..cfb1265761 --- /dev/null +++ b/lib/auto/POSIX/getpwuid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getpwuid { + usage "getpwuid(uid)", caller if @_ != 1; + getpwuid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/gets.al b/lib/auto/POSIX/gets.al new file mode 100644 index 0000000000..d989692172 --- /dev/null +++ b/lib/auto/POSIX/gets.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub gets { + usage "gets(handle)", caller if @_ != 1; + local($handle) = shift; + scalar <$handle>; +} + +1; diff --git a/lib/auto/POSIX/getuid.al b/lib/auto/POSIX/getuid.al new file mode 100644 index 0000000000..6b97d4889f --- /dev/null +++ b/lib/auto/POSIX/getuid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub getuid { + usage "getuid()", caller if @_ != 0; + $<; +} + +1; diff --git a/lib/auto/POSIX/gmtime.al b/lib/auto/POSIX/gmtime.al new file mode 100644 index 0000000000..520d2dadc5 --- /dev/null +++ b/lib/auto/POSIX/gmtime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub gmtime { + unimpl "gmtime(xxx)", caller if @_ != 123; + gmtime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/isatty.al b/lib/auto/POSIX/isatty.al new file mode 100644 index 0000000000..dfc50f4d63 --- /dev/null +++ b/lib/auto/POSIX/isatty.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub isatty { + unimpl "isatty(xxx)", caller if @_ != 123; + isatty($_[0]); +} + +1; diff --git a/lib/auto/POSIX/kill.al b/lib/auto/POSIX/kill.al new file mode 100644 index 0000000000..138a6d72f4 --- /dev/null +++ b/lib/auto/POSIX/kill.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub kill { + usage "kill(pid, sig)", caller if @_ != 2; + kill $_[1], $_[0]; +} + +1; diff --git a/lib/auto/POSIX/labs.al b/lib/auto/POSIX/labs.al new file mode 100644 index 0000000000..90426e8298 --- /dev/null +++ b/lib/auto/POSIX/labs.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub labs { + unimpl "labs(xxx)", caller if @_ != 123; + labs($_[0]); +} + +1; diff --git a/lib/auto/POSIX/ldiv.al b/lib/auto/POSIX/ldiv.al new file mode 100644 index 0000000000..788fb3219e --- /dev/null +++ b/lib/auto/POSIX/ldiv.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ldiv { + unimpl "ldiv(xxx)", caller if @_ != 123; + ldiv($_[0]); +} + +1; diff --git a/lib/auto/POSIX/link.al b/lib/auto/POSIX/link.al new file mode 100644 index 0000000000..662ad9d41e --- /dev/null +++ b/lib/auto/POSIX/link.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub link { + usage "link(oldfilename, newfilename)", caller if @_ != 2; + link($_[0], $_[1]); +} + +1; diff --git a/lib/auto/POSIX/localtime.al b/lib/auto/POSIX/localtime.al new file mode 100644 index 0000000000..5e4d61a940 --- /dev/null +++ b/lib/auto/POSIX/localtime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub localtime { + unimpl "localtime(xxx)", caller if @_ != 123; + localtime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/log.al b/lib/auto/POSIX/log.al new file mode 100644 index 0000000000..2ba36f20cc --- /dev/null +++ b/lib/auto/POSIX/log.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub log { + usage "log(x)", caller if @_ != 1; + log($_[0]); +} + +1; diff --git a/lib/auto/POSIX/longjmp.al b/lib/auto/POSIX/longjmp.al new file mode 100644 index 0000000000..d403d46bc5 --- /dev/null +++ b/lib/auto/POSIX/longjmp.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub longjmp { + unimpl "longjmp() is C-specific: use die instead", caller; +} + +1; diff --git a/lib/auto/POSIX/lseek.al b/lib/auto/POSIX/lseek.al new file mode 100644 index 0000000000..ded754a642 --- /dev/null +++ b/lib/auto/POSIX/lseek.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub lseek { + unimpl "lseek(xxx)", caller if @_ != 123; + lseek($_[0]); +} + +1; diff --git a/lib/auto/POSIX/malloc.al b/lib/auto/POSIX/malloc.al new file mode 100644 index 0000000000..e860639b0d --- /dev/null +++ b/lib/auto/POSIX/malloc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub malloc { + unimpl "malloc(xxx)", caller if @_ != 123; + malloc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/mblen.al b/lib/auto/POSIX/mblen.al new file mode 100644 index 0000000000..1a7b7f3428 --- /dev/null +++ b/lib/auto/POSIX/mblen.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mblen { + unimpl "mblen(xxx)", caller if @_ != 123; + mblen($_[0]); +} + +1; diff --git a/lib/auto/POSIX/mbstowcs.al b/lib/auto/POSIX/mbstowcs.al new file mode 100644 index 0000000000..8f15fe306e --- /dev/null +++ b/lib/auto/POSIX/mbstowcs.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mbstowcs { + unimpl "mbstowcs(xxx)", caller if @_ != 123; + mbstowcs($_[0]); +} + +1; diff --git a/lib/auto/POSIX/mbtowc.al b/lib/auto/POSIX/mbtowc.al new file mode 100644 index 0000000000..695dcb98f4 --- /dev/null +++ b/lib/auto/POSIX/mbtowc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mbtowc { + unimpl "mbtowc(xxx)", caller if @_ != 123; + mbtowc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/memchr.al b/lib/auto/POSIX/memchr.al new file mode 100644 index 0000000000..28b0c1255b --- /dev/null +++ b/lib/auto/POSIX/memchr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub memchr { + unimpl "memchr(xxx)", caller if @_ != 123; + memchr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/memcmp.al b/lib/auto/POSIX/memcmp.al new file mode 100644 index 0000000000..8406f28ed9 --- /dev/null +++ b/lib/auto/POSIX/memcmp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub memcmp { + unimpl "memcmp(xxx)", caller if @_ != 123; + memcmp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/memcpy.al b/lib/auto/POSIX/memcpy.al new file mode 100644 index 0000000000..eee2dd61fd --- /dev/null +++ b/lib/auto/POSIX/memcpy.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub memcpy { + unimpl "memcpy(xxx)", caller if @_ != 123; + memcpy($_[0]); +} + +1; diff --git a/lib/auto/POSIX/memmove.al b/lib/auto/POSIX/memmove.al new file mode 100644 index 0000000000..c926d78fa0 --- /dev/null +++ b/lib/auto/POSIX/memmove.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub memmove { + unimpl "memmove(xxx)", caller if @_ != 123; + memmove($_[0]); +} + +1; diff --git a/lib/auto/POSIX/memset.al b/lib/auto/POSIX/memset.al new file mode 100644 index 0000000000..369930e346 --- /dev/null +++ b/lib/auto/POSIX/memset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub memset { + unimpl "memset(xxx)", caller if @_ != 123; + memset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/mkdir.al b/lib/auto/POSIX/mkdir.al new file mode 100644 index 0000000000..0b1088271e --- /dev/null +++ b/lib/auto/POSIX/mkdir.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mkdir { + usage "mkdir(directoryname, mode)", caller if @_ != 2; + mkdir($_[0], $_[1]); +} + +1; diff --git a/lib/auto/POSIX/mkfifo.al b/lib/auto/POSIX/mkfifo.al new file mode 100644 index 0000000000..8b6ad724f1 --- /dev/null +++ b/lib/auto/POSIX/mkfifo.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mkfifo { + unimpl "mkfifo(xxx)", caller if @_ != 123; + mkfifo($_[0]); +} + +1; diff --git a/lib/auto/POSIX/mktime.al b/lib/auto/POSIX/mktime.al new file mode 100644 index 0000000000..df7e3556fd --- /dev/null +++ b/lib/auto/POSIX/mktime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub mktime { + unimpl "mktime(xxx)", caller if @_ != 123; + mktime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/offsetof.al b/lib/auto/POSIX/offsetof.al new file mode 100644 index 0000000000..fb5ecfb819 --- /dev/null +++ b/lib/auto/POSIX/offsetof.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub offsetof { + unimpl "offsetof() is C-specific, stopped", caller; +} + +1; diff --git a/lib/auto/POSIX/opendir.al b/lib/auto/POSIX/opendir.al new file mode 100644 index 0000000000..7c264d4770 --- /dev/null +++ b/lib/auto/POSIX/opendir.al @@ -0,0 +1,12 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub opendir { + usage "opendir(directory)", caller if @_ != 1; + local($dirhandle) = &gensym; + opendir($dirhandle, $_[0]) + ? $dirhandle + : (ungensym($dirhandle), undef); +} + +1; diff --git a/lib/auto/POSIX/pathconf.al b/lib/auto/POSIX/pathconf.al new file mode 100644 index 0000000000..4a66189185 --- /dev/null +++ b/lib/auto/POSIX/pathconf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub pathconf { + unimpl "pathconf(xxx)", caller if @_ != 123; + pathconf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/pause.al b/lib/auto/POSIX/pause.al new file mode 100644 index 0000000000..41fcea6c23 --- /dev/null +++ b/lib/auto/POSIX/pause.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub pause { + unimpl "pause(xxx)", caller if @_ != 123; + pause($_[0]); +} + +1; diff --git a/lib/auto/POSIX/perror.al b/lib/auto/POSIX/perror.al new file mode 100644 index 0000000000..36ae11e4c7 --- /dev/null +++ b/lib/auto/POSIX/perror.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub perror { + unimpl "perror() is C-specific--print $! instead", caller; + unimpl "perror(xxx)", caller if @_ != 123; + perror($_[0]); +} + +1; diff --git a/lib/auto/POSIX/pipe.al b/lib/auto/POSIX/pipe.al new file mode 100644 index 0000000000..d65b5ec885 --- /dev/null +++ b/lib/auto/POSIX/pipe.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub pipe { + unimpl "pipe(xxx)", caller if @_ != 123; + pipe($_[0]); +} + +1; diff --git a/lib/auto/POSIX/pow.al b/lib/auto/POSIX/pow.al new file mode 100644 index 0000000000..0893b2260e --- /dev/null +++ b/lib/auto/POSIX/pow.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub pow { + usage "pow(x,exponent)", caller if @_ != 2; + $_[0] ** $_[1]; +} + +1; diff --git a/lib/auto/POSIX/printf.al b/lib/auto/POSIX/printf.al new file mode 100644 index 0000000000..f911780072 --- /dev/null +++ b/lib/auto/POSIX/printf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub printf { + usage "printf(pattern, args...)", caller if @_ < 1; + printf STDOUT @_; +} + +1; diff --git a/lib/auto/POSIX/putc.al b/lib/auto/POSIX/putc.al new file mode 100644 index 0000000000..59eaca87a3 --- /dev/null +++ b/lib/auto/POSIX/putc.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub putc { + unimpl "putc() is C-specific--use print instead", caller; + unimpl "putc(xxx)", caller if @_ != 123; + putc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/putchar.al b/lib/auto/POSIX/putchar.al new file mode 100644 index 0000000000..1d6016c08d --- /dev/null +++ b/lib/auto/POSIX/putchar.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub putchar { + unimpl "putchar() is C-specific--use print instead", caller; + unimpl "putchar(xxx)", caller if @_ != 123; + putchar($_[0]); +} + +1; diff --git a/lib/auto/POSIX/puts.al b/lib/auto/POSIX/puts.al new file mode 100644 index 0000000000..84d3d8072a --- /dev/null +++ b/lib/auto/POSIX/puts.al @@ -0,0 +1,10 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub puts { + unimpl "puts() is C-specific--use print instead", caller; + unimpl "puts(xxx)", caller if @_ != 123; + puts($_[0]); +} + +1; diff --git a/lib/auto/POSIX/qsort.al b/lib/auto/POSIX/qsort.al new file mode 100644 index 0000000000..93eb12496c --- /dev/null +++ b/lib/auto/POSIX/qsort.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub qsort { + unimpl "qsort(xxx)", caller if @_ != 123; + qsort($_[0]); +} + +1; diff --git a/lib/auto/POSIX/raise.al b/lib/auto/POSIX/raise.al new file mode 100644 index 0000000000..de43d2a29e --- /dev/null +++ b/lib/auto/POSIX/raise.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub raise { + usage "raise(sig)", caller if @_ != 1; + kill $$, $_[0]; # Is this good enough? +} + +1; diff --git a/lib/auto/POSIX/rand.al b/lib/auto/POSIX/rand.al new file mode 100644 index 0000000000..08c3a1bfc7 --- /dev/null +++ b/lib/auto/POSIX/rand.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub rand { + unimpl "rand(xxx)", caller if @_ != 123; + rand($_[0]); +} + +1; diff --git a/lib/auto/POSIX/read.al b/lib/auto/POSIX/read.al new file mode 100644 index 0000000000..50363afd41 --- /dev/null +++ b/lib/auto/POSIX/read.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub read { + unimpl "read(xxx)", caller if @_ != 123; + read($_[0]); +} + +1; diff --git a/lib/auto/POSIX/readdir.al b/lib/auto/POSIX/readdir.al new file mode 100644 index 0000000000..84792b0c41 --- /dev/null +++ b/lib/auto/POSIX/readdir.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub readdir { + usage "readdir(dirhandle)", caller if @_ != 1; + readdir($_[0]); +} + +1; diff --git a/lib/auto/POSIX/realloc.al b/lib/auto/POSIX/realloc.al new file mode 100644 index 0000000000..4899b059c2 --- /dev/null +++ b/lib/auto/POSIX/realloc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub realloc { + unimpl "realloc(xxx)", caller if @_ != 123; + realloc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/remove.al b/lib/auto/POSIX/remove.al new file mode 100644 index 0000000000..83d2b8aa79 --- /dev/null +++ b/lib/auto/POSIX/remove.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub remove { + unimpl "remove(xxx)", caller if @_ != 123; + remove($_[0]); +} + +1; diff --git a/lib/auto/POSIX/rename.al b/lib/auto/POSIX/rename.al new file mode 100644 index 0000000000..b657c5a39d --- /dev/null +++ b/lib/auto/POSIX/rename.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub rename { + usage "rename(oldfilename, newfilename)", caller if @_ != 2; + rename($_[0], $_[1]); +} + +1; diff --git a/lib/auto/POSIX/rewind.al b/lib/auto/POSIX/rewind.al new file mode 100644 index 0000000000..0bbcc845a6 --- /dev/null +++ b/lib/auto/POSIX/rewind.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub rewind { + unimpl "rewind(xxx)", caller if @_ != 123; + rewind($_[0]); +} + +1; diff --git a/lib/auto/POSIX/rewinddir.al b/lib/auto/POSIX/rewinddir.al new file mode 100644 index 0000000000..610f45818d --- /dev/null +++ b/lib/auto/POSIX/rewinddir.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub rewinddir { + usage "rewinddir(dirhandle)", caller if @_ != 1; + rewinddir($_[0]); +} + +1; diff --git a/lib/auto/POSIX/rmdir.al b/lib/auto/POSIX/rmdir.al new file mode 100644 index 0000000000..a439aa6f93 --- /dev/null +++ b/lib/auto/POSIX/rmdir.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub rmdir { + usage "rmdir(directoryname)", caller if @_ != 1; + rmdir($_[0]); +} + +1; diff --git a/lib/auto/POSIX/scanf.al b/lib/auto/POSIX/scanf.al new file mode 100644 index 0000000000..f15440924d --- /dev/null +++ b/lib/auto/POSIX/scanf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub scanf { + unimpl "scanf(xxx)", caller if @_ != 123; + scanf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setbuf.al b/lib/auto/POSIX/setbuf.al new file mode 100644 index 0000000000..96f2e976dd --- /dev/null +++ b/lib/auto/POSIX/setbuf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setbuf { + unimpl "setbuf(xxx)", caller if @_ != 123; + setbuf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setgid.al b/lib/auto/POSIX/setgid.al new file mode 100644 index 0000000000..fcbb8b6f79 --- /dev/null +++ b/lib/auto/POSIX/setgid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setgid { + unimpl "setgid(xxx)", caller if @_ != 123; + setgid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setjmp.al b/lib/auto/POSIX/setjmp.al new file mode 100644 index 0000000000..93e614a32e --- /dev/null +++ b/lib/auto/POSIX/setjmp.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setjmp { + unimpl "setjmp() is C-specific: use eval {} instead", caller; +} + +1; diff --git a/lib/auto/POSIX/setpgid.al b/lib/auto/POSIX/setpgid.al new file mode 100644 index 0000000000..948e79a977 --- /dev/null +++ b/lib/auto/POSIX/setpgid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setpgid { + unimpl "setpgid(xxx)", caller if @_ != 123; + setpgid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setsid.al b/lib/auto/POSIX/setsid.al new file mode 100644 index 0000000000..7edc965f05 --- /dev/null +++ b/lib/auto/POSIX/setsid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setsid { + unimpl "setsid(xxx)", caller if @_ != 123; + setsid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setuid.al b/lib/auto/POSIX/setuid.al new file mode 100644 index 0000000000..02da7d3ab6 --- /dev/null +++ b/lib/auto/POSIX/setuid.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setuid { + unimpl "setuid(xxx)", caller if @_ != 123; + setuid($_[0]); +} + +1; diff --git a/lib/auto/POSIX/setvbuf.al b/lib/auto/POSIX/setvbuf.al new file mode 100644 index 0000000000..5303581077 --- /dev/null +++ b/lib/auto/POSIX/setvbuf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub setvbuf { + unimpl "setvbuf(xxx)", caller if @_ != 123; + setvbuf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigaction.al b/lib/auto/POSIX/sigaction.al new file mode 100644 index 0000000000..c2b83002b6 --- /dev/null +++ b/lib/auto/POSIX/sigaction.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigaction { + unimpl "sigaction(xxx)", caller if @_ != 123; + sigaction($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigaddset.al b/lib/auto/POSIX/sigaddset.al new file mode 100644 index 0000000000..9a0ea675f7 --- /dev/null +++ b/lib/auto/POSIX/sigaddset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigaddset { + unimpl "sigaddset(xxx)", caller if @_ != 123; + sigaddset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigdelset.al b/lib/auto/POSIX/sigdelset.al new file mode 100644 index 0000000000..c252f9f876 --- /dev/null +++ b/lib/auto/POSIX/sigdelset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigdelset { + unimpl "sigdelset(xxx)", caller if @_ != 123; + sigdelset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigemptyset.al b/lib/auto/POSIX/sigemptyset.al new file mode 100644 index 0000000000..f665f624e6 --- /dev/null +++ b/lib/auto/POSIX/sigemptyset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigemptyset { + unimpl "sigemptyset(xxx)", caller if @_ != 123; + sigemptyset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigfillset.al b/lib/auto/POSIX/sigfillset.al new file mode 100644 index 0000000000..b685797815 --- /dev/null +++ b/lib/auto/POSIX/sigfillset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigfillset { + unimpl "sigfillset(xxx)", caller if @_ != 123; + sigfillset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigismember.al b/lib/auto/POSIX/sigismember.al new file mode 100644 index 0000000000..67c9d98eb5 --- /dev/null +++ b/lib/auto/POSIX/sigismember.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigismember { + unimpl "sigismember(xxx)", caller if @_ != 123; + sigismember($_[0]); +} + +1; diff --git a/lib/auto/POSIX/siglongjmp.al b/lib/auto/POSIX/siglongjmp.al new file mode 100644 index 0000000000..48ab95ed26 --- /dev/null +++ b/lib/auto/POSIX/siglongjmp.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub siglongjmp { + unimpl "siglongjmp() is C-specific: use die instead", caller; +} + +1; diff --git a/lib/auto/POSIX/signal.al b/lib/auto/POSIX/signal.al new file mode 100644 index 0000000000..2471bd302c --- /dev/null +++ b/lib/auto/POSIX/signal.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub signal { + unimpl "signal(xxx)", caller if @_ != 123; + signal($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigpending.al b/lib/auto/POSIX/sigpending.al new file mode 100644 index 0000000000..bb2c76de5d --- /dev/null +++ b/lib/auto/POSIX/sigpending.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigpending { + unimpl "sigpending(xxx)", caller if @_ != 123; + sigpending($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigprocmask.al b/lib/auto/POSIX/sigprocmask.al new file mode 100644 index 0000000000..a6d42a2d43 --- /dev/null +++ b/lib/auto/POSIX/sigprocmask.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigprocmask { + unimpl "sigprocmask(xxx)", caller if @_ != 123; + sigprocmask($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sigsetjmp.al b/lib/auto/POSIX/sigsetjmp.al new file mode 100644 index 0000000000..b737259b1a --- /dev/null +++ b/lib/auto/POSIX/sigsetjmp.al @@ -0,0 +1,8 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigsetjmp { + unimpl "sigsetjmp() is C-specific: use eval {} instead", caller; +} + +1; diff --git a/lib/auto/POSIX/sigsuspend.al b/lib/auto/POSIX/sigsuspend.al new file mode 100644 index 0000000000..159f1d5aa6 --- /dev/null +++ b/lib/auto/POSIX/sigsuspend.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sigsuspend { + unimpl "sigsuspend(xxx)", caller if @_ != 123; + sigsuspend($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sin.al b/lib/auto/POSIX/sin.al new file mode 100644 index 0000000000..90681ff8d9 --- /dev/null +++ b/lib/auto/POSIX/sin.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sin { + usage "sin(x)", caller if @_ != 1; + sin($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sleep.al b/lib/auto/POSIX/sleep.al new file mode 100644 index 0000000000..ac326e8882 --- /dev/null +++ b/lib/auto/POSIX/sleep.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sleep { + unimpl "sleep(xxx)", caller if @_ != 123; + sleep($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sprintf.al b/lib/auto/POSIX/sprintf.al new file mode 100644 index 0000000000..5a61a83dd9 --- /dev/null +++ b/lib/auto/POSIX/sprintf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sprintf { + unimpl "sprintf(xxx)", caller if @_ != 123; + sprintf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sqrt.al b/lib/auto/POSIX/sqrt.al new file mode 100644 index 0000000000..f2efe5d76d --- /dev/null +++ b/lib/auto/POSIX/sqrt.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sqrt { + usage "sqrt(x)", caller if @_ != 1; + sqrt($_[0]); +} + +1; diff --git a/lib/auto/POSIX/srand.al b/lib/auto/POSIX/srand.al new file mode 100644 index 0000000000..563757dcd1 --- /dev/null +++ b/lib/auto/POSIX/srand.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub srand { + unimpl "srand(xxx)", caller if @_ != 123; + srand($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sscanf.al b/lib/auto/POSIX/sscanf.al new file mode 100644 index 0000000000..05701419d7 --- /dev/null +++ b/lib/auto/POSIX/sscanf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sscanf { + unimpl "sscanf(xxx)", caller if @_ != 123; + sscanf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/stat.al b/lib/auto/POSIX/stat.al new file mode 100644 index 0000000000..636607eb33 --- /dev/null +++ b/lib/auto/POSIX/stat.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub stat { + usage "stat(filename)", caller if @_ != 1; + stat($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strcat.al b/lib/auto/POSIX/strcat.al new file mode 100644 index 0000000000..b80dd70529 --- /dev/null +++ b/lib/auto/POSIX/strcat.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strcat { + unimpl "strcat(xxx)", caller if @_ != 123; + strcat($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strchr.al b/lib/auto/POSIX/strchr.al new file mode 100644 index 0000000000..9dbea2e1ec --- /dev/null +++ b/lib/auto/POSIX/strchr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strchr { + unimpl "strchr(xxx)", caller if @_ != 123; + strchr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strcmp.al b/lib/auto/POSIX/strcmp.al new file mode 100644 index 0000000000..72f53043a8 --- /dev/null +++ b/lib/auto/POSIX/strcmp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strcmp { + unimpl "strcmp(xxx)", caller if @_ != 123; + strcmp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strcoll.al b/lib/auto/POSIX/strcoll.al new file mode 100644 index 0000000000..a904097e3f --- /dev/null +++ b/lib/auto/POSIX/strcoll.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strcoll { + unimpl "strcoll(xxx)", caller if @_ != 123; + strcoll($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strcpy.al b/lib/auto/POSIX/strcpy.al new file mode 100644 index 0000000000..aa3e05d713 --- /dev/null +++ b/lib/auto/POSIX/strcpy.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strcpy { + unimpl "strcpy(xxx)", caller if @_ != 123; + strcpy($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strcspn.al b/lib/auto/POSIX/strcspn.al new file mode 100644 index 0000000000..00a5c1a968 --- /dev/null +++ b/lib/auto/POSIX/strcspn.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strcspn { + unimpl "strcspn(xxx)", caller if @_ != 123; + strcspn($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strerror.al b/lib/auto/POSIX/strerror.al new file mode 100644 index 0000000000..d4dbd7eeb9 --- /dev/null +++ b/lib/auto/POSIX/strerror.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strerror { + unimpl "strerror(xxx)", caller if @_ != 123; + strerror($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strftime.al b/lib/auto/POSIX/strftime.al new file mode 100644 index 0000000000..578b3245c2 --- /dev/null +++ b/lib/auto/POSIX/strftime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strftime { + unimpl "strftime(xxx)", caller if @_ != 123; + strftime($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strlen.al b/lib/auto/POSIX/strlen.al new file mode 100644 index 0000000000..afb3a7e025 --- /dev/null +++ b/lib/auto/POSIX/strlen.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strlen { + unimpl "strlen(xxx)", caller if @_ != 123; + strlen($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strncat.al b/lib/auto/POSIX/strncat.al new file mode 100644 index 0000000000..d5694bdddd --- /dev/null +++ b/lib/auto/POSIX/strncat.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strncat { + unimpl "strncat(xxx)", caller if @_ != 123; + strncat($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strncmp.al b/lib/auto/POSIX/strncmp.al new file mode 100644 index 0000000000..d85972c0a2 --- /dev/null +++ b/lib/auto/POSIX/strncmp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strncmp { + unimpl "strncmp(xxx)", caller if @_ != 123; + strncmp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strncpy.al b/lib/auto/POSIX/strncpy.al new file mode 100644 index 0000000000..1ebe12dd5a --- /dev/null +++ b/lib/auto/POSIX/strncpy.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strncpy { + unimpl "strncpy(xxx)", caller if @_ != 123; + strncpy($_[0]); +} + +1; diff --git a/lib/auto/POSIX/stroul.al b/lib/auto/POSIX/stroul.al new file mode 100644 index 0000000000..bbdb71e2ec --- /dev/null +++ b/lib/auto/POSIX/stroul.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub stroul { + unimpl "stroul(xxx)", caller if @_ != 123; + stroul($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strpbrk.al b/lib/auto/POSIX/strpbrk.al new file mode 100644 index 0000000000..ee8bef9a27 --- /dev/null +++ b/lib/auto/POSIX/strpbrk.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strpbrk { + unimpl "strpbrk(xxx)", caller if @_ != 123; + strpbrk($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strrchr.al b/lib/auto/POSIX/strrchr.al new file mode 100644 index 0000000000..175f3265e3 --- /dev/null +++ b/lib/auto/POSIX/strrchr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strrchr { + unimpl "strrchr(xxx)", caller if @_ != 123; + strrchr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strspn.al b/lib/auto/POSIX/strspn.al new file mode 100644 index 0000000000..1856caea4e --- /dev/null +++ b/lib/auto/POSIX/strspn.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strspn { + unimpl "strspn(xxx)", caller if @_ != 123; + strspn($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strstr.al b/lib/auto/POSIX/strstr.al new file mode 100644 index 0000000000..c9ef04aa80 --- /dev/null +++ b/lib/auto/POSIX/strstr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strstr { + unimpl "strstr(xxx)", caller if @_ != 123; + strstr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strtod.al b/lib/auto/POSIX/strtod.al new file mode 100644 index 0000000000..44ada12c08 --- /dev/null +++ b/lib/auto/POSIX/strtod.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strtod { + unimpl "strtod(xxx)", caller if @_ != 123; + strtod($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strtok.al b/lib/auto/POSIX/strtok.al new file mode 100644 index 0000000000..47825149b0 --- /dev/null +++ b/lib/auto/POSIX/strtok.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strtok { + unimpl "strtok(xxx)", caller if @_ != 123; + strtok($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strtol.al b/lib/auto/POSIX/strtol.al new file mode 100644 index 0000000000..4a40dffa0b --- /dev/null +++ b/lib/auto/POSIX/strtol.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strtol { + unimpl "strtol(xxx)", caller if @_ != 123; + strtol($_[0]); +} + +1; diff --git a/lib/auto/POSIX/strxfrm.al b/lib/auto/POSIX/strxfrm.al new file mode 100644 index 0000000000..9ad22f1efa --- /dev/null +++ b/lib/auto/POSIX/strxfrm.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub strxfrm { + unimpl "strxfrm(xxx)", caller if @_ != 123; + strxfrm($_[0]); +} + +1; diff --git a/lib/auto/POSIX/sysconf.al b/lib/auto/POSIX/sysconf.al new file mode 100644 index 0000000000..5dfeab8e9d --- /dev/null +++ b/lib/auto/POSIX/sysconf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub sysconf { + unimpl "sysconf(xxx)", caller if @_ != 123; + sysconf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/system.al b/lib/auto/POSIX/system.al new file mode 100644 index 0000000000..c143ca1e23 --- /dev/null +++ b/lib/auto/POSIX/system.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub system { + usage "system(command)", caller if @_ != 1; + system($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tan.al b/lib/auto/POSIX/tan.al new file mode 100644 index 0000000000..a86b877f3f --- /dev/null +++ b/lib/auto/POSIX/tan.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tan { + usage "tan(x)", caller if @_ != 1; + tan($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcdrain.al b/lib/auto/POSIX/tcdrain.al new file mode 100644 index 0000000000..97ea14f0ab --- /dev/null +++ b/lib/auto/POSIX/tcdrain.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcdrain { + unimpl "tcdrain(xxx)", caller if @_ != 123; + tcdrain($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcflow.al b/lib/auto/POSIX/tcflow.al new file mode 100644 index 0000000000..690587aa46 --- /dev/null +++ b/lib/auto/POSIX/tcflow.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcflow { + unimpl "tcflow(xxx)", caller if @_ != 123; + tcflow($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcflush.al b/lib/auto/POSIX/tcflush.al new file mode 100644 index 0000000000..733ab16425 --- /dev/null +++ b/lib/auto/POSIX/tcflush.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcflush { + unimpl "tcflush(xxx)", caller if @_ != 123; + tcflush($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcgetattr.al b/lib/auto/POSIX/tcgetattr.al new file mode 100644 index 0000000000..c8a5e09b6e --- /dev/null +++ b/lib/auto/POSIX/tcgetattr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcgetattr { + unimpl "tcgetattr(xxx)", caller if @_ != 123; + tcgetattr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcgetpgrp.al b/lib/auto/POSIX/tcgetpgrp.al new file mode 100644 index 0000000000..8b6f884f2b --- /dev/null +++ b/lib/auto/POSIX/tcgetpgrp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcgetpgrp { + unimpl "tcgetpgrp(xxx)", caller if @_ != 123; + tcgetpgrp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcsendbreak.al b/lib/auto/POSIX/tcsendbreak.al new file mode 100644 index 0000000000..e90b7fabd3 --- /dev/null +++ b/lib/auto/POSIX/tcsendbreak.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcsendbreak { + unimpl "tcsendbreak(xxx)", caller if @_ != 123; + tcsendbreak($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcsetattr.al b/lib/auto/POSIX/tcsetattr.al new file mode 100644 index 0000000000..1735cf6862 --- /dev/null +++ b/lib/auto/POSIX/tcsetattr.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcsetattr { + unimpl "tcsetattr(xxx)", caller if @_ != 123; + tcsetattr($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tcsetpgrp.al b/lib/auto/POSIX/tcsetpgrp.al new file mode 100644 index 0000000000..9dcff24b8c --- /dev/null +++ b/lib/auto/POSIX/tcsetpgrp.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tcsetpgrp { + unimpl "tcsetpgrp(xxx)", caller if @_ != 123; + tcsetpgrp($_[0]); +} + +1; diff --git a/lib/auto/POSIX/time.al b/lib/auto/POSIX/time.al new file mode 100644 index 0000000000..d750d24e90 --- /dev/null +++ b/lib/auto/POSIX/time.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub time { + unimpl "time(xxx)", caller if @_ != 123; + time($_[0]); +} + +1; diff --git a/lib/auto/POSIX/times.al b/lib/auto/POSIX/times.al new file mode 100644 index 0000000000..d8f588ad63 --- /dev/null +++ b/lib/auto/POSIX/times.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub times { + usage "times()", caller if @_ != 0; + times(); +} + +1; diff --git a/lib/auto/POSIX/tmpfile.al b/lib/auto/POSIX/tmpfile.al new file mode 100644 index 0000000000..7adb01fb9b --- /dev/null +++ b/lib/auto/POSIX/tmpfile.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tmpfile { + unimpl "tmpfile(xxx)", caller if @_ != 123; + tmpfile($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tmpnam.al b/lib/auto/POSIX/tmpnam.al new file mode 100644 index 0000000000..23e7dfb11b --- /dev/null +++ b/lib/auto/POSIX/tmpnam.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tmpnam { + unimpl "tmpnam(xxx)", caller if @_ != 123; + tmpnam($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tolower.al b/lib/auto/POSIX/tolower.al new file mode 100644 index 0000000000..8bcbb8494a --- /dev/null +++ b/lib/auto/POSIX/tolower.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tolower { + usage "tolower(string)", caller if @_ != 1; + lc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/toupper.al b/lib/auto/POSIX/toupper.al new file mode 100644 index 0000000000..e8b4c0b4ff --- /dev/null +++ b/lib/auto/POSIX/toupper.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub toupper { + usage "toupper(string)", caller if @_ != 1; + uc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/ttyname.al b/lib/auto/POSIX/ttyname.al new file mode 100644 index 0000000000..60f39dc5f4 --- /dev/null +++ b/lib/auto/POSIX/ttyname.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ttyname { + unimpl "ttyname(xxx)", caller if @_ != 123; + ttyname($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tzname.al b/lib/auto/POSIX/tzname.al new file mode 100644 index 0000000000..86e7019547 --- /dev/null +++ b/lib/auto/POSIX/tzname.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tzname { + unimpl "tzname(xxx)", caller if @_ != 123; + tzname($_[0]); +} + +1; diff --git a/lib/auto/POSIX/tzset.al b/lib/auto/POSIX/tzset.al new file mode 100644 index 0000000000..44b5b0a878 --- /dev/null +++ b/lib/auto/POSIX/tzset.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub tzset { + unimpl "tzset(xxx)", caller if @_ != 123; + tzset($_[0]); +} + +1; diff --git a/lib/auto/POSIX/umask.al b/lib/auto/POSIX/umask.al new file mode 100644 index 0000000000..e7c7fc71d3 --- /dev/null +++ b/lib/auto/POSIX/umask.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub umask { + usage "umask(mask)", caller if @_ != 1; + umask($_[0]); +} + +1; diff --git a/lib/auto/POSIX/ungetc.al b/lib/auto/POSIX/ungetc.al new file mode 100644 index 0000000000..76c426e72e --- /dev/null +++ b/lib/auto/POSIX/ungetc.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub ungetc { + unimpl "ungetc(xxx)", caller if @_ != 123; + ungetc($_[0]); +} + +1; diff --git a/lib/auto/POSIX/unlink.al b/lib/auto/POSIX/unlink.al new file mode 100644 index 0000000000..798ce431d8 --- /dev/null +++ b/lib/auto/POSIX/unlink.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub unlink { + usage "unlink(filename)", caller if @_ != 1; + unlink($_[0]); +} + +1; diff --git a/lib/auto/POSIX/utime.al b/lib/auto/POSIX/utime.al new file mode 100644 index 0000000000..fff416df89 --- /dev/null +++ b/lib/auto/POSIX/utime.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub utime { + usage "utime(filename, atime, mtime)", caller if @_ != 3; + utime($_[1], $_[2], $_[0]); +} + +1; diff --git a/lib/auto/POSIX/vfprintf.al b/lib/auto/POSIX/vfprintf.al new file mode 100644 index 0000000000..b18f42fd85 --- /dev/null +++ b/lib/auto/POSIX/vfprintf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub vfprintf { + unimpl "vfprintf(xxx)", caller if @_ != 123; + vfprintf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/vprintf.al b/lib/auto/POSIX/vprintf.al new file mode 100644 index 0000000000..f295a99906 --- /dev/null +++ b/lib/auto/POSIX/vprintf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub vprintf { + unimpl "vprintf(xxx)", caller if @_ != 123; + vprintf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/vsprintf.al b/lib/auto/POSIX/vsprintf.al new file mode 100644 index 0000000000..c8e00c7803 --- /dev/null +++ b/lib/auto/POSIX/vsprintf.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub vsprintf { + unimpl "vsprintf(xxx)", caller if @_ != 123; + vsprintf($_[0]); +} + +1; diff --git a/lib/auto/POSIX/wait.al b/lib/auto/POSIX/wait.al new file mode 100644 index 0000000000..489b1e3b07 --- /dev/null +++ b/lib/auto/POSIX/wait.al @@ -0,0 +1,11 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub wait { + usage "wait(statusvariable)", caller if @_ != 1; + local $result = wait(); + $_[0] = $?; + $result; +} + +1; diff --git a/lib/auto/POSIX/waitpid.al b/lib/auto/POSIX/waitpid.al new file mode 100644 index 0000000000..a7706a7243 --- /dev/null +++ b/lib/auto/POSIX/waitpid.al @@ -0,0 +1,11 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub waitpid { + usage "waitpid(pid, statusvariable, options)", caller if @_ != 3; + local $result = waitpid($_[0], $_[2]); + $_[1] = $?; + $result; +} + +1; diff --git a/lib/auto/POSIX/wcstombs.al b/lib/auto/POSIX/wcstombs.al new file mode 100644 index 0000000000..1f8782b9d6 --- /dev/null +++ b/lib/auto/POSIX/wcstombs.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub wcstombs { + unimpl "wcstombs(xxx)", caller if @_ != 123; + wcstombs($_[0]); +} + +1; diff --git a/lib/auto/POSIX/wctomb.al b/lib/auto/POSIX/wctomb.al new file mode 100644 index 0000000000..e4ccf87cb9 --- /dev/null +++ b/lib/auto/POSIX/wctomb.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub wctomb { + unimpl "wctomb(xxx)", caller if @_ != 123; + wctomb($_[0]); +} + +1; diff --git a/lib/auto/POSIX/write.al b/lib/auto/POSIX/write.al new file mode 100644 index 0000000000..2306b69a01 --- /dev/null +++ b/lib/auto/POSIX/write.al @@ -0,0 +1,9 @@ +# NOTE: Derived from POSIX.pm. Changes made here will be lost. +package POSIX; + +sub write { + unimpl "write(xxx)", caller if @_ != 123; + write($_[0]); +} + +1; diff --git a/lib/auto/SDBM_File.so b/lib/auto/SDBM_File.so new file mode 100755 index 0000000000..8414d44a5e Binary files /dev/null and b/lib/auto/SDBM_File.so differ diff --git a/lib/auto/SDBM_File/SDBM_File.so b/lib/auto/SDBM_File/SDBM_File.so new file mode 100755 index 0000000000..362042ccc0 Binary files /dev/null and b/lib/auto/SDBM_File/SDBM_File.so differ diff --git a/lib/auto/SDBM_File/foo b/lib/auto/SDBM_File/foo new file mode 100755 index 0000000000..193c50caba Binary files /dev/null and b/lib/auto/SDBM_File/foo differ diff --git a/lib/chat2.inter b/lib/chat2.inter new file mode 100644 index 0000000000..6934f1cc28 --- /dev/null +++ b/lib/chat2.inter @@ -0,0 +1,495 @@ +Article 20992 of comp.lang.perl: +Path: netlabs!news.cerf.net!mvb.saic.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!swrinde!ihnp4.ucsd.edu!ames!koriel!male.EBay.Sun.COM!jethro.Corp.Sun.COM!eric +From: eric.arnold@sun.com (Eric Arnold) +Newsgroups: comp.lang.perl +Subject: Re: Need a bidirectional filter for interactive Unix applications +Date: 15 Apr 94 21:24:03 GMT +Organization: Sun Microsystems +Lines: 478 +Sender: news@sun.com +Message-ID: +References: <1994Apr15.110134.4581@chemabs.uucp> +NNTP-Posting-Host: animus.corp.sun.com +X-Newsreader: prn Ver 1.09 +In-reply-to: btf64@cas.org's message of Fri, 15 Apr 1994 11:01:34 GMT + +In article <1994Apr15.110134.4581@chemabs.uucp> + btf64@cas.org (Bernard T. French) writes: + +>In article dgf@netcom.com (David Feldman) writes: +>>I need to write a bidirectional filter that would (ideally) sit between a +.. +>>program's stdin & stdout to point to a pty pair known to perl. The perl app- +>>lication would talk to the user's crt/keyboard, translate (application-specific) +>>the input & output streams, and pass these as appropriate to/from the pty pair, +.. +> +> I'm afraid I can't offer you a perl solution, but err..... there is a +>Tcl solution. There is a Tcl extension called "expect" that is designed to + +There *is* an old, established Perl solution: "chat2.pl" which does +everything (well, basically) "expect" does but you get it in the +expressive Perl environment. "chat2.pl" is delivered with the Perl +source. + +Randal: "interact()" still hasn't made it into Perl5alpha8 +"chat2.pl", so I've included a version which does. + +-Eric + + +## chat.pl: chat with a server +## V2.01.alpha.7 91/06/16 +## Randal L. Schwartz + +package chat; + +$sockaddr = 'S n a4 x8'; +chop($thishost = `hostname`); $thisaddr = (gethostbyname($thishost))[4]; +$thisproc = pack($sockaddr, 2, 0, $thisaddr); + +# *S = symbol for current I/O, gets assigned *chatsymbol.... +$next = "chatsymbol000000"; # next one +$nextpat = "^chatsymbol"; # patterns that match next++, ++, ++, ++ + + +## $handle = &chat'open_port("server.address",$port_number); +## opens a named or numbered TCP server + +sub open_port { ## public + local($server, $port) = @_; + + local($serveraddr,$serverproc); + + *S = ++$next; + if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { + $serveraddr = pack('C4', $1, $2, $3, $4); + } else { + local(@x) = gethostbyname($server); + return undef unless @x; + $serveraddr = $x[4]; + } + $serverproc = pack($sockaddr, 2, $port, $serveraddr); + unless (socket(S, 2, 1, 6)) { + # XXX hardwired $AF_SOCKET, $SOCK_STREAM, 'tcp' + # but who the heck would change these anyway? (:-) + ($!) = ($!, close(S)); # close S while saving $! + return undef; + } + unless (bind(S, $thisproc)) { + ($!) = ($!, close(S)); # close S while saving $! + return undef; + } + unless (connect(S, $serverproc)) { + ($!) = ($!, close(S)); # close S while saving $! + return undef; + } + select((select(S), $| = 1)[0]); + $next; # return symbol for switcharound +} + +## ($host, $port, $handle) = &chat'open_listen([$port_number]); +## opens a TCP port on the current machine, ready to be listened to +## if $port_number is absent or zero, pick a default port number +## process must be uid 0 to listen to a low port number + +sub open_listen { ## public + + *S = ++$next; + local($thisport) = shift || 0; + local($thisproc_local) = pack($sockaddr, 2, $thisport, $thisaddr); + local(*NS) = "__" . time; + unless (socket(NS, 2, 1, 6)) { + # XXX hardwired $AF_SOCKET, $SOCK_STREAM, 'tcp' + # but who the heck would change these anyway? (:-) + ($!) = ($!, close(NS)); + return undef; + } + unless (bind(NS, $thisproc_local)) { + ($!) = ($!, close(NS)); + return undef; + } + unless (listen(NS, 1)) { + ($!) = ($!, close(NS)); + return undef; + } + select((select(NS), $| = 1)[0]); + local($family, $port, @myaddr) = + unpack("S n C C C C x8", getsockname(NS)); + $S{"needs_accept"} = *NS; # so expect will open it + (@myaddr, $port, $next); # returning this +} + +## $handle = &chat'open_proc("command","arg1","arg2",...); +## opens a /bin/sh on a pseudo-tty + +sub open_proc { ## public + local(@cmd) = @_; + + *S = ++$next; + local(*TTY) = "__TTY" . time; + local($pty,$tty,$pty_handle) = &_getpty(S,TTY); + + #local($pty,$tty,$pty_handle) = &getpty(S,TTY); + #$Tty = $tty; + + die "Cannot find a new pty" unless defined $pty; + local($pid) = fork; + die "Cannot fork: $!" unless defined $pid; + unless ($pid) { + close STDIN; close STDOUT; close STDERR; + #close($pty_handle); + setpgrp(0,$$); + if (open(DEVTTY, "/dev/tty")) { + ioctl(DEVTTY,0x20007471,0); # XXX s/b &TIOCNOTTY + close DEVTTY; + } + open(STDIN,"<&TTY"); + open(STDOUT,">&TTY"); + open(STDERR,">&STDOUT"); + die "Oops" unless fileno(STDERR) == 2; # sanity + close(S); + + exec @cmd; + die "Cannot exec @cmd: $!"; + } + close(TTY); + $PID{$next} = $pid; + $next; # return symbol for switcharound + +} + +# $S is the read-ahead buffer + +## $return = &chat'expect([$handle,] $timeout_time, +## $pat1, $body1, $pat2, $body2, ... ) +## $handle is from previous &chat'open_*(). +## $timeout_time is the time (either relative to the current time, or +## absolute, ala time(2)) at which a timeout event occurs. +## $pat1, $pat2, and so on are regexs which are matched against the input +## stream. If a match is found, the entire matched string is consumed, +## and the corresponding body eval string is evaled. +## +## Each pat is a regular-expression (probably enclosed in single-quotes +## in the invocation). ^ and $ will work, respecting the current value of $*. +## If pat is 'TIMEOUT', the body is executed if the timeout is exceeded. +## If pat is 'EOF', the body is executed if the process exits before +## the other patterns are seen. +## +## Pats are scanned in the order given, so later pats can contain +## general defaults that won't be examined unless the earlier pats +## have failed. +## +## The result of eval'ing body is returned as the result of +## the invocation. Recursive invocations are not thought +## through, and may work only accidentally. :-) +## +## undef is returned if either a timeout or an eof occurs and no +## corresponding body has been defined. +## I/O errors of any sort are treated as eof. + +$nextsubname = "expectloop000000"; # used for subroutines + +sub expect { ## public + if ($_[0] =~ /$nextpat/) { + *S = shift; + } + local($endtime) = shift; + + local($timeout,$eof) = (1,1); + local($caller) = caller; + local($rmask, $nfound, $timeleft, $thisbuf); + local($cases, $pattern, $action, $subname); + $endtime += time if $endtime < 600_000_000; + + if (defined $S{"needs_accept"}) { # is it a listen socket? + local(*NS) = $S{"needs_accept"}; + delete $S{"needs_accept"}; + $S{"needs_close"} = *NS; + unless(accept(S,NS)) { + ($!) = ($!, close(S), close(NS)); + return undef; + } + select((select(S), $| = 1)[0]); + } + + # now see whether we need to create a new sub: + + unless ($subname = $expect_subname{$caller,@_}) { + # nope. make a new one: + $expect_subname{$caller,@_} = $subname = $nextsubname++; + + $cases .= <<"EDQ"; # header is funny to make everything elsif's +sub $subname { + LOOP: { + if (0) { ; } +EDQ + while (@_) { + ($pattern,$action) = splice(@_,0,2); + if ($pattern =~ /^eof$/i) { + $cases .= <<"EDQ"; + elsif (\$eof) { + package $caller; + $action; + } +EDQ + $eof = 0; + } elsif ($pattern =~ /^timeout$/i) { + $cases .= <<"EDQ"; + elsif (\$timeout) { + package $caller; + $action; + } +EDQ + $timeout = 0; + } else { + $pattern =~ s#/#\\/#g; + $cases .= <<"EDQ"; + elsif (\$S =~ /$pattern/) { + \$S = \$'; + package $caller; + $action; + } +EDQ + } + } + $cases .= <<"EDQ" if $eof; + elsif (\$eof) { + undef; + } +EDQ + $cases .= <<"EDQ" if $timeout; + elsif (\$timeout) { + undef; + } +EDQ + $cases .= <<'ESQ'; + else { + $rmask = ""; + vec($rmask,fileno(S),1) = 1; + ($nfound, $rmask) = + select($rmask, undef, undef, $endtime - time); + if ($nfound) { + $nread = sysread(S, $thisbuf, 1024); + if ($nread > 0) { + $S .= $thisbuf; + } else { + $eof++, redo LOOP; # any error is also eof + } + } else { + $timeout++, redo LOOP; # timeout + } + redo LOOP; + } + } +} +ESQ + eval $cases; die "$cases:\n$@" if $@; + } + $eof = $timeout = 0; + do $subname(); +} + +## &chat'print([$handle,] @data) +## $handle is from previous &chat'open(). +## like print $handle @data + +sub print { ## public + if ($_[0] =~ /$nextpat/) { + *S = shift; + } + print S @_; +} + +## &chat'close([$handle,]) +## $handle is from previous &chat'open(). +## like close $handle + +sub close { ## public + local($pid); + if ($_[0] =~ /$nextpat/) { + $pid = $PID{$_[0]}; + *S = shift; + } else { + $pid = $PID{$next}; + } + close(S); + waitpid($pid,0); + if (defined $S{"needs_close"}) { # is it a listen socket? + local(*NS) = $S{"needs_close"}; + delete $S{"needs_close"}; + close(NS); + } +} + +## @ready_handles = &chat'select($timeout, @handles) +## select()'s the handles with a timeout value of $timeout seconds. +## Returns an array of handles that are ready for I/O. +## Both user handles and chat handles are supported (but beware of +## stdio's buffering for user handles). + +sub select { ## public + local($timeout) = shift; + local(@handles) = @_; + local(%handlename) = (); + local(%ready) = (); + local($caller) = caller; + local($rmask) = ""; + for (@handles) { + if (/$nextpat/o) { # one of ours... see if ready + local(*SYM) = $_; + if (length($SYM)) { + $timeout = 0; # we have a winner + $ready{$_}++; + } + $handlename{fileno($_)} = $_; + } else { + $handlename{fileno(/'/ ? $_ : "$caller\'$_")} = $_; + } + } + for (sort keys %handlename) { + vec($rmask, $_, 1) = 1; + } + select($rmask, undef, undef, $timeout); + for (sort keys %handlename) { + $ready{$handlename{$_}}++ if vec($rmask,$_,1); + } + sort keys %ready; +} + +# ($pty,$tty) = $chat'_getpty(PTY,TTY): +# internal procedure to get the next available pty. +# opens pty on handle PTY, and matching tty on handle TTY. +# returns undef if can't find a pty. + +sub _getpty { ## private + local($_PTY,$_TTY) = @_; + $_PTY =~ s/^([^']+)$/(caller)[$[]."'".$1/e; + $_TTY =~ s/^([^']+)$/(caller)[$[]."'".$1/e; + local($pty,$tty); + for $bank (112..127) { + next unless -e sprintf("/dev/pty%c0", $bank); + for $unit (48..57) { + $pty = sprintf("/dev/pty%c%c", $bank, $unit); + open($_PTY,"+>$pty") || next; + select((select($_PTY), $| = 1)[0]); + ($tty = $pty) =~ s/pty/tty/; + open($_TTY,"+>$tty") || next; + select((select($_TTY), $| = 1)[0]); + system "stty nl>$tty"; + return ($pty,$tty,$_PTY); + } + } + undef; +} + + +sub getpty { + local( $pty_handle, $tty_handle ) = @_; + +print "--------in getpty----------\n"; + $pty_handle =~ s/^([^']+)$/(caller)[$[]."'".$1/e; + $pty_handle =~ s/^([^']+)$/(caller)[$[]."'".$1/e; + + #$pty_handle = ++$next_handle; + chop( @ptys = `ls /dev/pty*` ); + + for $pty ( @ptys ) + { + open($pty_handle,"+>$pty") || next; + select((select($pty_handle), $| = 1)[0]); + ($tty = $pty) =~ s/pty/tty/; + + open($tty_handle,"+>$tty") || next; + select((select($tty_handle), $| = 1)[0]); + ($tty = $pty) =~ s/pty/tty/; + + return ($pty, $tty, $pty_handle ); + } + return undef; +} + + + +# from: Randal L. Schwartz + +# Usage: +# +# ($chathandle = &chat'open_proc("/bin/sh")) || die "cannot open shell"; +# system("stty cbreak raw -echo >/dev/tty\n"); +# &chat'interact($chathandle); +# &chat'close($chathandle); +# system("stty -cbreak -raw echo >/dev/tty\n"); + +sub interact +{ + local( $chathandle ) = @_; + + &chat'print($chathandle, "stty sane\n"); + select(STDOUT) ; $| = 1; # unbuffer STDOUT + + #print "tty=$Tty,whoami=",`whoami`,"\n"; + #&change_utmp( "", $Tty, "eric", "", time() ); + + { + @ready = &chat'select(30, STDIN,$chathandle); + print "after select, ready=",join(",",@ready),"\n"; + #(warn "[waiting]"), redo unless @ready; + if (grep($_ eq $chathandle, @ready)) { + print "checking $chathandle\n"; + last unless $text = &chat'expect($chathandle,0,'[\s\S]+','$&'); + print "$chathandle OK\n"; + print "got=($text)"; + #print $text; + } + if (grep($_ eq STDIN, @ready)) { + print "checking STDIN\n"; + last unless sysread(STDIN,$buf,1024) > 0; + print "STDIN OK\n"; + &chat'print($chathandle,$buf); + } + redo; + } + #&change_utmp( $Tty, "$Tty", "", "", 0 ); + print "leaving interact, \$!=$!\n"; +} + +## $handle = &chat'open_duphandle(handle); +## duplicates an input file handle to conform to chat format + +sub open_duphandle { ## public + *S = ++$next; + open(S,"<&$_[0]"); + $next; # return symbol for switcharound +} + +#Here is an example which uses this routine. +# +# # The following lines makes stdin unbuffered +# +# $BSD = -f '/vmunix'; +# +# if ($BSD) { +# system "stty cbreak /dev/tty 2>&1"; +# } +# else { +# system "stty", '-icanon'; +# system "stty", 'eol', '^A'; +# } +# +# require 'mychat2.pl'; +# +# &chat'open_duphandle(STDIN); +# +# print +# &chat'expect(3, +# '[A-Z]', '" :-)"', +# '.', '" :-("', +# TIMEOUT, '"-o-"', +# EOF, '"\$\$"'), +# "\n"; + + +1; + + diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl index 5427494485..03dbbcd8fe 100644 --- a/lib/dumpvar.pl +++ b/lib/dumpvar.pl @@ -8,7 +8,7 @@ sub unctrl { } sub main'dumpvar { ($package,@vars) = @_; - local(*stab) = eval("*_$package"); + local(*stab) = *{"::_$package"}; while (($key,$val) = each(%stab)) { { next if @vars && !grep($key eq $_,@vars); diff --git a/lib/termcap.pl b/lib/termcap.pl deleted file mode 100644 index 22c18179d8..0000000000 --- a/lib/termcap.pl +++ /dev/null @@ -1,165 +0,0 @@ -;# $RCSfile: termcap.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:16 $ -;# -;# Usage: -;# require 'ioctl.pl'; -;# ioctl(TTY,$TIOCGETP,$foo); -;# ($ispeed,$ospeed) = unpack('cc',$foo); -;# require 'termcap.pl'; -;# &Tgetent('vt100'); # sets $TC{'cm'}, etc. -;# &Tputs(&Tgoto($TC{'cm'},$col,$row), 0, 'FILEHANDLE'); -;# &Tputs($TC{'dl'},$affcnt,'FILEHANDLE'); -;# -sub Tgetent { - local($TERM) = @_; - local($TERMCAP,$_,$entry,$loop,$field); - - warn "Tgetent: no ospeed set" unless $ospeed; - foreach $key (keys(TC)) { - delete $TC{$key}; - } - $TERM = $ENV{'TERM'} unless $TERM; - $TERMCAP = $ENV{'TERMCAP'}; - $TERMCAP = '/etc/termcap' unless $TERMCAP; - if ($TERMCAP !~ m:^/:) { - if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) { - $TERMCAP = '/etc/termcap'; - } - } - if ($TERMCAP =~ m:^/:) { - $entry = ''; - do { - $loop = " - open(TERMCAP,'<$TERMCAP') || die \"Can't open $TERMCAP\"; - while () { - next if /^#/; - next if /^\t/; - if (/(^|\\|)$TERM\[:\\|]/) { - chop; - while (chop eq '\\\\') { - \$_ .= ; - chop; - } - \$_ .= ':'; - last; - } - } - close TERMCAP; - \$entry .= \$_; - "; - eval $loop; - } while s/:tc=([^:]+):/:/ && ($TERM = $1); - $TERMCAP = $entry; - } - - foreach $field (split(/:[\s:\\]*/,$TERMCAP)) { - if ($field =~ /^\w\w$/) { - $TC{$field} = 1; - } - elsif ($field =~ /^(\w\w)#(.*)/) { - $TC{$1} = $2 if $TC{$1} eq ''; - } - elsif ($field =~ /^(\w\w)=(.*)/) { - $entry = $1; - $_ = $2; - s/\\E/\033/g; - s/\\(\d\d\d)/pack('c',$1 & 0177)/eg; - s/\\n/\n/g; - s/\\r/\r/g; - s/\\t/\t/g; - s/\\b/\b/g; - s/\\f/\f/g; - s/\\\^/\377/g; - s/\^\?/\177/g; - s/\^(.)/pack('c',ord($1) & 31)/eg; - s/\\(.)/$1/g; - s/\377/^/g; - $TC{$entry} = $_ if $TC{$entry} eq ''; - } - } - $TC{'pc'} = "\0" if $TC{'pc'} eq ''; - $TC{'bc'} = "\b" if $TC{'bc'} eq ''; -} - -@Tputs = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2); - -sub Tputs { - local($string,$affcnt,$FH) = @_; - local($ms); - if ($string =~ /(^[\d.]+)(\*?)(.*)$/) { - $ms = $1; - $ms *= $affcnt if $2; - $string = $3; - $decr = $Tputs[$ospeed]; - if ($decr > .1) { - $ms += $decr / 2; - $string .= $TC{'pc'} x ($ms / $decr); - } - } - print $FH $string if $FH; - $string; -} - -sub Tgoto { - local($string) = shift(@_); - local($result) = ''; - local($after) = ''; - local($code,$tmp) = @_; - local(@tmp); - @tmp = ($tmp,$code); - local($online) = 0; - while ($string =~ /^([^%]*)%(.)(.*)/) { - $result .= $1; - $code = $2; - $string = $3; - if ($code eq 'd') { - $result .= sprintf("%d",shift(@tmp)); - } - elsif ($code eq '.') { - $tmp = shift(@tmp); - if ($tmp == 0 || $tmp == 4 || $tmp == 10) { - if ($online) { - ++$tmp, $after .= $TC{'up'} if $TC{'up'}; - } - else { - ++$tmp, $after .= $TC{'bc'}; - } - } - $result .= sprintf("%c",$tmp); - $online = !$online; - } - elsif ($code eq '+') { - $result .= sprintf("%c",shift(@tmp)+ord($string)); - $string = substr($string,1,99); - $online = !$online; - } - elsif ($code eq 'r') { - ($code,$tmp) = @tmp; - @tmp = ($tmp,$code); - $online = !$online; - } - elsif ($code eq '>') { - ($code,$tmp,$string) = unpack("CCa99",$string); - if ($tmp[$[] > $code) { - $tmp[$[] += $tmp; - } - } - elsif ($code eq '2') { - $result .= sprintf("%02d",shift(@tmp)); - $online = !$online; - } - elsif ($code eq '3') { - $result .= sprintf("%03d",shift(@tmp)); - $online = !$online; - } - elsif ($code eq 'i') { - ($code,$tmp) = @tmp; - @tmp = ($code+1,$tmp+1); - } - else { - return "OOPS"; - } - } - $result . $string . $after; -} - -1; diff --git a/libperl.rlb b/libperl.rlb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libtperl.rlb b/libtperl.rlb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/make.out b/make.out index bda9fe0501..c38dafddad 100644 --- a/make.out +++ b/make.out @@ -1,5 +1,9 @@ make: Warning: Both `makefile' and `Makefile' exists -./configpm -ld.so: Undefined symbol: _dbminit -*** Error code 127 -make: Fatal error: Command failed for target `lib/Config.pm' +test -f miniperl || make miniperl +./miniperl ext/xsubpp ext/posix/POSIX.xs >tmp +mv tmp POSIX.c +`sh cflags POSIX.o` POSIX.c + CCCMD = cc -c -DDEBUGGING -g +test -d lib/auto/POSIX || mkdir lib/auto/POSIX +ld -o lib/auto/POSIX/POSIX.so POSIX.o -lm +cc -o perl perlmain.o perl.o av.o scope.o op.o doop.o doio.o dump.o hv.o malloc.o mg.o perly.o pp.o regcomp.o regexec.o gv.o sv.o taint.o toke.o util.o deb.o run.o dl_sunos.o -ldbm -ldl -lm -lposix diff --git a/makedepend b/makedepend index 11e4a1f66d..6aec6dfd50 100755 --- a/makedepend +++ b/makedepend @@ -1,5 +1,5 @@ #!/bin/sh -# $RCSfile: makedepend.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:24:20 $ +# $RCSfile: makedepend.SH,v 3314Revision: 4.1 3314Date: 92/08/07 18:24:20 $ # # $Log: makedepend.SH,v $ # Revision 4.1 92/08/07 18:24:20 lwall @@ -23,21 +23,21 @@ export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$) -cat='cat' +cat='/bin/cat' cppflags=' -DDEBUGGING' -cp='cp' -cppstdin='/tmp_mnt/vol/src/local/lwall/perl5/cppstdin' +cp='/bin/cp' +cppstdin='/tmp_mnt/net/vaccine/export/src/local/lwall/perl5/cppstdin' cppminus='' -echo='echo' -egrep='egrep' -expr='expr' -mv='mv' -rm='rm' -sed='sed' -sort='sort' +echo='/bin/echo' +egrep='/bin/egrep' +expr='/bin/expr' +mv='/bin/mv' +rm='/bin/rm' +sed='/bin/sed' +sort='/bin/sort' test='test' -tr='tr' -uniq='uniq' +tr='/bin/tr' +uniq='/bin/uniq' PATH="$PATH:." export PATH @@ -66,6 +66,11 @@ case "$defrule" in '') defrule='$(CC) -c $(CFLAGS)' ;; esac +: Create files in UU directory to avoid problems with long filenames +: on systems with 14 character filename limits so file.c.c and file.c +: might be identical +$test -d UU || mkdir UU + make clist || ($echo "Searching for .c files..."; \ $echo *.c | $tr ' ' '\012' | $egrep -v '\*' >.clist) for file in `$cat .clist`; do @@ -87,8 +92,8 @@ for file in `$cat .clist`; do -e 's|/\*.*$||' \ -e 's|\\$||' \ -e p \ - -e '}' ) >$file.c - $cppstdin $finc -I/usr/local/include -I. $cppflags $cppminus <$file.c | + -e '}' ) >UU/$file.c + $cppstdin $finc -I/usr/local/include -I. $cppflags $cppminus > $mf -$rm -f .deptmp `sed 's/\.c/.c.c/' .clist` .shlist .clist .hlist .hsed +$rm -rf .deptmp UU .shlist .clist .hlist .hsed diff --git a/makedepend.SH b/makedepend.SH index d474b724c2..01963f873e 100755 --- a/makedepend.SH +++ b/makedepend.SH @@ -86,6 +86,11 @@ case "$defrule" in '') defrule='$(CC) -c $(CFLAGS)' ;; esac +: Create files in UU directory to avoid problems with long filenames +: on systems with 14 character filename limits so file.c.c and file.c +: might be identical +$test -d UU || mkdir UU + make clist || ($echo "Searching for .c files..."; \ $echo *.c | $tr ' ' '\012' | $egrep -v '\*' >.clist) for file in `$cat .clist`; do @@ -107,8 +112,8 @@ for file in `$cat .clist`; do -e 's|/\*.*$||' \ -e 's|\\$||' \ -e p \ - -e '}' ) >$file.c - $cppstdin $finc -I/usr/local/include -I. $cppflags $cppminus <$file.c | + -e '}' ) >UU/$file.c + $cppstdin $finc -I/usr/local/include -I. $cppflags $cppminus > $mf -$rm -f .deptmp `sed 's/\.c/.c.c/' .clist` .shlist .clist .hlist .hsed +$rm -rf .deptmp UU .shlist .clist .hlist .hsed !NO!SUBS! $eunicefix makedepend diff --git a/makedir b/makedir index 343c78d3b0..250bdd5fb0 100755 --- a/makedir +++ b/makedir @@ -1,5 +1,5 @@ #!/bin/sh -# $RCSfile: makedir.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:24:23 $ +# $RCSfile: makedir.SH,v 3314Revision: 4.1 3314Date: 92/08/07 18:24:23 $ # # $Log: makedir.SH,v $ # Revision 4.1 92/08/07 18:24:23 lwall @@ -16,7 +16,7 @@ export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed mysel case $# in 0) - echo "makedir pathname filenameflag" + /bin/echo "makedir pathname filenameflag" exit 1 ;; esac @@ -29,7 +29,7 @@ esac : strip last component if it is to be a filename case X$2 in - X1) set `echo $1 | sed 's:\(.*\)/[^/]*$:\1:'` ;; + X1) set `/bin/echo $1 | /bin/sed 's:\(.*\)/[^/]*$:\1:'` ;; *) set $1 ;; esac @@ -43,7 +43,7 @@ while true ; do case $1 in */*) list="$1 $list" - set `echo $1 | sed 's:\(.*\)/:\1 :'` + set `echo $1 | /bin/sed 's:\(.*\)/:\1 :'` ;; *) break @@ -54,5 +54,5 @@ done set $list for dir do - mkdir $dir >/dev/null 2>&1 + /bin/mkdir $dir >/dev/null 2>&1 done diff --git a/makefile b/makefile index e5c6310ef2..98bb363faf 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,8 @@ -# : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $ +# .SH,v $Revision: 4.1 $Date: 92/08/07 17:18:08 $ +# This file is derived from Makefile.SH. Any changes made here will +# be lost the next time you run Configure. +# Makefile is used to generate makefile. The only difference +# is that makefile has the dependencies filled in at the end. # # $Log: Makefile.SH,v $ # Revision 4.1 92/08/07 17:18:08 lwall @@ -36,14 +40,24 @@ mansrc = /usr/local/man/man1 manext = 1 LDFLAGS = CLDFLAGS = + SMALL = LARGE = mallocsrc = malloc.c mallocobj = malloc.o -dlsrc = dl.c -dlobj = dl.o -SLN = ln -s +dlsrc = dl_sunos.c +dlobj = dl_sunos.o +dldir = ext/dl +LNS = /bin/ln -s RMS = rm -f +ranlib = /usr/bin/ranlib + +# The following are used to build and install shared libraries for +# dynamic loading. +LDDLFLAGS = +CCDLFLAGS = +CCCDLFLAGS = +SHLIBSUFFIX = .so libs = -ldbm -ldl -lm -lposix @@ -51,7 +65,7 @@ public = perl shellflags = -# To use an alternate make, set in config.sh. +## To use an alternate make, set in config.sh. MAKE = make CCCMD = `sh $(shellflags) cflags $@` @@ -64,7 +78,7 @@ manpages = perl.man h2ph.man util = -sh = Makefile.SH makedepend.SH h2ph.SH +sh = Makefile.SH cflags.SH embed_h.SH makedepend.SH makedir.SH writemain.SH h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h @@ -79,19 +93,19 @@ c1 = av.c scope.c op.c doop.c doio.c dump.c hv.c c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c -c = $(c1) $(c2) $(c3) +c = $(c1) $(c2) $(c3) $(dlsrc) miniperlmain.c perlmain.c s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c -s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c +s2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c -saber = $(s1) $(s2) $(s3) +saber = $(s1) $(s2) $(s3) $(dlsrc) obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o -obj = $(obj1) $(obj2) $(obj3) $(dlobj) +obj = $(obj1) $(obj2) $(obj3) lintflags = -hbvxac @@ -100,85 +114,105 @@ addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 # grrr SHELL = /bin/sh -.SUFFIXES: .x - .c.o: $(CCCMD) $*.c -.x.c: - sh writemain $*.x >$*.c - all: miniperl perl lib/Config.pm #all: $(public) $(private) $(util) $(scripts) # cd x2p; $(MAKE) all # touch all +# Phony target to force checking subdirectories. +FORCE: + + +$(dlsrc): $(dldir)/$(dlsrc) + cp $(dldir)/$(dlsrc) $(dlsrc) + +$(dlobj): $(dlsrc) + $(CCCMD) $(dlsrc) + + # NDBM_File extension +NDBM_File.o: NDBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c + NDBM_File.c: ext/dbm/NDBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/NDBM_File.xs >tmp + ./miniperl ext/xsubpp ext/dbm/NDBM_File.xs >tmp mv tmp NDBM_File.c -NDBM_File.o: NDBM_File.c +lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX): NDBM_File.o + test -d lib/auto/NDBM_File || mkdir lib/auto/NDBM_File + ld $(LDDLFLAGS) -o $@ NDBM_File.o # ODBM_File extension -ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap - test -f miniperl || make miniperl - ext/xsubpp ext/dbm/ODBM_File.xs >tmp - mv tmp ODBM_File.c - ODBM_File.o: ODBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c -# GDBM_File extension -GDBM_File.c: ext/dbm/GDBM_File.xs ext/xsubpp ext/typemap +ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/GDBM_File.xs >tmp - mv tmp GDBM_File.c + ./miniperl ext/xsubpp ext/dbm/ODBM_File.xs >tmp + mv tmp ODBM_File.c -GDBM_File.o: GDBM_File.c +lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX): ODBM_File.o + test -d lib/auto/ODBM_File || mkdir lib/auto/ODBM_File + ld $(LDDLFLAGS) -o $@ ODBM_File.o # SDBM_File extension +SDBM_File.o: SDBM_File.c + $(CCCMD) $(CCCDLFLAGS) $*.c + SDBM_File.c: ext/dbm/SDBM_File.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/dbm/SDBM_File.xs >tmp + ./miniperl ext/xsubpp ext/dbm/SDBM_File.xs >tmp mv tmp SDBM_File.c -SDBM_File.o: SDBM_File.c - -lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/SDBM_File 2>/dev/null - ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a - -ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h - cd ext/dbm/sdbm; $(MAKE) sdbm +lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX): SDBM_File.o ext/dbm/sdbm/libsdbm.a + test -d lib/auto/SDBM_File || mkdir lib/auto/SDBM_File + ld $(LDDLFLAGS) -o $@ SDBM_File.o ext/dbm/sdbm/libsdbm.a # POSIX extension +POSIX.o: POSIX.c + $(CCCMD) $(CCCDLFLAGS) $*.c + POSIX.c: ext/posix/POSIX.xs ext/xsubpp ext/typemap test -f miniperl || make miniperl - ext/xsubpp ext/posix/POSIX.xs >tmp + ./miniperl ext/xsubpp ext/posix/POSIX.xs >tmp mv tmp POSIX.c -POSIX.o: POSIX.c -lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a - @- mkdir lib/auto/POSIX 2>/dev/null - ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a -extobjs= ext/dbm/NDBM_File.xs.o ext/dbm/ODBM_File.xs.o ext/dbm/GDBM_File.xs.o ext/dbm/SDBM_File.xs.o ext/posix/POSIX.xs.o +lib/auto/POSIX/POSIX$(SHLIBSUFFIX): POSIX.o + test -d lib/auto/POSIX || mkdir lib/auto/POSIX + ld $(LDDLFLAGS) -o $@ POSIX.o -lm + +# List of extensions (used by writemain) to generate perlmain.c +ext= NDBM_File ODBM_File SDBM_File POSIX +extsrc= NDBM_File.c ODBM_File.c SDBM_File.c POSIX.c +# Extension dependencies. +extdep= lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX) lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX) lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX) lib/auto/POSIX/POSIX$(SHLIBSUFFIX) +# How to include extensions in linking command +extobj= + +ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/sdbm.c + cd ext/dbm/sdbm; $(MAKE) -f Makefile libsdbm.a + # The $& notation tells Sequent machines that it can do a parallel make, # and is harmless otherwise. -miniperlmain.c: miniperlmain.x -miniperlmain.o: miniperlmain.c miniperl: $& miniperlmain.o perl.o $(obj) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs) -perlmain.c: perlmain.x +perlmain.c: miniperlmain.c + sh writemain $(ext) > perlmain.c + perlmain.o: perlmain.c -perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o - $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs) + +perl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep) + $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs) libperl.rlb: libperl.a - ranlib libperl.a + $(ranlib) libperl.a touch libperl.rlb libperl.a: $& perl.o $(obj) @@ -189,11 +223,11 @@ libperl.a: $& perl.o $(obj) # checks as well as the special code to validate that the script in question # has been invoked correctly. -suidperl: $& sperl.o main.o libperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl +suidperl: $& sperl.o perlmain.o libperl.rlb + $(CC) $(LARGE) $(CLDFLAGS) sperl.o perlmain.o libperl.a $(libs) -o suidperl -lib/Config.pm: config.sh - ./configpm +lib/Config.pm: config.sh miniperl + ./miniperl configpm saber: $(saber) # load $(saber) @@ -201,21 +235,16 @@ saber: $(saber) sperl.o: perl.c perly.h patchlevel.h $(h) $(RMS) sperl.c - $(SLN) perl.c sperl.c + $(LNS) perl.c sperl.c $(CCCMD) -DIAMSUID sperl.c $(RMS) sperl.c -dl.o: ext/dl/dl.c - cp ext/dl/dl.c dl.c - $(CC) -c dl.c - - perly.h: perly.c @ echo Dummy dependency for dumb parallel make touch perly.h opcode.h: opcode.pl - - opcode.pl + - perl opcode.pl embed.h: embed_h.SH global.sym interp.sym sh embed_h.SH @@ -234,14 +263,21 @@ install: all ./perl installperl clean: - rm -f *.o all perl taintperl suidperl miniperl + rm -f *.o all perl miniperl + rm -f POSIX.c ?DBM_File.c perlmain.c + rm -f ext/dbm/sdbm/libsdbm.a + cd ext/dbm/sdbm; $(MAKE) -f Makefile clean cd x2p; $(MAKE) clean realclean: clean cd x2p; $(MAKE) realclean + cd ext/dbm/sdbm; $(MAKE) -f Makefile realclean rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man - rm -f perly.h t/perl Makefile config.h makedepend makedir - rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags + rm -f Makefile cflags embed_h makedepend makedir writemain + rm -f config.h t/perl makefile makefile.old cflags + rm -rf lib/auto/?DBM_File lib/auto/POSIX + rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags + rm -f lib/Config.pm rm -f c2ph pstruct # The following lint has practically everything turned on. Unfortunately, @@ -258,17 +294,17 @@ depend: makedepend - test -s perly.h || /bin/rm -f perly.h cd x2p; $(MAKE) depend -test: perl +test: perl lib/Config.pm - cd t && chmod +x TEST */*.t - - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST .clist -hlist: +hlist: $(h) echo $(h) | tr ' ' '\012' >.hlist -shlist: +shlist: $(sh) echo $(sh) | tr ' ' '\012' >.shlist # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE @@ -1196,8 +1232,8 @@ util.o: /usr/include/sys/ttycom.h util.o: /usr/include/sys/ttydev.h util.o: /usr/include/sys/types.h util.o: /usr/include/time.h +util.o: /usr/include/unistd.h util.o: /usr/include/varargs.h -util.o: /usr/include/vfork.h util.o: /usr/include/vm/faultcode.h util.o: EXTERN.h util.o: av.h @@ -1323,7 +1359,165 @@ run.o: scope.h run.o: sv.h run.o: unixish.h run.o: util.h +dl_sunos.o: /usr/include/ctype.h +dl_sunos.o: /usr/include/dirent.h +dl_sunos.o: /usr/include/dlfcn.h +dl_sunos.o: /usr/include/errno.h +dl_sunos.o: /usr/include/machine/param.h +dl_sunos.o: /usr/include/machine/setjmp.h +dl_sunos.o: /usr/include/netinet/in.h +dl_sunos.o: /usr/include/setjmp.h +dl_sunos.o: /usr/include/stdio.h +dl_sunos.o: /usr/include/sys/dirent.h +dl_sunos.o: /usr/include/sys/errno.h +dl_sunos.o: /usr/include/sys/filio.h +dl_sunos.o: /usr/include/sys/ioccom.h +dl_sunos.o: /usr/include/sys/ioctl.h +dl_sunos.o: /usr/include/sys/param.h +dl_sunos.o: /usr/include/sys/signal.h +dl_sunos.o: /usr/include/sys/sockio.h +dl_sunos.o: /usr/include/sys/stat.h +dl_sunos.o: /usr/include/sys/stdtypes.h +dl_sunos.o: /usr/include/sys/sysmacros.h +dl_sunos.o: /usr/include/sys/time.h +dl_sunos.o: /usr/include/sys/times.h +dl_sunos.o: /usr/include/sys/ttold.h +dl_sunos.o: /usr/include/sys/ttychars.h +dl_sunos.o: /usr/include/sys/ttycom.h +dl_sunos.o: /usr/include/sys/ttydev.h +dl_sunos.o: /usr/include/sys/types.h +dl_sunos.o: /usr/include/time.h +dl_sunos.o: /usr/include/varargs.h +dl_sunos.o: /usr/include/vm/faultcode.h +dl_sunos.o: EXTERN.h +dl_sunos.o: XSUB.h +dl_sunos.o: av.h +dl_sunos.o: config.h +dl_sunos.o: cop.h +dl_sunos.o: cv.h +dl_sunos.o: dl_sunos.c +dl_sunos.o: embed.h +dl_sunos.o: form.h +dl_sunos.o: gv.h +dl_sunos.o: handy.h +dl_sunos.o: hv.h +dl_sunos.o: mg.h +dl_sunos.o: op.h +dl_sunos.o: opcode.h +dl_sunos.o: perl.h +dl_sunos.o: pp.h +dl_sunos.o: proto.h +dl_sunos.o: regexp.h +dl_sunos.o: scope.h +dl_sunos.o: sv.h +dl_sunos.o: unixish.h +dl_sunos.o: util.h +miniperlmain.o: /usr/include/ctype.h +miniperlmain.o: /usr/include/dirent.h +miniperlmain.o: /usr/include/errno.h +miniperlmain.o: /usr/include/machine/param.h +miniperlmain.o: /usr/include/machine/setjmp.h +miniperlmain.o: /usr/include/netinet/in.h +miniperlmain.o: /usr/include/setjmp.h +miniperlmain.o: /usr/include/stdio.h +miniperlmain.o: /usr/include/sys/dirent.h +miniperlmain.o: /usr/include/sys/errno.h +miniperlmain.o: /usr/include/sys/filio.h +miniperlmain.o: /usr/include/sys/ioccom.h +miniperlmain.o: /usr/include/sys/ioctl.h +miniperlmain.o: /usr/include/sys/param.h +miniperlmain.o: /usr/include/sys/signal.h +miniperlmain.o: /usr/include/sys/sockio.h +miniperlmain.o: /usr/include/sys/stat.h +miniperlmain.o: /usr/include/sys/stdtypes.h +miniperlmain.o: /usr/include/sys/sysmacros.h +miniperlmain.o: /usr/include/sys/time.h +miniperlmain.o: /usr/include/sys/times.h +miniperlmain.o: /usr/include/sys/ttold.h +miniperlmain.o: /usr/include/sys/ttychars.h +miniperlmain.o: /usr/include/sys/ttycom.h +miniperlmain.o: /usr/include/sys/ttydev.h +miniperlmain.o: /usr/include/sys/types.h +miniperlmain.o: /usr/include/time.h +miniperlmain.o: /usr/include/varargs.h +miniperlmain.o: /usr/include/vm/faultcode.h +miniperlmain.o: INTERN.h +miniperlmain.o: av.h +miniperlmain.o: config.h +miniperlmain.o: cop.h +miniperlmain.o: cv.h +miniperlmain.o: embed.h +miniperlmain.o: form.h +miniperlmain.o: gv.h +miniperlmain.o: handy.h +miniperlmain.o: hv.h +miniperlmain.o: mg.h +miniperlmain.o: miniperlmain.c +miniperlmain.o: op.h +miniperlmain.o: opcode.h +miniperlmain.o: perl.h +miniperlmain.o: pp.h +miniperlmain.o: proto.h +miniperlmain.o: regexp.h +miniperlmain.o: scope.h +miniperlmain.o: sv.h +miniperlmain.o: unixish.h +miniperlmain.o: util.h +perlmain.o: /usr/include/ctype.h +perlmain.o: /usr/include/dirent.h +perlmain.o: /usr/include/errno.h +perlmain.o: /usr/include/machine/param.h +perlmain.o: /usr/include/machine/setjmp.h +perlmain.o: /usr/include/netinet/in.h +perlmain.o: /usr/include/setjmp.h +perlmain.o: /usr/include/stdio.h +perlmain.o: /usr/include/sys/dirent.h +perlmain.o: /usr/include/sys/errno.h +perlmain.o: /usr/include/sys/filio.h +perlmain.o: /usr/include/sys/ioccom.h +perlmain.o: /usr/include/sys/ioctl.h +perlmain.o: /usr/include/sys/param.h +perlmain.o: /usr/include/sys/signal.h +perlmain.o: /usr/include/sys/sockio.h +perlmain.o: /usr/include/sys/stat.h +perlmain.o: /usr/include/sys/stdtypes.h +perlmain.o: /usr/include/sys/sysmacros.h +perlmain.o: /usr/include/sys/time.h +perlmain.o: /usr/include/sys/times.h +perlmain.o: /usr/include/sys/ttold.h +perlmain.o: /usr/include/sys/ttychars.h +perlmain.o: /usr/include/sys/ttycom.h +perlmain.o: /usr/include/sys/ttydev.h +perlmain.o: /usr/include/sys/types.h +perlmain.o: /usr/include/time.h +perlmain.o: /usr/include/varargs.h +perlmain.o: /usr/include/vm/faultcode.h +perlmain.o: INTERN.h +perlmain.o: av.h +perlmain.o: config.h +perlmain.o: cop.h +perlmain.o: cv.h +perlmain.o: embed.h +perlmain.o: form.h +perlmain.o: gv.h +perlmain.o: handy.h +perlmain.o: hv.h +perlmain.o: mg.h +perlmain.o: op.h +perlmain.o: opcode.h +perlmain.o: perl.h +perlmain.o: perlmain.c +perlmain.o: pp.h +perlmain.o: proto.h +perlmain.o: regexp.h +perlmain.o: scope.h +perlmain.o: sv.h +perlmain.o: unixish.h +perlmain.o: util.h Makefile: Makefile.SH config.sh ; /bin/sh Makefile.SH +cflags: cflags.SH config.sh ; /bin/sh cflags.SH +embed_h: embed_h.SH config.sh ; /bin/sh embed_h.SH makedepend: makedepend.SH config.sh ; /bin/sh makedepend.SH -h2ph: h2ph.SH config.sh ; /bin/sh h2ph.SH +makedir: makedir.SH config.sh ; /bin/sh makedir.SH +writemain: writemain.SH config.sh ; /bin/sh writemain.SH # WARNING: Put nothing here or make depend will gobble it up! diff --git a/makefile.lib b/makefile.lib deleted file mode 100644 index f499425298..0000000000 --- a/makefile.lib +++ /dev/null @@ -1,1409 +0,0 @@ -# : Makefile.SH,v 303Revision: 4.0.1.4 303Date: 92/06/08 11:40:43 $ -# -# $Log: Makefile.SH,v $ -# Revision 4.0.1.4 92/06/08 11:40:43 lwall -# patch20: cray didn't give enough memory to /bin/sh -# patch20: various and sundry fixes -# -# Revision 4.0.1.3 91/11/05 15:48:11 lwall -# patch11: saberized perl -# patch11: added support for dbz -# -# Revision 4.0.1.2 91/06/07 10:14:43 lwall -# patch4: cflags now emits entire cc command except for the filename -# patch4: alternate make programs are now semi-supported -# patch4: uperl.o no longer tries to link in libraries prematurely -# patch4: installperl now installs x2p stuff too -# -# Revision 4.0.1.1 91/04/11 17:30:39 lwall -# patch1: C flags are now settable on a per-file basis -# -# Revision 4.0 91/03/20 00:58:54 lwall -# 4.0 baseline. -# -# - -CC = cc -YACC = /bin/yacc -bin = /usr/local/bin -scriptdir = /usr/local/bin -privlib = /usr/local/lib/perl -mansrc = /usr/man/manl -manext = l -LDFLAGS = -CLDFLAGS = -SMALL = -LARGE = -mallocsrc = malloc.c -mallocobj = malloc.o -SLN = ln -s -RMS = rm -f -LIB = . - -libs = -ldbm -lm -lposix - -public = perl taintperl - -shellflags = - -# To use an alternate make, set in config.sh. -MAKE = make - - -CCCMD = `sh $(shellflags) cflags $@` - -private = - -scripts = h2ph - -manpages = perl.man h2ph.man - -util = - -sh = Makefile.SH makedepend.SH h2ph.SH - -h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h embed.h form.h handy.h -h2 = hash.h perl.h regcomp.h regexp.h spat.h stab.h str.h util.h - -h = $(h1) $(h2) - -c1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c -c2 = eval.c form.c hash.c main.c $(mallocsrc) perl.c pp.c regcomp.c regexec.c -c3 = stab.c str.c toke.c util.c usersub.c - -c = $(c1) $(c2) $(c3) - -s1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c -s2 = eval.c form.c hash.c main.c perl.c pp.c regcomp.c regexec.c -s3 = stab.c str.c toke.c util.c usersub.c perly.c - -saber = $(s1) $(s2) $(s3) - -obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o -obj2 = eval.o form.o $(mallocobj) perl.o pp.o regcomp.o regexec.o -obj3 = stab.o str.o toke.o util.o - -obj = $(obj1) $(obj2) $(obj3) - -tobj1 = tarray.o tcmd.o tcons.o tconsarg.o tdoarg.o tdoio.o tdolist.o tdump.o -tobj2 = teval.o tform.o thash.o $(mallocobj) tpp.o tregcomp.o tregexec.o -tobj3 = tstab.o tstr.o ttoke.o tutil.o - -tobj = $(tobj1) $(tobj2) $(tobj3) - -lintflags = -hbvxac - -addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 - -# grrr -SHELL = /bin/sh - -.c.o: - $(CCCMD) $*.c - -all: libperl.rlb - -#all: $(public) $(private) $(util) uperl.o $(scripts) -# cd x2p; $(MAKE) all -# touch all - -# This is the standard version that contains no "taint" checks and is -# used for all scripts that aren't set-id or running under something set-id. -# The $& notation is tells Sequent machines that it can do a parallel make, -# and is harmless otherwise. - -#perl: $& main.o $(obj) hash.o perly.o usersub.o -# $(CC) $(LARGE) $(CLDFLAGS) main.o $(obj) hash.o perly.o usersub.o \ -# $(libs) -o perl -# echo '' - -perl: $& main.o libperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) main.o $(LIB)/libperl.a $(libs) -o perl - echo '' - -libperl.rlb: $(LIB)/libperl.a - ranlib $(LIB)/libperl.a - touch libperl.rlb - -$(LIB)/libperl.a: $& perly.o perl.o $(obj) hash.o usersub.o - ar rcuv $(LIB)/libperl.a $(obj) hash.o perly.o usersub.o - -# This version, if specified in Configure, does ONLY those scripts which need -# set-id emulation. Suidperl must be setuid root. It contains the "taint" -# checks as well as the special code to validate that the script in question -# has been invoked correctly. - -suidperl: $& sperl.o main.o libtperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libtperl.a $(libs) -o suidperl - -# This version interprets scripts that are already set-id either via a wrapper -# or through the kernel allowing set-id scripts (bad idea). Taintperl must -# NOT be setuid to root or anything else. The only difference between it -# and normal perl is the presence of the "taint" checks. - -taintperl: $& main.o libtperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) main.o libtperl.a $(libs) -o taintperl - -libtperl.rlb: libtperl.a - ranlib libtperl.a - touch libtperl.rlb - -libtperl.a: $& tperly.o tperl.o $(tobj) thash.o usersub.o - ar rcuv libtperl.a $(tobj) thash.o tperly.o usersub.o tperl.o - -# This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist. - -dbzperl: $& main.o zhash.o libperl.rlb - $(CC) $(LARGE) $(CLDFLAGS) main.o zhash.o /usr/lib/dbz.o $(LIB)/libperl.a $(libs) -o dbzperl - -zhash.o: hash.c $(h) - $(RMS) zhash.c - $(SLN) hash.c zhash.c - $(CCCMD) -DWANT_DBZ zhash.c - $(RMS) zhash.c - -uperl.o: $& $(obj) main.o hash.o perly.o - -ld $(LARGE) $(LDFLAGS) -r $(obj) main.o hash.o perly.o -o uperl.o - -saber: $(saber) - # load $(saber) - # load /lib/libm.a - -# Replicating all this junk is yucky, but I don't see a portable way to fix it. - -tperly.o: perly.c perly.h $(h) - $(RMS) tperly.c - $(SLN) perly.c tperly.c - $(CCCMD) -DTAINT tperly.c - $(RMS) tperly.c - -tperl.o: perl.c perly.h patchlevel.h perl.h $(h) - $(RMS) tperl.c - $(SLN) perl.c tperl.c - $(CCCMD) -DTAINT tperl.c - $(RMS) tperl.c - -sperl.o: perl.c perly.h patchlevel.h $(h) - $(RMS) sperl.c - $(SLN) perl.c sperl.c - $(CCCMD) -DTAINT -DIAMSUID sperl.c - $(RMS) sperl.c - -tarray.o: array.c $(h) - $(RMS) tarray.c - $(SLN) array.c tarray.c - $(CCCMD) -DTAINT tarray.c - $(RMS) tarray.c - -tcmd.o: cmd.c $(h) - $(RMS) tcmd.c - $(SLN) cmd.c tcmd.c - $(CCCMD) -DTAINT tcmd.c - $(RMS) tcmd.c - -tcons.o: cons.c $(h) perly.h - $(RMS) tcons.c - $(SLN) cons.c tcons.c - $(CCCMD) -DTAINT tcons.c - $(RMS) tcons.c - -tconsarg.o: consarg.c $(h) - $(RMS) tconsarg.c - $(SLN) consarg.c tconsarg.c - $(CCCMD) -DTAINT tconsarg.c - $(RMS) tconsarg.c - -tdoarg.o: doarg.c $(h) - $(RMS) tdoarg.c - $(SLN) doarg.c tdoarg.c - $(CCCMD) -DTAINT tdoarg.c - $(RMS) tdoarg.c - -tdoio.o: doio.c $(h) - $(RMS) tdoio.c - $(SLN) doio.c tdoio.c - $(CCCMD) -DTAINT tdoio.c - $(RMS) tdoio.c - -tdolist.o: dolist.c $(h) - $(RMS) tdolist.c - $(SLN) dolist.c tdolist.c - $(CCCMD) -DTAINT tdolist.c - $(RMS) tdolist.c - -tdump.o: dump.c $(h) - $(RMS) tdump.c - $(SLN) dump.c tdump.c - $(CCCMD) -DTAINT tdump.c - $(RMS) tdump.c - -teval.o: eval.c $(h) - $(RMS) teval.c - $(SLN) eval.c teval.c - $(CCCMD) -DTAINT teval.c - $(RMS) teval.c - -tform.o: form.c $(h) - $(RMS) tform.c - $(SLN) form.c tform.c - $(CCCMD) -DTAINT tform.c - $(RMS) tform.c - -thash.o: hash.c $(h) - $(RMS) thash.c - $(SLN) hash.c thash.c - $(CCCMD) -DTAINT thash.c - $(RMS) thash.c - -tpp.o: pp.c $(h) - $(RMS) tpp.c - $(SLN) pp.c tpp.c - $(CCCMD) -DTAINT tpp.c - $(RMS) tpp.c - -tregcomp.o: regcomp.c $(h) - $(RMS) tregcomp.c - $(SLN) regcomp.c tregcomp.c - $(CCCMD) -DTAINT tregcomp.c - $(RMS) tregcomp.c - -tregexec.o: regexec.c $(h) - $(RMS) tregexec.c - $(SLN) regexec.c tregexec.c - $(CCCMD) -DTAINT tregexec.c - $(RMS) tregexec.c - -tstab.o: stab.c $(h) - $(RMS) tstab.c - $(SLN) stab.c tstab.c - $(CCCMD) -DTAINT tstab.c - $(RMS) tstab.c - -tstr.o: str.c $(h) perly.h - $(RMS) tstr.c - $(SLN) str.c tstr.c - $(CCCMD) -DTAINT tstr.c - $(RMS) tstr.c - -ttoke.o: toke.c $(h) perly.h - $(RMS) ttoke.c - $(SLN) toke.c ttoke.c - $(CCCMD) -DTAINT ttoke.c - $(RMS) ttoke.c - -tutil.o: util.c $(h) - $(RMS) tutil.c - $(SLN) util.c tutil.c - $(CCCMD) -DTAINT tutil.c - $(RMS) tutil.c - -perly.h: perly.c - @ echo Dummy dependency for dumb parallel make - touch perly.h - -embed.h: embed_h.SH global.var interp.var - sh embed_h.SH - -perly.c: perly.y perly.fixer - @ \ -case "$(YACC)" in \ - *bison*) echo 'Expect' 25 shift/reduce and 53 reduce/reduce conflicts;; \ - *) echo 'Expect' 27 shift/reduce and 51 reduce/reduce conflicts;; \ -esac - $(YACC) -d perly.y - sh $(shellflags) ./perly.fixer y.tab.c perly.c - mv y.tab.h perly.h - echo 'extern YYSTYPE yylval;' >>perly.h - -perly.o: perly.c perly.h $(h) - $(CCCMD) perly.c - -install: all - ./perl installperl - -clean: - rm -f *.o all perl taintperl suidperl perly.c - cd x2p; $(MAKE) clean - -realclean: clean - cd x2p; $(MAKE) realclean - rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man - rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir - rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags - rm -f c2ph pstruct - -# The following lint has practically everything turned on. Unfortunately, -# you have to wade through a lot of mumbo jumbo that can't be suppressed. -# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message -# for that spot. - -lint: perly.c $(c) - lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz - -depend: makedepend - - test -f perly.h || cp /dev/null perly.h - ./makedepend - - test -s perly.h || /bin/rm -f perly.h - cd x2p; $(MAKE) depend - -test: perl - - cd t && chmod +x TEST */*.t - - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST .clist - -hlist: - echo $(h) | tr ' ' '\012' >.hlist - -shlist: - echo $(sh) | tr ' ' '\012' >.shlist - -# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE -# If this runs make out of memory, delete /usr/include lines. -array.o: -array.o: /usr/ucbinclude/ctype.h -array.o: /usr/ucbinclude/dirent.h -array.o: /usr/ucbinclude/errno.h -array.o: /usr/ucbinclude/machine/param.h -array.o: /usr/ucbinclude/machine/setjmp.h -array.o: /usr/ucbinclude/ndbm.h -array.o: /usr/ucbinclude/netinet/in.h -array.o: /usr/ucbinclude/setjmp.h -array.o: /usr/ucbinclude/stdio.h -array.o: /usr/ucbinclude/sys/dirent.h -array.o: /usr/ucbinclude/sys/errno.h -array.o: /usr/ucbinclude/sys/filio.h -array.o: /usr/ucbinclude/sys/ioccom.h -array.o: /usr/ucbinclude/sys/ioctl.h -array.o: /usr/ucbinclude/sys/param.h -array.o: /usr/ucbinclude/sys/signal.h -array.o: /usr/ucbinclude/sys/sockio.h -array.o: /usr/ucbinclude/sys/stat.h -array.o: /usr/ucbinclude/sys/stdtypes.h -array.o: /usr/ucbinclude/sys/sysmacros.h -array.o: /usr/ucbinclude/sys/time.h -array.o: /usr/ucbinclude/sys/times.h -array.o: /usr/ucbinclude/sys/ttold.h -array.o: /usr/ucbinclude/sys/ttychars.h -array.o: /usr/ucbinclude/sys/ttycom.h -array.o: /usr/ucbinclude/sys/ttydev.h -array.o: /usr/ucbinclude/sys/types.h -array.o: /usr/ucbinclude/time.h -array.o: /usr/ucbinclude/vm/faultcode.h -array.o: EXTERN.h -array.o: arg.h -array.o: array.c -array.o: array.h -array.o: cmd.h -array.o: config.h -array.o: embed.h -array.o: form.h -array.o: handy.h -array.o: hash.h -array.o: perl.h -array.o: regexp.h -array.o: spat.h -array.o: stab.h -array.o: str.h -array.o: unixish.h -array.o: util.h -cmd.o: -cmd.o: /usr/ucbinclude/ctype.h -cmd.o: /usr/ucbinclude/dirent.h -cmd.o: /usr/ucbinclude/errno.h -cmd.o: /usr/ucbinclude/machine/param.h -cmd.o: /usr/ucbinclude/machine/setjmp.h -cmd.o: /usr/ucbinclude/ndbm.h -cmd.o: /usr/ucbinclude/netinet/in.h -cmd.o: /usr/ucbinclude/setjmp.h -cmd.o: /usr/ucbinclude/stdio.h -cmd.o: /usr/ucbinclude/sys/dirent.h -cmd.o: /usr/ucbinclude/sys/errno.h -cmd.o: /usr/ucbinclude/sys/filio.h -cmd.o: /usr/ucbinclude/sys/ioccom.h -cmd.o: /usr/ucbinclude/sys/ioctl.h -cmd.o: /usr/ucbinclude/sys/param.h -cmd.o: /usr/ucbinclude/sys/signal.h -cmd.o: /usr/ucbinclude/sys/sockio.h -cmd.o: /usr/ucbinclude/sys/stat.h -cmd.o: /usr/ucbinclude/sys/stdtypes.h -cmd.o: /usr/ucbinclude/sys/sysmacros.h -cmd.o: /usr/ucbinclude/sys/time.h -cmd.o: /usr/ucbinclude/sys/times.h -cmd.o: /usr/ucbinclude/sys/ttold.h -cmd.o: /usr/ucbinclude/sys/ttychars.h -cmd.o: /usr/ucbinclude/sys/ttycom.h -cmd.o: /usr/ucbinclude/sys/ttydev.h -cmd.o: /usr/ucbinclude/sys/types.h -cmd.o: /usr/ucbinclude/time.h -cmd.o: /usr/ucbinclude/varargs.h -cmd.o: /usr/ucbinclude/vm/faultcode.h -cmd.o: EXTERN.h -cmd.o: arg.h -cmd.o: array.h -cmd.o: cmd.c -cmd.o: cmd.h -cmd.o: config.h -cmd.o: embed.h -cmd.o: form.h -cmd.o: handy.h -cmd.o: hash.h -cmd.o: perl.h -cmd.o: regexp.h -cmd.o: spat.h -cmd.o: stab.h -cmd.o: str.h -cmd.o: unixish.h -cmd.o: util.h -cons.o: -cons.o: /usr/ucbinclude/ctype.h -cons.o: /usr/ucbinclude/dirent.h -cons.o: /usr/ucbinclude/errno.h -cons.o: /usr/ucbinclude/machine/param.h -cons.o: /usr/ucbinclude/machine/setjmp.h -cons.o: /usr/ucbinclude/ndbm.h -cons.o: /usr/ucbinclude/netinet/in.h -cons.o: /usr/ucbinclude/setjmp.h -cons.o: /usr/ucbinclude/stdio.h -cons.o: /usr/ucbinclude/sys/dirent.h -cons.o: /usr/ucbinclude/sys/errno.h -cons.o: /usr/ucbinclude/sys/filio.h -cons.o: /usr/ucbinclude/sys/ioccom.h -cons.o: /usr/ucbinclude/sys/ioctl.h -cons.o: /usr/ucbinclude/sys/param.h -cons.o: /usr/ucbinclude/sys/signal.h -cons.o: /usr/ucbinclude/sys/sockio.h -cons.o: /usr/ucbinclude/sys/stat.h -cons.o: /usr/ucbinclude/sys/stdtypes.h -cons.o: /usr/ucbinclude/sys/sysmacros.h -cons.o: /usr/ucbinclude/sys/time.h -cons.o: /usr/ucbinclude/sys/times.h -cons.o: /usr/ucbinclude/sys/ttold.h -cons.o: /usr/ucbinclude/sys/ttychars.h -cons.o: /usr/ucbinclude/sys/ttycom.h -cons.o: /usr/ucbinclude/sys/ttydev.h -cons.o: /usr/ucbinclude/sys/types.h -cons.o: /usr/ucbinclude/time.h -cons.o: /usr/ucbinclude/vm/faultcode.h -cons.o: EXTERN.h -cons.o: arg.h -cons.o: array.h -cons.o: cmd.h -cons.o: config.h -cons.o: cons.c -cons.o: embed.h -cons.o: form.h -cons.o: handy.h -cons.o: hash.h -cons.o: perl.h -cons.o: perly.h -cons.o: regexp.h -cons.o: spat.h -cons.o: stab.h -cons.o: str.h -cons.o: unixish.h -cons.o: util.h -consarg.o: -consarg.o: /usr/ucbinclude/ctype.h -consarg.o: /usr/ucbinclude/dirent.h -consarg.o: /usr/ucbinclude/errno.h -consarg.o: /usr/ucbinclude/machine/param.h -consarg.o: /usr/ucbinclude/machine/setjmp.h -consarg.o: /usr/ucbinclude/ndbm.h -consarg.o: /usr/ucbinclude/netinet/in.h -consarg.o: /usr/ucbinclude/setjmp.h -consarg.o: /usr/ucbinclude/stdio.h -consarg.o: /usr/ucbinclude/sys/dirent.h -consarg.o: /usr/ucbinclude/sys/errno.h -consarg.o: /usr/ucbinclude/sys/filio.h -consarg.o: /usr/ucbinclude/sys/ioccom.h -consarg.o: /usr/ucbinclude/sys/ioctl.h -consarg.o: /usr/ucbinclude/sys/param.h -consarg.o: /usr/ucbinclude/sys/signal.h -consarg.o: /usr/ucbinclude/sys/sockio.h -consarg.o: /usr/ucbinclude/sys/stat.h -consarg.o: /usr/ucbinclude/sys/stdtypes.h -consarg.o: /usr/ucbinclude/sys/sysmacros.h -consarg.o: /usr/ucbinclude/sys/time.h -consarg.o: /usr/ucbinclude/sys/times.h -consarg.o: /usr/ucbinclude/sys/ttold.h -consarg.o: /usr/ucbinclude/sys/ttychars.h -consarg.o: /usr/ucbinclude/sys/ttycom.h -consarg.o: /usr/ucbinclude/sys/ttydev.h -consarg.o: /usr/ucbinclude/sys/types.h -consarg.o: /usr/ucbinclude/time.h -consarg.o: /usr/ucbinclude/vm/faultcode.h -consarg.o: EXTERN.h -consarg.o: arg.h -consarg.o: array.h -consarg.o: cmd.h -consarg.o: config.h -consarg.o: consarg.c -consarg.o: embed.h -consarg.o: form.h -consarg.o: handy.h -consarg.o: hash.h -consarg.o: perl.h -consarg.o: regexp.h -consarg.o: spat.h -consarg.o: stab.h -consarg.o: str.h -consarg.o: unixish.h -consarg.o: util.h -doarg.o: -doarg.o: /usr/ucbinclude/ctype.h -doarg.o: /usr/ucbinclude/dirent.h -doarg.o: /usr/ucbinclude/errno.h -doarg.o: /usr/ucbinclude/machine/param.h -doarg.o: /usr/ucbinclude/machine/setjmp.h -doarg.o: /usr/ucbinclude/ndbm.h -doarg.o: /usr/ucbinclude/netinet/in.h -doarg.o: /usr/ucbinclude/setjmp.h -doarg.o: /usr/ucbinclude/stdio.h -doarg.o: /usr/ucbinclude/sys/dirent.h -doarg.o: /usr/ucbinclude/sys/errno.h -doarg.o: /usr/ucbinclude/sys/filio.h -doarg.o: /usr/ucbinclude/sys/ioccom.h -doarg.o: /usr/ucbinclude/sys/ioctl.h -doarg.o: /usr/ucbinclude/sys/param.h -doarg.o: /usr/ucbinclude/sys/signal.h -doarg.o: /usr/ucbinclude/sys/sockio.h -doarg.o: /usr/ucbinclude/sys/stat.h -doarg.o: /usr/ucbinclude/sys/stdtypes.h -doarg.o: /usr/ucbinclude/sys/sysmacros.h -doarg.o: /usr/ucbinclude/sys/time.h -doarg.o: /usr/ucbinclude/sys/times.h -doarg.o: /usr/ucbinclude/sys/ttold.h -doarg.o: /usr/ucbinclude/sys/ttychars.h -doarg.o: /usr/ucbinclude/sys/ttycom.h -doarg.o: /usr/ucbinclude/sys/ttydev.h -doarg.o: /usr/ucbinclude/sys/types.h -doarg.o: /usr/ucbinclude/time.h -doarg.o: /usr/ucbinclude/vm/faultcode.h -doarg.o: EXTERN.h -doarg.o: arg.h -doarg.o: array.h -doarg.o: cmd.h -doarg.o: config.h -doarg.o: doarg.c -doarg.o: embed.h -doarg.o: form.h -doarg.o: handy.h -doarg.o: hash.h -doarg.o: perl.h -doarg.o: regexp.h -doarg.o: spat.h -doarg.o: stab.h -doarg.o: str.h -doarg.o: unixish.h -doarg.o: util.h -doio.o: -doio.o: /usr/ucbinclude/ctype.h -doio.o: /usr/ucbinclude/debug/debug.h -doio.o: /usr/ucbinclude/dirent.h -doio.o: /usr/ucbinclude/errno.h -doio.o: /usr/ucbinclude/grp.h -doio.o: /usr/ucbinclude/machine/mmu.h -doio.o: /usr/ucbinclude/machine/param.h -doio.o: /usr/ucbinclude/machine/setjmp.h -doio.o: /usr/ucbinclude/mon/obpdefs.h -doio.o: /usr/ucbinclude/mon/openprom.h -doio.o: /usr/ucbinclude/mon/sunromvec.h -doio.o: /usr/ucbinclude/ndbm.h -doio.o: /usr/ucbinclude/netdb.h -doio.o: /usr/ucbinclude/netinet/in.h -doio.o: /usr/ucbinclude/pwd.h -doio.o: /usr/ucbinclude/setjmp.h -doio.o: /usr/ucbinclude/stdio.h -doio.o: /usr/ucbinclude/sys/dirent.h -doio.o: /usr/ucbinclude/sys/errno.h -doio.o: /usr/ucbinclude/sys/fcntlcom.h -doio.o: /usr/ucbinclude/sys/file.h -doio.o: /usr/ucbinclude/sys/filio.h -doio.o: /usr/ucbinclude/sys/ioccom.h -doio.o: /usr/ucbinclude/sys/ioctl.h -doio.o: /usr/ucbinclude/sys/ipc.h -doio.o: /usr/ucbinclude/sys/msg.h -doio.o: /usr/ucbinclude/sys/param.h -doio.o: /usr/ucbinclude/sys/sem.h -doio.o: /usr/ucbinclude/sys/shm.h -doio.o: /usr/ucbinclude/sys/signal.h -doio.o: /usr/ucbinclude/sys/socket.h -doio.o: /usr/ucbinclude/sys/sockio.h -doio.o: /usr/ucbinclude/sys/stat.h -doio.o: /usr/ucbinclude/sys/stdtypes.h -doio.o: /usr/ucbinclude/sys/sysmacros.h -doio.o: /usr/ucbinclude/sys/time.h -doio.o: /usr/ucbinclude/sys/times.h -doio.o: /usr/ucbinclude/sys/ttold.h -doio.o: /usr/ucbinclude/sys/ttychars.h -doio.o: /usr/ucbinclude/sys/ttycom.h -doio.o: /usr/ucbinclude/sys/ttydev.h -doio.o: /usr/ucbinclude/sys/types.h -doio.o: /usr/ucbinclude/time.h -doio.o: /usr/ucbinclude/utime.h -doio.o: /usr/ucbinclude/vm/faultcode.h -doio.o: EXTERN.h -doio.o: arg.h -doio.o: array.h -doio.o: cmd.h -doio.o: config.h -doio.o: doio.c -doio.o: embed.h -doio.o: form.h -doio.o: handy.h -doio.o: hash.h -doio.o: perl.h -doio.o: regexp.h -doio.o: spat.h -doio.o: stab.h -doio.o: str.h -doio.o: unixish.h -doio.o: util.h -dolist.o: -dolist.o: /usr/ucbinclude/ctype.h -dolist.o: /usr/ucbinclude/dirent.h -dolist.o: /usr/ucbinclude/errno.h -dolist.o: /usr/ucbinclude/machine/param.h -dolist.o: /usr/ucbinclude/machine/setjmp.h -dolist.o: /usr/ucbinclude/ndbm.h -dolist.o: /usr/ucbinclude/netinet/in.h -dolist.o: /usr/ucbinclude/setjmp.h -dolist.o: /usr/ucbinclude/stdio.h -dolist.o: /usr/ucbinclude/sys/dirent.h -dolist.o: /usr/ucbinclude/sys/errno.h -dolist.o: /usr/ucbinclude/sys/filio.h -dolist.o: /usr/ucbinclude/sys/ioccom.h -dolist.o: /usr/ucbinclude/sys/ioctl.h -dolist.o: /usr/ucbinclude/sys/param.h -dolist.o: /usr/ucbinclude/sys/signal.h -dolist.o: /usr/ucbinclude/sys/sockio.h -dolist.o: /usr/ucbinclude/sys/stat.h -dolist.o: /usr/ucbinclude/sys/stdtypes.h -dolist.o: /usr/ucbinclude/sys/sysmacros.h -dolist.o: /usr/ucbinclude/sys/time.h -dolist.o: /usr/ucbinclude/sys/times.h -dolist.o: /usr/ucbinclude/sys/ttold.h -dolist.o: /usr/ucbinclude/sys/ttychars.h -dolist.o: /usr/ucbinclude/sys/ttycom.h -dolist.o: /usr/ucbinclude/sys/ttydev.h -dolist.o: /usr/ucbinclude/sys/types.h -dolist.o: /usr/ucbinclude/time.h -dolist.o: /usr/ucbinclude/vm/faultcode.h -dolist.o: EXTERN.h -dolist.o: arg.h -dolist.o: array.h -dolist.o: cmd.h -dolist.o: config.h -dolist.o: dolist.c -dolist.o: embed.h -dolist.o: form.h -dolist.o: handy.h -dolist.o: hash.h -dolist.o: perl.h -dolist.o: regexp.h -dolist.o: spat.h -dolist.o: stab.h -dolist.o: str.h -dolist.o: unixish.h -dolist.o: util.h -dump.o: -dump.o: /usr/ucbinclude/ctype.h -dump.o: /usr/ucbinclude/dirent.h -dump.o: /usr/ucbinclude/errno.h -dump.o: /usr/ucbinclude/machine/param.h -dump.o: /usr/ucbinclude/machine/setjmp.h -dump.o: /usr/ucbinclude/ndbm.h -dump.o: /usr/ucbinclude/netinet/in.h -dump.o: /usr/ucbinclude/setjmp.h -dump.o: /usr/ucbinclude/stdio.h -dump.o: /usr/ucbinclude/sys/dirent.h -dump.o: /usr/ucbinclude/sys/errno.h -dump.o: /usr/ucbinclude/sys/filio.h -dump.o: /usr/ucbinclude/sys/ioccom.h -dump.o: /usr/ucbinclude/sys/ioctl.h -dump.o: /usr/ucbinclude/sys/param.h -dump.o: /usr/ucbinclude/sys/signal.h -dump.o: /usr/ucbinclude/sys/sockio.h -dump.o: /usr/ucbinclude/sys/stat.h -dump.o: /usr/ucbinclude/sys/stdtypes.h -dump.o: /usr/ucbinclude/sys/sysmacros.h -dump.o: /usr/ucbinclude/sys/time.h -dump.o: /usr/ucbinclude/sys/times.h -dump.o: /usr/ucbinclude/sys/ttold.h -dump.o: /usr/ucbinclude/sys/ttychars.h -dump.o: /usr/ucbinclude/sys/ttycom.h -dump.o: /usr/ucbinclude/sys/ttydev.h -dump.o: /usr/ucbinclude/sys/types.h -dump.o: /usr/ucbinclude/time.h -dump.o: /usr/ucbinclude/vm/faultcode.h -dump.o: EXTERN.h -dump.o: arg.h -dump.o: array.h -dump.o: cmd.h -dump.o: config.h -dump.o: dump.c -dump.o: embed.h -dump.o: form.h -dump.o: handy.h -dump.o: hash.h -dump.o: perl.h -dump.o: regexp.h -dump.o: spat.h -dump.o: stab.h -dump.o: str.h -dump.o: unixish.h -dump.o: util.h -eval.o: -eval.o: /usr/ucbinclude/ctype.h -eval.o: /usr/ucbinclude/dirent.h -eval.o: /usr/ucbinclude/errno.h -eval.o: /usr/ucbinclude/machine/param.h -eval.o: /usr/ucbinclude/machine/setjmp.h -eval.o: /usr/ucbinclude/ndbm.h -eval.o: /usr/ucbinclude/netinet/in.h -eval.o: /usr/ucbinclude/setjmp.h -eval.o: /usr/ucbinclude/stdio.h -eval.o: /usr/ucbinclude/sys/dirent.h -eval.o: /usr/ucbinclude/sys/errno.h -eval.o: /usr/ucbinclude/sys/fcntlcom.h -eval.o: /usr/ucbinclude/sys/file.h -eval.o: /usr/ucbinclude/sys/filio.h -eval.o: /usr/ucbinclude/sys/ioccom.h -eval.o: /usr/ucbinclude/sys/ioctl.h -eval.o: /usr/ucbinclude/sys/param.h -eval.o: /usr/ucbinclude/sys/signal.h -eval.o: /usr/ucbinclude/sys/sockio.h -eval.o: /usr/ucbinclude/sys/stat.h -eval.o: /usr/ucbinclude/sys/stdtypes.h -eval.o: /usr/ucbinclude/sys/sysmacros.h -eval.o: /usr/ucbinclude/sys/time.h -eval.o: /usr/ucbinclude/sys/times.h -eval.o: /usr/ucbinclude/sys/ttold.h -eval.o: /usr/ucbinclude/sys/ttychars.h -eval.o: /usr/ucbinclude/sys/ttycom.h -eval.o: /usr/ucbinclude/sys/ttydev.h -eval.o: /usr/ucbinclude/sys/types.h -eval.o: /usr/ucbinclude/time.h -eval.o: /usr/ucbinclude/vfork.h -eval.o: /usr/ucbinclude/vm/faultcode.h -eval.o: EXTERN.h -eval.o: arg.h -eval.o: array.h -eval.o: cmd.h -eval.o: config.h -eval.o: embed.h -eval.o: eval.c -eval.o: form.h -eval.o: handy.h -eval.o: hash.h -eval.o: perl.h -eval.o: regexp.h -eval.o: spat.h -eval.o: stab.h -eval.o: str.h -eval.o: unixish.h -eval.o: util.h -form.o: -form.o: /usr/ucbinclude/ctype.h -form.o: /usr/ucbinclude/dirent.h -form.o: /usr/ucbinclude/errno.h -form.o: /usr/ucbinclude/machine/param.h -form.o: /usr/ucbinclude/machine/setjmp.h -form.o: /usr/ucbinclude/ndbm.h -form.o: /usr/ucbinclude/netinet/in.h -form.o: /usr/ucbinclude/setjmp.h -form.o: /usr/ucbinclude/stdio.h -form.o: /usr/ucbinclude/sys/dirent.h -form.o: /usr/ucbinclude/sys/errno.h -form.o: /usr/ucbinclude/sys/filio.h -form.o: /usr/ucbinclude/sys/ioccom.h -form.o: /usr/ucbinclude/sys/ioctl.h -form.o: /usr/ucbinclude/sys/param.h -form.o: /usr/ucbinclude/sys/signal.h -form.o: /usr/ucbinclude/sys/sockio.h -form.o: /usr/ucbinclude/sys/stat.h -form.o: /usr/ucbinclude/sys/stdtypes.h -form.o: /usr/ucbinclude/sys/sysmacros.h -form.o: /usr/ucbinclude/sys/time.h -form.o: /usr/ucbinclude/sys/times.h -form.o: /usr/ucbinclude/sys/ttold.h -form.o: /usr/ucbinclude/sys/ttychars.h -form.o: /usr/ucbinclude/sys/ttycom.h -form.o: /usr/ucbinclude/sys/ttydev.h -form.o: /usr/ucbinclude/sys/types.h -form.o: /usr/ucbinclude/time.h -form.o: /usr/ucbinclude/vm/faultcode.h -form.o: EXTERN.h -form.o: arg.h -form.o: array.h -form.o: cmd.h -form.o: config.h -form.o: embed.h -form.o: form.c -form.o: form.h -form.o: handy.h -form.o: hash.h -form.o: perl.h -form.o: regexp.h -form.o: spat.h -form.o: stab.h -form.o: str.h -form.o: unixish.h -form.o: util.h -hash.o: -hash.o: /usr/ucbinclude/ctype.h -hash.o: /usr/ucbinclude/dirent.h -hash.o: /usr/ucbinclude/errno.h -hash.o: /usr/ucbinclude/machine/param.h -hash.o: /usr/ucbinclude/machine/setjmp.h -hash.o: /usr/ucbinclude/ndbm.h -hash.o: /usr/ucbinclude/netinet/in.h -hash.o: /usr/ucbinclude/setjmp.h -hash.o: /usr/ucbinclude/stdio.h -hash.o: /usr/ucbinclude/sys/dirent.h -hash.o: /usr/ucbinclude/sys/errno.h -hash.o: /usr/ucbinclude/sys/fcntlcom.h -hash.o: /usr/ucbinclude/sys/file.h -hash.o: /usr/ucbinclude/sys/filio.h -hash.o: /usr/ucbinclude/sys/ioccom.h -hash.o: /usr/ucbinclude/sys/ioctl.h -hash.o: /usr/ucbinclude/sys/param.h -hash.o: /usr/ucbinclude/sys/signal.h -hash.o: /usr/ucbinclude/sys/sockio.h -hash.o: /usr/ucbinclude/sys/stat.h -hash.o: /usr/ucbinclude/sys/stdtypes.h -hash.o: /usr/ucbinclude/sys/sysmacros.h -hash.o: /usr/ucbinclude/sys/time.h -hash.o: /usr/ucbinclude/sys/times.h -hash.o: /usr/ucbinclude/sys/ttold.h -hash.o: /usr/ucbinclude/sys/ttychars.h -hash.o: /usr/ucbinclude/sys/ttycom.h -hash.o: /usr/ucbinclude/sys/ttydev.h -hash.o: /usr/ucbinclude/sys/types.h -hash.o: /usr/ucbinclude/time.h -hash.o: /usr/ucbinclude/vm/faultcode.h -hash.o: EXTERN.h -hash.o: arg.h -hash.o: array.h -hash.o: cmd.h -hash.o: config.h -hash.o: embed.h -hash.o: form.h -hash.o: handy.h -hash.o: hash.c -hash.o: hash.h -hash.o: perl.h -hash.o: regexp.h -hash.o: spat.h -hash.o: stab.h -hash.o: str.h -hash.o: unixish.h -hash.o: util.h -main.o: -main.o: /usr/ucbinclude/ctype.h -main.o: /usr/ucbinclude/dirent.h -main.o: /usr/ucbinclude/errno.h -main.o: /usr/ucbinclude/machine/param.h -main.o: /usr/ucbinclude/machine/setjmp.h -main.o: /usr/ucbinclude/ndbm.h -main.o: /usr/ucbinclude/netinet/in.h -main.o: /usr/ucbinclude/setjmp.h -main.o: /usr/ucbinclude/stdio.h -main.o: /usr/ucbinclude/sys/dirent.h -main.o: /usr/ucbinclude/sys/errno.h -main.o: /usr/ucbinclude/sys/filio.h -main.o: /usr/ucbinclude/sys/ioccom.h -main.o: /usr/ucbinclude/sys/ioctl.h -main.o: /usr/ucbinclude/sys/param.h -main.o: /usr/ucbinclude/sys/signal.h -main.o: /usr/ucbinclude/sys/sockio.h -main.o: /usr/ucbinclude/sys/stat.h -main.o: /usr/ucbinclude/sys/stdtypes.h -main.o: /usr/ucbinclude/sys/sysmacros.h -main.o: /usr/ucbinclude/sys/time.h -main.o: /usr/ucbinclude/sys/times.h -main.o: /usr/ucbinclude/sys/ttold.h -main.o: /usr/ucbinclude/sys/ttychars.h -main.o: /usr/ucbinclude/sys/ttycom.h -main.o: /usr/ucbinclude/sys/ttydev.h -main.o: /usr/ucbinclude/sys/types.h -main.o: /usr/ucbinclude/time.h -main.o: /usr/ucbinclude/vm/faultcode.h -main.o: INTERN.h -main.o: arg.h -main.o: array.h -main.o: cmd.h -main.o: config.h -main.o: embed.h -main.o: form.h -main.o: handy.h -main.o: hash.h -main.o: main.c -main.o: perl.h -main.o: regexp.h -main.o: spat.h -main.o: stab.h -main.o: str.h -main.o: unixish.h -main.o: util.h -malloc.o: -malloc.o: /usr/ucbinclude/ctype.h -malloc.o: /usr/ucbinclude/dirent.h -malloc.o: /usr/ucbinclude/errno.h -malloc.o: /usr/ucbinclude/machine/param.h -malloc.o: /usr/ucbinclude/machine/setjmp.h -malloc.o: /usr/ucbinclude/ndbm.h -malloc.o: /usr/ucbinclude/netinet/in.h -malloc.o: /usr/ucbinclude/setjmp.h -malloc.o: /usr/ucbinclude/stdio.h -malloc.o: /usr/ucbinclude/sys/dirent.h -malloc.o: /usr/ucbinclude/sys/errno.h -malloc.o: /usr/ucbinclude/sys/filio.h -malloc.o: /usr/ucbinclude/sys/ioccom.h -malloc.o: /usr/ucbinclude/sys/ioctl.h -malloc.o: /usr/ucbinclude/sys/param.h -malloc.o: /usr/ucbinclude/sys/signal.h -malloc.o: /usr/ucbinclude/sys/sockio.h -malloc.o: /usr/ucbinclude/sys/stat.h -malloc.o: /usr/ucbinclude/sys/stdtypes.h -malloc.o: /usr/ucbinclude/sys/sysmacros.h -malloc.o: /usr/ucbinclude/sys/time.h -malloc.o: /usr/ucbinclude/sys/times.h -malloc.o: /usr/ucbinclude/sys/ttold.h -malloc.o: /usr/ucbinclude/sys/ttychars.h -malloc.o: /usr/ucbinclude/sys/ttycom.h -malloc.o: /usr/ucbinclude/sys/ttydev.h -malloc.o: /usr/ucbinclude/sys/types.h -malloc.o: /usr/ucbinclude/time.h -malloc.o: /usr/ucbinclude/vm/faultcode.h -malloc.o: EXTERN.h -malloc.o: arg.h -malloc.o: array.h -malloc.o: cmd.h -malloc.o: config.h -malloc.o: embed.h -malloc.o: form.h -malloc.o: handy.h -malloc.o: hash.h -malloc.o: malloc.c -malloc.o: perl.h -malloc.o: regexp.h -malloc.o: spat.h -malloc.o: stab.h -malloc.o: str.h -malloc.o: unixish.h -malloc.o: util.h -perl.o: -perl.o: /usr/ucbinclude/ctype.h -perl.o: /usr/ucbinclude/dirent.h -perl.o: /usr/ucbinclude/errno.h -perl.o: /usr/ucbinclude/machine/param.h -perl.o: /usr/ucbinclude/machine/setjmp.h -perl.o: /usr/ucbinclude/ndbm.h -perl.o: /usr/ucbinclude/netinet/in.h -perl.o: /usr/ucbinclude/setjmp.h -perl.o: /usr/ucbinclude/stdio.h -perl.o: /usr/ucbinclude/sys/dirent.h -perl.o: /usr/ucbinclude/sys/errno.h -perl.o: /usr/ucbinclude/sys/filio.h -perl.o: /usr/ucbinclude/sys/ioccom.h -perl.o: /usr/ucbinclude/sys/ioctl.h -perl.o: /usr/ucbinclude/sys/param.h -perl.o: /usr/ucbinclude/sys/signal.h -perl.o: /usr/ucbinclude/sys/sockio.h -perl.o: /usr/ucbinclude/sys/stat.h -perl.o: /usr/ucbinclude/sys/stdtypes.h -perl.o: /usr/ucbinclude/sys/sysmacros.h -perl.o: /usr/ucbinclude/sys/time.h -perl.o: /usr/ucbinclude/sys/times.h -perl.o: /usr/ucbinclude/sys/ttold.h -perl.o: /usr/ucbinclude/sys/ttychars.h -perl.o: /usr/ucbinclude/sys/ttycom.h -perl.o: /usr/ucbinclude/sys/ttydev.h -perl.o: /usr/ucbinclude/sys/types.h -perl.o: /usr/ucbinclude/time.h -perl.o: /usr/ucbinclude/vm/faultcode.h -perl.o: EXTERN.h -perl.o: arg.h -perl.o: array.h -perl.o: cmd.h -perl.o: config.h -perl.o: embed.h -perl.o: form.h -perl.o: handy.h -perl.o: hash.h -perl.o: patchlevel.h -perl.o: perl.c -perl.o: perl.h -perl.o: perly.h -perl.o: regexp.h -perl.o: spat.h -perl.o: stab.h -perl.o: str.h -perl.o: unixish.h -perl.o: util.h -pp.o: EXTERN.h -pp.o: arg.h -pp.o: array.h -pp.o: cmd.h -pp.o: config.h -pp.o: embed.h -pp.o: pp.c -pp.o: pp.h -pp.o: form.h -pp.o: handy.h -pp.o: hash.h -pp.o: perl.h -pp.o: regexp.h -pp.o: spat.h -pp.o: stab.h -pp.o: str.h -pp.o: unixish.h -pp.o: util.h -regcomp.o: -regcomp.o: /usr/ucbinclude/ctype.h -regcomp.o: /usr/ucbinclude/dirent.h -regcomp.o: /usr/ucbinclude/errno.h -regcomp.o: /usr/ucbinclude/machine/param.h -regcomp.o: /usr/ucbinclude/machine/setjmp.h -regcomp.o: /usr/ucbinclude/ndbm.h -regcomp.o: /usr/ucbinclude/netinet/in.h -regcomp.o: /usr/ucbinclude/setjmp.h -regcomp.o: /usr/ucbinclude/stdio.h -regcomp.o: /usr/ucbinclude/sys/dirent.h -regcomp.o: /usr/ucbinclude/sys/errno.h -regcomp.o: /usr/ucbinclude/sys/filio.h -regcomp.o: /usr/ucbinclude/sys/ioccom.h -regcomp.o: /usr/ucbinclude/sys/ioctl.h -regcomp.o: /usr/ucbinclude/sys/param.h -regcomp.o: /usr/ucbinclude/sys/signal.h -regcomp.o: /usr/ucbinclude/sys/sockio.h -regcomp.o: /usr/ucbinclude/sys/stat.h -regcomp.o: /usr/ucbinclude/sys/stdtypes.h -regcomp.o: /usr/ucbinclude/sys/sysmacros.h -regcomp.o: /usr/ucbinclude/sys/time.h -regcomp.o: /usr/ucbinclude/sys/times.h -regcomp.o: /usr/ucbinclude/sys/ttold.h -regcomp.o: /usr/ucbinclude/sys/ttychars.h -regcomp.o: /usr/ucbinclude/sys/ttycom.h -regcomp.o: /usr/ucbinclude/sys/ttydev.h -regcomp.o: /usr/ucbinclude/sys/types.h -regcomp.o: /usr/ucbinclude/time.h -regcomp.o: /usr/ucbinclude/vm/faultcode.h -regcomp.o: EXTERN.h -regcomp.o: INTERN.h -regcomp.o: arg.h -regcomp.o: array.h -regcomp.o: cmd.h -regcomp.o: config.h -regcomp.o: embed.h -regcomp.o: form.h -regcomp.o: handy.h -regcomp.o: hash.h -regcomp.o: perl.h -regcomp.o: regcomp.c -regcomp.o: regcomp.h -regcomp.o: regexp.h -regcomp.o: spat.h -regcomp.o: stab.h -regcomp.o: str.h -regcomp.o: unixish.h -regcomp.o: util.h -regexec.o: -regexec.o: /usr/ucbinclude/ctype.h -regexec.o: /usr/ucbinclude/dirent.h -regexec.o: /usr/ucbinclude/errno.h -regexec.o: /usr/ucbinclude/machine/param.h -regexec.o: /usr/ucbinclude/machine/setjmp.h -regexec.o: /usr/ucbinclude/ndbm.h -regexec.o: /usr/ucbinclude/netinet/in.h -regexec.o: /usr/ucbinclude/setjmp.h -regexec.o: /usr/ucbinclude/stdio.h -regexec.o: /usr/ucbinclude/sys/dirent.h -regexec.o: /usr/ucbinclude/sys/errno.h -regexec.o: /usr/ucbinclude/sys/filio.h -regexec.o: /usr/ucbinclude/sys/ioccom.h -regexec.o: /usr/ucbinclude/sys/ioctl.h -regexec.o: /usr/ucbinclude/sys/param.h -regexec.o: /usr/ucbinclude/sys/signal.h -regexec.o: /usr/ucbinclude/sys/sockio.h -regexec.o: /usr/ucbinclude/sys/stat.h -regexec.o: /usr/ucbinclude/sys/stdtypes.h -regexec.o: /usr/ucbinclude/sys/sysmacros.h -regexec.o: /usr/ucbinclude/sys/time.h -regexec.o: /usr/ucbinclude/sys/times.h -regexec.o: /usr/ucbinclude/sys/ttold.h -regexec.o: /usr/ucbinclude/sys/ttychars.h -regexec.o: /usr/ucbinclude/sys/ttycom.h -regexec.o: /usr/ucbinclude/sys/ttydev.h -regexec.o: /usr/ucbinclude/sys/types.h -regexec.o: /usr/ucbinclude/time.h -regexec.o: /usr/ucbinclude/vm/faultcode.h -regexec.o: EXTERN.h -regexec.o: arg.h -regexec.o: array.h -regexec.o: cmd.h -regexec.o: config.h -regexec.o: embed.h -regexec.o: form.h -regexec.o: handy.h -regexec.o: hash.h -regexec.o: perl.h -regexec.o: regcomp.h -regexec.o: regexec.c -regexec.o: regexp.h -regexec.o: spat.h -regexec.o: stab.h -regexec.o: str.h -regexec.o: unixish.h -regexec.o: util.h -stab.o: -stab.o: /usr/ucbinclude/ctype.h -stab.o: /usr/ucbinclude/dirent.h -stab.o: /usr/ucbinclude/errno.h -stab.o: /usr/ucbinclude/machine/param.h -stab.o: /usr/ucbinclude/machine/setjmp.h -stab.o: /usr/ucbinclude/ndbm.h -stab.o: /usr/ucbinclude/netinet/in.h -stab.o: /usr/ucbinclude/setjmp.h -stab.o: /usr/ucbinclude/stdio.h -stab.o: /usr/ucbinclude/sys/dirent.h -stab.o: /usr/ucbinclude/sys/errno.h -stab.o: /usr/ucbinclude/sys/filio.h -stab.o: /usr/ucbinclude/sys/ioccom.h -stab.o: /usr/ucbinclude/sys/ioctl.h -stab.o: /usr/ucbinclude/sys/param.h -stab.o: /usr/ucbinclude/sys/signal.h -stab.o: /usr/ucbinclude/sys/sockio.h -stab.o: /usr/ucbinclude/sys/stat.h -stab.o: /usr/ucbinclude/sys/stdtypes.h -stab.o: /usr/ucbinclude/sys/sysmacros.h -stab.o: /usr/ucbinclude/sys/time.h -stab.o: /usr/ucbinclude/sys/times.h -stab.o: /usr/ucbinclude/sys/ttold.h -stab.o: /usr/ucbinclude/sys/ttychars.h -stab.o: /usr/ucbinclude/sys/ttycom.h -stab.o: /usr/ucbinclude/sys/ttydev.h -stab.o: /usr/ucbinclude/sys/types.h -stab.o: /usr/ucbinclude/time.h -stab.o: /usr/ucbinclude/vm/faultcode.h -stab.o: EXTERN.h -stab.o: arg.h -stab.o: array.h -stab.o: cmd.h -stab.o: config.h -stab.o: embed.h -stab.o: form.h -stab.o: handy.h -stab.o: hash.h -stab.o: perl.h -stab.o: regexp.h -stab.o: spat.h -stab.o: stab.c -stab.o: stab.h -stab.o: str.h -stab.o: unixish.h -stab.o: util.h -str.o: -str.o: /usr/ucbinclude/ctype.h -str.o: /usr/ucbinclude/dirent.h -str.o: /usr/ucbinclude/errno.h -str.o: /usr/ucbinclude/machine/param.h -str.o: /usr/ucbinclude/machine/setjmp.h -str.o: /usr/ucbinclude/ndbm.h -str.o: /usr/ucbinclude/netinet/in.h -str.o: /usr/ucbinclude/setjmp.h -str.o: /usr/ucbinclude/stdio.h -str.o: /usr/ucbinclude/sys/dirent.h -str.o: /usr/ucbinclude/sys/errno.h -str.o: /usr/ucbinclude/sys/filio.h -str.o: /usr/ucbinclude/sys/ioccom.h -str.o: /usr/ucbinclude/sys/ioctl.h -str.o: /usr/ucbinclude/sys/param.h -str.o: /usr/ucbinclude/sys/signal.h -str.o: /usr/ucbinclude/sys/sockio.h -str.o: /usr/ucbinclude/sys/stat.h -str.o: /usr/ucbinclude/sys/stdtypes.h -str.o: /usr/ucbinclude/sys/sysmacros.h -str.o: /usr/ucbinclude/sys/time.h -str.o: /usr/ucbinclude/sys/times.h -str.o: /usr/ucbinclude/sys/ttold.h -str.o: /usr/ucbinclude/sys/ttychars.h -str.o: /usr/ucbinclude/sys/ttycom.h -str.o: /usr/ucbinclude/sys/ttydev.h -str.o: /usr/ucbinclude/sys/types.h -str.o: /usr/ucbinclude/time.h -str.o: /usr/ucbinclude/vm/faultcode.h -str.o: EXTERN.h -str.o: arg.h -str.o: array.h -str.o: cmd.h -str.o: config.h -str.o: embed.h -str.o: form.h -str.o: handy.h -str.o: hash.h -str.o: perl.h -str.o: perly.h -str.o: regexp.h -str.o: spat.h -str.o: stab.h -str.o: str.c -str.o: str.h -str.o: unixish.h -str.o: util.h -toke.o: -toke.o: /usr/ucbinclude/ctype.h -toke.o: /usr/ucbinclude/dirent.h -toke.o: /usr/ucbinclude/errno.h -toke.o: /usr/ucbinclude/machine/param.h -toke.o: /usr/ucbinclude/machine/setjmp.h -toke.o: /usr/ucbinclude/ndbm.h -toke.o: /usr/ucbinclude/netinet/in.h -toke.o: /usr/ucbinclude/setjmp.h -toke.o: /usr/ucbinclude/stdio.h -toke.o: /usr/ucbinclude/sys/dirent.h -toke.o: /usr/ucbinclude/sys/errno.h -toke.o: /usr/ucbinclude/sys/fcntlcom.h -toke.o: /usr/ucbinclude/sys/file.h -toke.o: /usr/ucbinclude/sys/filio.h -toke.o: /usr/ucbinclude/sys/ioccom.h -toke.o: /usr/ucbinclude/sys/ioctl.h -toke.o: /usr/ucbinclude/sys/param.h -toke.o: /usr/ucbinclude/sys/signal.h -toke.o: /usr/ucbinclude/sys/sockio.h -toke.o: /usr/ucbinclude/sys/stat.h -toke.o: /usr/ucbinclude/sys/stdtypes.h -toke.o: /usr/ucbinclude/sys/sysmacros.h -toke.o: /usr/ucbinclude/sys/time.h -toke.o: /usr/ucbinclude/sys/times.h -toke.o: /usr/ucbinclude/sys/ttold.h -toke.o: /usr/ucbinclude/sys/ttychars.h -toke.o: /usr/ucbinclude/sys/ttycom.h -toke.o: /usr/ucbinclude/sys/ttydev.h -toke.o: /usr/ucbinclude/sys/types.h -toke.o: /usr/ucbinclude/time.h -toke.o: /usr/ucbinclude/vm/faultcode.h -toke.o: EXTERN.h -toke.o: arg.h -toke.o: array.h -toke.o: cmd.h -toke.o: config.h -toke.o: embed.h -toke.o: form.h -toke.o: handy.h -toke.o: hash.h -toke.o: keywords.h -toke.o: perl.h -toke.o: perly.h -toke.o: regexp.h -toke.o: spat.h -toke.o: stab.h -toke.o: str.h -toke.o: toke.c -toke.o: unixish.h -toke.o: util.h -util.o: -util.o: /usr/ucbinclude/ctype.h -util.o: /usr/ucbinclude/dirent.h -util.o: /usr/ucbinclude/errno.h -util.o: /usr/ucbinclude/machine/param.h -util.o: /usr/ucbinclude/machine/setjmp.h -util.o: /usr/ucbinclude/ndbm.h -util.o: /usr/ucbinclude/netinet/in.h -util.o: /usr/ucbinclude/setjmp.h -util.o: /usr/ucbinclude/stdio.h -util.o: /usr/ucbinclude/sys/dirent.h -util.o: /usr/ucbinclude/sys/errno.h -util.o: /usr/ucbinclude/sys/fcntlcom.h -util.o: /usr/ucbinclude/sys/file.h -util.o: /usr/ucbinclude/sys/filio.h -util.o: /usr/ucbinclude/sys/ioccom.h -util.o: /usr/ucbinclude/sys/ioctl.h -util.o: /usr/ucbinclude/sys/param.h -util.o: /usr/ucbinclude/sys/signal.h -util.o: /usr/ucbinclude/sys/sockio.h -util.o: /usr/ucbinclude/sys/stat.h -util.o: /usr/ucbinclude/sys/stdtypes.h -util.o: /usr/ucbinclude/sys/sysmacros.h -util.o: /usr/ucbinclude/sys/time.h -util.o: /usr/ucbinclude/sys/times.h -util.o: /usr/ucbinclude/sys/ttold.h -util.o: /usr/ucbinclude/sys/ttychars.h -util.o: /usr/ucbinclude/sys/ttycom.h -util.o: /usr/ucbinclude/sys/ttydev.h -util.o: /usr/ucbinclude/sys/types.h -util.o: /usr/ucbinclude/time.h -util.o: /usr/ucbinclude/varargs.h -util.o: /usr/ucbinclude/vfork.h -util.o: /usr/ucbinclude/vm/faultcode.h -util.o: EXTERN.h -util.o: arg.h -util.o: array.h -util.o: cmd.h -util.o: config.h -util.o: embed.h -util.o: form.h -util.o: handy.h -util.o: hash.h -util.o: perl.h -util.o: regexp.h -util.o: spat.h -util.o: stab.h -util.o: str.h -util.o: unixish.h -util.o: util.c -util.o: util.h -usersub.o: -usersub.o: /usr/ucbinclude/ctype.h -usersub.o: /usr/ucbinclude/dirent.h -usersub.o: /usr/ucbinclude/errno.h -usersub.o: /usr/ucbinclude/machine/param.h -usersub.o: /usr/ucbinclude/machine/setjmp.h -usersub.o: /usr/ucbinclude/ndbm.h -usersub.o: /usr/ucbinclude/netinet/in.h -usersub.o: /usr/ucbinclude/setjmp.h -usersub.o: /usr/ucbinclude/stdio.h -usersub.o: /usr/ucbinclude/sys/dirent.h -usersub.o: /usr/ucbinclude/sys/errno.h -usersub.o: /usr/ucbinclude/sys/filio.h -usersub.o: /usr/ucbinclude/sys/ioccom.h -usersub.o: /usr/ucbinclude/sys/ioctl.h -usersub.o: /usr/ucbinclude/sys/param.h -usersub.o: /usr/ucbinclude/sys/signal.h -usersub.o: /usr/ucbinclude/sys/sockio.h -usersub.o: /usr/ucbinclude/sys/stat.h -usersub.o: /usr/ucbinclude/sys/stdtypes.h -usersub.o: /usr/ucbinclude/sys/sysmacros.h -usersub.o: /usr/ucbinclude/sys/time.h -usersub.o: /usr/ucbinclude/sys/times.h -usersub.o: /usr/ucbinclude/sys/ttold.h -usersub.o: /usr/ucbinclude/sys/ttychars.h -usersub.o: /usr/ucbinclude/sys/ttycom.h -usersub.o: /usr/ucbinclude/sys/ttydev.h -usersub.o: /usr/ucbinclude/sys/types.h -usersub.o: /usr/ucbinclude/time.h -usersub.o: /usr/ucbinclude/vm/faultcode.h -usersub.o: EXTERN.h -usersub.o: arg.h -usersub.o: array.h -usersub.o: cmd.h -usersub.o: config.h -usersub.o: embed.h -usersub.o: form.h -usersub.o: handy.h -usersub.o: hash.h -usersub.o: perl.h -usersub.o: regexp.h -usersub.o: spat.h -usersub.o: stab.h -usersub.o: str.h -usersub.o: unixish.h -usersub.o: usersub.c -usersub.o: util.h -Makefile: Makefile.SH config.sh ; /bin/sh Makefile.SH -makedepend: makedepend.SH config.sh ; /bin/sh makedepend.SH -h2ph: h2ph.SH config.sh ; /bin/sh h2ph.SH -# WARNING: Put nothing here or make depend will gobble it up! diff --git a/malloc.c b/malloc.c index c99e3580c7..a2631ae7a0 100644 --- a/malloc.c +++ b/malloc.c @@ -64,7 +64,7 @@ static int morecore(); */ union overhead { union overhead *ov_next; /* when free */ -#if ALIGNBYTES > 4 +#if MEM_ALIGNBYTES > 4 double strut; /* alignment problems */ #endif struct { diff --git a/match_stuff b/match_stuff deleted file mode 100644 index b13d2b7bb6..0000000000 --- a/match_stuff +++ /dev/null @@ -1,53 +0,0 @@ - len = sv->sv_cur; - e = sv->sv_ptr + len; - if (delim == '\'') - d = e; - else - d = sv->sv_ptr; - for (; d < e; d++) { - if (*d == '\\') - d++; - else if ((*d == '$' && d[1] && d[1] != '|' && d[1] != ')') || - (*d == '@')) { - lex_stuff = newSVsv(sv); - d = scan_ident(d,bufend,buf,FALSE); - (void)gv_fetchpv(buf,TRUE); /* make sure it's created */ - for (; d < e; d++) { - if (*d == '\\') - d++; - else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') { - d = scan_ident(d,bufend,buf,FALSE); - (void)gv_fetchpv(buf,TRUE); - } - else if (*d == '@') { - d = scan_ident(d,bufend,buf,FALSE); - if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") || - strEQ(buf,"SIG") || strEQ(buf,"INC")) - (void)gv_fetchpv(buf,TRUE); - } - } - pm->op_pmflags |= PMf_RUNTIME; - goto got_pat; /* skip compiling for now */ - } - } - if (pm->op_pmflags & PMf_FOLD) - StructCopy(pm, &savepm, PMOP); - scan_prefix(pm,sv->sv_ptr,len); - if ((pm->op_pmflags & PMf_ALL) && (pm->op_pmflags & PMf_SCANFIRST)) { - fbm_compile(pm->op_pmshort, pm->op_pmflags & PMf_FOLD); - pm->op_pmregexp = regcomp(sv->sv_ptr,sv->sv_ptr+len, - pm->op_pmflags & PMf_FOLD); - /* Note that this regexp can still be used if someone says - * something like /a/ && s//b/; so we can't delete it. - */ - } - else { - if (pm->op_pmflags & PMf_FOLD) - StructCopy(&savepm, pm, PMOP); - if (pm->op_pmshort) - fbm_compile(pm->op_pmshort, pm->op_pmflags & PMf_FOLD); - pm->op_pmregexp = regcomp(sv->sv_ptr,sv->sv_ptr+len, - pm->op_pmflags & PMf_FOLD); - hoistmust(pm); - } - got_pat: diff --git a/mg.c b/mg.c index a78d4dae6b..da11119847 100644 --- a/mg.c +++ b/mg.c @@ -85,23 +85,26 @@ SV* sv; MAGIC* mg; char *s; STRLEN len; - U32 savemagic = SvMAGICAL(sv); - - SvMAGICAL_off(sv); - SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { MGVTBL* vtbl = mg->mg_virtual; - if (vtbl && vtbl->svt_len) - return (*vtbl->svt_len)(sv, mg); - } - mg_get(sv); - s = SvPV(sv, len); + if (vtbl && vtbl->svt_len) { + U32 savemagic = SvMAGICAL(sv); - SvFLAGS(sv) |= savemagic; - if (SvGMAGICAL(sv)) - SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK|SVf_POK); + SvMAGICAL_off(sv); + SvFLAGS(sv) |= (SvFLAGS(sv)&(SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; + + len = (*vtbl->svt_len)(sv, mg); + SvFLAGS(sv) |= savemagic; + if (SvGMAGICAL(sv)) + SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK|SVf_POK); + + return len; + } + } + + s = SvPV(sv, len); return len; } @@ -176,7 +179,7 @@ SV* sv; (*vtbl->svt_free)(sv, mg); if (mg->mg_ptr && mg->mg_type != 'g') Safefree(mg->mg_ptr); - if (mg->mg_obj != sv) + if (mg->mg_flags & MGf_REFCOUNTED) SvREFCNT_dec(mg->mg_obj); Safefree(mg); } @@ -456,7 +459,7 @@ SV* sv; MAGIC* mg; { register char *s; - I32 i; + U32 i; s = SvPV(sv,na); my_setenv(mg->mg_ptr,s); /* And you'll never guess what the dog had */ @@ -477,6 +480,15 @@ MAGIC* mg; return 0; } +int +magic_clearenv(sv,mg) +SV* sv; +MAGIC* mg; +{ + my_setenv(mg->mg_ptr,Nullch); + return 0; +} + int magic_setsig(sv,mg) SV* sv; @@ -759,7 +771,7 @@ MAGIC* mg; s = SvPV(sv, na); if (*s == '*' && s[1]) s++; - gv = gv_fetchpv(s,TRUE); + gv = gv_fetchpv(s,TRUE, SVt_PVGV); if (sv == (SV*)gv) return 0; if (GvGP(sv)) @@ -880,7 +892,7 @@ MAGIC* mg; perldb = i; break; case '\024': /* ^T */ - basetime = (time_t)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); + basetime = (Time_t)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); break; case '\027': /* ^W */ dowarn = (bool)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); @@ -894,12 +906,12 @@ MAGIC* mg; case '^': Safefree(IoTOP_NAME(GvIO(defoutgv))); IoTOP_NAME(GvIO(defoutgv)) = s = savestr(SvPV(sv,na)); - IoTOP_GV(GvIO(defoutgv)) = gv_fetchpv(s,TRUE); + IoTOP_GV(GvIO(defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO); break; case '~': Safefree(IoFMT_NAME(GvIO(defoutgv))); IoFMT_NAME(GvIO(defoutgv)) = s = savestr(SvPV(sv,na)); - IoFMT_GV(GvIO(defoutgv)) = gv_fetchpv(s,TRUE); + IoFMT_GV(GvIO(defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO); break; case '=': IoPAGE_LEN(GvIO(defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); @@ -970,16 +982,19 @@ MAGIC* mg; break; /* don't do magic till later */ } #ifdef HAS_SETRUID - (void)setruid((UIDTYPE)uid); + (void)setruid((Uid_t)uid); #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)uid, (UIDTYPE)-1); + (void)setreuid((Uid_t)uid, (Uid_t)-1); +#ifdef HAS_SETRESUID + (void)setresuid((Uid_t)uid, (Uid_t)-1, (Uid_t)-1); #else if (uid == euid) /* special case $< = $> */ (void)setuid(uid); else croak("setruid() not implemented"); #endif +#endif #endif uid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv); tainting |= (euid != uid || egid != gid); @@ -991,16 +1006,20 @@ MAGIC* mg; break; /* don't do magic till later */ } #ifdef HAS_SETEUID - (void)seteuid((UIDTYPE)euid); + (void)seteuid((Uid_t)euid); #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)-1, (UIDTYPE)euid); + (void)setreuid((Uid_t)-1, (Uid_t)euid); +#else +#ifdef HAS_SETRESUID + (void)setresuid((Uid_t)-1, (Uid_t)euid, (Uid_t)-1); #else if (euid == uid) /* special case $> = $< */ setuid(euid); else croak("seteuid() not implemented"); #endif +#endif #endif euid = (I32)geteuid(); tainting |= (euid != uid || egid != gid); @@ -1012,16 +1031,20 @@ MAGIC* mg; break; /* don't do magic till later */ } #ifdef HAS_SETRGID - (void)setrgid((GIDTYPE)gid); + (void)setrgid((Gid_t)gid); #else #ifdef HAS_SETREGID - (void)setregid((GIDTYPE)gid, (GIDTYPE)-1); + (void)setregid((Gid_t)gid, (Gid_t)-1); +#else +#ifdef HAS_SETRESGID + (void)setresgid((Gid_t)gid, (Gid_t)-1, (Gid_t) 1); #else if (gid == egid) /* special case $( = $) */ (void)setgid(gid); else croak("setrgid() not implemented"); #endif +#endif #endif gid = (I32)getgid(); tainting |= (euid != uid || egid != gid); @@ -1033,16 +1056,20 @@ MAGIC* mg; break; /* don't do magic till later */ } #ifdef HAS_SETEGID - (void)setegid((GIDTYPE)egid); + (void)setegid((Gid_t)egid); #else #ifdef HAS_SETREGID - (void)setregid((GIDTYPE)-1, (GIDTYPE)egid); + (void)setregid((Gid_t)-1, (Gid_t)egid); +#else +#ifdef HAS_SETRESGID + (void)setresgid((Gid_t)-1, (Gid_t)egid, (Gid_t)-1); #else if (egid == gid) /* special case $) = $( */ (void)setgid(egid); else croak("setegid() not implemented"); #endif +#endif #endif egid = (I32)getegid(); tainting |= (euid != uid || egid != gid); @@ -1131,15 +1158,15 @@ I32 sig; gv = gv_fetchpv( SvPVx(*hv_fetch(GvHVn(siggv),sig_name[sig],strlen(sig_name[sig]), - TRUE), na), TRUE); + TRUE), na), TRUE, SVt_PVCV); cv = GvCV(gv); if (!cv && *sig_name[sig] == 'C' && instr(sig_name[sig],"LD")) { if (sig_name[sig][1] == 'H') gv = gv_fetchpv(SvPVx(*hv_fetch(GvHVn(siggv),"CLD",3,TRUE), na), - TRUE); + TRUE, SVt_PVCV); else gv = gv_fetchpv(SvPVx(*hv_fetch(GvHVn(siggv),"CHLD",4,TRUE), na), - TRUE); + TRUE, SVt_PVCV); cv = GvCV(gv); /* gag */ } if (!cv) { diff --git a/mg.h b/mg.h index c18c4262ab..b2cd7d6f59 100644 --- a/mg.h +++ b/mg.h @@ -28,5 +28,6 @@ struct magic { }; #define MGf_TAINTEDDIR 1 +#define MGf_REFCOUNTED 2 #define MgTAINTEDDIR(mg) (mg->mg_flags & MGf_TAINTEDDIR) #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR) diff --git a/miniperlmain.c b/miniperlmain.c index e0b75fffe6..0e1b0f990e 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -32,8 +32,5 @@ void perl_init_ext() { char *file = __FILE__; - -#ifdef USE_DYNAMIC_LOADING - boot_DynamicLoader(); -#endif + /* Do not delete this line--writemain depends on it */ } diff --git a/miniperlmain.x b/miniperlmain.x new file mode 100644 index 0000000000..e69de29bb2 diff --git a/net b/net new file mode 120000 index 0000000000..c15a429de2 --- /dev/null +++ b/net @@ -0,0 +1 @@ +/scalpel/lwall/netperl \ No newline at end of file diff --git a/oldcmdcruft b/oldcmdcruft deleted file mode 100644 index d4e65720de..0000000000 --- a/oldcmdcruft +++ /dev/null @@ -1,592 +0,0 @@ -#ifdef NOTDEF - if (go_to) { - if (op->cop_label && strEQ(go_to,op->cop_label)) - goto_targ = go_to = Nullch; /* here at last */ - else { - switch (op->cop_type) { - case COP_IF: - oldspat = curspat; - oldsave = savestack->av_fill; -#ifdef DEBUGGING - olddlevel = dlevel; -#endif - retstr = &sv_yes; - newsp = -2; - if (op->uop.ccop_true) { -#ifdef DEBUGGING - if (debug) { - debname[dlevel] = 't'; - debdelim[dlevel] = '_'; - if (++dlevel >= dlmax) - deb_growlevel(); - } -#endif - newsp = cop_exec(op->uop.ccop_true,gimme && (opflags & COPf_TERM),sp); - st = stack->av_array; /* possibly reallocated */ - retstr = st[newsp]; - } - if (!goto_targ) - go_to = Nullch; - curspat = oldspat; - if (savestack->av_fill > oldsave) - leave_scope(oldsave); -#ifdef DEBUGGING - dlevel = olddlevel; -#endif - op = op->uop.ccop_alt; - goto tail_recursion_entry; - case COP_ELSE: - oldspat = curspat; - oldsave = savestack->av_fill; -#ifdef DEBUGGING - olddlevel = dlevel; -#endif - retstr = &sv_undef; - newsp = -2; - if (op->uop.ccop_true) { -#ifdef DEBUGGING - if (debug) { - debname[dlevel] = 'e'; - debdelim[dlevel] = '_'; - if (++dlevel >= dlmax) - deb_growlevel(); - } -#endif - newsp = cop_exec(op->uop.ccop_true,gimme && (opflags & COPf_TERM),sp); - st = stack->av_array; /* possibly reallocated */ - retstr = st[newsp]; - } - if (!goto_targ) - go_to = Nullch; - curspat = oldspat; - if (savestack->av_fill > oldsave) - leave_scope(oldsave); -#ifdef DEBUGGING - dlevel = olddlevel; -#endif - break; - case COP_BLOCK: - case COP_WHILE: - if (!(opflags & COPf_ONCE)) { - opflags |= COPf_ONCE; - if (++loop_ptr >= loop_max) { - loop_max += 128; - Renew(loop_stack, loop_max, struct loop); - } - loop_stack[loop_ptr].loop_label = op->cop_label; - loop_stack[loop_ptr].loop_sp = sp; -#ifdef DEBUGGING - if (debug & 4) { - deb("(Pushing label #%d %s)\n", - loop_ptr, op->cop_label ? op->cop_label : ""); - } -#endif - } -#ifdef JMPCLOBBER - opparm = op; -#endif - match = setjmp(loop_stack[loop_ptr].loop_env); - if (match) { - st = stack->av_array; /* possibly reallocated */ -#ifdef JMPCLOBBER - op = opparm; - opflags = op->cop_flags|COPf_ONCE; -#endif - if (savestack->av_fill > oldsave) - leave_scope(oldsave); - switch (match) { - default: - fatal("longjmp returned bad value (%d)",match); - case OP_LAST: /* not done unless go_to found */ - go_to = Nullch; - if (lastretstr) { - retstr = lastretstr; - newsp = -2; - } - else { - newsp = sp + lastsize; - retstr = st[newsp]; - } -#ifdef DEBUGGING - olddlevel = dlevel; -#endif - curspat = oldspat; - goto next_op; - case OP_NEXT: /* not done unless go_to found */ - go_to = Nullch; -#ifdef JMPCLOBBER - newsp = -2; - retstr = &sv_undef; -#endif - goto next_iter; - case OP_REDO: /* not done unless go_to found */ - go_to = Nullch; -#ifdef JMPCLOBBER - newsp = -2; - retstr = &sv_undef; -#endif - goto doit; - } - } - oldspat = curspat; - oldsave = savestack->av_fill; -#ifdef DEBUGGING - olddlevel = dlevel; -#endif - if (op->uop.ccop_true) { -#ifdef DEBUGGING - if (debug) { - debname[dlevel] = 't'; - debdelim[dlevel] = '_'; - if (++dlevel >= dlmax) - deb_growlevel(); - } -#endif - newsp = cop_exec(op->uop.ccop_true,gimme && (opflags & COPf_TERM),sp); - st = stack->av_array; /* possibly reallocated */ - if (newsp >= 0) - retstr = st[newsp]; - } - if (!goto_targ) { - go_to = Nullch; - goto next_iter; - } -#ifdef DEBUGGING - dlevel = olddlevel; -#endif - if (op->uop.ccop_alt) { -#ifdef DEBUGGING - if (debug) { - debname[dlevel] = 'a'; - debdelim[dlevel] = '_'; - if (++dlevel >= dlmax) - deb_growlevel(); - } -#endif - newsp = cop_exec(op->uop.ccop_alt,gimme && (opflags & COPf_TERM),sp); - st = stack->av_array; /* possibly reallocated */ - if (newsp >= 0) - retstr = st[newsp]; - } - if (goto_targ) - break; - go_to = Nullch; - goto finish_while; - } - op = op->cop_next; - if (op && op->cop_head == op) - /* reached end of while loop */ - return sp; /* targ isn't in this block */ - if (opflags & COPf_ONCE) { -#ifdef DEBUGGING - if (debug & 4) { - tmps = loop_stack[loop_ptr].loop_label; - deb("(Popping label #%d %s)\n",loop_ptr, - tmps ? tmps : "" ); - } -#endif - loop_ptr--; - } - goto tail_recursion_entry; - } - } -#endif - -#ifdef DEBUGGING - if (debug) { - if (debug & 2) { - deb("%s (%lx) r%lx t%lx a%lx n%lx cs%lx\n", - cop_name[op->cop_type],op,op->cop_expr, - op->uop.ccop_true,op->uop.ccop_alt,op->cop_next, - curspat); - } - debname[dlevel] = cop_name[op->cop_type][0]; - debdelim[dlevel] = '!'; - if (++dlevel >= dlmax) - deb_growlevel(); - } -#endif - - /* Here is some common optimization */ - - if (opflags & COPf_COND) { - switch (opflags & COPf_OPTIMIZE) { - - case COPo_FALSE: - retstr = op->cop_short; - newsp = -2; - match = FALSE; - if (opflags & COPf_NESURE) - goto maybe; - break; - case COPo_TRUE: - retstr = op->cop_short; - newsp = -2; - match = TRUE; - if (opflags & COPf_EQSURE) - goto flipmaybe; - break; - - case COPo_REG: - retstr = GV_STR(op->cop_stab); - newsp = -2; - match = SvTRUE(retstr); /* => retstr = retstr, c2 should fix */ - if (opflags & (match ? COPf_EQSURE : COPf_NESURE)) - goto flipmaybe; - break; - - case COPo_ANCHOR: /* /^pat/ optimization */ - if (multiline) { - if (*op->cop_short->sv_ptr && !(opflags & COPf_EQSURE)) - goto scanner; /* just unanchor it */ - else - break; /* must evaluate */ - } - match = 0; - goto strop; - - case COPo_STROP: /* string op optimization */ - match = 1; - strop: - retstr = GV_STR(op->cop_stab); - newsp = -2; -#ifndef I286 - if (*op->cop_short->sv_ptr == *SvPV(retstr) && - (match ? retstr->sv_cur == op->cop_slen - 1 : - retstr->sv_cur >= op->cop_slen) && - bcmp(op->cop_short->sv_ptr, SvPV(retstr), - op->cop_slen) == 0 ) { - if (opflags & COPf_EQSURE) { - if (sawampersand && (opflags & COPf_OPTIMIZE) != COPo_STROP) { - curspat = Nullpm; - if (leftstab) - sv_setpvn(GvSV(leftstab),"",0); - if (amperstab) - sv_setsv(GvSV(amperstab),op->cop_short); - if (rightstab) - sv_setpvn(GvSV(rightstab), - retstr->sv_ptr + op->cop_slen, - retstr->sv_cur - op->cop_slen); - } - if (op->cop_spat) - lastspat = op->cop_spat; - match = !(opflags & COPf_FIRSTNEG); - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } - } - else if (opflags & COPf_NESURE) { - match = opflags & COPf_FIRSTNEG; - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } -#else - { - char *zap1, *zap2, zap1c, zap2c; - int zaplen; - int lenok; - - zap1 = op->cop_short->sv_ptr; - zap2 = SvPV(retstr); - zap1c = *zap1; - zap2c = *zap2; - zaplen = op->cop_slen; - if (match) - lenok = (retstr->sv_cur == op->cop_slen - 1); - else - lenok = (retstr->sv_cur >= op->cop_slen); - if ((zap1c == zap2c) && lenok && (bcmp(zap1, zap2, zaplen) == 0)) { - if (opflags & COPf_EQSURE) { - if (sawampersand && - (opflags & COPf_OPTIMIZE) != COPo_STROP) { - curspat = Nullpm; - if (leftstab) - sv_setpvn(GvSV(leftstab),"",0); - if (amperstab) - sv_setsv(GvSV(amperstab),op->cop_short); - if (rightstab) - sv_setpvn(GvSV(rightstab), - retstr->sv_ptr + op->cop_slen, - retstr->sv_cur - op->cop_slen); - } - if (op->cop_spat) - lastspat = op->cop_spat; - match = !(opflags & COPf_FIRSTNEG); - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } - } - else if (opflags & COPf_NESURE) { - match = opflags & COPf_FIRSTNEG; - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } - } -#endif - break; /* must evaluate */ - - case COPo_SCAN: /* non-anchored search */ - scanner: - retstr = GV_STR(op->cop_stab); - newsp = -2; - if (retstr->sv_pok & SVp_STUDIED) - if (screamfirst[op->cop_short->sv_rare] >= 0) - tmps = screaminstr(retstr, op->cop_short); - else - tmps = Nullch; - else { - tmps = SvPV(retstr); /* make sure it's pok */ -#ifndef lint - tmps = fbm_instr((unsigned char*)tmps, - (unsigned char*)tmps + retstr->sv_cur, op->cop_short); -#endif - } - if (tmps) { - if (opflags & COPf_EQSURE) { - ++op->cop_short->sv_u.sv_useful; - if (sawampersand) { - curspat = Nullpm; - if (leftstab) - sv_setpvn(GvSV(leftstab),retstr->sv_ptr, - tmps - retstr->sv_ptr); - if (amperstab) - sv_setpvn(GvSV(amperstab), - tmps, op->cop_short->sv_cur); - if (rightstab) - sv_setpvn(GvSV(rightstab), - tmps + op->cop_short->sv_cur, - retstr->sv_cur - (tmps - retstr->sv_ptr) - - op->cop_short->sv_cur); - } - lastspat = op->cop_spat; - match = !(opflags & COPf_FIRSTNEG); - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } - else - hint = tmps; - } - else { - if (opflags & COPf_NESURE) { - ++op->cop_short->sv_u.sv_useful; - match = opflags & COPf_FIRSTNEG; - retstr = match ? &sv_yes : &sv_no; - goto flipmaybe; - } - } - if (--op->cop_short->sv_u.sv_useful < 0) { - opflags &= ~COPf_OPTIMIZE; - opflags |= COPo_EVAL; /* never try this optimization again */ - op->cop_flags = (opflags & ~COPf_ONCE); - } - break; /* must evaluate */ - - case COPo_NUMOP: /* numeric op optimization */ - retstr = GV_STR(op->cop_stab); - newsp = -2; - switch (op->cop_slen) { - case OP_EQ: - if (dowarn) { - if ((!retstr->sv_nok && !looks_like_number(retstr))) - warn("Possible use of == on string value"); - } - match = (SvNV(retstr) == op->cop_short->sv_u.sv_nv); - break; - case OP_NE: - match = (SvNV(retstr) != op->cop_short->sv_u.sv_nv); - break; - case OP_LT: - match = (SvNV(retstr) < op->cop_short->sv_u.sv_nv); - break; - case OP_LE: - match = (SvNV(retstr) <= op->cop_short->sv_u.sv_nv); - break; - case OP_GT: - match = (SvNV(retstr) > op->cop_short->sv_u.sv_nv); - break; - case OP_GE: - match = (SvNV(retstr) >= op->cop_short->sv_u.sv_nv); - break; - } - if (match) { - if (opflags & COPf_EQSURE) { - retstr = &sv_yes; - goto flipmaybe; - } - } - else if (opflags & COPf_NESURE) { - retstr = &sv_no; - goto flipmaybe; - } - break; /* must evaluate */ - - case COPo_INDGETS: /* while (<$foo>) */ - last_in_stab = newGV(SvPV(GV_STR(op->cop_stab)),TRUE); - if (!GvIO(last_in_stab)) - GvIO(last_in_stab) = newIO(); - goto dogets; - case COPo_GETS: /* really a while () */ - last_in_stab = op->cop_stab; - dogets: - fp = GvIO(last_in_stab)->ifp; - retstr = GvSV(defstab); - newsp = -2; - keepgoing: - if (fp && sv_gets(retstr, fp, 0)) { - if (*retstr->sv_ptr == '0' && retstr->sv_cur == 1) - match = FALSE; - else - match = TRUE; - GvIO(last_in_stab)->lines++; - } - else if (GvIO(last_in_stab)->flags & IOf_ARGV) { - if (!fp) - goto doeval; /* first time through */ - fp = nextargv(last_in_stab); - if (fp) - goto keepgoing; - (void)do_close(last_in_stab,FALSE); - GvIO(last_in_stab)->flags |= IOf_START; - retstr = &sv_undef; - match = FALSE; - } - else { - retstr = &sv_undef; - match = FALSE; - } - goto flipmaybe; - case COPo_EVAL: - break; - case COPo_UNFLIP: - while (tmps_max > tmps_base) { /* clean up after last oldeval */ - sv_free(tmps_list[tmps_max]); - tmps_list[tmps_max--] = Nullsv; - } - newsp = oldeval(Nullsv,op->cop_expr,gimme && (opflags & COPf_TERM),sp); - st = stack->av_array; /* possibly reallocated */ - retstr = st[newsp]; - match = SvTRUE(retstr); - if (op->cop_expr->arg_type == OP_FLIP) /* undid itself? */ - opflags = copyopt(op,op->cop_expr[3].arg_ptr.arg_op); - goto maybe; - case COPo_CHOP: - retstr = GvSV(op->cop_stab); - newsp = -2; - match = (retstr->sv_cur != 0); - tmps = SvPV(retstr); - tmps += retstr->sv_cur - match; - sv_setpvn(&strchop,tmps,match); - *tmps = '\0'; - retstr->sv_nok = 0; - retstr->sv_cur = tmps - retstr->sv_ptr; - SvSETMAGIC(retstr); - retstr = &strchop; - goto flipmaybe; - case COPo_ARRAY: - match = op->cop_short->sv_u.sv_useful; /* just to get register */ - - if (match < 0) { /* first time through here? */ - ar = GvAVn(op->cop_expr[1].arg_ptr.arg_stab); - aryoptsave = savestack->av_fill; - save_sptr(&GvSV(op->cop_stab)); - save_long(&op->cop_short->sv_u.sv_useful); - } - else { - ar = GvAV(op->cop_expr[1].arg_ptr.arg_stab); - if (op->cop_type != COP_WHILE && savestack->av_fill > firstsave) - leave_scope(firstsave); - } - - if (match >= ar->av_fill) { /* we're in LAST, probably */ - if (match < 0 && /* er, probably not... */ - savestack->av_fill > aryoptsave) - leave_scope(aryoptsave); - retstr = &sv_undef; - op->cop_short->sv_u.sv_useful = -1; /* actually redundant */ - match = FALSE; - } - else { - match++; - if (!(retstr = ar->av_array[match])) - retstr = av_fetch(ar,match,TRUE); - GvSV(op->cop_stab) = retstr; - op->cop_short->sv_u.sv_useful = match; - match = TRUE; - } - newsp = -2; - goto maybe; - case COPo_D1: - break; - case COPo_D0: - if (DBsingle->sv_u.sv_nv != 0) - break; - if (DBsignal->sv_u.sv_nv != 0) - break; - if (DBtrace->sv_u.sv_nv != 0) - break; - goto next_op; - } - - /* we have tried to make this normal case as abnormal as possible */ - - doeval: - if (gimme == G_ARRAY) { - lastretstr = Nullsv; - lastspbase = sp; - lastsize = newsp - sp; - if (lastsize < 0) - lastsize = 0; - } - else - lastretstr = retstr; - while (tmps_max > tmps_base) { /* clean up after last oldeval */ - sv_free(tmps_list[tmps_max]); - tmps_list[tmps_max--] = Nullsv; - } - newsp = oldeval(Nullsv,op->cop_expr, - gimme && (opflags & COPf_TERM) && op->cop_type == COP_EXPR && - !op->uop.acop_expr, - sp); - st = stack->av_array; /* possibly reallocated */ - retstr = st[newsp]; - if (newsp > sp && retstr) - match = SvTRUE(retstr); - else - match = FALSE; - goto maybe; - - /* if flipflop was true, flop it */ - - flipmaybe: - if (match && opflags & COPf_FLIP) { - while (tmps_max > tmps_base) { /* clean up after last oldeval */ - sv_free(tmps_list[tmps_max]); - tmps_list[tmps_max--] = Nullsv; - } - if (op->cop_expr->arg_type == OP_FLOP) { /* currently toggled? */ - newsp = oldeval(Nullsv,op->cop_expr,G_SCALAR,sp);/*let oldeval undo it*/ - opflags = copyopt(op,op->cop_expr[3].arg_ptr.arg_op); - } - else { - newsp = oldeval(Nullsv,op->cop_expr,G_SCALAR,sp);/* let oldeval do it */ - if (op->cop_expr->arg_type == OP_FLOP) /* still toggled? */ - opflags = copyopt(op,op->cop_expr[4].arg_ptr.arg_op); - } - } - else if (opflags & COPf_FLIP) { - if (op->cop_expr->arg_type == OP_FLOP) { /* currently toggled? */ - match = TRUE; /* force on */ - } - } - - /* at this point, match says whether our expression was true */ - - maybe: - if (opflags & COPf_INVERT) - match = !match; - if (!match) - goto next_op; - } -#ifdef TAINT - tainted = 0; /* modifier doesn't affect regular expression */ -#endif diff --git a/op.c b/op.c index 86a870ebdc..6f4a46a2a7 100644 --- a/op.c +++ b/op.c @@ -303,14 +303,16 @@ void op_free(op) OP *op; { - register OP *kid; + register OP *kid, *nextkid; if (!op) return; if (op->op_flags & OPf_KIDS) { - for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) + for (kid = cUNOP->op_first; kid; kid = nextkid) { + nextkid = kid->op_sibling; /* Get before next freeing kid */ op_free(kid); + } } @@ -557,7 +559,8 @@ OP *op; case OP_RV2SV: case OP_RV2AV: case OP_RV2HV: - if (!(op->op_flags & OPf_INTRO)) + if (!(op->op_flags & OPf_INTRO) && + (!op->op_sibling || op->op_sibling->op_type != OP_READLINE)) useless = "a variable"; break; @@ -706,7 +709,7 @@ OP *op; curcop = &compiling; } op->op_flags &= ~OPf_PARENS; - if (needblockscope) + if (hints & HINT_BLOCK_SCOPE) op->op_flags |= OPf_PARENS; } else @@ -745,7 +748,8 @@ I32 type; if ((type == OP_UNDEF) && !(op->op_flags & OPf_STACKED)) { op->op_type = OP_RV2CV; /* entersubr => rv2cv */ op->op_ppaddr = ppaddr[OP_RV2CV]; - null(cUNOP->op_first); /* disable pushmark */ + assert(cUNOP->op_first->op_type == OP_NULL); + null(((LISTOP*)cUNOP->op_first)->op_first); /* disable pushmark */ break; } /* FALL THROUGH */ @@ -764,6 +768,7 @@ I32 type; case OP_RV2AV: case OP_RV2HV: case OP_RV2GV: + op->op_private = (hints & HINT_STRICT_REFS); ref(cUNOP->op_first, op->op_type); /* FALL THROUGH */ case OP_AASSIGN: @@ -774,8 +779,9 @@ I32 type; modcount = 10000; break; case OP_RV2SV: + op->op_private = (hints & HINT_STRICT_REFS); if (type == OP_RV2AV || type == OP_RV2HV) - op->op_private = type; + op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : OPpDEREF_HV); ref(cUNOP->op_first, op->op_type); /* FALL THROUGH */ case OP_PADSV: @@ -812,8 +818,9 @@ I32 type; case OP_AELEM: case OP_HELEM: ref(cBINOP->op_first, op->op_type); + op->op_private = (hints & HINT_STRICT_REFS); if (type == OP_RV2AV || type == OP_RV2HV) - op->op_private = type; + op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : OPpDEREF_HV); break; case OP_SCOPE: @@ -869,7 +876,8 @@ I32 type; && !(op->op_flags & (OPf_STACKED|OPf_PARENS))) { op->op_type = OP_RV2CV; /* entersubr => rv2cv */ op->op_ppaddr = ppaddr[OP_RV2CV]; - null(cUNOP->op_first); + assert(cUNOP->op_first->op_type == OP_NULL); + null(((LISTOP*)cUNOP->op_first)->op_first); /* disable pushmark */ } break; @@ -878,8 +886,9 @@ I32 type; ref(kid, type); break; case OP_RV2SV: + op->op_private = (hints & HINT_STRICT_REFS); if (type == OP_RV2AV || type == OP_RV2HV) - op->op_private = type; + op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : OPpDEREF_HV); ref(cUNOP->op_first, op->op_type); break; @@ -888,6 +897,7 @@ I32 type; op->op_flags |= OPf_LVAL; /* FALL THROUGH */ case OP_RV2GV: + op->op_private = (hints & HINT_STRICT_REFS); ref(cUNOP->op_first, op->op_type); break; @@ -905,8 +915,10 @@ I32 type; case OP_AELEM: case OP_HELEM: ref(cBINOP->op_first, op->op_type); + op->op_private = (hints & HINT_STRICT_REFS); if (type == OP_RV2AV || type == OP_RV2HV || type == OP_REFGEN) { - op->op_private = type; + op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : + type == OP_RV2HV ? OPpDEREF_HV : 0); op->op_flags |= OPf_LVAL; } break; @@ -1072,7 +1084,7 @@ OP *o; if (o->op_type == OP_LIST) { o = convert(OP_JOIN, 0, prepend_elem(OP_LIST, - newSVREF(newGVOP(OP_GV, 0, gv_fetchpv(";", TRUE))), + newSVREF(newGVOP(OP_GV, 0, gv_fetchpv(";", TRUE, SVt_PV))), o)); } return o; @@ -1091,6 +1103,9 @@ register OP *o; if (opargs[type] & OA_TARGET) o->op_targ = pad_alloc(type, SVs_PADTMP); + if ((opargs[type] & OA_OTHERINT) && (hints & HINT_INTEGER)) + o->op_ppaddr = ppaddr[++(o->op_type)]; + if (!(opargs[type] & OA_FOLDCONST)) goto nope; @@ -1107,8 +1122,12 @@ register OP *o; o->op_next = 0; op = curop; run(); - if (o->op_targ && *stack_sp == PAD_SV(o->op_targ)) + if (o->op_targ && *stack_sp == PAD_SV(o->op_targ)) /* grab pad temp? */ pad_swipe(o->op_targ); + else if (SvTEMP(*stack_sp)) { /* grab mortal temp? */ + SvREFCNT_inc(*stack_sp); + SvTEMP_off(*stack_sp); + } op_free(o); if (type == OP_RV2GV) return newGVOP(OP_GV, 0, *(stack_sp--)); @@ -1118,18 +1137,21 @@ register OP *o; nope: if (!(opargs[type] & OA_OTHERINT)) return o; - if (!(o->op_flags & OPf_KIDS)) - return o; - for (curop = ((UNOP*)o)->op_first; curop; curop = curop->op_sibling) { - if (curop->op_type == OP_CONST) { - if (SvIOK(((SVOP*)curop)->op_sv)) + if (!(hints & HINT_INTEGER)) { + if (!(o->op_flags & OPf_KIDS)) + return o; + + for (curop = ((UNOP*)o)->op_first; curop; curop = curop->op_sibling) { + if (curop->op_type == OP_CONST) { + if (SvIOK(((SVOP*)curop)->op_sv)) + continue; + return o; + } + if (opargs[curop->op_type] & OA_RETINTEGER) continue; return o; } - if (opargs[curop->op_type] & OA_RETINTEGER) - continue; - return o; } o->op_ppaddr = ppaddr[++(o->op_type)]; @@ -1554,6 +1576,8 @@ OP *repl; if (pm->op_pmshort && (pm->op_pmflags & PMf_SCANFIRST)) fbm_compile(pm->op_pmshort, pm->op_pmflags & PMf_FOLD); pm->op_pmregexp = regcomp(p, p + plen, pm->op_pmflags & PMf_FOLD); + if (strEQ("\\s+", pm->op_pmregexp->precomp)) + pm->op_pmflags |= PMf_WHITE; hoistmust(pm); op_free(expr); } @@ -1746,6 +1770,62 @@ OP *op; expect = XSTATE; } +void +hint(aver, id, arg) +int aver; +OP *id; +OP *arg; +{ + SV *sv; + U32 bits = 0; + SV **sp = 0; + SV **mark = 0; + + if (arg) { + OP* curop = LINKLIST(arg); + arg->op_next = 0; + op = curop; + run(); + sp = stack_sp; + mark = stack_base + POPMARK; + stack_sp = mark; /* Might as well reset sp now. */ + } + if (id) { + STRLEN len; + char *name; + sv = ((SVOP*)id)->op_sv; + name = SvPV(sv, len); + + if (strEQ(name, "integer")) + bits = HINT_INTEGER; + else if (strEQ(name, "strict")) { + if (arg) { + while (++mark <= sp) { + if (strEQ(SvPV(*mark,na), "refs")) + bits |= HINT_STRICT_REFS; + else if (strEQ(SvPV(*mark,na), "subs")) + bits |= HINT_STRICT_SUBS; + else if (strEQ(SvPV(*mark,na), "vars")) + bits |= HINT_STRICT_VARS; + } + } + else + bits = HINT_STRICT_REFS|HINT_STRICT_SUBS|HINT_STRICT_VARS; + } + + if (aver) + hints |= bits; + else + hints &= ~bits; + + op_free(id); + } + if (arg) + op_free(arg); + copline = NOLINE; + expect = XSTATE; +} + HV* fetch_stash(sv,create) SV *sv; @@ -1756,7 +1836,7 @@ I32 create; GV *tmpgv; char *name = SvPV(sv, na); sprintf(tmpbuf,"%s::",name); - tmpgv = gv_fetchpv(tmpbuf,create); + tmpgv = gv_fetchpv(tmpbuf,create, SVt_PVHV); if (!tmpgv) return 0; if (!GvHV(tmpgv)) @@ -1929,7 +2009,7 @@ OP *op; if (label) { cop->cop_label = label; - needblockscope = TRUE; + hints |= HINT_BLOCK_SCOPE; } cop->cop_seq = cop_seqmax++; @@ -2187,8 +2267,8 @@ OP *cont; if (expr) { op = newLOGOP(OP_AND, 0, expr, scalar(listop)); - if (op == expr) { /* oops, it's a while (0) */ - op_free(expr); + if (op == expr && op->op_type == OP_CONST && !SvTRUE(cSVOP->op_sv)) { + op_free(expr); /* oops, it's a while (0) */ op_free((OP*)loop); return Nullop; /* (listop already freed by newLOGOP) */ } @@ -2237,16 +2317,22 @@ newFOROP(I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *block,OP *cont #endif /* STANDARD_C */ { LOOP *loop; + int padoff = 0; copline = forline; if (sv) { - if (sv->op_type == OP_RV2SV) { + if (sv->op_type == OP_RV2SV) { /* symbol table variable */ OP *op = sv; sv = cUNOP->op_first; sv->op_next = sv; cUNOP->op_first = Nullop; op_free(op); } + else if (sv->op_type == OP_PADSV) { /* private variable */ + padoff = sv->op_targ; + op_free(sv); + sv = Nullop; + } else croak("Can't use %s for loop variable", op_name[sv->op_type]); } @@ -2255,8 +2341,11 @@ newFOROP(I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *block,OP *cont } loop = (LOOP*)list(convert(OP_ENTERITER, 0, append_elem(OP_LIST, force_list(expr), scalar(sv)))); - return newSTATEOP(0, label, newWHILEOP(flags, 1, - loop, newOP(OP_ITER, 0), block, cont)); + assert(!loop->op_next); + Renew(loop, 1, LOOP); + loop->op_targ = padoff; + return newSTATEOP(0, label, newWHILEOP(flags, 1, loop, + newOP(OP_ITER, 0), block, cont)); } OP* @@ -2274,12 +2363,12 @@ OP* label; label = newUNOP(OP_REFGEN, 0, ref(label, OP_REFGEN)); op = newUNOP(type, OPf_STACKED, label); } - needblockscope = TRUE; + hints |= HINT_BLOCK_SCOPE; return op; } void -cv_clear(cv) +cv_undef(cv) CV *cv; { if (!CvUSERSUB(cv) && CvROOT(cv)) { @@ -2302,9 +2391,9 @@ CV *cv; while (i > 0) { SV** svp = av_fetch(CvPADLIST(cv), i--, FALSE); if (svp) - av_free((AV*)*svp); + sv_free(*svp); } - av_free((AV*)CvPADLIST(cv)); + sv_free(CvPADLIST(cv)); } SvREFCNT_dec(CvGV(cv)); LEAVE; @@ -2319,7 +2408,7 @@ OP *block; { register CV *cv; char *name = SvPVx(cSVOP->op_sv, na); - GV *gv = gv_fetchpv(name,2); + GV *gv = gv_fetchpv(name,2, SVt_PVCV); AV* av; char *s; @@ -2387,7 +2476,7 @@ OP *block; SAVEI32(perldb); if (!beginav) beginav = newAV(); - av_push(beginav, cv); + av_push(beginav, (SV *)cv); DEBUG_x( dump_sub(gv) ); rs = nrs; rslen = nrslen; @@ -2434,7 +2523,7 @@ I32 (*subaddr)(); char *filename; { register CV *cv; - GV *gv = gv_fetchpv(name,2); + GV *gv = gv_fetchpv(name,2, SVt_PVCV); char *s; sub_generation++; @@ -2489,7 +2578,7 @@ OP *block; name = SvPVx(cSVOP->op_sv, na); else name = "STDOUT"; - gv = gv_fetchpv(name,TRUE); + gv = gv_fetchpv(name,TRUE, SVt_PVFM); if (cv = GvFORM(gv)) { if (dowarn) { line_t oldline = curcop->cop_line; @@ -2706,7 +2795,7 @@ OP *op; if (cLISTOP->op_first->op_type == OP_STUB) { op_free(op); op = newUNOP(type, OPf_SPECIAL, - newGVOP(OP_GV, 0, gv_fetchpv("main'ARGV", TRUE))); + newGVOP(OP_GV, 0, gv_fetchpv("main'ARGV", TRUE, SVt_PVAV))); } return ck_fun(op); } @@ -2717,7 +2806,7 @@ OP * ck_eval(op) OP *op; { - needblockscope = TRUE; + hints |= HINT_BLOCK_SCOPE; if (op->op_flags & OPf_KIDS) { SVOP *kid = (SVOP*)cUNOP->op_first; @@ -2785,10 +2874,12 @@ ck_rvconst(op) register OP *op; { SVOP *kid = (SVOP*)cUNOP->op_first; + int iscv = (op->op_type==OP_RV2CV); + if (kid->op_type == OP_CONST) { kid->op_type = OP_GV; kid->op_sv = SvREFCNT_inc(gv_fetchpv(SvPVx(kid->op_sv, na), - 1+(op->op_type==OP_RV2CV))); + 1+iscv, iscv ? SVt_PVCV : SVt_PVGV)); } return op; } @@ -2814,7 +2905,7 @@ OP *op; if (kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE)) { OP *newop = newGVOP(type, OPf_SPECIAL, - gv_fetchpv(SvPVx(kid->op_sv, na), TRUE)); + gv_fetchpv(SvPVx(kid->op_sv, na), TRUE, SVt_PVIO)); op_free(op); return newop; } @@ -2822,7 +2913,8 @@ OP *op; else { op_free(op); if (type == OP_FTTTY) - return newGVOP(type, OPf_SPECIAL, gv_fetchpv("main'STDIN", TRUE)); + return newGVOP(type, OPf_SPECIAL, gv_fetchpv("main'STDIN", TRUE, + SVt_PVIO)); else return newUNOP(type, 0, newSVREF(newGVOP(OP_GV, 0, defgv))); } @@ -2876,7 +2968,7 @@ OP *op; (kid->op_private & OPpCONST_BARE)) { char *name = SvPVx(((SVOP*)kid)->op_sv, na); OP *newop = newAVREF(newGVOP(OP_GV, 0, - gv_fetchpv(name, TRUE) )); + gv_fetchpv(name, TRUE, SVt_PVAV) )); if (dowarn) warn("Array @%s missing the @ in argument %d of %s()", name, numargs, op_name[op->op_type]); @@ -2894,7 +2986,7 @@ OP *op; (kid->op_private & OPpCONST_BARE)) { char *name = SvPVx(((SVOP*)kid)->op_sv, na); OP *newop = newHVREF(newGVOP(OP_GV, 0, - gv_fetchpv(name, TRUE) )); + gv_fetchpv(name, TRUE, SVt_PVHV) )); if (dowarn) warn("Hash %%%s missing the %% in argument %d of %s()", name, numargs, op_name[op->op_type]); @@ -2923,7 +3015,8 @@ OP *op; if (kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE)) { OP *newop = newGVOP(OP_GV, 0, - gv_fetchpv(SvPVx(((SVOP*)kid)->op_sv, na), TRUE) ); + gv_fetchpv(SvPVx(((SVOP*)kid)->op_sv, na), TRUE, + SVt_PVIO) ); op_free(kid); kid = newop; } @@ -3157,7 +3250,7 @@ OP *op; return newUNOP(type, 0, scalar(newUNOP(OP_RV2AV, 0, scalar(newGVOP(OP_GV, 0, - gv_fetchpv((subline ? "_" : "ARGV"), TRUE) ))))); + gv_fetchpv((subline ? "_" : "ARGV"), TRUE, SVt_PVAV) ))))); } return scalar(modkids(ck_fun(op), type)); } @@ -3213,8 +3306,10 @@ OP *op; kid = kid->op_sibling; op_free(cLISTOP->op_first); cLISTOP->op_first = kid; - if (!kid) + if (!kid) { cLISTOP->op_first = kid = newSVOP(OP_CONST, 0, newSVpv(" ", 1)); + cLISTOP->op_last = kid; /* There was only one element previously */ + } if (kid->op_type != OP_MATCH) { OP *sibl = kid->op_sibling; @@ -3262,9 +3357,9 @@ OP *op; if (o->op_type == OP_RV2CV) null(o); /* disable rv2cv */ - op->op_private = 0; + op->op_private = (hints & HINT_STRICT_REFS); if (perldb && curstash != debstash) - op->op_private |= OPpSUBR_DB; + op->op_private |= OPpDEREF_DB; return op; } @@ -3321,7 +3416,7 @@ register OP* op; case OP_GV: if (op->op_next->op_type == OP_RV2SV) { - if (op->op_next->op_private < OP_RV2GV) { + if (!(op->op_next->op_private & (OPpDEREF_HV|OPpDEREF_AV))) { null(op->op_next); op->op_flags |= op->op_next->op_flags & OPf_INTRO; op->op_next = op->op_next->op_next; @@ -3334,7 +3429,7 @@ register OP* op; I32 i; if (pop->op_type == OP_CONST && pop->op_next->op_type == OP_AELEM && - pop->op_next->op_private < OP_RV2GV && + !(pop->op_next->op_private & (OPpDEREF_HV|OPpDEREF_AV)) && !(pop->op_next->op_flags & OPf_INTRO) && (i = SvIV(((SVOP*)pop)->op_sv)) <= 255 && i >= 0) diff --git a/op.h b/op.h index c230dd0b99..b988f31d63 100644 --- a/op.h +++ b/op.h @@ -42,7 +42,7 @@ typedef U16 PADOFFSET; char op_flags; \ char op_private; -#define GIMME (op->op_flags & OPf_KNOW ? op->op_flags & OPf_LIST : getgimme(op)) +#define GIMME (op->op_flags & OPf_KNOW ? op->op_flags & OPf_LIST : cxstack[cxstack_ix].blk_gimme) /* Public flags */ #define OPf_LIST 1 /* Do operator in list context. */ @@ -75,8 +75,11 @@ typedef U16 PADOFFSET; /* Private for OP_REPEAT */ #define OPpREPEAT_DOLIST 1 /* List replication. */ -/* Private for OP_SUBR */ -#define OPpSUBR_DB 1 /* Debug subroutine. */ +/* Private for OP_ENTERSUBR, OP_RV2?V, OP_?ELEM */ + /* (lower bits carry hints) */ +#define OPpDEREF_DB 32 /* Debug subroutine. */ +#define OPpDEREF_AV 64 /* Want ref to AV. */ +#define OPpDEREF_HV 128 /* Want ref to HV. */ /* Private for OP_CONST */ #define OPpCONST_BARE 1 /* Was a bare word (filehandle?). */ @@ -146,6 +149,7 @@ struct pmop { #define PMf_GLOBAL 256 /* pattern had a g modifier */ #define PMf_RUNTIME 512 /* pattern coming in on the stack */ #define PMf_EVAL 1024 /* evaluating replacement as expr */ +#define PMf_WHITE 2048 /* pattern is \s+ */ struct svop { BASEOP diff --git a/opcode.h b/opcode.h index aea0a8af36..dbcd3ffadf 100644 --- a/opcode.h +++ b/opcode.h @@ -39,286 +39,303 @@ typedef enum { OP_UNDEF, /* 37 */ OP_STUDY, /* 38 */ OP_PREINC, /* 39 */ - OP_PREDEC, /* 40 */ - OP_POSTINC, /* 41 */ - OP_POSTDEC, /* 42 */ - OP_POW, /* 43 */ - OP_MULTIPLY, /* 44 */ - OP_DIVIDE, /* 45 */ - OP_MODULO, /* 46 */ - OP_REPEAT, /* 47 */ - OP_ADD, /* 48 */ - OP_INTADD, /* 49 */ - OP_SUBTRACT, /* 50 */ - OP_CONCAT, /* 51 */ - OP_LEFT_SHIFT, /* 52 */ - OP_RIGHT_SHIFT, /* 53 */ - OP_LT, /* 54 */ - OP_GT, /* 55 */ - OP_LE, /* 56 */ - OP_GE, /* 57 */ - OP_EQ, /* 58 */ - OP_NE, /* 59 */ - OP_NCMP, /* 60 */ - OP_SLT, /* 61 */ - OP_SGT, /* 62 */ - OP_SLE, /* 63 */ - OP_SGE, /* 64 */ - OP_SEQ, /* 65 */ - OP_SNE, /* 66 */ - OP_SCMP, /* 67 */ - OP_BIT_AND, /* 68 */ - OP_XOR, /* 69 */ - OP_BIT_OR, /* 70 */ - OP_NEGATE, /* 71 */ - OP_NOT, /* 72 */ - OP_COMPLEMENT, /* 73 */ - OP_ATAN2, /* 74 */ - OP_SIN, /* 75 */ - OP_COS, /* 76 */ - OP_RAND, /* 77 */ - OP_SRAND, /* 78 */ - OP_EXP, /* 79 */ - OP_LOG, /* 80 */ - OP_SQRT, /* 81 */ - OP_INT, /* 82 */ - OP_HEX, /* 83 */ - OP_OCT, /* 84 */ - OP_ABS, /* 85 */ - OP_LENGTH, /* 86 */ - OP_SUBSTR, /* 87 */ - OP_VEC, /* 88 */ - OP_INDEX, /* 89 */ - OP_RINDEX, /* 90 */ - OP_SPRINTF, /* 91 */ - OP_FORMLINE, /* 92 */ - OP_ORD, /* 93 */ - OP_CHR, /* 94 */ - OP_CRYPT, /* 95 */ - OP_UCFIRST, /* 96 */ - OP_LCFIRST, /* 97 */ - OP_UC, /* 98 */ - OP_LC, /* 99 */ - OP_RV2AV, /* 100 */ - OP_AELEMFAST, /* 101 */ - OP_AELEM, /* 102 */ - OP_ASLICE, /* 103 */ - OP_EACH, /* 104 */ - OP_VALUES, /* 105 */ - OP_KEYS, /* 106 */ - OP_DELETE, /* 107 */ - OP_RV2HV, /* 108 */ - OP_HELEM, /* 109 */ - OP_HSLICE, /* 110 */ - OP_UNPACK, /* 111 */ - OP_PACK, /* 112 */ - OP_SPLIT, /* 113 */ - OP_JOIN, /* 114 */ - OP_LIST, /* 115 */ - OP_LSLICE, /* 116 */ - OP_ANONLIST, /* 117 */ - OP_ANONHASH, /* 118 */ - OP_SPLICE, /* 119 */ - OP_PUSH, /* 120 */ - OP_POP, /* 121 */ - OP_SHIFT, /* 122 */ - OP_UNSHIFT, /* 123 */ - OP_SORT, /* 124 */ - OP_REVERSE, /* 125 */ - OP_GREPSTART, /* 126 */ - OP_GREPWHILE, /* 127 */ - OP_RANGE, /* 128 */ - OP_FLIP, /* 129 */ - OP_FLOP, /* 130 */ - OP_AND, /* 131 */ - OP_OR, /* 132 */ - OP_COND_EXPR, /* 133 */ - OP_ANDASSIGN, /* 134 */ - OP_ORASSIGN, /* 135 */ - OP_METHOD, /* 136 */ - OP_ENTERSUBR, /* 137 */ - OP_LEAVESUBR, /* 138 */ - OP_CALLER, /* 139 */ - OP_WARN, /* 140 */ - OP_DIE, /* 141 */ - OP_RESET, /* 142 */ - OP_LINESEQ, /* 143 */ - OP_NEXTSTATE, /* 144 */ - OP_DBSTATE, /* 145 */ - OP_UNSTACK, /* 146 */ - OP_ENTER, /* 147 */ - OP_LEAVE, /* 148 */ - OP_SCOPE, /* 149 */ - OP_ENTERITER, /* 150 */ - OP_ITER, /* 151 */ - OP_ENTERLOOP, /* 152 */ - OP_LEAVELOOP, /* 153 */ - OP_RETURN, /* 154 */ - OP_LAST, /* 155 */ - OP_NEXT, /* 156 */ - OP_REDO, /* 157 */ - OP_DUMP, /* 158 */ - OP_GOTO, /* 159 */ - OP_EXIT, /* 160 */ - OP_NSWITCH, /* 161 */ - OP_CSWITCH, /* 162 */ - OP_OPEN, /* 163 */ - OP_CLOSE, /* 164 */ - OP_PIPE_OP, /* 165 */ - OP_FILENO, /* 166 */ - OP_UMASK, /* 167 */ - OP_BINMODE, /* 168 */ - OP_TIE, /* 169 */ - OP_UNTIE, /* 170 */ - OP_DBMOPEN, /* 171 */ - OP_DBMCLOSE, /* 172 */ - OP_SSELECT, /* 173 */ - OP_SELECT, /* 174 */ - OP_GETC, /* 175 */ - OP_READ, /* 176 */ - OP_ENTERWRITE, /* 177 */ - OP_LEAVEWRITE, /* 178 */ - OP_PRTF, /* 179 */ - OP_PRINT, /* 180 */ - OP_SYSREAD, /* 181 */ - OP_SYSWRITE, /* 182 */ - OP_SEND, /* 183 */ - OP_RECV, /* 184 */ - OP_EOF, /* 185 */ - OP_TELL, /* 186 */ - OP_SEEK, /* 187 */ - OP_TRUNCATE, /* 188 */ - OP_FCNTL, /* 189 */ - OP_IOCTL, /* 190 */ - OP_FLOCK, /* 191 */ - OP_SOCKET, /* 192 */ - OP_SOCKPAIR, /* 193 */ - OP_BIND, /* 194 */ - OP_CONNECT, /* 195 */ - OP_LISTEN, /* 196 */ - OP_ACCEPT, /* 197 */ - OP_SHUTDOWN, /* 198 */ - OP_GSOCKOPT, /* 199 */ - OP_SSOCKOPT, /* 200 */ - OP_GETSOCKNAME, /* 201 */ - OP_GETPEERNAME, /* 202 */ - OP_LSTAT, /* 203 */ - OP_STAT, /* 204 */ - OP_FTRREAD, /* 205 */ - OP_FTRWRITE, /* 206 */ - OP_FTREXEC, /* 207 */ - OP_FTEREAD, /* 208 */ - OP_FTEWRITE, /* 209 */ - OP_FTEEXEC, /* 210 */ - OP_FTIS, /* 211 */ - OP_FTEOWNED, /* 212 */ - OP_FTROWNED, /* 213 */ - OP_FTZERO, /* 214 */ - OP_FTSIZE, /* 215 */ - OP_FTMTIME, /* 216 */ - OP_FTATIME, /* 217 */ - OP_FTCTIME, /* 218 */ - OP_FTSOCK, /* 219 */ - OP_FTCHR, /* 220 */ - OP_FTBLK, /* 221 */ - OP_FTFILE, /* 222 */ - OP_FTDIR, /* 223 */ - OP_FTPIPE, /* 224 */ - OP_FTLINK, /* 225 */ - OP_FTSUID, /* 226 */ - OP_FTSGID, /* 227 */ - OP_FTSVTX, /* 228 */ - OP_FTTTY, /* 229 */ - OP_FTTEXT, /* 230 */ - OP_FTBINARY, /* 231 */ - OP_CHDIR, /* 232 */ - OP_CHOWN, /* 233 */ - OP_CHROOT, /* 234 */ - OP_UNLINK, /* 235 */ - OP_CHMOD, /* 236 */ - OP_UTIME, /* 237 */ - OP_RENAME, /* 238 */ - OP_LINK, /* 239 */ - OP_SYMLINK, /* 240 */ - OP_READLINK, /* 241 */ - OP_MKDIR, /* 242 */ - OP_RMDIR, /* 243 */ - OP_OPEN_DIR, /* 244 */ - OP_READDIR, /* 245 */ - OP_TELLDIR, /* 246 */ - OP_SEEKDIR, /* 247 */ - OP_REWINDDIR, /* 248 */ - OP_CLOSEDIR, /* 249 */ - OP_FORK, /* 250 */ - OP_WAIT, /* 251 */ - OP_WAITPID, /* 252 */ - OP_SYSTEM, /* 253 */ - OP_EXEC, /* 254 */ - OP_KILL, /* 255 */ - OP_GETPPID, /* 256 */ - OP_GETPGRP, /* 257 */ - OP_SETPGRP, /* 258 */ - OP_GETPRIORITY, /* 259 */ - OP_SETPRIORITY, /* 260 */ - OP_TIME, /* 261 */ - OP_TMS, /* 262 */ - OP_LOCALTIME, /* 263 */ - OP_GMTIME, /* 264 */ - OP_ALARM, /* 265 */ - OP_SLEEP, /* 266 */ - OP_SHMGET, /* 267 */ - OP_SHMCTL, /* 268 */ - OP_SHMREAD, /* 269 */ - OP_SHMWRITE, /* 270 */ - OP_MSGGET, /* 271 */ - OP_MSGCTL, /* 272 */ - OP_MSGSND, /* 273 */ - OP_MSGRCV, /* 274 */ - OP_SEMGET, /* 275 */ - OP_SEMCTL, /* 276 */ - OP_SEMOP, /* 277 */ - OP_REQUIRE, /* 278 */ - OP_DOFILE, /* 279 */ - OP_ENTEREVAL, /* 280 */ - OP_LEAVEEVAL, /* 281 */ - OP_EVALONCE, /* 282 */ - OP_ENTERTRY, /* 283 */ - OP_LEAVETRY, /* 284 */ - OP_GHBYNAME, /* 285 */ - OP_GHBYADDR, /* 286 */ - OP_GHOSTENT, /* 287 */ - OP_GNBYNAME, /* 288 */ - OP_GNBYADDR, /* 289 */ - OP_GNETENT, /* 290 */ - OP_GPBYNAME, /* 291 */ - OP_GPBYNUMBER, /* 292 */ - OP_GPROTOENT, /* 293 */ - OP_GSBYNAME, /* 294 */ - OP_GSBYPORT, /* 295 */ - OP_GSERVENT, /* 296 */ - OP_SHOSTENT, /* 297 */ - OP_SNETENT, /* 298 */ - OP_SPROTOENT, /* 299 */ - OP_SSERVENT, /* 300 */ - OP_EHOSTENT, /* 301 */ - OP_ENETENT, /* 302 */ - OP_EPROTOENT, /* 303 */ - OP_ESERVENT, /* 304 */ - OP_GPWNAM, /* 305 */ - OP_GPWUID, /* 306 */ - OP_GPWENT, /* 307 */ - OP_SPWENT, /* 308 */ - OP_EPWENT, /* 309 */ - OP_GGRNAM, /* 310 */ - OP_GGRGID, /* 311 */ - OP_GGRENT, /* 312 */ - OP_SGRENT, /* 313 */ - OP_EGRENT, /* 314 */ - OP_GETLOGIN, /* 315 */ - OP_SYSCALL, /* 316 */ + OP_I_PREINC, /* 40 */ + OP_PREDEC, /* 41 */ + OP_I_PREDEC, /* 42 */ + OP_POSTINC, /* 43 */ + OP_I_POSTINC, /* 44 */ + OP_POSTDEC, /* 45 */ + OP_I_POSTDEC, /* 46 */ + OP_POW, /* 47 */ + OP_MULTIPLY, /* 48 */ + OP_I_MULTIPLY, /* 49 */ + OP_DIVIDE, /* 50 */ + OP_I_DIVIDE, /* 51 */ + OP_MODULO, /* 52 */ + OP_I_MODULO, /* 53 */ + OP_REPEAT, /* 54 */ + OP_ADD, /* 55 */ + OP_I_ADD, /* 56 */ + OP_SUBTRACT, /* 57 */ + OP_I_SUBTRACT, /* 58 */ + OP_CONCAT, /* 59 */ + OP_LEFT_SHIFT, /* 60 */ + OP_RIGHT_SHIFT, /* 61 */ + OP_LT, /* 62 */ + OP_I_LT, /* 63 */ + OP_GT, /* 64 */ + OP_I_GT, /* 65 */ + OP_LE, /* 66 */ + OP_I_LE, /* 67 */ + OP_GE, /* 68 */ + OP_I_GE, /* 69 */ + OP_EQ, /* 70 */ + OP_I_EQ, /* 71 */ + OP_NE, /* 72 */ + OP_I_NE, /* 73 */ + OP_NCMP, /* 74 */ + OP_I_NCMP, /* 75 */ + OP_SLT, /* 76 */ + OP_SGT, /* 77 */ + OP_SLE, /* 78 */ + OP_SGE, /* 79 */ + OP_SEQ, /* 80 */ + OP_SNE, /* 81 */ + OP_SCMP, /* 82 */ + OP_BIT_AND, /* 83 */ + OP_XOR, /* 84 */ + OP_BIT_OR, /* 85 */ + OP_NEGATE, /* 86 */ + OP_I_NEGATE, /* 87 */ + OP_NOT, /* 88 */ + OP_COMPLEMENT, /* 89 */ + OP_ATAN2, /* 90 */ + OP_SIN, /* 91 */ + OP_COS, /* 92 */ + OP_RAND, /* 93 */ + OP_SRAND, /* 94 */ + OP_EXP, /* 95 */ + OP_LOG, /* 96 */ + OP_SQRT, /* 97 */ + OP_INT, /* 98 */ + OP_HEX, /* 99 */ + OP_OCT, /* 100 */ + OP_ABS, /* 101 */ + OP_LENGTH, /* 102 */ + OP_SUBSTR, /* 103 */ + OP_VEC, /* 104 */ + OP_INDEX, /* 105 */ + OP_RINDEX, /* 106 */ + OP_SPRINTF, /* 107 */ + OP_FORMLINE, /* 108 */ + OP_ORD, /* 109 */ + OP_CHR, /* 110 */ + OP_CRYPT, /* 111 */ + OP_UCFIRST, /* 112 */ + OP_LCFIRST, /* 113 */ + OP_UC, /* 114 */ + OP_LC, /* 115 */ + OP_RV2AV, /* 116 */ + OP_AELEMFAST, /* 117 */ + OP_AELEM, /* 118 */ + OP_ASLICE, /* 119 */ + OP_EACH, /* 120 */ + OP_VALUES, /* 121 */ + OP_KEYS, /* 122 */ + OP_DELETE, /* 123 */ + OP_RV2HV, /* 124 */ + OP_HELEM, /* 125 */ + OP_HSLICE, /* 126 */ + OP_UNPACK, /* 127 */ + OP_PACK, /* 128 */ + OP_SPLIT, /* 129 */ + OP_JOIN, /* 130 */ + OP_LIST, /* 131 */ + OP_LSLICE, /* 132 */ + OP_ANONLIST, /* 133 */ + OP_ANONHASH, /* 134 */ + OP_SPLICE, /* 135 */ + OP_PUSH, /* 136 */ + OP_POP, /* 137 */ + OP_SHIFT, /* 138 */ + OP_UNSHIFT, /* 139 */ + OP_SORT, /* 140 */ + OP_REVERSE, /* 141 */ + OP_GREPSTART, /* 142 */ + OP_GREPWHILE, /* 143 */ + OP_RANGE, /* 144 */ + OP_FLIP, /* 145 */ + OP_FLOP, /* 146 */ + OP_AND, /* 147 */ + OP_OR, /* 148 */ + OP_COND_EXPR, /* 149 */ + OP_ANDASSIGN, /* 150 */ + OP_ORASSIGN, /* 151 */ + OP_METHOD, /* 152 */ + OP_ENTERSUBR, /* 153 */ + OP_LEAVESUBR, /* 154 */ + OP_CALLER, /* 155 */ + OP_WARN, /* 156 */ + OP_DIE, /* 157 */ + OP_RESET, /* 158 */ + OP_LINESEQ, /* 159 */ + OP_NEXTSTATE, /* 160 */ + OP_DBSTATE, /* 161 */ + OP_UNSTACK, /* 162 */ + OP_ENTER, /* 163 */ + OP_LEAVE, /* 164 */ + OP_SCOPE, /* 165 */ + OP_ENTERITER, /* 166 */ + OP_ITER, /* 167 */ + OP_ENTERLOOP, /* 168 */ + OP_LEAVELOOP, /* 169 */ + OP_RETURN, /* 170 */ + OP_LAST, /* 171 */ + OP_NEXT, /* 172 */ + OP_REDO, /* 173 */ + OP_DUMP, /* 174 */ + OP_GOTO, /* 175 */ + OP_EXIT, /* 176 */ + OP_NSWITCH, /* 177 */ + OP_CSWITCH, /* 178 */ + OP_OPEN, /* 179 */ + OP_CLOSE, /* 180 */ + OP_PIPE_OP, /* 181 */ + OP_FILENO, /* 182 */ + OP_UMASK, /* 183 */ + OP_BINMODE, /* 184 */ + OP_TIE, /* 185 */ + OP_UNTIE, /* 186 */ + OP_DBMOPEN, /* 187 */ + OP_DBMCLOSE, /* 188 */ + OP_SSELECT, /* 189 */ + OP_SELECT, /* 190 */ + OP_GETC, /* 191 */ + OP_READ, /* 192 */ + OP_ENTERWRITE, /* 193 */ + OP_LEAVEWRITE, /* 194 */ + OP_PRTF, /* 195 */ + OP_PRINT, /* 196 */ + OP_SYSREAD, /* 197 */ + OP_SYSWRITE, /* 198 */ + OP_SEND, /* 199 */ + OP_RECV, /* 200 */ + OP_EOF, /* 201 */ + OP_TELL, /* 202 */ + OP_SEEK, /* 203 */ + OP_TRUNCATE, /* 204 */ + OP_FCNTL, /* 205 */ + OP_IOCTL, /* 206 */ + OP_FLOCK, /* 207 */ + OP_SOCKET, /* 208 */ + OP_SOCKPAIR, /* 209 */ + OP_BIND, /* 210 */ + OP_CONNECT, /* 211 */ + OP_LISTEN, /* 212 */ + OP_ACCEPT, /* 213 */ + OP_SHUTDOWN, /* 214 */ + OP_GSOCKOPT, /* 215 */ + OP_SSOCKOPT, /* 216 */ + OP_GETSOCKNAME, /* 217 */ + OP_GETPEERNAME, /* 218 */ + OP_LSTAT, /* 219 */ + OP_STAT, /* 220 */ + OP_FTRREAD, /* 221 */ + OP_FTRWRITE, /* 222 */ + OP_FTREXEC, /* 223 */ + OP_FTEREAD, /* 224 */ + OP_FTEWRITE, /* 225 */ + OP_FTEEXEC, /* 226 */ + OP_FTIS, /* 227 */ + OP_FTEOWNED, /* 228 */ + OP_FTROWNED, /* 229 */ + OP_FTZERO, /* 230 */ + OP_FTSIZE, /* 231 */ + OP_FTMTIME, /* 232 */ + OP_FTATIME, /* 233 */ + OP_FTCTIME, /* 234 */ + OP_FTSOCK, /* 235 */ + OP_FTCHR, /* 236 */ + OP_FTBLK, /* 237 */ + OP_FTFILE, /* 238 */ + OP_FTDIR, /* 239 */ + OP_FTPIPE, /* 240 */ + OP_FTLINK, /* 241 */ + OP_FTSUID, /* 242 */ + OP_FTSGID, /* 243 */ + OP_FTSVTX, /* 244 */ + OP_FTTTY, /* 245 */ + OP_FTTEXT, /* 246 */ + OP_FTBINARY, /* 247 */ + OP_CHDIR, /* 248 */ + OP_CHOWN, /* 249 */ + OP_CHROOT, /* 250 */ + OP_UNLINK, /* 251 */ + OP_CHMOD, /* 252 */ + OP_UTIME, /* 253 */ + OP_RENAME, /* 254 */ + OP_LINK, /* 255 */ + OP_SYMLINK, /* 256 */ + OP_READLINK, /* 257 */ + OP_MKDIR, /* 258 */ + OP_RMDIR, /* 259 */ + OP_OPEN_DIR, /* 260 */ + OP_READDIR, /* 261 */ + OP_TELLDIR, /* 262 */ + OP_SEEKDIR, /* 263 */ + OP_REWINDDIR, /* 264 */ + OP_CLOSEDIR, /* 265 */ + OP_FORK, /* 266 */ + OP_WAIT, /* 267 */ + OP_WAITPID, /* 268 */ + OP_SYSTEM, /* 269 */ + OP_EXEC, /* 270 */ + OP_KILL, /* 271 */ + OP_GETPPID, /* 272 */ + OP_GETPGRP, /* 273 */ + OP_SETPGRP, /* 274 */ + OP_GETPRIORITY, /* 275 */ + OP_SETPRIORITY, /* 276 */ + OP_TIME, /* 277 */ + OP_TMS, /* 278 */ + OP_LOCALTIME, /* 279 */ + OP_GMTIME, /* 280 */ + OP_ALARM, /* 281 */ + OP_SLEEP, /* 282 */ + OP_SHMGET, /* 283 */ + OP_SHMCTL, /* 284 */ + OP_SHMREAD, /* 285 */ + OP_SHMWRITE, /* 286 */ + OP_MSGGET, /* 287 */ + OP_MSGCTL, /* 288 */ + OP_MSGSND, /* 289 */ + OP_MSGRCV, /* 290 */ + OP_SEMGET, /* 291 */ + OP_SEMCTL, /* 292 */ + OP_SEMOP, /* 293 */ + OP_REQUIRE, /* 294 */ + OP_DOFILE, /* 295 */ + OP_ENTEREVAL, /* 296 */ + OP_LEAVEEVAL, /* 297 */ + OP_EVALONCE, /* 298 */ + OP_ENTERTRY, /* 299 */ + OP_LEAVETRY, /* 300 */ + OP_GHBYNAME, /* 301 */ + OP_GHBYADDR, /* 302 */ + OP_GHOSTENT, /* 303 */ + OP_GNBYNAME, /* 304 */ + OP_GNBYADDR, /* 305 */ + OP_GNETENT, /* 306 */ + OP_GPBYNAME, /* 307 */ + OP_GPBYNUMBER, /* 308 */ + OP_GPROTOENT, /* 309 */ + OP_GSBYNAME, /* 310 */ + OP_GSBYPORT, /* 311 */ + OP_GSERVENT, /* 312 */ + OP_SHOSTENT, /* 313 */ + OP_SNETENT, /* 314 */ + OP_SPROTOENT, /* 315 */ + OP_SSERVENT, /* 316 */ + OP_EHOSTENT, /* 317 */ + OP_ENETENT, /* 318 */ + OP_EPROTOENT, /* 319 */ + OP_ESERVENT, /* 320 */ + OP_GPWNAM, /* 321 */ + OP_GPWUID, /* 322 */ + OP_GPWENT, /* 323 */ + OP_SPWENT, /* 324 */ + OP_EPWENT, /* 325 */ + OP_GGRNAM, /* 326 */ + OP_GGRGID, /* 327 */ + OP_GGRENT, /* 328 */ + OP_SGRENT, /* 329 */ + OP_EGRENT, /* 330 */ + OP_GETLOGIN, /* 331 */ + OP_SYSCALL, /* 332 */ + OP_max } opcode; -#define MAXO 317 +#define MAXO 333 #ifndef DOINIT extern char *op_name[]; @@ -364,27 +381,42 @@ char *op_name[] = { "undef operator", "study", "preincrement", + "integer preincrement", "predecrement", + "integer predecrement", "postincrement", + "integer postincrement", "postdecrement", + "integer postdecrement", "exponentiation", "multiplication", + "integer multiplication", "division", + "integer division", "modulus", + "integer modulus", "repeat", "addition", "integer addition", "subtraction", + "integer subtraction", "concatenation", "left bitshift", "right bitshift", "numeric lt", + "integer lt", "numeric gt", + "integer gt", "numeric le", + "integer le", "numeric ge", + "integer ge", "numeric eq", + "integer eq", "numeric ne", + "integer ne", "spaceship", + "integer spaceship", "string lt", "string gt", "string le", @@ -396,6 +428,7 @@ char *op_name[] = { "xor", "bit or", "negate", + "integer negate", "not", "1's complement", "atan2", @@ -712,27 +745,42 @@ OP * pp_defined P((void)); OP * pp_undef P((void)); OP * pp_study P((void)); OP * pp_preinc P((void)); +OP * pp_i_preinc P((void)); OP * pp_predec P((void)); +OP * pp_i_predec P((void)); OP * pp_postinc P((void)); +OP * pp_i_postinc P((void)); OP * pp_postdec P((void)); +OP * pp_i_postdec P((void)); OP * pp_pow P((void)); OP * pp_multiply P((void)); +OP * pp_i_multiply P((void)); OP * pp_divide P((void)); +OP * pp_i_divide P((void)); OP * pp_modulo P((void)); +OP * pp_i_modulo P((void)); OP * pp_repeat P((void)); OP * pp_add P((void)); -OP * pp_intadd P((void)); +OP * pp_i_add P((void)); OP * pp_subtract P((void)); +OP * pp_i_subtract P((void)); OP * pp_concat P((void)); OP * pp_left_shift P((void)); OP * pp_right_shift P((void)); OP * pp_lt P((void)); +OP * pp_i_lt P((void)); OP * pp_gt P((void)); +OP * pp_i_gt P((void)); OP * pp_le P((void)); +OP * pp_i_le P((void)); OP * pp_ge P((void)); +OP * pp_i_ge P((void)); OP * pp_eq P((void)); +OP * pp_i_eq P((void)); OP * pp_ne P((void)); +OP * pp_i_ne P((void)); OP * pp_ncmp P((void)); +OP * pp_i_ncmp P((void)); OP * pp_slt P((void)); OP * pp_sgt P((void)); OP * pp_sle P((void)); @@ -744,6 +792,7 @@ OP * pp_bit_and P((void)); OP * pp_xor P((void)); OP * pp_bit_or P((void)); OP * pp_negate P((void)); +OP * pp_i_negate P((void)); OP * pp_not P((void)); OP * pp_complement P((void)); OP * pp_atan2 P((void)); @@ -1034,27 +1083,42 @@ OP * (*ppaddr[])() = { pp_undef, pp_study, pp_preinc, + pp_i_preinc, pp_predec, + pp_i_predec, pp_postinc, + pp_i_postinc, pp_postdec, + pp_i_postdec, pp_pow, pp_multiply, + pp_i_multiply, pp_divide, + pp_i_divide, pp_modulo, + pp_i_modulo, pp_repeat, pp_add, - pp_intadd, + pp_i_add, pp_subtract, + pp_i_subtract, pp_concat, pp_left_shift, pp_right_shift, pp_lt, + pp_i_lt, pp_gt, + pp_i_gt, pp_le, + pp_i_le, pp_ge, + pp_i_ge, pp_eq, + pp_i_eq, pp_ne, + pp_i_ne, pp_ncmp, + pp_i_ncmp, pp_slt, pp_sgt, pp_sle, @@ -1066,6 +1130,7 @@ OP * (*ppaddr[])() = { pp_xor, pp_bit_or, pp_negate, + pp_i_negate, pp_not, pp_complement, pp_atan2, @@ -1358,27 +1423,42 @@ OP * (*check[])() = { ck_lfun, /* undef */ ck_fun, /* study */ ck_lfun, /* preinc */ + ck_lfun, /* i_preinc */ ck_lfun, /* predec */ + ck_lfun, /* i_predec */ ck_lfun, /* postinc */ + ck_lfun, /* i_postinc */ ck_lfun, /* postdec */ + ck_lfun, /* i_postdec */ ck_null, /* pow */ ck_null, /* multiply */ + ck_null, /* i_multiply */ ck_null, /* divide */ + ck_null, /* i_divide */ ck_null, /* modulo */ + ck_null, /* i_modulo */ ck_repeat, /* repeat */ ck_null, /* add */ - ck_null, /* intadd */ + ck_null, /* i_add */ ck_null, /* subtract */ + ck_null, /* i_subtract */ ck_concat, /* concat */ ck_null, /* left_shift */ ck_null, /* right_shift */ ck_null, /* lt */ + ck_null, /* i_lt */ ck_null, /* gt */ + ck_null, /* i_gt */ ck_null, /* le */ + ck_null, /* i_le */ ck_null, /* ge */ + ck_null, /* i_ge */ ck_null, /* eq */ + ck_null, /* i_eq */ ck_null, /* ne */ + ck_null, /* i_ne */ ck_null, /* ncmp */ + ck_null, /* i_ncmp */ ck_null, /* slt */ ck_null, /* sgt */ ck_null, /* sle */ @@ -1390,6 +1470,7 @@ OP * (*check[])() = { ck_null, /* xor */ ck_null, /* bit_or */ ck_null, /* negate */ + ck_null, /* i_negate */ ck_null, /* not */ ck_null, /* complement */ ck_fun, /* atan2 */ @@ -1681,28 +1762,43 @@ U32 opargs[] = { 0x00000914, /* defined */ 0x00000904, /* undef */ 0x0000090c, /* study */ - 0x00000104, /* preinc */ - 0x00000104, /* predec */ - 0x0000010c, /* postinc */ - 0x0000010c, /* postdec */ - 0x0000110e, /* pow */ - 0x0000110e, /* multiply */ - 0x0000110e, /* divide */ - 0x0000111e, /* modulo */ + 0x00000124, /* preinc */ + 0x00000114, /* i_preinc */ + 0x00000124, /* predec */ + 0x00000114, /* i_predec */ + 0x0000012c, /* postinc */ + 0x0000011c, /* i_postinc */ + 0x0000012c, /* postdec */ + 0x0000011c, /* i_postdec */ + 0x0000112e, /* pow */ + 0x0000112e, /* multiply */ + 0x0000111e, /* i_multiply */ + 0x0000112e, /* divide */ + 0x0000111e, /* i_divide */ + 0x0000113e, /* modulo */ + 0x0000111e, /* i_modulo */ 0x00001209, /* repeat */ 0x0000112e, /* add */ - 0x0000111e, /* intadd */ - 0x0000110e, /* subtract */ + 0x0000111e, /* i_add */ + 0x0000112e, /* subtract */ + 0x0000111e, /* i_subtract */ 0x0000110e, /* concat */ 0x0000111e, /* left_shift */ 0x0000111e, /* right_shift */ - 0x00001116, /* lt */ - 0x00001116, /* gt */ - 0x00001116, /* le */ - 0x00001116, /* ge */ - 0x00001116, /* eq */ - 0x00001116, /* ne */ - 0x0000111e, /* ncmp */ + 0x00001136, /* lt */ + 0x00001116, /* i_lt */ + 0x00001136, /* gt */ + 0x00001116, /* i_gt */ + 0x00001136, /* le */ + 0x00001116, /* i_le */ + 0x00001136, /* ge */ + 0x00001116, /* i_ge */ + 0x00001136, /* eq */ + 0x00001116, /* i_eq */ + 0x00001136, /* ne */ + 0x00001116, /* i_ne */ + 0x0000113e, /* ncmp */ + 0x0000111e, /* i_ncmp */ 0x00001116, /* slt */ 0x00001116, /* sgt */ 0x00001116, /* sle */ @@ -1713,7 +1809,8 @@ U32 opargs[] = { 0x0000110e, /* bit_and */ 0x0000110e, /* xor */ 0x0000110e, /* bit_or */ - 0x0000010e, /* negate */ + 0x0000012e, /* negate */ + 0x0000011e, /* i_negate */ 0x00000116, /* not */ 0x0000010e, /* complement */ 0x0000110e, /* atan2 */ diff --git a/opcode.pl b/opcode.pl index c3452ffb9f..953cb52e17 100755 --- a/opcode.pl +++ b/opcode.pl @@ -25,6 +25,7 @@ print "typedef enum {\n"; for (@ops) { print "\t", &tab(3,"OP_\U$_,"), "/* ", $i++, " */\n"; } +print "\t", &tab(3,"OP_max"), "\n"; print "} opcode;\n"; print "\n#define MAXO ", scalar @ops, "\n\n"; @@ -213,35 +214,50 @@ defined defined operator ck_rfun is S? undef undef operator ck_lfun s S? study study ck_fun st S? -preinc preincrement ck_lfun s S -predec predecrement ck_lfun s S -postinc postincrement ck_lfun st S -postdec postdecrement ck_lfun st S +preinc preincrement ck_lfun Is S +i_preinc integer preincrement ck_lfun is S +predec predecrement ck_lfun Is S +i_predec integer predecrement ck_lfun is S +postinc postincrement ck_lfun Ist S +i_postinc integer postincrement ck_lfun ist S +postdec postdecrement ck_lfun Ist S +i_postdec integer postdecrement ck_lfun ist S # Ordinary operators. -pow exponentiation ck_null fst S S +pow exponentiation ck_null Ifst S S -multiply multiplication ck_null fst S S -divide division ck_null fst S S -modulo modulus ck_null ifst S S +multiply multiplication ck_null Ifst S S +i_multiply integer multiplication ck_null ifst S S +divide division ck_null Ifst S S +i_divide integer division ck_null ifst S S +modulo modulus ck_null Iifst S S +i_modulo integer modulus ck_null ifst S S repeat repeat ck_repeat mt L S add addition ck_null Ifst S S -intadd integer addition ck_null ifst S S -subtract subtraction ck_null fst S S +i_add integer addition ck_null ifst S S +subtract subtraction ck_null Ifst S S +i_subtract integer subtraction ck_null ifst S S concat concatenation ck_concat fst S S left_shift left bitshift ck_null ifst S S right_shift right bitshift ck_null ifst S S -lt numeric lt ck_null ifs S S -gt numeric gt ck_null ifs S S -le numeric le ck_null ifs S S -ge numeric ge ck_null ifs S S -eq numeric eq ck_null ifs S S -ne numeric ne ck_null ifs S S -ncmp spaceship ck_null ifst S S +lt numeric lt ck_null Iifs S S +i_lt integer lt ck_null ifs S S +gt numeric gt ck_null Iifs S S +i_gt integer gt ck_null ifs S S +le numeric le ck_null Iifs S S +i_le integer le ck_null ifs S S +ge numeric ge ck_null Iifs S S +i_ge integer ge ck_null ifs S S +eq numeric eq ck_null Iifs S S +i_eq integer eq ck_null ifs S S +ne numeric ne ck_null Iifs S S +i_ne integer ne ck_null ifs S S +ncmp spaceship ck_null Iifst S S +i_ncmp integer spaceship ck_null ifst S S slt string lt ck_null ifs S S sgt string gt ck_null ifs S S @@ -255,7 +271,8 @@ bit_and bit and ck_null fst S S xor xor ck_null fst S S bit_or bit or ck_null fst S S -negate negate ck_null fst S +negate negate ck_null Ifst S +i_negate integer negate ck_null ifst S not not ck_null ifs S complement 1's complement ck_null fst S diff --git a/oy b/oy deleted file mode 100644 index 89564c530a..0000000000 --- a/oy +++ /dev/null @@ -1,16 +0,0 @@ - | LVALFUN sexpr %prec '(' - { $$ = redOP($1, 1, lv($2)); } - | LVALFUN - { $$ = redOP($1, 1, - lv(gv_to_op(A_STAB,defstab))); } - | SSELECT - { $$ = redOP(OP_SELECT, 0);} - | SSELECT WORD - { $$ = redOP(OP_SELECT, 1, - gv_to_op(A_WORD,newGV($2,TRUE))); - Safefree($2); $2 = Nullch; } - | SSELECT '(' handle ')' - { $$ = redOP(OP_SELECT, 1, $3); } - | SSELECT '(' sexpr csexpr csexpr csexpr ')' - { op4 = $6; - $$ = redOP(OP_SSELECT, 4, $3, $4, $5); } diff --git a/package b/package deleted file mode 100644 index 6c2785d2ba..0000000000 --- a/package +++ /dev/null @@ -1,21 +0,0 @@ - -void -package(OP *name) -{ char tmpbuf[256]; - GV *tmpgv; - - save_hptr(&curstash); - save_item(curstname); - sv_setpv(curstname,$2); - sprintf(tmpbuf,"'_%s",$2); - tmpgv = gv_fetchpv(tmpbuf,TRUE); - if (!GvHV(tmpgv)) - GvHV(tmpgv) = newHV(0); - curstash = GvHV(tmpgv); - if (!curstash->hv_name) - curstash->hv_name = savestr($2); - curstash->hv_coeffsize = 0; - op_free($2); - copline = NOLINE; - expectterm = 2; -} diff --git a/parse_format b/parse_format deleted file mode 100644 index 80b5c3d3cf..0000000000 --- a/parse_format +++ /dev/null @@ -1,48 +0,0 @@ -void -XXX(fcmd) -register FF *fcmd; -{ - register int i; - register OP *arg; - register int items; - SV *sv; - OP *parse_list(); - line_t oldline = curcmd->cop_line; - - sv = fcmd->ff_unparsed; - curcmd->cop_line = fcmd->ff_line; - fcmd->ff_unparsed = Nullsv; - - /* Grrf. We have to fake curcmd to be in run_format's package temporarily... */ - (void)save_hptr(&curcmd->cop_stash); - (void)save_hptr(&curstash); - curstash = sv->sv_u.sv_hv; - curcmd->cop_stash = sv->sv_u.sv_hv; - arg = parse_list(sv); - - items = arg->arg_len - 1; /* ignore $$ on end */ - for (i = 1; i <= items; i++) { - if (!fcmd || fcmd->ff_type == FFt_NULL) - fatal("Too many field values"); - dehoistXXX(arg,i); - fcmd->ff_expr = redOP(OP_ITEM,1, - arg[i].arg_ptr.arg_arg,Nullop,Nullop); - if (fcmd->ff_flags & FFf_CHOP) { - if ((fcmd->ff_expr[1].arg_type & A_MASK) == A_STAB) { - fcmd->ff_expr[1].arg_type = DD_LVAL; - ldehoistXXX(fcmd->ff_expr,1); - } - else if ((fcmd->ff_expr[1].arg_type & A_MASK) == A_EXPR) - fcmd->ff_expr[1].arg_type = A_LEXPR; - else - fatal("^ field requires scalar lvalue"); - } - fcmd = fcmd->ff_next; - } - if (fcmd && fcmd->ff_type) - fatal("Not enough field values"); - curcmd->cop_line = oldline; - Safefree(arg); - sv_free(sv); -} - diff --git a/pat/env.pat b/pat/env.pat new file mode 100644 index 0000000000..3ba5e69308 --- /dev/null +++ b/pat/env.pat @@ -0,0 +1,22 @@ +*** /scalpel/lwall/perl5alpha4/perl.c Fri Jan 14 05:04:50 1994 +--- perl.c Fri Jan 14 23:22:47 1994 +*************** +*** 1303,1309 **** + SvMULTI_on(envgv); + hv = GvHVn(envgv); + hv_clear(hv); +- hv_magic(hv, envgv, 'E'); + if (env != environ) + environ[0] = Nullch; + for (; *env; env++) { +--- 1303,1308 ---- +*************** +*** 1314,1319 **** +--- 1313,1319 ---- + (void)hv_store(hv, *env, s - *env, sv, 0); + *s = '='; + } ++ hv_magic(hv, envgv, 'E'); + } + tainted = 0; + if (tmpgv = gv_fetchpv("$",TRUE)) diff --git a/pat/inherit.pat b/pat/inherit.pat new file mode 100644 index 0000000000..71c41d4107 --- /dev/null +++ b/pat/inherit.pat @@ -0,0 +1,39 @@ +*** /scalpel/lwall/perl5alpha4/gv.c Fri Jan 14 04:28:25 1994 +--- gv.c Fri Jan 14 14:05:38 1994 +*************** +*** 133,151 **** + SV** svp = AvARRAY(av); + I32 items = AvFILL(av) + 1; + while (items--) { +- char tmpbuf[512]; + SV* sv = *svp++; +! *tmpbuf = '_'; +! SvUPGRADE(sv, SVt_PV); +! strcpy(tmpbuf+1, SvPV(sv, na)); +! gv = gv_fetchpv(tmpbuf,FALSE); +! if (!gv || !(stash = GvHV(gv))) { + if (dowarn) + warn("Can't locate package %s for @%s'ISA", + SvPVX(sv), HvNAME(stash)); + continue; + } +! gv = gv_fetchmeth(stash, name, len); + if (gv) { + GvCV(topgv) = GvCV(gv); /* cache the CV */ + GvCVGEN(topgv) = sub_generation; /* valid for now */ +--- 133,147 ---- + SV** svp = AvARRAY(av); + I32 items = AvFILL(av) + 1; + while (items--) { + SV* sv = *svp++; +! HV* basestash = fetch_stash(sv, FALSE); +! if (!basestash) { + if (dowarn) + warn("Can't locate package %s for @%s'ISA", + SvPVX(sv), HvNAME(stash)); + continue; + } +! gv = gv_fetchmeth(basestash, name, len); + if (gv) { + GvCV(topgv) = GvCV(gv); /* cache the CV */ + GvCVGEN(topgv) = sub_generation; /* valid for now */ diff --git a/perl.c b/perl.c index 029328274c..e638e175ae 100644 --- a/perl.c +++ b/perl.c @@ -208,11 +208,12 @@ register PerlInterpreter *sv_interp; sv_clean_refs(); /* Delete self-reference from main symbol table */ - GvHV(gv_fetchpv("::_main",TRUE)) = 0; + GvHV(gv_fetchpv("::_main",TRUE, SVt_PVHV)) = 0; --SvREFCNT(defstash); /* Try to destruct main symbol table. May fail on reference loops. */ SvREFCNT_dec(defstash); + defstash = 0; FREE_TMPS(); #ifdef DEBUGGING @@ -467,7 +468,7 @@ setuid perl scripts securely.\n"); rslen = nrslen; rschar = nrschar; rspara = (nrslen == 2); - sv_setpvn(GvSV(gv_fetchpv("/", TRUE)), rs, rslen); + sv_setpvn(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), rs, rslen); if (do_undump) my_unexec(); @@ -571,7 +572,7 @@ I32 gimme; /* TRUE if called in list context */ I32 hasargs; /* whether to create a @_ array for routine */ I32 numargs; /* how many args are pushed on the stack */ { - return perl_callsv((SV*)gv_fetchpv(subname, TRUE), + return perl_callsv((SV*)gv_fetchpv(subname, TRUE, SVt_PVCV), sp, gimme, hasargs, numargs); } @@ -618,7 +619,7 @@ I32 namlen; { register GV *gv; - if (gv = gv_fetchpv(sym,TRUE)) + if (gv = gv_fetchpv(sym,TRUE, SVt_PV)) sv_magic(GvSV(gv), (SV*)gv, 0, name, namlen); } @@ -773,7 +774,7 @@ char *s; s++; return s; case 'v': - fputs("\nThis is perl, version 5.0, Alpha 8 (unsupported)\n\n",stdout); + fputs("\nThis is perl, version 5.0, Alpha 9 (unsupported)\n\n",stdout); fputs(rcsid,stdout); fputs("\nCopyright (c) 1989, 1990, 1991, 1992, 1993, 1994 Larry Wall\n",stdout); #ifdef MSDOS @@ -841,12 +842,12 @@ init_main_stash() GV *gv; curstash = defstash = newHV(); curstname = newSVpv("main",4); - GvHV(gv = gv_fetchpv("_main",TRUE)) = (HV*)SvREFCNT_inc(defstash); + GvHV(gv = gv_fetchpv("_main",TRUE, SVt_PVHV)) = (HV*)SvREFCNT_inc(defstash); SvREADONLY_on(gv); - HvNAME(defstash) = "main"; - incgv = gv_HVadd(gv_AVadd(gv_fetchpv("INC",TRUE))); + HvNAME(defstash) = savestr("main"); + incgv = gv_HVadd(gv_AVadd(gv_fetchpv("INC",TRUE, SVt_PVAV))); SvMULTI_on(incgv); - defgv = gv_fetchpv("_",TRUE); + defgv = gv_fetchpv("_",TRUE, SVt_PV); curstash = defstash; compiling.cop_stash = defstash; } @@ -966,10 +967,14 @@ sed %s -e \"/^[^#]/b\" \ (void)seteuid(uid); /* musn't stay setuid root */ #else #ifdef HAS_SETREUID - (void)setreuid(-1, uid); + (void)setreuid((Uid_t)-1, uid); +#else +#ifdef HAS_SETRESUID + (void)setresuid((Uid_t)-1, uid, (Uid_t)-1); #else setuid(uid); #endif +#endif #endif if (geteuid() != uid) croak("Can't do seteuid!\n"); @@ -1051,7 +1056,13 @@ char *validarg; { struct stat tmpstatbuf; - if (setreuid(euid,uid) < 0 || getuid() != euid || geteuid() != uid) + if ( +#ifdef HAS_SETREUID + setreuid(euid,uid) < 0 +#elif HAS_SETRESUID + setresuid(euid,uid,(Uid_t)-1) < 0 +#endif + || getuid() != euid || geteuid() != uid) croak("Can't swap uid and euid"); /* really paranoid */ if (stat(SvPVX(GvSV(curcop->cop_filegv)),&tmpstatbuf) < 0) croak("Permission denied"); /* testing full pathname here */ @@ -1070,7 +1081,13 @@ char *validarg; } croak("Permission denied\n"); } - if (setreuid(uid,euid) < 0 || getuid() != uid || geteuid() != euid) + if ( +#ifdef HAS_SETREUID + setreuid(uid,euid) < 0 +#elif defined(HAS_SETRESUID) + setresuid(uid,euid,(Uid_t)-1) < 0 +#endif + || getuid() != uid || geteuid() != euid) croak("Can't reswap uid and euid"); if (!cando(S_IXUSR,FALSE,&statbuf)) /* can real uid exec? */ croak("Permission denied\n"); @@ -1125,10 +1142,14 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); (void)setegid(statbuf.st_gid); #else #ifdef HAS_SETREGID - (void)setregid((GIDTYPE)-1,statbuf.st_gid); + (void)setregid((Gid_t)-1,statbuf.st_gid); +#else +#ifdef HAS_SETRESGID + (void)setresgid((Gid_t)-1,statbuf.st_gid,(Gid_t)-1); #else setgid(statbuf.st_gid); #endif +#endif #endif if (getegid() != statbuf.st_gid) croak("Can't do setegid!\n"); @@ -1139,22 +1160,30 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); (void)seteuid(statbuf.st_uid); /* all that for this */ #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)-1,statbuf.st_uid); + (void)setreuid((Uid_t)-1,statbuf.st_uid); +#else +#ifdef HAS_SETRESUID + (void)setresuid((Uid_t)-1,statbuf.st_uid,(Uid_t)-1); #else setuid(statbuf.st_uid); #endif +#endif #endif if (geteuid() != statbuf.st_uid) croak("Can't do seteuid!\n"); } else if (uid) { /* oops, mustn't run as root */ #ifdef HAS_SETEUID - (void)seteuid((UIDTYPE)uid); + (void)seteuid((Uid_t)uid); #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)-1,(UIDTYPE)uid); + (void)setreuid((Uid_t)-1,(Uid_t)uid); #else - setuid((UIDTYPE)uid); +#ifdef HAS_SETRESUID + (void)setresuid((Uid_t)-1,(Uid_t)uid,(Uid_t)-1); +#else + setuid((Uid_t)uid); +#endif #endif #endif if (geteuid() != uid) @@ -1222,22 +1251,22 @@ init_debugger() GV* tmpgv; debstash = newHV(); - GvHV(gv_fetchpv("::_DB",TRUE)) = debstash; + GvHV(gv_fetchpv("::_DB",TRUE, SVt_PVHV)) = debstash; curstash = debstash; - dbargs = GvAV(gv_AVadd((tmpgv = gv_fetchpv("args",TRUE)))); + dbargs = GvAV(gv_AVadd((tmpgv = gv_fetchpv("args",TRUE, SVt_PVAV)))); SvMULTI_on(tmpgv); AvREAL_off(dbargs); - DBgv = gv_fetchpv("DB",TRUE); + DBgv = gv_fetchpv("DB",TRUE, SVt_PVGV); SvMULTI_on(DBgv); - DBline = gv_fetchpv("dbline",TRUE); + DBline = gv_fetchpv("dbline",TRUE, SVt_PVAV); SvMULTI_on(DBline); - DBsub = gv_HVadd(tmpgv = gv_fetchpv("sub",TRUE)); + DBsub = gv_HVadd(tmpgv = gv_fetchpv("sub",TRUE, SVt_PVHV)); SvMULTI_on(tmpgv); - DBsingle = GvSV((tmpgv = gv_fetchpv("single",TRUE))); + DBsingle = GvSV((tmpgv = gv_fetchpv("single",TRUE, SVt_PV))); SvMULTI_on(tmpgv); - DBtrace = GvSV((tmpgv = gv_fetchpv("trace",TRUE))); + DBtrace = GvSV((tmpgv = gv_fetchpv("trace",TRUE, SVt_PV))); SvMULTI_on(tmpgv); - DBsignal = GvSV((tmpgv = gv_fetchpv("signal",TRUE))); + DBsignal = GvSV((tmpgv = gv_fetchpv("signal",TRUE, SVt_PV))); SvMULTI_on(tmpgv); curstash = defstash; } @@ -1299,33 +1328,33 @@ init_predump_symbols() { GV *tmpgv; - sv_setpvn(GvSV(gv_fetchpv("\"", TRUE)), " ", 1); + sv_setpvn(GvSV(gv_fetchpv("\"", TRUE, SVt_PV)), " ", 1); - stdingv = gv_fetchpv("STDIN",TRUE); + stdingv = gv_fetchpv("STDIN",TRUE, SVt_PVIO); SvMULTI_on(stdingv); if (!GvIO(stdingv)) GvIO(stdingv) = newIO(); IoIFP(GvIO(stdingv)) = stdin; - tmpgv = gv_fetchpv("stdin",TRUE); + tmpgv = gv_fetchpv("stdin",TRUE, SVt_PVIO); GvIO(tmpgv) = (IO*)SvREFCNT_inc(GvIO(stdingv)); SvMULTI_on(tmpgv); - tmpgv = gv_fetchpv("STDOUT",TRUE); + tmpgv = gv_fetchpv("STDOUT",TRUE, SVt_PVIO); SvMULTI_on(tmpgv); if (!GvIO(tmpgv)) GvIO(tmpgv) = newIO(); IoOFP(GvIO(tmpgv)) = IoIFP(GvIO(tmpgv)) = stdout; defoutgv = tmpgv; - tmpgv = gv_fetchpv("stdout",TRUE); + tmpgv = gv_fetchpv("stdout",TRUE, SVt_PVIO); GvIO(tmpgv) = (IO*)SvREFCNT_inc(GvIO(defoutgv)); SvMULTI_on(tmpgv); - curoutgv = gv_fetchpv("STDERR",TRUE); + curoutgv = gv_fetchpv("STDERR",TRUE, SVt_PVIO); SvMULTI_on(curoutgv); if (!GvIO(curoutgv)) GvIO(curoutgv) = newIO(); IoOFP(GvIO(curoutgv)) = IoIFP(GvIO(curoutgv)) = stderr; - tmpgv = gv_fetchpv("stderr",TRUE); + tmpgv = gv_fetchpv("stderr",TRUE, SVt_PVIO); GvIO(tmpgv) = (IO*)SvREFCNT_inc(GvIO(curoutgv)); SvMULTI_on(tmpgv); curoutgv = defoutgv; /* switch back to STDOUT */ @@ -1354,30 +1383,31 @@ register char **env; } if (s = strchr(argv[0], '=')) { *s++ = '\0'; - sv_setpv(GvSV(gv_fetchpv(argv[0]+1,TRUE)),s); + sv_setpv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),s); } else - sv_setiv(GvSV(gv_fetchpv(argv[0]+1,TRUE)),1); + sv_setiv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),1); } } toptarget = NEWSV(0,0); sv_upgrade(toptarget, SVt_PVFM); sv_setpvn(toptarget, "", 0); - bodytarget = NEWSV(0,0); + tmpgv = gv_fetchpv("\001",TRUE, SVt_PV); + bodytarget = GvSV(tmpgv); sv_upgrade(bodytarget, SVt_PVFM); sv_setpvn(bodytarget, "", 0); formtarget = bodytarget; tainted = 1; - if (tmpgv = gv_fetchpv("0",TRUE)) { + if (tmpgv = gv_fetchpv("0",TRUE, SVt_PV)) { sv_setpv(GvSV(tmpgv),origfilename); magicname("0", "0", 1); } - if (tmpgv = gv_fetchpv("\024",TRUE)) + if (tmpgv = gv_fetchpv("\024",TRUE, SVt_PV)) time(&basetime); - if (tmpgv = gv_fetchpv("\030",TRUE)) + if (tmpgv = gv_fetchpv("\030",TRUE, SVt_PV)) sv_setpv(GvSV(tmpgv),origargv[0]); - if (argvgv = gv_fetchpv("ARGV",TRUE)) { + if (argvgv = gv_fetchpv("ARGV",TRUE, SVt_PVAV)) { SvMULTI_on(argvgv); (void)gv_AVadd(argvgv); av_clear(GvAVn(argvgv)); @@ -1385,7 +1415,7 @@ register char **env; (void)av_push(GvAVn(argvgv),newSVpv(argv[0],0)); } } - if (envgv = gv_fetchpv("ENV",TRUE)) { + if (envgv = gv_fetchpv("ENV",TRUE, SVt_PVHV)) { HV *hv; SvMULTI_on(envgv); hv = GvHVn(envgv); @@ -1399,13 +1429,14 @@ register char **env; continue; *s++ = '\0'; sv = newSVpv(s--,0); + sv_magic(sv, sv, 'e', *env, s - *env); (void)hv_store(hv, *env, s - *env, sv, 0); *s = '='; } hv_magic(hv, envgv, 'E'); } tainted = 0; - if (tmpgv = gv_fetchpv("$",TRUE)) + if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV)) sv_setiv(GvSV(tmpgv),(I32)getpid()); } @@ -1413,11 +1444,17 @@ register char **env; static void init_perllib() { - if (!tainting) - incpush(getenv("PERLLIB")); + char *s; + if (!tainting) { + s = getenv("PERL5LIB"); + if (s) + incpush(s); + else + incpush(getenv("PERLLIB")); + } #ifndef PRIVLIB -#define PRIVLIB "/usr/local/lib/perl" +#define PRIVLIB "/usr/local/lib/perl5:/usr/local/lib/perl" #endif incpush(PRIVLIB); (void)av_push(GvAVn(incgv),newSVpv(".",1)); @@ -1437,15 +1474,43 @@ AV* list; CV *cv = (CV*)av_shift(list); SAVEFREESV(cv); - if (setjmp(top_env)) { - if (list == beginav) { - warn("BEGIN failed--execution aborted"); - Copy(oldtop, top_env, 1, jmp_buf); - my_exit(1); - } - } - else { + switch (setjmp(top_env)) { + case 0: perl_callsv((SV*)cv, sp, G_SCALAR, 0, 0); + break; + case 1: + statusvalue = 255; /* XXX I don't think we use 1 anymore. */ + /* FALL THROUGH */ + case 2: + /* my_exit() was called */ + curstash = defstash; + if (endav) + calllist(endav); + FREE_TMPS(); + if (statusvalue) { + if (list == beginav) + warn("BEGIN failed--execution aborted"); + else + warn("END failed--execution aborted"); + } + Copy(oldtop, top_env, 1, jmp_buf); + my_exit(statusvalue); + /* NOTREACHED */ + return; + case 3: + if (!restartop) { + fprintf(stderr, "panic: restartop\n"); + FREE_TMPS(); + break; + } + if (stack != mainstack) { + dSP; + SWITCHSTACK(stack, mainstack); + } + op = restartop; + restartop = 0; + run(); + break; } } diff --git a/perl.h b/perl.h index 75e66ad5cf..d2b46f6902 100644 --- a/perl.h +++ b/perl.h @@ -40,10 +40,12 @@ * 4.0 baseline. * */ +#ifndef H_PERL +#define H_PERL 1 #include "embed.h" -#define VOIDWANT 1 +#define VOIDUSED 1 #ifdef __cplusplus #include "config_c++.h" #else @@ -121,14 +123,12 @@ char Error[1]; # ifndef HAS_GETPGRP # define HAS_GETPGRP # endif -# define getpgrp getpgrp2 #endif #ifdef HAS_SETPGRP2 # ifndef HAS_SETPGRP # define HAS_SETPGRP # endif -# define setpgrp setpgrp2 #endif #include @@ -146,7 +146,9 @@ char Error[1]; /* Use all the "standard" definitions? */ #ifdef STANDARD_C # include -# include +# ifdef I_STRING +# include +# endif # define MEM_SIZE size_t #else typedef unsigned int MEM_SIZE; @@ -157,9 +159,9 @@ char Error[1]; #endif #ifdef HAS_MEMCPY -# ifndef STANDARD_C +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) # ifndef memcpy - extern char * memcpy P((char*, char*, int)); + extern char * memcpy P((char*, char*, int)); # endif # endif #else @@ -173,7 +175,7 @@ char Error[1]; #endif /* HAS_MEMCPY */ #ifdef HAS_MEMSET -# ifndef STANDARD_C +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) # ifndef memset extern char *memset P((char*, int, int)); # endif @@ -190,7 +192,7 @@ char Error[1]; #endif /* HAS_MEMSET */ #ifdef HAS_MEMCMP -# ifndef STANDARD_C +# if !defined(STANDARD_C) && !defined(I_STRING) && !defined(I_MEMORY) # ifndef memcmp extern int memcmp P((char*, char*, int)); # endif @@ -208,7 +210,7 @@ char Error[1]; # endif #endif /* HAS_BCMP */ -#ifndef HAS_MEMMOVE +#if !defined(HAS_MEMMOVE) && !defined(memmove) # if defined(HAS_BCOPY) && defined(HAS_SAFE_BCOPY) # define memmove(d,s,l) bcopy(s,d,l) # else @@ -254,17 +256,19 @@ char Error[1]; #endif #ifdef I_SYS_TIME -# ifdef SYSTIMEKERNEL +# ifdef I_SYS_TIME_KERNEL # define KERNEL # endif # include -# ifdef SYSTIMEKERNEL +# ifdef I_SYS_TIME_KERNEL # undef KERNEL # endif #endif #ifndef MSDOS -#include +# ifdef HAS_TIMES +# include +# endif #endif #if defined(HAS_STRERROR) && (!defined(HAS_MKDIR) || !defined(HAS_RMDIR)) @@ -273,7 +277,7 @@ char Error[1]; #include #ifdef HAS_SOCKET -# ifndef ENOTSOCK +# ifdef I_NET_ERRNO # include # endif #endif @@ -551,6 +555,7 @@ typedef union any ANY; union any { void* any_ptr; I32 any_i32; + long any_long; }; #include "regexp.h" @@ -668,10 +673,10 @@ struct Outrec { #endif /* MSDOS */ #ifndef __cplusplus -UIDTYPE getuid P(()); -UIDTYPE geteuid P(()); -GIDTYPE getgid P(()); -GIDTYPE getegid P(()); +Uid_t getuid P(()); +Uid_t geteuid P(()); +Gid_t getgid P(()); +Gid_t getegid P(()); #endif #ifdef DEBUGGING @@ -735,7 +740,7 @@ double atof P((const char*)); #ifndef STANDARD_C /* All of these are in stdlib.h or time.h for ANSI C */ -long time(); +Time_t time(); struct tm *gmtime(), *localtime(); char *strchr(), *strrchr(); char *strcpy(), *strcat(); @@ -764,7 +769,7 @@ char *strcpy(), *strcat(); char *crypt P((const char*, const char*)); char *getenv P((const char*)); -long lseek P((int,off_t,int)); +Off_t lseek P((int,Off_t,int)); char *getlogin P((void)); #ifdef EUNICE @@ -775,16 +780,16 @@ int unlnk P((char*)); #endif #ifndef HAS_SETREUID -#ifdef HAS_SETRESUID -#define setreuid(r,e) setresuid(r,e,-1) -#define HAS_SETREUID -#endif +# ifdef HAS_SETRESUID +# define setreuid(r,e) setresuid(r,e,(Uid_t)-1) +# define HAS_SETREUID +# endif #endif #ifndef HAS_SETREGID -#ifdef HAS_SETRESGID -#define setregid(r,e) setresgid(r,e,-1) -#define HAS_SETREGID -#endif +# ifdef HAS_SETRESGID +# define setregid(r,e) setresgid(r,e,(Gid_t)-1) +# define HAS_SETREGID +# endif #endif #define SCAN_DEF 0 @@ -817,7 +822,7 @@ EXT U32 sub_generation; /* inc to force methods to be looked up again */ EXT char ** origenviron; EXT U32 origalen; -EXT I32 * xiv_root; /* free xiv list--shared by interpreters */ +EXT I32 ** xiv_root; /* free xiv list--shared by interpreters */ EXT double * xnv_root; /* free xnv list--shared by interpreters */ EXT XRV * xrv_root; /* free xrv list--shared by interpreters */ EXT XPV * xpv_root; /* free xpv list--shared by interpreters */ @@ -880,6 +885,8 @@ EXT char warn_reserved[] INIT("Unquoted string \"%s\" may clash with future reserved word"); EXT char warn_nl[] INIT("Unsuccessful %s on filename containing newline"); +EXT char no_hardref[] + INIT("Can't use a string as %s ref while \"strict refs\" averred"); EXT char no_usym[] INIT("Can't use an undefined value as %s reference"); EXT char no_aelem[] @@ -1018,7 +1025,7 @@ typedef enum { XTERM, XREF, XSTATE, - XBLOCK, + XBLOCK } expectation; EXT FILE * VOL rsfp INIT(Nullfp); @@ -1052,13 +1059,22 @@ EXT I32 thisexpr; /* name id for nothing_in_common() */ EXT char * last_uni; /* position of last named-unary operator */ EXT char * last_lop; /* position of last list operator */ EXT OPCODE last_lop_op; /* last list operator */ -EXT bool in_format; /* we're compiling a run_format */ EXT bool in_my; /* we're compiling a "my" declaration */ -EXT I32 needblockscope INIT(TRUE); /* block overhead needed? */ #ifdef FCRYPT EXT I32 cryptseen; /* has fast crypt() been initialized? */ #endif +EXT U32 hints; /* various compilation flags */ + + /* Note: the lowest 8 bits are reserved for + stuffing into op->op_private */ +#define HINT_INTEGER 0x00000001 +#define HINT_STRICT_REFS 0x00000002 + +#define HINT_BLOCK_SCOPE 0x00000100 +#define HINT_STRICT_SUBS 0x00000200 +#define HINT_STRICT_VARS 0x00000400 + /**************************************************************************/ /* This regexp stuff is global since it always happens within 1 expr eval */ /**************************************************************************/ @@ -1136,7 +1152,7 @@ IEXT VOL U32 Idebug; IEXT U32 Iperldb; /* magical thingies */ -IEXT time_t Ibasetime; /* $^T */ +IEXT Time_t Ibasetime; /* $^T */ IEXT I32 Iarybase; /* $[ */ IEXT SV * Iformfeed; /* $^L */ IEXT char * Ichopset IINIT(" \n-"); /* $: */ @@ -1317,7 +1333,8 @@ MGVTBL vtbl_sv = {magic_get, 0, 0}; MGVTBL vtbl_env = {0, 0, 0, 0, 0}; MGVTBL vtbl_envelem = {0, magic_setenv, - 0, 0, 0}; + 0, magic_clearenv, + 0}; MGVTBL vtbl_sig = {0, 0, 0, 0, 0}; MGVTBL vtbl_sigelem = {0, magic_setsig, 0, 0, 0}; @@ -1372,3 +1389,5 @@ EXT MGVTBL vtbl_vec; EXT MGVTBL vtbl_bm; EXT MGVTBL vtbl_uvar; #endif + +#endif /* Include guard */ diff --git a/perl.man b/perl.man index 0cef761ab0..3bcede859c 100644 --- a/perl.man +++ b/perl.man @@ -5011,7 +5011,6 @@ out. You'll just have to suffer along with these silly symbols. Most of them have reasonable mnemonics, or analogues in one of the shells. .Ip $_ 8 -''' UNDER The default input and pattern-searching space. The following pairs are equivalent: .nf @@ -5035,7 +5034,6 @@ The following pairs are equivalent: .fi (Mnemonic: underline is understood in certain operations.) .Ip $. 8 -''' INPUT_LINE The current input line number of the last filehandle that was read. Readonly. Remember that only an explicit close on the filehandle resets the line number. @@ -5043,7 +5041,6 @@ Since <> never does an explicit close, line numbers increase across ARGV files (but see examples under eof). (Mnemonic: many programs use . to mean the current line number.) .Ip $/ 8 -''' RS or INPUT_RECORD_SEPARATOR The input record separator, newline by default. Works like .IR awk 's @@ -5059,7 +5056,6 @@ Setting it to "\en\en" will blindly assume that the next input character belongs to the next paragraph, even if it's a newline. (Mnemonic: / is used to delimit line boundaries when quoting poetry.) .Ip $, 8 -''' OFS or OUTPUT_FIELD_SEPARATOR The output field separator for the print operator. Ordinarily the print operator simply prints out the comma separated fields you specify. @@ -5070,13 +5066,11 @@ set this variable as you would set OFS variable to specify what is printed between fields. (Mnemonic: what is printed when there is a , in your print statement.) .Ip $"" 8 -''' LIST_SEPARATOR This is like $, except that it applies to array values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic: obvious, I think.) .Ip $\e 8 -''' ORS or OUTPUT_RECORD_SEPARATOR The output record separator for the print operator. Ordinarily the print operator simply prints out the comma separated fields you specify, with no trailing newline or record separator assumed. @@ -5089,7 +5083,6 @@ ORS variable to specify what is printed at the end of the print. Also, it's just like /, but it's what you get \*(L"back\*(R" from .IR perl .) .Ip $# 8 -''' OFMT or OUTPUT_FORMAT The output format for printed numbers. This variable is a half-hearted attempt to emulate .IR awk 's @@ -5106,33 +5099,27 @@ explicitly to get value. (Mnemonic: # is the number sign.) .Ip $% 8 -''' PAGE The current page number of the currently selected output channel. (Mnemonic: % is page number in nroff.) .Ip $= 8 -''' PRINTABLE_LINES The current page length (printable lines) of the currently selected output channel. Default is 60. (Mnemonic: = has horizontal lines.) .Ip $\- 8 -''' LINES_REMAINING The number of lines left on the page of the currently selected output channel. (Mnemonic: lines_on_page \- lines_printed.) .Ip $~ 8 -''' FORMAT_NAME The name of the current report format for the currently selected output channel. Default is name of the filehandle. (Mnemonic: brother to $^.) .Ip $^ 8 -''' TOP_FORMAT_NAME The name of the current top-of-page format for the currently selected output channel. Default is name of the filehandle with \*(L"_TOP\*(R" appended. (Mnemonic: points to top of page.) .Ip $| 8 -''' AUTOFLUSH If set to nonzero, forces a flush after every write or print on the currently selected output channel. Default is 0. @@ -5147,13 +5134,11 @@ script under rsh and want to see the output as it's happening. (Mnemonic: when you want your pipes to be piping hot.) .Ip $$ 8 -''' PID The process number of the .I perl running this script. (Mnemonic: same as shells.) .Ip $? 8 -''' STATUS The status returned by the last pipe close, backtick (\`\`) command or .I system operator. @@ -5163,19 +5148,16 @@ $? & 255 gives which signal, if any, the process died from, and whether there was a core dump. (Mnemonic: similar to sh and ksh.) .Ip $& 8 4 -''' MATCH The string matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval enclosed by the current BLOCK). (Mnemonic: like & in some editors.) .Ip $\` 8 4 -''' LEFT The string preceding whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval enclosed by the current BLOCK). (Mnemonic: \` often precedes a quoted string.) .Ip $\' 8 4 -''' RIGHT The string following whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval enclosed by the current BLOCK). @@ -5190,7 +5172,6 @@ Example: .fi .Ip $+ 8 4 -''' LAST_PAREN_MATCH The last bracket matched by the last search pattern. This is useful if you don't know which of a set of alternative patterns matched. @@ -5202,7 +5183,6 @@ For example: .fi (Mnemonic: be positive and forward looking.) .Ip $* 8 2 -''' MULTILINE_MATCHING Set to 1 to do multiline matching within a string, 0 to tell .I perl that it can assume that strings contain a single line, for the purpose @@ -5214,7 +5194,6 @@ Default is 0. Note that this variable only influences the interpretation of ^ and $. A literal newline can be searched for even when $* == 0. .Ip $0 8 -''' PROGRAM_NAME Contains the name of the file containing the .I perl script being executed. @@ -5226,7 +5205,6 @@ pattern matched, not counting patterns matched in nested blocks that have been exited already. (Mnemonic: like \edigit.) .Ip $[ 8 2 -''' ARRAY_BASE The index of the first element in an array, and of the first character in a substring. Default is 0, but you could set it to 1 to make @@ -5237,7 +5215,6 @@ behave more like when subscripting and when evaluating the index() and substr() functions. (Mnemonic: [ begins subscripts.) .Ip $] 8 2 -''' PERL_VERSION The string printed out when you say \*(L"perl -v\*(R". It can be used to determine at the beginning of a script whether the perl interpreter executing the script is in the right range of versions. @@ -5259,7 +5236,6 @@ or, used numerically, .fi (Mnemonic: Is this version of perl in the right bracket?) .Ip $; 8 2 -''' SUBSEP or SUBSCRIPT_SEPARATOR The subscript separator for multi-dimensional array emulation. If you refer to an associative array element as .nf @@ -5286,7 +5262,6 @@ value for $;. Yeah, I know, it's pretty lame, but $, is already taken for something more important.) .Ip $! 8 2 -''' ERRNO If used in a numeric context, yields the current value of errno, with all the usual caveats. (This means that you shouldn't depend on the value of $! to be anything @@ -5298,17 +5273,14 @@ if, for instance, you want $! to return the string for error n, or you want to set the exit value for the die operator. (Mnemonic: What just went bang?) .Ip $@ 8 2 -''' EVAL_ERROR The perl syntax error message from the last eval command. If null, the last eval parsed and executed correctly (although the operations you invoked may have failed in the normal fashion). (Mnemonic: Where was the syntax error \*(L"at\*(R"?) .Ip $< 8 2 -''' UID or REAL_USER_ID The real uid of this process. (Mnemonic: it's the uid you came FROM, if you're running setuid.) .Ip $> 8 2 -''' EUID or EFFECTIVE_USER_ID The effective uid of this process. Example: .nf @@ -5321,7 +5293,6 @@ Example: (Mnemonic: it's the uid you went TO, if you're running setuid.) Note: $< and $> can only be swapped on machines supporting setreuid(). .Ip $( 8 2 -''' GID or REAL_GROUP_ID The real gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. @@ -5330,7 +5301,6 @@ by getgroups(), one of which may be the same as the first number. (Mnemonic: parentheses are used to GROUP things. The real gid is the group you LEFT, if you're running setgid.) .Ip $) 8 2 -''' EGID or EFFECTIVE_GROUP_ID The effective gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. @@ -5343,40 +5313,35 @@ Note: $<, $>, $( and $) can only be set on machines that support the corresponding set[re][ug]id() routine. $( and $) can only be swapped on machines supporting setregid(). .Ip $: 8 2 -''' LINE_BREAK_CHARACTERS The current set of characters after which a string may be broken to fill continuation fields (starting with ^) in a format. Default is "\ \en-", to break on whitespace or hyphens. (Mnemonic: a \*(L"colon\*(R" in poetry is a part of a line.) +.Ip $^A 8 2 +The current value of the write accumulator for format lines. .Ip $^D 8 2 -''' DEBUGGING The current value of the debugging flags. (Mnemonic: value of .B \-D switch.) .Ip $^F 8 2 -''' SYSTEM_FD_MAX The maximum system file descriptor, ordinarily 2. System file descriptors are passed to subprocesses, while higher file descriptors are not. During an open, system file descriptors are preserved even if the open fails. Ordinary file descriptors are closed before the open is attempted. .Ip $^I 8 2 -''' INPLACE_EDIT The current value of the inplace-edit extension. Use undef to disable inplace editing. (Mnemonic: value of .B \-i switch.) .Ip $^L 8 2 -''' FORMFEED What formats output to perform a formfeed. Default is \ef. .Ip $^P 8 2 -''' PERLDB The internal flag that the debugger clears so that it doesn't debug itself. You could conceivable disable debugging yourself by clearing it. .Ip $^T 8 2 -''' BASETIME The time at which the script began running, in seconds since the epoch. The values returned by the .B \-M , @@ -5385,13 +5350,11 @@ and .B \-C filetests are based on this value. .Ip $^W 8 2 -''' WARNING The current value of the warning switch. (Mnemonic: related to the .B \-w switch.) .Ip $^X 8 2 -''' EXECUTABLE_NAME The name that Perl itself was executed as, from argv[0]. .Ip $ARGV 8 3 contains the name of the current file when reading from <>. diff --git a/perl5-notes b/perl5-notes new file mode 100644 index 0000000000..c8bb4ba702 --- /dev/null +++ b/perl5-notes @@ -0,0 +1,345 @@ +#!/usr/local/bin/perl5 +# perl5 -x notes 2> expected > actual ; diff expected actual +open(EVAL, "| perl5 -x") || die "Can't pipe to perl5\n"; +while () { + m/prints ``(.*)''$/ && print STDERR $1,"\n"; + print EVAL $_; +} +__END__ +#!/usr/local/bin/perl5 +# +# Perl5a6 notes: Patchlevel 3 +# +# This document is in the public domain. +# +# Written by Tony Sanders +# +# Quick examples of the new Perl5 features as of alpha6. Look in the +# file Changes, the man page, and in the test suite (esp t/op/ref.t) +# for more information. There are also a number of files in the alpha6 +# release (e.g., tie*) that show how to use various features. Also, there +# are a number of package modules in lib/*.pm that are of interest. +# +# Thanks to the following for their input: +# Johan.Vromans@NL.net +# Daniel Faken +# Tom Christiansen +# Dean Roehrich +# Larry Wall +# Lionel Cons +# + +# BEGIN { } + # executed at load time + print "doody\n"; + BEGIN { print "howdy\n"; } # prints ``howdy'' + # then prints ``doody'' +# END { } + # executed at exit time in reverse order of definition + END { print "blue sky\n"; } # will print ``blue sky'' + END { print "goodbye\n"; } # will print ``goodbye'' + +# (expr?lval:lval) = value; + # The (?:) operator can be used as an lvalue. + $a = 1; $b = 2; + (defined $b ? $a : $b) = 10; + print "$a:$b\n"; # prints ``10:2'' + +# new functions: abs, chr, uc, ucfirst, lc, lcfirst + print abs(-10), "\n"; # prints ``10'' + print chr(64), "\n"; # prints ``@'' + print uc("the"), "\n"; # prints ``THE'' + print ucfirst("the"), "\n"; # prints ``The'' + print lc("THE"), "\n"; # prints ``the'' + print lcfirst("THE"), "\n"; # prints ``tHE'' + +# references + # references + $thing1 = "testing"; + $ref = \$thing1; # \ creates a reference + print $$ref,"\n" if ${$ref} eq $$ref; # deref, prints ``testing'' + + # symbolic references + sub bat { "baz"; } + sub baz { print "foobar\n" }; + &{&bat}; # prints ``foobar'' + +# symbol table assignment: *foo = \&func; + # replaces an item in the symbol table (function, scalar, array, hash) + # *foo = \$bar replaces the scalar + # *foo = \%bar replaces the hash table + # *foo = \@bar replaces the array + # *foo = \&bar replaces the function + # *foo = *bar all of the above (including FILEHANDLE!) + # XXX: can't do just filehandles (yet) + # + # This can be used to import and rename a symbol from another package: + # *myfunc = \&otherpack::otherfunc; + +# AUTOLOAD { ...; } + # called if method not found, passed function name in $AUTOLOAD + # @_ are the arguments to the function. +# goto &func; + # goto's a function, used by AUTOLOAD to jump to the function +# qw/arg list/; qw(arg list); + # quoted words, yields a list; works like split(' ', 'arg list') + # not a function, more like q//; + { + package AutoLoader; + AUTOLOAD { + eval "sub $AUTOLOAD" . '{ print "@_\n"}'; + goto &$AUTOLOAD } + package JAPH; + @ISA = (AutoLoader); + sub foo2 { &bar } + foo2 qw(Just another Perl hacker,); + # prints ``Just another Perl hacker,'' + } +# Larry notes: +# You might point out that there's a canned Autoloader base class in the +# library. Another subtlety is that $AUTOLOAD is always in the same +# package as the AUTOLOAD routine, so if you call another package's +# AUTOLOAD explicitly you have to set $AUTOLOAD in that package first. + +# my + # lexical scoping + sub samp1 { print $z,"\n" } + sub samp2 { my($z) = "world"; &samp1 } + $z = "hello"; + &samp2; # prints ``hello'' + +# package; + # empty package; for catching non-local variable references + sub samp3 { + my $x = shift; # local() would work also + package; # empty package + $main::count += $x; # this is ok. + # $y = 1; # would be a compile time error + } + +# => + # works like comma (,); use for key/value pairs + # sometimes used to disambiguate the final expression in a block + # might someday supply warnings if you get out of sync + %foo = ( abc => foo ); + print $foo{abc},"\n"; # prints ``foo'' + +# :: + # works like tick (') (use of ' is deprecated in perl5) + print $main::foo{abc},"\n"; # prints ``foo'' + +# bless ref; + # Bless takes a reference and returns an "object" + $oref = bless \$scalar; + +# -> + # dereferences an "object" + $x = { def => bar }; # $x is ref to anonymous hash + print $x->{def},"\n"; # prints ``bar'' + + # method derefs must be bless'ed + { + # initial cap is encouraged to avoid naming conflicts + package Sample; + sub samp4 { my($this) = shift; print $this->{def},"\n"; } + sub samp5 { print "samp5: ", $_[1], "\n"; } + $main::y = bless $main::x; # $x is ref, $y is "object" + } + $y->samp4(); # prints ``bar'' + + # indirect object calls (same as $y->samp5(arglist)) + samp5 $y arglist; # prints ``samp5: arglist'' + + # static method calls (often used for constructors, see below) + samp5 Sample arglist; # prints ``samp5: arglist'' + +# function calls without & + sub samp6 { print "look ma\n"; } + samp6; # prints ``look ma'' + + # "forward" decl + sub samp7; + samp7; # prints ``look pa'' + sub samp7 { print "look pa\n"; } + + # no decl requires ()'s or initial & + &samp8; # prints ``look da'' + samp8(); # prints ``look da'' + sub samp8 { print "look da\n"; } + +# ref + # returns "object" type + { + package OBJ1; + $x = bless \$y; # returns "object" $x in "class" OBJ1 + print ref $x,"\n"; # prints ``OBJ1'' + } + + # and non-references return undef. + $z = 1; + print "non-ref\n" unless ref $z; # prints ``non-ref'' + + # ref's to "builtins" return type + print ref \$ascalar,"\n"; # prints ``SCALAR'' + print ref \@array,"\n"; # prints ``ARRAY'' + print ref \%hash,"\n"; # prints ``HASH'' + sub func { print shift,"\n"; } + print ref \&func,"\n"; # prints ``CODE'' + print ref \\$scalar,"\n"; # prints ``REF'' + +# tie + # bind a variable to a package with magic functions: + # new, DESTROY, fetch, store, delete, firstkey, nextkey + # The exact function list varies with the variable type, + # see the man page and tie* for more details. + # Usage: tie variable, PackageName, ARGLIST + { + package TIEPACK; + sub new { print "NEW: @_\n"; local($x) = $_[1]; bless \$x } + sub fetch { print "fetch ", ref $_[0], "\n"; ${$_[0]} } + sub store { print "store $_[1]\n"; ${$_[0]} = $_[1] } + DESTROY { print "DESTROY ", ref $_[0], "\n" } + } + tie $h, TIEPACK, "black_tie"; # prints ``NEW: TIEPACK black_tie'' + print $h, "\n"; # prints ``fetch TIEPACK'' + # prints ``black_tie'' + $h = 'bar'; # prints ``store bar'' + untie $h; # prints ``DESTROY SCALAR'' + +# References + $sref = \$scalar; # $$sref is scalar + $aref = \@array; # @$aref is array + $href = \%hash; # %$href is hash table + $fref = \&func; # &$fref is function + $refref = \$fref; # ref to ref to function + &$$refref("call the function"); # prints ``call the function'' + +# Anonymous data-structures + %hash = ( abc => foo ); # hash in perl4 (works in perl5 also) + print $hash{abc},"\n"; # prints ``foo'' + $ref = { abc => bar }; # reference to anon hash + print $ref->{abc},"\n"; # prints ``bar'' + + @ary = ( 0, 1, 2 ); # array in perl4 (works in perl5 also) + print $ary[1],"\n"; # prints ``1'' + $ref = [ 3, 4, 5 ]; # reference to anon array + print $ref->[1],"\n"; # prints ``4'' + +# Nested data-structures + @foo = ( 0, { name => foobar }, 2, 3 ); # $#foo == 3 + $aref = [ 0, { name => foobar }, 2, 3 ]; # ref to anon array + $href = { # ref to hash of arrays + John => [ Mary, Pat, Blanch ], + Paul => [ Sally, Jill, Jane ], + Mark => [ Ann, Bob, Dawn ], + }; + print $href->{Paul}->[0], "\n"; # prints ``Sally'' + print $href->{Paul}[0],"\n"; # shorthand version, prints ``Sally'' + print @{$href->{Mark}},"\n"; # prints ``AnnBobDawn'' + +# @ISA + # Multiple Inheritance (get rich quick) + { + package OBJ2; sub abc { print "abc\n"; } + package OBJ3; sub def { print "def\n"; } + package OBJ4; @ISA = ("OBJ2", "OBJ3"); + $x = bless { foo => bar }; + $x->abc; # prints ``abc'' + $x->def; # prints ``def'' + } + +# Packages, Classes, Objects, Methods, Constructors, Destructors, etc. + # XXX: need more explinations and samples + { + package OBJ5; + sub new { print "NEW: @_\n"; my($x) = "empty"; bless \$x } + sub output { my($this) = shift; print "value = $$this\n"; } + DESTROY { print "OBJ5 DESTROY\n" } + } + # Constructors are often written as static method calls: + $x = new OBJ5; # prints ``NEW: OBJ5'' + $x->output; # prints ``value = empty'' + # The destructor is responsible for calling any base class destructors. + undef $x; # prints ``OBJ5 DESTROY'' + +# require Package; + # same as: BEGIN { require 'Package.pm'; } +# require ; + # checks against the perl version number + require 5.000; # requires perl 5.0 or better + +# Package Modules +# =============== +# Yes, these are all very sketchy. See the .pm file for details. + +# DynamicLoader (builtin) + # Public: &bootstrap + # Load a shared library package on systems that support it + # This incomplete example was extracted from lib/POSIX.pm + # + # package POSIX; + # requires Exporter; require AutoLoader; + # @ISA = (Exporter, AutoLoader, DynamicLoader); + # @EXPORT = qw(closedir, opendir, [..., lots of functions]); + # bootstrap POSIX; + +# Larry notes: +# The gist of it is that DynamicLoader::bootstrap is only called if main.c +# didn't already define MYPACKAGE::bootstrap. So the .pm file doesn't know +# (or care) whether the module is statically or dynamically loaded. + +# AutoLoader.pm + # Public: &AUTOLOAD + # Causes functions from .../lib/perl/auto/PACKAGE/*.al to autoload + # when used but not defined. + +# Config.pm + # Exports: %Config + # The data from the Configure script for perl programs (yeah) + +# English.pm + # Exports: (lots of verbose variables) + # The "english" versions of things like $_ $| $= + +# Exporter.pm + # Public: &import + # import PACKAGE [@symbols] + # requires PACKAGE to define @EXPORT + { + package FOOBAR; + require Exporter; + @ISA = (Exporter); + @EXPORT = (foo, bar); + sub foo { print "FOO\n" }; + sub bar { print "BAR\n" }; + 1; + package BAT; + # require FOOBAR; # not in this example + import FOOBAR; + @ISA = (); + &foo; # prints ``FOO'' + } + +# FileHandle.pm + # Exports: (lots of filehandle functions) + # English versions of various filehandle operations + +# Hostname.pm + # Exports: &hostname + # Routine to get hostname + # { + # require Hostname; import Hostname; + # print &hostname,"\n"; # prints your hostname + # } + +# POSIX.pm + # Exports: (posix functions and defines) + # POSIX.1 bindings + +# SDBM_File.pm + # SDBM interfaces (use with `tie') + # Other DBM interfaces work the same way + +# when the script exits the END section gets executed and prints ``goodbye'' +# ENDs are executed in reverse order of definition. prints ``blue sky'' +__END__ diff --git a/perlmain.c b/perlmain.c index 75a3d6fcca..d3ff323a73 100644 --- a/perlmain.c +++ b/perlmain.c @@ -32,11 +32,7 @@ void perl_init_ext() { char *file = __FILE__; + /* Do not delete this line--writemain depends on it */ + boot_DynamicLoader(); -#ifdef USE_DYNAMIC_LOADING - boot_DynamicLoader(); -#endif - newXSUB("POSIX::bootstrap", 0, boot_POSIX, file); - newXSUB("NDBM_File::bootstrap", 0, boot_NDBM_File, file); - newXSUB("ODBM_File::bootstrap", 0, boot_ODBM_File, file); } diff --git a/perly.c b/perly.c index 91854f9f83..6c4b9fef49 100644 --- a/perly.c +++ b/perly.c @@ -27,1371 +27,1353 @@ typedef union { #define FORMAT 263 #define SUB 264 #define PACKAGE 265 -#define WHILE 266 -#define UNTIL 267 -#define IF 268 -#define UNLESS 269 -#define ELSE 270 -#define ELSIF 271 -#define CONTINUE 272 -#define FOR 273 -#define LOOPEX 274 -#define DOTDOT 275 -#define FUNC0 276 -#define FUNC1 277 -#define FUNC 278 -#define RELOP 279 -#define EQOP 280 -#define MULOP 281 -#define ADDOP 282 -#define DOLSHARP 283 -#define DO 284 -#define LOCAL 285 -#define DELETE 286 -#define HASHBRACK 287 -#define NOAMP 288 -#define OROP 289 -#define ANDOP 290 -#define LSTOP 291 -#define OROR 292 -#define ANDAND 293 -#define BITOROP 294 -#define BITANDOP 295 -#define UNIOP 296 -#define SHIFTOP 297 -#define MATCHOP 298 -#define UMINUS 299 -#define REFGEN 300 -#define POWOP 301 -#define PREINC 302 -#define PREDEC 303 -#define POSTINC 304 -#define POSTDEC 305 -#define ARROW 306 +#define HINT 266 +#define WHILE 267 +#define UNTIL 268 +#define IF 269 +#define UNLESS 270 +#define ELSE 271 +#define ELSIF 272 +#define CONTINUE 273 +#define FOR 274 +#define LOOPEX 275 +#define DOTDOT 276 +#define FUNC0 277 +#define FUNC1 278 +#define FUNC 279 +#define RELOP 280 +#define EQOP 281 +#define MULOP 282 +#define ADDOP 283 +#define DOLSHARP 284 +#define DO 285 +#define LOCAL 286 +#define DELETE 287 +#define HASHBRACK 288 +#define NOAMP 289 +#define OROP 290 +#define ANDOP 291 +#define LSTOP 292 +#define OROR 293 +#define ANDAND 294 +#define BITOROP 295 +#define BITANDOP 296 +#define UNIOP 297 +#define SHIFTOP 298 +#define MATCHOP 299 +#define UMINUS 300 +#define REFGEN 301 +#define POWOP 302 +#define PREINC 303 +#define PREDEC 304 +#define POSTINC 305 +#define POSTDEC 306 +#define ARROW 307 #define YYERRCODE 256 short yylhs[] = { -1, 30, 0, 7, 3, 8, 8, 8, 9, 9, 9, 9, 23, 23, 23, 23, 23, 23, 13, 13, 13, 11, 11, 11, 11, 29, 29, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 26, 26, 28, 28, - 1, 1, 1, 2, 2, 31, 31, 32, 32, 14, - 14, 27, 27, 27, 27, 27, 27, 27, 27, 15, + 1, 1, 1, 1, 2, 2, 31, 31, 32, 32, + 33, 33, 14, 14, 27, 27, 27, 27, 27, 27, + 27, 27, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 24, 24, 22, 17, 18, 19, 20, 21, - 25, 25, 25, 25, 4, 4, 5, 5, 6, 6, + 16, 16, 16, 16, 16, 24, 24, 22, 17, 18, + 19, 20, 21, 25, 25, 25, 25, 4, 4, 5, + 5, 6, 6, }; short yylen[] = { 2, 0, 2, 4, 0, 0, 2, 2, 2, 1, 2, 3, 1, 1, 3, 3, 3, 3, 0, 2, 6, 6, 6, 4, 4, 0, 2, 7, 7, 5, 5, 8, 7, 10, 3, 0, 1, 0, 1, 0, 1, - 1, 1, 1, 3, 2, 3, 3, 3, 2, 3, - 1, 3, 5, 4, 6, 6, 3, 2, 4, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 5, 3, 1, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, - 1, 1, 4, 5, 4, 1, 1, 1, 5, 6, - 5, 6, 5, 4, 5, 6, 8, 1, 1, 3, - 4, 3, 4, 2, 2, 4, 5, 4, 5, 1, - 2, 1, 2, 2, 1, 3, 3, 4, 4, 6, - 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, + 1, 1, 1, 1, 3, 2, 3, 3, 3, 2, + 3, 4, 3, 1, 3, 5, 4, 6, 6, 3, + 2, 4, 3, 4, 4, 4, 4, 4, 4, 4, + 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 5, 3, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, + 2, 3, 3, 1, 1, 4, 5, 4, 1, 1, + 1, 5, 6, 5, 6, 5, 4, 5, 6, 8, + 1, 1, 3, 4, 3, 4, 2, 2, 4, 5, + 4, 5, 1, 2, 1, 2, 2, 1, 3, 3, + 4, 4, 6, 1, 1, 0, 1, 2, 2, 2, + 2, 2, 2, 1, 1, 1, 1, 2, 1, 2, + 1, 3, 2, }; short yydefred[] = { 1, - 0, 5, 0, 40, 0, 0, 0, 6, 41, 7, - 9, 0, 42, 43, 4, 0, 45, 0, 0, 49, - 12, 0, 0, 118, 0, 154, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, - 0, 0, 0, 0, 0, 106, 108, 102, 0, 0, - 0, 142, 5, 44, 47, 46, 48, 151, 153, 152, + 0, 5, 0, 40, 0, 0, 0, 0, 6, 41, + 7, 9, 0, 42, 43, 44, 4, 0, 46, 0, + 0, 50, 0, 12, 0, 0, 121, 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 149, 0, 125, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, - 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 0, 145, 146, 147, 148, 150, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 0, 0, 109, 111, + 105, 0, 0, 0, 145, 5, 45, 48, 47, 49, + 51, 156, 0, 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 90, 91, 0, 0, 0, 0, 0, 0, - 0, 11, 0, 0, 57, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 36, 0, 136, - 137, 0, 0, 0, 0, 0, 0, 0, 100, 0, - 0, 99, 122, 0, 52, 0, 156, 0, 0, 0, - 158, 97, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 152, 0, 128, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 61, 0, 136, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 101, 0, 148, 149, + 150, 151, 153, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 93, 94, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 0, 52, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 36, 0, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 103, 0, 0, 102, 125, 0, + 55, 0, 159, 0, 0, 0, 161, 100, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 120, 0, 0, 0, 3, 139, 0, 0, 29, - 0, 30, 0, 0, 0, 23, 0, 24, 0, 0, - 0, 138, 59, 0, 126, 0, 128, 0, 0, 0, - 0, 160, 123, 0, 155, 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 105, 0, 103, 0, 114, 121, 0, 54, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, 53, 127, - 129, 0, 0, 159, 113, 0, 0, 111, 0, 0, - 104, 109, 115, 0, 140, 27, 28, 21, 0, 22, - 0, 32, 0, 0, 116, 112, 110, 56, 55, 0, - 0, 31, 0, 0, 0, 117, 20, 33, + 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, + 0, 3, 142, 0, 0, 29, 0, 30, 0, 0, + 0, 23, 0, 24, 0, 0, 0, 141, 62, 0, + 129, 0, 131, 0, 0, 0, 0, 163, 126, 0, + 158, 0, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 108, 0, 106, 0, + 117, 124, 0, 57, 0, 0, 0, 0, 19, 0, + 0, 0, 0, 0, 56, 130, 132, 0, 0, 162, + 116, 0, 0, 114, 0, 0, 107, 112, 118, 0, + 143, 27, 28, 21, 0, 22, 0, 32, 0, 0, + 119, 115, 113, 59, 58, 0, 0, 31, 0, 0, + 0, 120, 20, 33, }; short yydgoto[] = { 1, - 8, 9, 73, 199, 202, 192, 79, 3, 10, 11, - 60, 176, 256, 108, 62, 63, 64, 65, 66, 67, - 68, 69, 178, 109, 71, 168, 72, 12, 130, 2, - 13, 14, + 9, 10, 76, 205, 208, 198, 82, 3, 11, 12, + 63, 182, 262, 113, 65, 66, 67, 68, 69, 70, + 71, 72, 184, 114, 74, 174, 75, 13, 135, 2, + 14, 15, 16, }; short yysindex[] = { 0, - 0, 0, 74, 0, -113, -240, -53, 0, 0, 0, - 0, 938, 0, 0, 0, -47, 0, -51, 28, 0, - 0, 0, -33, 0, 75, 0, -22, -21, -20, -14, - 148, 2770, 87, 94, 110, -33, 2820, 2770, 171, 1094, - -214, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 1146, 0, - 2770, 2770, 1209, -33, -33, -33, -33, -33, -194, 0, - 47, 814, -70, -52, -50, 0, 0, 0, 120, 89, - -138, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2770, 2770, 2770, -47, 2770, -47, 2770, -47, 2770, -47, - 1324, 157, 814, 161, 1439, 2770, 0, 170, 0, -103, - -26, -103, 178, 93, 95, 67, 2770, 168, 0, 767, - 0, -103, -70, -70, -70, -87, -87, 130, 11, -70, - -70, 0, -16, 0, 0, 0, 0, 0, -47, 0, - 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 1495, 1595, - 2770, 2770, 2770, 2770, 1642, 1766, 1910, 1957, 2034, 2770, - 2081, 2770, 0, 0, -89, 2770, 2770, 2770, 2770, 2770, - 2225, 0, -247, -92, 0, 201, 168, 189, -194, 145, - -194, 174, 38, 188, 38, 182, -29, 0, 2770, 0, - 0, 206, 202, 767, 2349, 2396, 128, 2770, 0, 2493, - 132, 0, 0, 767, 0, 2770, 0, 2540, 162, 2664, - 0, 0, 0, 168, 168, 168, 168, 1295, 52, -103, - 687, 2770, -40, 2770, -176, 985, 1295, 1295, 350, 2770, - 176, 2770, 236, 2770, 420, 2770, 493, 2770, 116, -42, - 2770, -42, 102, 2770, 225, 2770, -4, 103, 3, 107, - 13, 0, 11, 232, 2770, 0, 0, 2770, -47, 0, - -47, 0, -47, -47, 235, 0, -47, 0, 2770, -47, - 11, 0, 0, 238, 0, 11, 0, 11, 2770, 108, - 160, 0, 0, 14, 0, 2770, 0, 1295, 1295, 2770, - 1295, 1295, 1295, 1295, 1295, 1295, 167, 131, 2770, 17, - 0, 172, 0, 175, 0, 0, 2770, 0, 719, -194, - -194, 38, 0, 2770, 38, 228, -194, -47, 0, 0, - 0, 133, 179, 0, 0, 19, 379, 0, 186, 277, - 0, 0, 0, 278, 0, 0, 0, 0, 230, 0, - 1324, 0, -194, 198, 0, 0, 0, 0, 0, -47, - 289, 0, 300, 38, -47, 0, 0, 0, + 0, 0, 74, 0, -120, -227, -57, -209, 0, 0, + 0, 0, 893, 0, 0, 0, 0, -67, 0, -52, + 52, 0, 993, 0, 0, -4, 0, 25, 0, -31, + -23, -19, -11, 77, 2687, 76, 106, 113, -4, 2786, + 2687, 87, 1043, -132, 2687, 2687, 2687, 2687, 2687, 2687, + 2687, 1100, 0, 2687, 2687, 1222, -4, -4, -4, -4, + -4, -116, 0, -21, 1549, -87, -69, -40, 0, 0, + 0, 145, 115, -121, 0, 0, 0, 0, 0, 0, + 0, 0, -1, 0, 0, 2687, 2687, 2687, -67, 2687, + -67, 2687, -67, 2687, -67, 1329, 150, 1549, 151, 1394, + 2687, 0, 164, 0, 324, -29, 324, 170, 88, 102, + 11, 2687, 190, 0, 442, 0, 324, -87, -87, -87, + -86, -86, 149, -2, -87, -87, 0, -30, 0, 0, + 0, 0, 0, -67, 0, 2687, 2687, 2687, 2687, 2687, + 2687, 2687, 2687, 1451, 1501, 2687, 2687, 2687, 2687, 1598, + 1680, 1774, 1870, 1964, 2687, 2043, 2687, 0, 0, -85, + 2687, 2687, 2687, 2687, 2687, 2143, 0, -248, -49, 0, + 0, 1273, 190, 195, -116, 143, -116, 181, -12, 182, + -12, 192, 36, 0, 2687, 0, 0, 191, 222, 442, + 2242, 2315, 141, 2687, 0, 2415, 142, 0, 0, 442, + 0, 2687, 0, 2514, 177, 2587, 0, 0, 0, 190, + 190, 190, 190, 18, 660, 324, -131, 2687, -181, 2687, + -230, 829, 18, 18, 1915, 2687, 710, 2687, 455, 2687, + 46, 2687, 276, 2687, -127, -28, 2687, -28, 71, 2687, + 237, 2687, -26, 122, -20, 134, 2, 0, -2, 247, + 2687, 0, 0, 2687, -67, 0, -67, 0, -67, -67, + 249, 0, -67, 0, 2687, -67, -2, 0, 0, 252, + 0, -2, 0, -2, 2687, 135, 171, 0, 0, 6, + 0, 2687, 0, 18, 18, 2687, 18, 18, 18, 18, + 18, 18, 183, 136, 2687, 15, 0, 185, 0, 193, + 0, 0, 2687, 0, 290, -116, -116, -12, 0, 2687, + -12, 236, -116, -67, 0, 0, 0, 153, 194, 0, + 0, 17, 392, 0, 200, 261, 0, 0, 0, 274, + 0, 0, 0, 0, 197, 0, 1329, 0, -116, 205, + 0, 0, 0, 0, 0, -67, 291, 0, 292, -12, + -67, 0, 0, 0, }; short yyrindex[] = { 0, - 0, 0, 468, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 505, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 559, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2846, 0, 0, 0, 0, 0, 0, 0, - 0, 3442, 3496, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, - 15, 219, 605, 650, 3539, 0, 0, 0, 2912, 0, + 0, 0, 0, 0, 557, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3333, 2837, 0, 0, 0, 0, + 0, 0, 0, 0, 3423, 3589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3442, 0, 310, 0, 0, 0, 0, 0, 0, 0, - 266, 0, 1970, 0, 0, 311, 0, 2978, 0, 3986, - 3711, 4119, 0, 0, 0, 0, 3442, 3026, 0, 5027, - 0, 4165, 5067, 5103, 5139, 5175, 5211, 3104, 0, 5282, - 5466, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 105, 0, 23, 16, 4876, 618, 3639, 0, 0, + 0, 2892, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3423, 0, 294, 0, 0, + 0, 0, 0, 0, 0, 284, 0, 969, 0, 0, + 306, 0, 2936, 0, 1830, 3682, 2474, 0, 0, 0, + 0, 3423, 2991, 0, 4707, 0, 4051, 4923, 4973, 5009, + 5045, 5092, 3152, 0, 5139, 5187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1038, 0, 0, 34, 0, 163, 0, - 163, 0, 284, 0, 284, 0, 295, 0, 0, 0, - 0, 0, 0, 311, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5027, 0, 0, 0, 0, 3281, 0, - 0, 0, 0, 57, 58, 80, 82, 3930, 1699, 4226, - 4267, 0, 3794, 0, 3835, 4850, 4325, 4567, 0, 0, - 4505, 0, 4446, 0, 4405, 0, 4312, 0, 3879, 3359, - 0, 3400, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3442, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 943, 0, + 0, 0, 61, 0, 165, 0, 165, 0, 233, 0, + 233, 0, 293, 0, 0, 0, 0, 0, 0, 306, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4707, + 0, 0, 0, 0, 3207, 0, 0, 0, 0, 65, + 73, 81, 85, 2218, 4507, 4093, 4134, 0, 3723, 0, + 3769, -25, 3057, 4364, 0, 0, 4466, 0, 4456, 0, + 4415, 0, 4176, 0, 4010, 3250, 0, 3291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4593, 4634, 0, - 4685, 4690, 4696, 4747, 4757, 4788, 0, 0, 311, 0, - 0, 0, 0, 0, 0, 0, 311, 0, 0, 163, - 163, 284, 0, 0, 284, 0, 163, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2456, 0, 0, 0, + 3423, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 329, 0, 163, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 284, 0, 0, 0, 0, + 0, 0, 0, 4519, 4565, 0, 4570, 4621, 4758, 4787, + 4806, 4857, 0, 0, 306, 0, 0, 0, 0, 0, + 0, 0, 306, 0, 0, 165, 165, 233, 0, 0, + 233, 0, 165, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4514, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 308, 0, 165, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, + 0, 0, 0, 0, }; short yygindex[] = { 0, - 0, 0, 0, -148, 0, 0, -5, 298, 0, 0, - 0, 41, -170, -3, 5451, 561, 1087, 0, 0, 0, - 0, 0, 367, -80, 12, 121, 0, 0, -120, 0, - 0, 0, + 0, 0, 0, -171, 0, 0, -5, 279, 0, 0, + 0, 13, -180, -3, 5357, 586, 585, 0, 0, 0, + 0, 0, 344, 362, 359, 95, 0, 0, -130, 0, + 0, 0, 0, }; -#define YYTABLESIZE 5767 -short yytable[] = { 17, - 165, 236, 55, 156, 258, 20, 59, 75, 61, 15, - 74, 197, 76, 186, 198, 183, 18, 83, 85, 87, - 156, 84, 86, 88, 90, 89, 193, 200, 260, 195, - 244, 99, 246, 234, 81, 152, 106, 111, 158, 135, - 160, 130, 107, 245, 130, 119, 135, 97, 250, 123, - 252, 197, 152, 110, 198, 13, 135, 135, 130, 130, - 135, 130, 135, 130, 158, 124, 125, 126, 127, 128, - 157, 15, 159, 13, 38, 15, 201, 129, 169, 167, - 171, 170, 173, 172, 175, 174, 77, 177, 291, 15, - 135, 182, 38, 130, 296, 293, 157, 16, 17, 25, - 15, 15, 15, 264, 139, 295, 315, 184, 15, 321, - 190, 336, 308, 273, 82, 16, 17, 310, 194, 311, - 14, 150, 15, 203, 151, 191, 94, 204, 205, 206, - 207, 328, 25, 95, 330, 25, 25, 25, 14, 25, - 15, 25, 25, 16, 25, 135, 135, 162, 233, 96, - 135, 135, 237, 238, 239, 240, 241, 243, 25, 161, - 287, 292, 25, 25, 298, 294, 313, 163, 235, 4, - 5, 6, 7, 347, 135, 261, 135, 139, 140, 326, - 327, 266, 268, 55, 270, 251, 332, 91, 135, 319, - 25, 334, 274, 149, 150, 25, 179, 151, 25, 25, - 25, 180, 25, 19, 25, 25, 55, 25, 320, 185, - 103, 135, 342, 55, 253, 188, 324, 135, 155, 189, - 196, 25, 25, 78, 25, 25, 25, 26, 257, 249, - 288, 135, 290, 153, 154, 155, 131, 132, 133, 134, - 259, 247, 263, 300, 248, 301, 262, 302, 303, 135, - 269, 305, 276, 25, 307, 167, 272, 150, 151, 51, - 151, 143, 51, 144, 289, 312, 130, 130, 130, 130, - 340, 297, 316, 135, 304, 130, 51, 51, 309, 130, - 130, 130, 130, 18, 314, 25, 331, 25, 25, 130, - 130, 318, 130, 130, 130, 130, 322, 130, 130, 323, - 329, 130, 333, 335, 130, 130, 130, 254, 255, 51, - 337, 51, 131, 132, 133, 134, 18, 338, 339, 18, - 18, 18, 343, 18, 35, 18, 18, 61, 18, 345, - 137, 138, 139, 140, 344, 4, 5, 6, 7, 348, - 346, 51, 18, 145, 146, 147, 148, 18, 149, 150, - 37, 143, 151, 13, 37, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 35, - 164, 341, 25, 25, 18, 25, 25, 25, 70, 306, - 0, 0, 25, 25, 25, 25, 25, 25, 0, 0, - 25, 0, 0, 0, 0, 25, 139, 140, 0, 25, - 0, 25, 25, 0, 0, 153, 18, 280, 18, 18, - 143, 0, 144, 150, 0, 0, 151, 0, 25, 25, +#define YYTABLESIZE 5643 +short yytable[] = { 19, + 264, 22, 17, 161, 161, 242, 78, 62, 88, 64, + 192, 266, 77, 206, 79, 84, 90, 140, 84, 83, + 92, 163, 140, 140, 89, 91, 93, 95, 94, 20, + 250, 58, 84, 84, 104, 157, 157, 240, 203, 111, + 116, 204, 140, 251, 256, 140, 258, 23, 124, 140, + 165, 144, 128, 162, 196, 17, 54, 170, 140, 54, + 140, 163, 207, 13, 87, 84, 297, 84, 155, 197, + 17, 156, 299, 54, 54, 252, 203, 302, 148, 204, + 149, 13, 164, 175, 173, 177, 176, 179, 178, 181, + 180, 17, 183, 162, 301, 314, 188, 84, 321, 17, + 316, 38, 317, 17, 25, 16, 54, 327, 54, 342, + 80, 17, 58, 17, 140, 99, 96, 155, 17, 38, + 156, 14, 58, 16, 112, 15, 108, 334, 209, 293, + 336, 17, 210, 211, 212, 213, 18, 25, 54, 14, + 25, 25, 25, 15, 25, 100, 25, 25, 142, 25, + 144, 145, 101, 239, 144, 145, 134, 243, 244, 245, + 246, 247, 249, 25, 25, 140, 154, 155, 25, 353, + 156, 155, 241, 167, 156, 332, 333, 140, 140, 140, + 298, 267, 338, 257, 166, 168, 140, 272, 274, 185, + 276, 186, 300, 319, 325, 25, 140, 25, 280, 21, + 25, 25, 25, 191, 25, 58, 25, 25, 348, 25, + 194, 340, 4, 5, 6, 7, 8, 158, 159, 160, + 160, 259, 263, 25, 140, 140, 195, 25, 25, 25, + 25, 268, 18, 140, 140, 255, 294, 346, 296, 202, + 140, 84, 84, 84, 84, 136, 137, 138, 139, 306, + 265, 307, 84, 308, 309, 25, 29, 311, 260, 261, + 313, 173, 269, 275, 84, 18, 278, 282, 18, 18, + 18, 318, 18, 156, 18, 18, 295, 18, 322, 84, + 84, 84, 54, 54, 54, 54, 303, 25, 310, 25, + 25, 18, 315, 141, 337, 320, 18, 142, 143, 144, + 145, 344, 136, 137, 138, 139, 335, 324, 339, 328, + 150, 151, 152, 153, 345, 154, 155, 329, 341, 156, + 54, 54, 54, 18, 343, 142, 143, 144, 145, 349, + 331, 351, 352, 64, 37, 4, 5, 6, 7, 8, + 350, 153, 35, 154, 155, 354, 146, 156, 35, 347, + 148, 13, 149, 37, 169, 18, 73, 18, 18, 312, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 0, 0, 0, 25, 25, 0, 25, 25, - 25, 144, 0, 0, 0, 25, 25, 25, 25, 25, - 25, 0, 0, 25, 137, 138, 139, 140, 25, 0, - 0, 0, 25, 0, 25, 25, 0, 2, 146, 147, - 148, 0, 149, 150, 0, 136, 151, 0, 0, 137, - 138, 139, 140, 0, 51, 51, 51, 51, 0, 141, - 142, 0, 145, 146, 147, 148, 0, 149, 150, 0, - 39, 151, 0, 39, 39, 39, 0, 39, 0, 39, - 39, 0, 39, 0, 137, 138, 139, 140, 0, 0, - 0, 0, 51, 51, 51, 0, 39, 0, 0, 147, - 148, 39, 149, 150, 0, 0, 151, 0, 0, 18, + 25, 25, 25, 25, 25, 0, 0, 0, 25, 25, + 0, 25, 25, 25, 86, 0, 0, 0, 25, 25, + 25, 25, 25, 25, 0, 0, 25, 102, 0, 0, + 0, 25, 0, 115, 0, 25, 0, 25, 25, 0, + 0, 156, 0, 0, 0, 129, 130, 131, 132, 133, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 0, 0, 0, 25, 25, + 0, 25, 25, 25, 0, 0, 0, 171, 25, 25, + 25, 25, 25, 25, 149, 0, 25, 0, 0, 190, + 0, 25, 189, 0, 0, 25, 0, 25, 25, 0, + 200, 0, 0, 199, 47, 0, 201, 58, 60, 57, + 0, 52, 0, 61, 55, 0, 54, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 0, 0, 0, 18, 18, 39, 18, + 18, 18, 18, 0, 2, 59, 18, 18, 0, 18, 18, 18, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 0, 0, 18, 0, 0, 0, 0, 18, - 0, 0, 0, 18, 0, 18, 18, 0, 0, 0, - 39, 151, 0, 39, 151, 151, 151, 0, 151, 141, - 151, 151, 141, 151, 113, 114, 115, 116, 117, 0, - 0, 120, 121, 0, 0, 0, 141, 141, 0, 141, - 0, 141, 151, 0, 136, 0, 0, 0, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 141, 142, - 0, 145, 146, 147, 148, 84, 149, 150, 84, 141, - 151, 141, 0, 136, 0, 0, 0, 137, 138, 139, - 140, 0, 84, 84, 0, 84, 0, 84, 0, 0, - 145, 146, 147, 148, 0, 149, 150, 0, 0, 151, - 0, 141, 152, 0, 151, 152, 152, 152, 0, 152, - 101, 152, 152, 101, 152, 0, 0, 84, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 101, 101, 0, - 101, 0, 101, 152, 148, 0, 149, 150, 0, 0, - 151, 0, 0, 39, 39, 39, 39, 39, 39, 0, - 0, 0, 0, 39, 39, 39, 39, 0, 0, 0, - 39, 39, 101, 39, 39, 39, 0, 0, 0, 0, - 39, 39, 39, 39, 39, 39, 0, 0, 39, 325, - 0, 0, 0, 39, 0, 0, 0, 39, 0, 39, - 39, 137, 138, 139, 140, 152, 0, 0, 0, 143, - 0, 144, 0, 0, 0, 0, 0, 0, 0, 149, - 150, 0, 0, 151, 0, 0, 0, 0, 0, 44, - 0, 0, 55, 57, 54, 0, 49, 0, 58, 52, - 0, 51, 0, 0, 0, 151, 151, 151, 151, 151, - 0, 0, 0, 0, 141, 141, 141, 141, 0, 0, - 56, 0, 151, 141, 151, 151, 151, 141, 141, 141, - 141, 151, 151, 151, 151, 151, 151, 141, 141, 151, - 141, 141, 141, 141, 151, 141, 141, 53, 151, 141, - 151, 151, 141, 141, 141, 0, 0, 0, 0, 0, - 84, 84, 84, 84, 143, 0, 144, 0, 0, 84, - 0, 0, 0, 84, 84, 84, 84, 0, 0, 15, - 0, 0, 45, 84, 84, 0, 84, 84, 84, 84, - 0, 84, 84, 0, 0, 84, 152, 152, 152, 152, - 152, 0, 0, 0, 0, 101, 101, 101, 101, 0, - 0, 0, 0, 152, 101, 152, 152, 152, 101, 101, - 101, 101, 152, 152, 152, 152, 152, 152, 101, 101, - 152, 101, 101, 101, 101, 152, 101, 101, 0, 152, - 101, 152, 152, 101, 101, 101, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 137, 0, 139, 140, 0, - 44, 0, 0, 55, 57, 54, 0, 49, 0, 58, - 52, 0, 51, 149, 150, 0, 0, 151, 0, 0, - 0, 0, 0, 136, 0, 0, 50, 137, 138, 139, - 140, 56, 0, 0, 0, 0, 0, 141, 142, 0, - 145, 146, 147, 148, 0, 149, 150, 0, 0, 151, - 0, 0, 0, 22, 23, 24, 25, 26, 53, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 0, 33, 34, 35, 143, 0, 144, 0, 36, - 37, 38, 39, 40, 41, 0, 0, 42, 0, 0, - 15, 0, 43, 45, 0, 0, 46, 0, 47, 48, - 39, 0, 163, 39, 39, 39, 0, 39, 0, 39, - 39, 0, 39, 0, 0, 0, 0, 0, 136, 0, - 0, 0, 137, 138, 139, 140, 39, 0, 0, 0, - 0, 39, 141, 142, 0, 145, 146, 147, 148, 80, - 149, 150, 0, 0, 151, 0, 0, 92, 0, 0, - 0, 0, 80, 101, 0, 104, 44, 0, 39, 55, - 57, 54, 0, 49, 0, 58, 52, 0, 51, 0, - 80, 80, 80, 80, 80, 0, 0, 0, 0, 0, - 0, 0, 105, 0, 0, 0, 0, 56, 0, 0, - 39, 0, 0, 39, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, - 0, 55, 57, 54, 53, 49, 118, 58, 52, 187, - 51, 0, 0, 21, 22, 23, 24, 25, 26, 0, - 0, 0, 0, 27, 28, 29, 30, 0, 0, 56, - 31, 32, 0, 33, 34, 35, 15, 0, 0, 45, - 36, 37, 38, 39, 40, 41, 0, 0, 42, 0, - 0, 0, 0, 43, 0, 0, 53, 46, 0, 47, - 48, 44, 0, 0, 55, 57, 54, 0, 49, 0, - 58, 52, 0, 51, 0, 0, 0, 0, 0, 136, - 0, 0, 0, 137, 138, 139, 140, 0, 15, 0, - 0, 45, 56, 0, 142, 0, 145, 146, 147, 148, - 0, 149, 150, 0, 0, 151, 0, 0, 0, 0, - 0, 0, 0, 39, 39, 39, 39, 39, 39, 53, - 0, 122, 0, 39, 39, 39, 39, 0, 0, 0, - 39, 39, 0, 39, 39, 39, 0, 0, 0, 0, - 39, 39, 39, 39, 39, 39, 0, 0, 39, 0, - 0, 15, 0, 39, 45, 0, 0, 39, 0, 39, - 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22, 23, 24, 25, 26, 143, 44, 144, 0, 55, - 57, 54, 0, 49, 0, 58, 52, 32, 51, 33, - 34, 35, 0, 0, 0, 0, 36, 37, 38, 39, - 40, 41, 0, 0, 42, 0, 0, 56, 0, 43, - 0, 0, 0, 46, 0, 47, 48, 0, 0, 0, - 0, 0, 22, 23, 24, 25, 26, 0, 0, 0, - 0, 0, 0, 0, 53, 0, 0, 0, 0, 32, - 0, 33, 34, 35, 0, 0, 0, 0, 36, 37, - 38, 39, 40, 41, 0, 0, 42, 0, 0, 0, - 0, 43, 0, 0, 0, 46, 15, 47, 48, 45, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 22, 23, 24, 25, 26, - 0, 44, 0, 0, 55, 57, 54, 0, 49, 181, - 58, 52, 32, 51, 33, 34, 35, 0, 0, 0, - 0, 36, 37, 38, 39, 40, 41, 0, 0, 42, - 0, 0, 56, 0, 43, 0, 0, 0, 46, 0, - 47, 48, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 44, 0, 53, - 55, 57, 54, 0, 49, 0, 58, 52, 0, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 212, 0, 0, 56, 0, - 0, 15, 0, 0, 45, 0, 0, 0, 0, 136, - 0, 0, 0, 137, 138, 139, 140, 0, 0, 21, - 22, 23, 24, 25, 26, 53, 145, 146, 147, 148, - 0, 149, 150, 0, 0, 151, 0, 32, 0, 33, - 34, 35, 0, 0, 0, 0, 36, 37, 38, 39, - 40, 41, 0, 0, 42, 0, 0, 15, 0, 43, - 45, 0, 0, 46, 0, 47, 48, 44, 0, 0, - 55, 57, 54, 0, 49, 0, 58, 52, 0, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 214, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 44, 0, 0, 55, 57, 54, - 0, 49, 0, 58, 52, 53, 51, 0, 0, 0, - 0, 0, 0, 0, 0, 22, 23, 24, 25, 26, - 0, 0, 220, 0, 0, 56, 0, 0, 0, 0, - 0, 0, 32, 0, 33, 34, 35, 15, 0, 0, - 45, 36, 37, 38, 39, 40, 41, 0, 0, 42, - 0, 0, 53, 0, 43, 0, 0, 0, 46, 77, - 47, 48, 77, 0, 0, 0, 0, 0, 0, 0, - 0, 22, 23, 24, 25, 26, 77, 77, 0, 77, - 0, 77, 0, 0, 15, 0, 0, 45, 32, 0, - 33, 34, 35, 0, 0, 0, 0, 36, 37, 38, - 39, 40, 41, 0, 0, 42, 0, 0, 0, 77, - 43, 77, 0, 0, 46, 0, 47, 48, 44, 0, - 0, 55, 57, 54, 0, 49, 0, 58, 52, 0, - 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 77, 0, 0, 0, 0, 222, 0, 0, 56, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 22, 23, 24, 25, 26, 53, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, - 33, 34, 35, 0, 0, 0, 0, 36, 37, 38, - 39, 40, 41, 0, 0, 42, 0, 0, 15, 0, - 43, 45, 0, 0, 46, 0, 47, 48, 22, 23, - 24, 25, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 32, 0, 33, 34, 35, - 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, - 0, 0, 42, 0, 0, 0, 0, 43, 0, 0, - 0, 46, 44, 47, 48, 55, 57, 54, 0, 49, - 0, 58, 52, 0, 51, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 0, 0, - 224, 0, 0, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 77, 77, 44, - 0, 0, 55, 57, 54, 0, 49, 0, 58, 52, - 53, 51, 77, 77, 77, 0, 0, 0, 0, 0, - 131, 0, 0, 131, 0, 0, 0, 226, 0, 0, - 56, 0, 22, 23, 24, 25, 26, 131, 131, 0, - 0, 0, 15, 0, 0, 45, 0, 0, 0, 32, - 0, 33, 34, 35, 0, 0, 0, 53, 36, 37, - 38, 39, 40, 41, 0, 0, 42, 0, 0, 0, - 131, 43, 131, 0, 0, 46, 44, 47, 48, 55, - 57, 54, 0, 49, 0, 58, 52, 0, 51, 15, - 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 131, 0, 228, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 44, 0, 0, 55, 57, 54, 0, - 49, 0, 58, 52, 53, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 231, 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 15, 0, 0, 45, - 0, 0, 0, 0, 0, 0, 22, 23, 24, 25, - 26, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 32, 0, 33, 34, 35, 0, 0, - 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, - 42, 0, 0, 15, 0, 43, 45, 0, 0, 46, - 0, 47, 48, 22, 23, 24, 25, 26, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 0, 33, 34, 35, 131, 131, 131, 131, 36, - 37, 38, 39, 40, 41, 0, 0, 42, 0, 0, - 0, 0, 43, 0, 0, 0, 46, 44, 47, 48, - 55, 57, 54, 0, 49, 242, 58, 52, 0, 51, - 0, 0, 0, 131, 131, 131, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, - 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 32, 0, 33, - 34, 35, 0, 0, 0, 53, 36, 37, 38, 39, - 40, 41, 0, 0, 42, 0, 0, 0, 0, 43, - 0, 0, 0, 46, 0, 47, 48, 22, 23, 24, - 25, 26, 0, 0, 0, 0, 0, 15, 0, 0, - 45, 0, 0, 0, 32, 0, 33, 34, 35, 0, - 0, 0, 0, 36, 37, 38, 39, 40, 41, 0, - 0, 42, 0, 0, 0, 0, 43, 0, 0, 0, - 46, 44, 47, 48, 55, 57, 54, 0, 49, 265, - 58, 52, 0, 51, 0, 0, 0, 0, 0, 0, + 0, 0, 56, 18, 0, 18, 18, 39, 0, 0, + 39, 39, 39, 0, 39, 0, 39, 39, 0, 39, + 0, 270, 0, 0, 0, 142, 143, 144, 145, 0, + 0, 279, 0, 39, 17, 141, 0, 48, 39, 142, + 143, 144, 145, 154, 155, 0, 0, 156, 0, 146, + 147, 0, 150, 151, 152, 153, 0, 154, 155, 154, + 0, 156, 154, 154, 154, 39, 154, 144, 154, 154, + 144, 154, 0, 0, 0, 144, 145, 0, 0, 0, + 85, 0, 304, 0, 144, 144, 0, 144, 97, 144, + 154, 154, 155, 85, 106, 156, 109, 39, 0, 0, + 39, 0, 118, 119, 120, 121, 122, 0, 0, 125, + 126, 85, 85, 85, 85, 85, 0, 144, 0, 144, + 155, 0, 0, 155, 155, 155, 326, 155, 104, 155, + 155, 104, 155, 0, 330, 0, 0, 141, 0, 0, + 0, 142, 143, 144, 145, 104, 104, 0, 104, 144, + 104, 155, 154, 0, 150, 151, 152, 153, 0, 154, + 155, 0, 193, 156, 0, 0, 0, 0, 25, 26, + 27, 28, 29, 0, 0, 0, 0, 0, 0, 0, + 104, 0, 0, 0, 0, 0, 35, 0, 36, 37, + 38, 0, 0, 0, 0, 39, 40, 41, 42, 43, + 44, 0, 0, 45, 142, 143, 144, 145, 46, 0, + 0, 0, 49, 155, 50, 51, 0, 0, 168, 152, + 153, 0, 154, 155, 0, 0, 156, 0, 0, 0, + 39, 39, 39, 39, 39, 39, 0, 0, 0, 0, + 0, 39, 39, 39, 39, 0, 0, 0, 39, 39, + 0, 39, 39, 39, 0, 0, 0, 0, 39, 39, + 39, 39, 39, 39, 0, 0, 39, 0, 0, 0, + 0, 39, 0, 0, 0, 39, 0, 39, 39, 0, + 0, 0, 0, 154, 154, 154, 154, 154, 0, 0, + 0, 0, 0, 144, 144, 144, 144, 0, 0, 0, + 0, 154, 144, 154, 154, 154, 144, 144, 144, 144, + 154, 154, 154, 154, 154, 154, 144, 144, 154, 144, + 144, 144, 144, 154, 144, 144, 0, 154, 144, 154, + 154, 144, 144, 144, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 155, 155, 155, 155, 155, 0, + 0, 0, 0, 0, 104, 104, 104, 104, 0, 148, + 0, 149, 155, 104, 155, 155, 155, 104, 104, 104, + 104, 155, 155, 155, 155, 155, 155, 104, 104, 155, + 104, 104, 104, 104, 155, 104, 104, 0, 155, 104, + 155, 155, 104, 104, 104, 47, 0, 0, 58, 60, + 57, 0, 52, 0, 61, 55, 0, 54, 0, 142, + 143, 144, 145, 0, 0, 0, 0, 0, 0, 0, + 0, 53, 150, 151, 152, 153, 59, 154, 155, 0, + 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 39, 0, 0, 39, 39, + 39, 0, 39, 56, 39, 39, 0, 39, 0, 142, + 143, 144, 145, 0, 0, 0, 0, 0, 0, 0, + 0, 39, 0, 151, 152, 153, 39, 154, 155, 134, + 0, 156, 134, 0, 0, 17, 0, 0, 48, 0, + 0, 0, 0, 0, 0, 47, 134, 134, 58, 60, + 57, 0, 52, 39, 61, 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, - 0, 55, 57, 54, 0, 49, 267, 58, 52, 53, - 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 81, 0, 0, 0, 0, 59, 0, 0, 134, + 0, 134, 0, 0, 0, 39, 0, 0, 39, 0, + 0, 0, 0, 0, 0, 47, 0, 0, 58, 60, + 57, 0, 52, 56, 61, 55, 0, 54, 0, 0, + 0, 134, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 110, 0, 0, 141, 0, 59, 0, 142, 143, + 144, 145, 0, 0, 0, 17, 0, 0, 48, 147, + 0, 150, 151, 152, 153, 0, 154, 155, 0, 0, + 156, 0, 47, 56, 0, 58, 60, 57, 0, 52, + 123, 61, 55, 0, 54, 0, 0, 0, 24, 25, + 26, 27, 28, 29, 0, 0, 0, 0, 0, 30, + 31, 32, 33, 59, 0, 17, 34, 35, 48, 36, + 37, 38, 0, 0, 0, 0, 39, 40, 41, 42, + 43, 44, 0, 0, 45, 0, 0, 0, 0, 46, + 56, 0, 0, 49, 0, 50, 51, 0, 39, 39, + 39, 39, 39, 39, 0, 0, 0, 0, 0, 39, + 39, 39, 39, 0, 0, 0, 39, 39, 0, 39, + 39, 39, 17, 0, 0, 48, 39, 39, 39, 39, + 39, 39, 0, 0, 39, 134, 134, 134, 134, 39, + 0, 0, 0, 39, 0, 39, 39, 0, 0, 25, + 26, 27, 28, 29, 47, 0, 0, 58, 60, 57, + 0, 52, 0, 61, 55, 0, 54, 35, 0, 36, + 37, 38, 0, 134, 134, 134, 39, 40, 41, 42, + 43, 44, 0, 0, 45, 59, 0, 0, 0, 46, + 0, 0, 0, 49, 0, 50, 51, 0, 0, 25, + 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 56, 253, 127, 0, 254, 35, 0, 36, + 37, 38, 0, 0, 0, 0, 39, 40, 41, 42, + 43, 44, 0, 148, 45, 149, 0, 0, 0, 46, + 0, 0, 0, 49, 17, 50, 51, 48, 0, 0, + 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, + 29, 47, 0, 0, 58, 60, 57, 0, 52, 0, + 61, 55, 0, 54, 35, 0, 36, 37, 38, 0, + 0, 0, 0, 39, 40, 41, 42, 43, 44, 0, + 0, 45, 59, 0, 0, 0, 46, 0, 0, 0, + 49, 0, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, + 0, 0, 0, 0, 0, 0, 47, 0, 0, 58, + 60, 57, 0, 52, 187, 61, 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 45, 0, 0, 0, 0, 0, - 0, 22, 23, 24, 25, 26, 53, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 0, 32, 82, - 33, 34, 35, 0, 0, 0, 0, 36, 37, 38, - 39, 40, 41, 82, 82, 42, 82, 0, 15, 0, - 43, 45, 0, 0, 46, 44, 47, 48, 55, 57, - 54, 0, 49, 0, 58, 52, 0, 51, 0, 0, - 0, 0, 0, 0, 0, 0, 82, 0, 82, 0, - 0, 271, 0, 0, 0, 0, 56, 0, 0, 0, + 0, 17, 0, 0, 48, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 44, 0, 0, 55, 57, 54, 82, 49, - 275, 58, 52, 53, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, + 27, 28, 29, 47, 56, 0, 58, 60, 57, 0, + 52, 0, 61, 55, 0, 54, 35, 0, 36, 37, + 38, 0, 0, 0, 0, 39, 40, 41, 42, 43, + 44, 218, 0, 45, 59, 0, 17, 0, 46, 48, + 0, 0, 49, 0, 50, 51, 0, 0, 0, 0, + 0, 0, 0, 47, 0, 0, 58, 60, 57, 0, + 52, 56, 61, 55, 0, 54, 0, 0, 141, 0, + 0, 0, 142, 143, 144, 145, 0, 0, 0, 0, + 0, 220, 146, 147, 59, 150, 151, 152, 153, 0, + 154, 155, 0, 17, 156, 0, 48, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, + 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 35, 0, 36, 37, 38, 0, 148, + 0, 149, 39, 40, 41, 42, 43, 44, 0, 0, + 45, 0, 0, 17, 0, 46, 48, 0, 0, 49, + 47, 50, 51, 58, 60, 57, 0, 52, 0, 61, + 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, + 25, 26, 27, 28, 29, 0, 0, 0, 226, 0, + 0, 59, 0, 0, 0, 0, 0, 0, 35, 0, + 36, 37, 38, 0, 0, 0, 0, 39, 40, 41, + 42, 43, 44, 0, 0, 45, 0, 0, 56, 0, + 46, 0, 0, 0, 49, 0, 50, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, + 28, 29, 47, 0, 0, 58, 60, 57, 0, 52, + 17, 61, 55, 48, 54, 35, 0, 36, 37, 38, + 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, + 228, 0, 45, 59, 0, 0, 0, 46, 0, 0, + 0, 49, 0, 50, 51, 0, 0, 25, 26, 27, + 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 56, 0, 0, 0, 0, 35, 0, 36, 37, 38, + 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, + 0, 0, 45, 0, 0, 0, 0, 46, 0, 0, + 0, 49, 17, 50, 51, 48, 47, 0, 0, 58, + 60, 57, 0, 52, 0, 61, 55, 0, 54, 0, + 0, 0, 0, 0, 141, 0, 0, 0, 142, 143, + 144, 145, 0, 0, 230, 0, 0, 59, 146, 147, + 0, 150, 151, 152, 153, 0, 154, 155, 0, 0, + 156, 0, 0, 0, 25, 26, 27, 28, 29, 0, + 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, + 127, 0, 35, 127, 36, 37, 38, 0, 0, 0, + 0, 39, 40, 41, 42, 43, 44, 127, 127, 45, + 127, 0, 127, 0, 46, 0, 17, 0, 49, 48, + 50, 51, 47, 0, 0, 58, 60, 57, 0, 52, + 0, 61, 55, 0, 54, 0, 0, 0, 0, 0, + 127, 0, 127, 0, 0, 0, 0, 0, 0, 0, + 232, 0, 0, 59, 0, 0, 25, 26, 27, 28, + 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 127, 0, 35, 0, 36, 37, 38, 0, + 56, 0, 0, 39, 40, 41, 42, 43, 44, 0, + 0, 45, 286, 0, 0, 148, 46, 149, 0, 0, + 49, 0, 50, 51, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 48, 47, 0, 0, 58, + 60, 57, 0, 52, 0, 61, 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 56, 0, 22, 23, 24, 25, 26, - 0, 0, 0, 0, 0, 15, 0, 0, 45, 0, - 0, 0, 32, 0, 33, 34, 35, 0, 0, 0, - 53, 36, 37, 38, 39, 40, 41, 0, 0, 42, - 0, 0, 0, 0, 43, 0, 0, 0, 46, 0, - 47, 48, 22, 23, 24, 25, 26, 0, 0, 0, - 0, 0, 15, 0, 0, 45, 0, 0, 0, 32, - 0, 33, 34, 35, 0, 0, 0, 0, 36, 37, - 38, 39, 40, 41, 0, 0, 42, 0, 0, 0, - 0, 43, 0, 0, 0, 46, 44, 47, 48, 55, - 57, 54, 0, 49, 0, 58, 52, 0, 51, 0, + 0, 0, 0, 0, 234, 0, 0, 59, 0, 0, + 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, + 36, 37, 38, 0, 56, 0, 0, 39, 40, 41, + 42, 43, 44, 0, 0, 45, 0, 0, 0, 0, + 46, 0, 0, 0, 49, 47, 50, 51, 58, 60, + 57, 0, 52, 0, 61, 55, 17, 54, 0, 48, + 0, 0, 0, 0, 0, 0, 127, 127, 127, 127, + 0, 0, 0, 237, 0, 127, 59, 0, 0, 127, + 127, 0, 0, 0, 0, 0, 0, 0, 0, 127, + 127, 0, 127, 127, 127, 127, 25, 26, 27, 28, + 29, 0, 0, 56, 127, 127, 127, 0, 0, 0, + 0, 0, 0, 0, 35, 0, 36, 37, 38, 0, + 0, 0, 0, 39, 40, 41, 42, 43, 44, 0, + 0, 45, 0, 0, 0, 17, 46, 0, 48, 0, + 49, 0, 50, 51, 0, 47, 0, 0, 58, 60, + 57, 0, 52, 248, 61, 55, 0, 54, 0, 0, + 141, 0, 0, 0, 142, 143, 144, 145, 0, 0, + 0, 0, 0, 0, 146, 147, 59, 150, 151, 152, + 153, 0, 154, 155, 0, 0, 156, 0, 0, 0, + 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, + 0, 0, 0, 56, 0, 0, 0, 0, 35, 0, + 36, 37, 38, 0, 0, 0, 0, 39, 40, 41, + 42, 43, 44, 0, 0, 45, 0, 0, 53, 0, + 46, 53, 0, 0, 49, 17, 50, 51, 48, 0, + 0, 0, 0, 0, 47, 53, 53, 58, 60, 57, + 0, 52, 271, 61, 55, 0, 54, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 26, 27, 28, 29, 0, 59, 0, 0, 53, 0, + 53, 0, 0, 0, 0, 0, 0, 35, 0, 36, + 37, 38, 0, 0, 0, 0, 39, 40, 41, 42, + 43, 44, 56, 0, 45, 0, 0, 0, 0, 46, + 53, 0, 0, 49, 0, 50, 51, 47, 0, 0, + 58, 60, 57, 0, 52, 273, 61, 55, 0, 54, + 0, 0, 0, 0, 17, 0, 0, 48, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 82, 82, 82, 82, 0, 0, 56, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 26, 27, 28, 29, 0, 56, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 35, 0, 36, + 37, 38, 0, 0, 0, 0, 39, 40, 41, 42, + 43, 44, 0, 0, 45, 0, 0, 17, 0, 46, + 48, 0, 0, 49, 0, 50, 51, 47, 0, 0, + 58, 60, 57, 0, 52, 0, 61, 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 82, 0, 0, 0, 22, - 23, 24, 25, 26, 53, 0, 277, 0, 0, 82, - 82, 82, 0, 0, 0, 0, 32, 0, 33, 34, - 35, 0, 0, 0, 0, 36, 37, 38, 39, 40, - 41, 0, 0, 42, 0, 0, 15, 0, 43, 45, - 0, 0, 46, 0, 47, 48, 22, 23, 24, 25, - 26, 0, 44, 0, 0, 55, 57, 54, 0, 49, - 0, 58, 52, 32, 51, 33, 34, 35, 0, 0, - 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, - 42, 0, 0, 56, 0, 43, 0, 0, 0, 46, - 0, 47, 48, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 44, 0, 0, 55, 57, 54, 0, 49, - 53, 58, 52, 0, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 277, 0, 0, 0, 0, 59, 0, + 0, 0, 0, 0, 53, 53, 53, 53, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, + 27, 28, 29, 0, 0, 56, 0, 53, 53, 0, + 0, 0, 0, 0, 97, 0, 35, 97, 36, 37, + 38, 0, 53, 53, 53, 39, 40, 41, 42, 43, + 44, 97, 97, 45, 97, 0, 97, 17, 46, 0, + 48, 0, 49, 0, 50, 51, 47, 0, 0, 58, + 60, 57, 0, 52, 281, 61, 55, 0, 54, 0, + 0, 0, 0, 0, 97, 0, 97, 0, 0, 0, + 0, 25, 26, 27, 28, 29, 0, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, + 0, 36, 37, 38, 0, 0, 97, 0, 39, 40, + 41, 42, 43, 44, 56, 0, 45, 0, 0, 0, + 0, 46, 0, 0, 0, 49, 0, 50, 51, 47, + 0, 0, 58, 60, 57, 0, 52, 0, 61, 55, + 0, 54, 0, 0, 0, 0, 17, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 56, 0, 0, 135, 0, 0, 135, - 0, 0, 15, 0, 0, 45, 0, 0, 0, 0, - 0, 0, 0, 135, 135, 0, 135, 0, 135, 0, - 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 135, 32, 135, 33, - 34, 35, 15, 0, 0, 45, 36, 37, 38, 39, - 40, 41, 119, 0, 42, 119, 0, 0, 0, 43, - 0, 0, 0, 46, 0, 47, 48, 0, 135, 119, - 119, 0, 119, 0, 119, 0, 0, 0, 0, 0, + 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 25, 26, 27, 28, 29, 0, 56, 0, 283, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, + 0, 36, 37, 38, 0, 0, 0, 0, 39, 40, + 41, 42, 43, 44, 0, 0, 45, 0, 0, 17, + 0, 46, 48, 0, 0, 49, 0, 50, 51, 47, + 0, 0, 58, 60, 57, 0, 52, 0, 61, 55, + 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, + 97, 97, 97, 97, 0, 0, 0, 0, 0, 97, + 59, 0, 0, 97, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 97, 97, 0, 97, 97, 97, 97, + 25, 26, 27, 28, 29, 0, 0, 56, 97, 97, + 97, 0, 0, 0, 0, 0, 0, 0, 35, 0, + 36, 37, 38, 0, 0, 0, 0, 39, 40, 41, + 42, 43, 44, 0, 0, 45, 0, 0, 0, 17, + 46, 0, 48, 0, 49, 0, 50, 51, 47, 0, + 0, 58, 60, 57, 0, 52, 0, 61, 55, 0, + 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 25, 26, 27, 28, 29, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 119, 0, 119, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 141, 0, - 0, 141, 0, 0, 0, 0, 22, 23, 24, 25, - 26, 0, 0, 0, 119, 141, 141, 0, 141, 0, - 141, 0, 0, 32, 0, 33, 34, 35, 0, 0, - 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, - 42, 0, 0, 0, 0, 43, 144, 0, 141, 46, - 141, 47, 48, 0, 0, 0, 98, 23, 24, 25, - 26, 0, 0, 144, 144, 0, 144, 0, 144, 0, - 0, 0, 0, 32, 0, 33, 34, 35, 0, 0, - 141, 0, 36, 37, 38, 39, 40, 41, 0, 0, - 42, 135, 135, 135, 135, 43, 144, 0, 144, 46, - 135, 47, 48, 0, 135, 135, 135, 135, 0, 0, - 0, 0, 0, 0, 135, 135, 0, 135, 135, 135, - 135, 0, 135, 135, 96, 0, 135, 96, 144, 135, - 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 96, 96, 0, 96, 0, 96, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 119, 119, 119, - 119, 0, 0, 0, 0, 0, 119, 0, 0, 0, - 119, 119, 119, 119, 0, 0, 96, 0, 0, 0, - 119, 119, 0, 119, 119, 119, 119, 0, 119, 119, - 0, 0, 119, 0, 0, 119, 119, 119, 0, 0, - 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, + 0, 35, 0, 36, 37, 38, 0, 0, 0, 0, + 39, 40, 41, 42, 43, 44, 56, 138, 45, 0, + 138, 0, 0, 46, 0, 0, 0, 49, 0, 50, + 51, 0, 0, 0, 138, 138, 0, 138, 0, 138, + 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 138, 0, 138, + 0, 0, 122, 0, 0, 122, 0, 0, 0, 0, + 0, 0, 0, 25, 26, 27, 28, 29, 0, 122, + 122, 0, 122, 0, 122, 0, 0, 0, 0, 138, + 0, 35, 0, 36, 37, 38, 0, 0, 0, 0, + 39, 40, 41, 42, 43, 44, 144, 0, 45, 144, + 0, 0, 122, 46, 122, 0, 0, 49, 0, 50, + 51, 0, 0, 144, 144, 0, 144, 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 141, 141, 141, 141, 0, 0, 0, - 0, 0, 141, 0, 0, 0, 141, 141, 141, 141, - 0, 0, 0, 0, 0, 0, 141, 141, 0, 141, - 141, 141, 141, 0, 141, 141, 0, 0, 141, 0, - 0, 141, 141, 141, 0, 0, 0, 0, 0, 0, - 0, 144, 144, 144, 144, 0, 0, 0, 0, 0, - 144, 0, 0, 0, 144, 144, 144, 144, 0, 0, - 0, 0, 0, 0, 144, 144, 0, 144, 144, 144, - 144, 95, 144, 144, 95, 0, 144, 0, 0, 144, - 144, 144, 0, 0, 0, 0, 0, 0, 95, 95, - 0, 95, 0, 95, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 122, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 144, 0, 144, 0, + 0, 147, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 103, 26, 27, 28, 29, 0, 147, 147, + 0, 147, 0, 147, 0, 0, 0, 0, 144, 0, + 35, 0, 36, 37, 38, 0, 0, 0, 0, 39, + 40, 41, 42, 43, 44, 0, 0, 45, 0, 0, + 0, 147, 46, 147, 0, 0, 49, 0, 50, 51, + 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, + 83, 0, 0, 138, 138, 138, 138, 0, 0, 0, + 0, 0, 138, 147, 83, 83, 138, 138, 138, 138, + 0, 0, 0, 0, 0, 0, 138, 138, 0, 138, + 138, 138, 138, 0, 138, 138, 0, 0, 138, 0, + 0, 138, 138, 138, 0, 0, 0, 83, 0, 83, + 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, + 122, 122, 0, 0, 0, 0, 0, 122, 0, 0, + 0, 122, 122, 122, 122, 0, 0, 0, 0, 83, + 0, 122, 122, 0, 122, 122, 122, 122, 0, 122, + 122, 0, 99, 122, 0, 99, 122, 122, 122, 0, + 0, 0, 144, 144, 144, 144, 0, 0, 0, 99, + 99, 144, 99, 0, 99, 144, 144, 144, 144, 0, + 0, 0, 0, 0, 0, 144, 144, 0, 144, 144, + 144, 144, 0, 144, 144, 0, 0, 144, 0, 0, + 144, 144, 144, 0, 99, 0, 0, 98, 0, 0, + 98, 0, 0, 0, 0, 0, 0, 147, 147, 147, + 147, 0, 0, 0, 98, 98, 147, 98, 0, 98, + 147, 147, 147, 147, 99, 0, 0, 0, 0, 0, + 147, 147, 0, 147, 147, 147, 147, 0, 147, 147, + 86, 0, 147, 86, 0, 147, 147, 147, 0, 98, + 0, 0, 0, 0, 0, 0, 0, 86, 86, 0, + 86, 0, 86, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 83, 83, 83, 83, 0, 0, 98, + 0, 72, 0, 0, 72, 0, 0, 0, 0, 0, + 86, 0, 86, 0, 0, 0, 83, 83, 72, 72, + 0, 72, 0, 72, 0, 0, 0, 0, 0, 0, + 0, 83, 83, 83, 0, 0, 0, 0, 0, 0, + 0, 0, 86, 133, 0, 0, 133, 0, 0, 0, + 0, 72, 0, 72, 0, 0, 0, 0, 0, 0, + 133, 133, 0, 133, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, - 96, 96, 96, 95, 0, 0, 0, 0, 96, 0, - 0, 0, 96, 96, 96, 96, 0, 0, 0, 0, - 0, 0, 96, 96, 0, 96, 96, 96, 96, 83, - 96, 96, 83, 95, 96, 0, 0, 96, 96, 96, - 0, 0, 0, 0, 0, 0, 83, 83, 0, 83, - 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 72, 0, 0, 0, 0, 99, 99, + 99, 99, 0, 0, 0, 133, 0, 99, 0, 0, + 0, 99, 99, 99, 99, 0, 0, 0, 0, 0, + 0, 99, 99, 0, 99, 99, 99, 99, 0, 99, + 99, 0, 0, 99, 0, 0, 99, 99, 99, 0, + 0, 0, 0, 146, 0, 0, 146, 0, 0, 0, + 0, 0, 0, 98, 98, 98, 98, 0, 0, 0, + 146, 146, 98, 146, 0, 146, 98, 98, 98, 98, + 0, 0, 0, 0, 0, 0, 98, 98, 0, 98, + 98, 98, 98, 0, 98, 98, 0, 0, 98, 0, + 0, 98, 98, 98, 0, 146, 86, 86, 86, 86, + 0, 0, 0, 0, 0, 86, 0, 0, 0, 86, + 86, 86, 86, 0, 0, 0, 0, 0, 0, 86, + 86, 0, 86, 86, 86, 86, 0, 86, 86, 0, + 0, 0, 0, 0, 86, 86, 86, 72, 72, 72, + 72, 0, 0, 0, 0, 0, 72, 0, 0, 0, + 72, 72, 72, 72, 0, 0, 0, 0, 0, 0, + 72, 72, 0, 72, 72, 72, 72, 0, 72, 72, + 0, 0, 0, 0, 0, 72, 72, 72, 0, 133, + 133, 133, 133, 0, 0, 0, 0, 0, 133, 0, + 0, 0, 133, 133, 133, 133, 0, 0, 0, 0, + 0, 0, 133, 133, 0, 133, 133, 133, 133, 135, + 133, 133, 135, 0, 133, 0, 0, 133, 133, 133, + 0, 0, 0, 0, 0, 0, 135, 135, 0, 135, + 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 69, 0, 0, 69, 0, 0, 0, 0, 0, 83, - 0, 83, 0, 0, 0, 0, 0, 69, 69, 0, - 69, 0, 69, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, + 0, 135, 110, 0, 0, 0, 0, 0, 0, 146, + 146, 146, 146, 0, 0, 0, 110, 110, 146, 110, + 0, 110, 146, 146, 146, 146, 0, 0, 0, 0, + 0, 0, 146, 146, 0, 146, 146, 146, 146, 0, + 146, 146, 104, 0, 146, 104, 0, 146, 146, 146, + 0, 110, 0, 0, 0, 0, 0, 0, 0, 104, + 104, 0, 104, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 83, 143, 0, 0, 143, 0, 0, 0, 0, - 69, 0, 69, 0, 0, 0, 0, 0, 0, 143, - 143, 0, 143, 0, 143, 0, 0, 0, 0, 0, + 0, 0, 0, 73, 0, 0, 73, 0, 0, 0, + 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, + 73, 73, 0, 73, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 143, 0, 132, 0, 0, 132, - 0, 0, 0, 0, 0, 0, 95, 95, 95, 95, - 0, 0, 0, 132, 132, 95, 132, 0, 132, 95, - 95, 95, 95, 0, 0, 0, 0, 0, 0, 95, - 95, 0, 95, 95, 95, 95, 0, 95, 95, 107, - 0, 95, 107, 0, 95, 95, 95, 0, 132, 0, - 0, 0, 0, 0, 0, 0, 107, 107, 0, 107, - 0, 107, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, + 0, 0, 74, 73, 0, 73, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 74, 74, 0, 74, + 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 135, 135, 135, 135, 74, + 0, 74, 0, 0, 135, 0, 0, 0, 135, 135, + 135, 135, 0, 0, 0, 0, 0, 0, 135, 135, + 0, 135, 135, 135, 135, 0, 135, 135, 0, 0, + 135, 74, 0, 135, 135, 135, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 110, 110, 110, 110, 0, + 0, 0, 0, 0, 110, 0, 0, 0, 110, 110, + 110, 110, 0, 0, 0, 0, 0, 0, 110, 110, + 0, 110, 110, 110, 110, 0, 110, 110, 0, 0, + 110, 0, 0, 110, 110, 110, 0, 0, 104, 104, + 104, 104, 0, 0, 0, 0, 0, 104, 0, 0, + 0, 104, 104, 104, 104, 0, 0, 0, 0, 0, + 0, 104, 104, 0, 104, 104, 104, 104, 0, 104, + 104, 0, 0, 104, 0, 0, 104, 104, 104, 73, + 73, 73, 73, 0, 0, 0, 0, 0, 73, 0, + 0, 0, 73, 73, 73, 73, 0, 0, 0, 0, + 0, 0, 73, 73, 0, 73, 73, 73, 73, 0, + 73, 0, 0, 0, 0, 0, 0, 73, 73, 73, + 0, 0, 0, 0, 0, 74, 74, 74, 74, 0, + 0, 0, 0, 0, 74, 0, 0, 0, 74, 74, + 75, 74, 0, 75, 0, 0, 0, 0, 74, 74, + 0, 74, 74, 74, 74, 0, 74, 75, 75, 0, + 75, 0, 75, 74, 74, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 83, 83, 83, 0, 0, - 0, 107, 0, 83, 0, 0, 0, 83, 83, 83, - 83, 0, 0, 0, 0, 0, 0, 83, 83, 0, - 83, 83, 83, 83, 0, 83, 83, 0, 0, 0, - 0, 0, 83, 83, 83, 69, 69, 69, 69, 0, - 0, 0, 0, 0, 69, 0, 0, 0, 69, 69, - 69, 69, 0, 0, 0, 0, 0, 0, 69, 69, - 0, 69, 69, 69, 69, 0, 69, 69, 0, 0, - 0, 0, 0, 69, 69, 69, 0, 143, 143, 143, - 143, 0, 0, 0, 0, 0, 143, 0, 0, 0, - 143, 143, 143, 143, 0, 0, 0, 0, 0, 0, - 143, 143, 0, 143, 143, 143, 143, 0, 143, 143, - 0, 0, 143, 0, 0, 143, 143, 143, 0, 0, - 0, 101, 0, 0, 101, 0, 0, 0, 0, 0, - 0, 132, 132, 132, 132, 0, 0, 0, 101, 101, - 132, 101, 0, 101, 132, 132, 132, 132, 0, 0, - 0, 0, 0, 0, 132, 132, 0, 132, 132, 132, - 132, 0, 132, 132, 0, 0, 132, 0, 0, 132, - 132, 132, 0, 101, 107, 107, 107, 107, 0, 0, - 0, 0, 0, 107, 0, 0, 0, 107, 107, 107, - 107, 0, 0, 0, 0, 0, 0, 107, 107, 0, - 107, 107, 107, 107, 70, 107, 107, 70, 0, 107, - 0, 0, 107, 107, 107, 0, 0, 0, 0, 0, - 0, 70, 70, 0, 70, 0, 70, 0, 0, 0, + 0, 137, 0, 0, 137, 0, 0, 0, 0, 0, + 75, 0, 75, 0, 0, 0, 0, 0, 137, 137, + 0, 137, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 71, 0, 0, 71, 0, - 0, 0, 0, 0, 70, 0, 70, 0, 0, 0, - 0, 0, 71, 71, 0, 71, 0, 71, 0, 0, + 0, 0, 75, 76, 0, 0, 76, 0, 0, 0, + 0, 137, 0, 137, 0, 0, 0, 0, 0, 0, + 76, 76, 0, 76, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 70, 0, 0, 72, - 0, 0, 72, 0, 0, 71, 0, 71, 0, 0, - 0, 0, 0, 0, 0, 0, 72, 72, 0, 72, - 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, - 50, 72, 0, 50, 0, 0, 101, 101, 101, 101, - 0, 0, 0, 0, 0, 101, 0, 50, 50, 101, - 101, 101, 101, 0, 0, 0, 0, 0, 0, 101, - 101, 72, 101, 101, 101, 101, 0, 101, 101, 0, - 0, 101, 0, 0, 101, 101, 101, 0, 0, 0, - 50, 0, 50, 0, 0, 0, 124, 0, 0, 124, + 0, 0, 0, 137, 77, 0, 0, 77, 0, 0, + 0, 0, 0, 76, 0, 76, 0, 0, 0, 0, + 0, 77, 77, 0, 77, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 124, 124, 0, 124, 0, 124, 0, - 0, 0, 50, 0, 0, 0, 0, 0, 0, 70, - 70, 70, 70, 0, 0, 0, 0, 0, 70, 0, - 0, 0, 70, 70, 70, 70, 124, 0, 124, 0, - 0, 0, 70, 70, 0, 70, 70, 70, 70, 0, - 70, 0, 0, 0, 0, 0, 0, 70, 70, 70, - 71, 71, 71, 71, 0, 0, 0, 0, 124, 71, - 0, 0, 0, 71, 71, 0, 71, 0, 0, 0, - 0, 0, 0, 71, 71, 0, 71, 71, 71, 71, - 0, 71, 0, 0, 0, 0, 0, 0, 71, 71, - 71, 0, 0, 0, 72, 72, 72, 72, 0, 0, - 0, 0, 0, 72, 0, 0, 0, 72, 72, 94, - 0, 0, 94, 0, 0, 0, 0, 72, 72, 0, - 72, 72, 72, 72, 0, 72, 94, 94, 0, 94, - 0, 94, 72, 72, 72, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 50, 50, 50, 50, 0, - 0, 0, 0, 0, 0, 134, 0, 0, 134, 94, - 0, 94, 0, 0, 0, 0, 0, 0, 50, 50, - 0, 0, 134, 134, 0, 134, 0, 134, 0, 0, - 0, 0, 0, 50, 50, 50, 0, 0, 0, 0, - 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 124, 124, 124, 134, 0, 134, 0, 0, - 124, 0, 0, 0, 124, 124, 73, 0, 0, 73, - 0, 0, 0, 0, 124, 124, 0, 124, 124, 124, - 124, 0, 0, 73, 73, 0, 73, 134, 73, 124, - 124, 124, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, - 74, 0, 0, 0, 0, 0, 73, 0, 73, 0, - 0, 0, 0, 0, 74, 74, 0, 74, 0, 74, + 0, 0, 0, 0, 0, 76, 78, 0, 0, 78, + 0, 0, 0, 0, 77, 0, 77, 0, 0, 0, + 0, 0, 0, 78, 78, 0, 78, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, - 0, 0, 75, 0, 0, 75, 0, 74, 0, 74, - 0, 0, 0, 0, 0, 80, 0, 0, 80, 75, - 75, 0, 75, 0, 75, 0, 0, 0, 0, 0, - 0, 0, 80, 80, 94, 94, 94, 94, 0, 74, - 0, 0, 0, 94, 0, 0, 0, 94, 94, 0, - 0, 0, 75, 0, 75, 0, 0, 94, 94, 0, - 94, 94, 94, 94, 0, 80, 0, 80, 0, 0, - 0, 0, 94, 94, 94, 0, 0, 0, 0, 0, - 134, 134, 134, 134, 75, 0, 0, 0, 0, 134, - 0, 0, 0, 134, 134, 76, 0, 80, 76, 0, - 0, 0, 0, 134, 134, 0, 134, 134, 134, 134, - 0, 0, 76, 76, 0, 76, 0, 76, 134, 134, - 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 78, 0, 0, 78, - 0, 73, 73, 73, 73, 76, 0, 76, 0, 0, - 73, 0, 0, 78, 78, 73, 78, 0, 78, 0, - 0, 0, 0, 0, 73, 73, 0, 73, 73, 73, - 73, 0, 0, 0, 0, 0, 0, 76, 0, 73, - 73, 73, 74, 74, 74, 74, 78, 0, 78, 0, - 0, 74, 0, 0, 0, 79, 0, 0, 79, 0, - 0, 0, 0, 0, 0, 74, 74, 0, 74, 74, - 74, 74, 79, 79, 0, 79, 0, 79, 78, 0, - 74, 74, 74, 0, 0, 0, 0, 75, 75, 75, - 75, 0, 0, 0, 0, 0, 75, 0, 0, 0, - 80, 80, 80, 80, 0, 79, 0, 79, 0, 0, - 75, 75, 0, 75, 75, 75, 75, 60, 0, 0, - 60, 0, 0, 80, 80, 75, 75, 75, 0, 0, - 0, 0, 0, 0, 60, 60, 0, 79, 80, 80, - 80, 0, 0, 62, 0, 0, 62, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 78, 0, 78, 0, + 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, + 0, 0, 0, 0, 0, 75, 0, 0, 0, 75, + 75, 0, 0, 0, 0, 0, 0, 0, 78, 75, + 75, 0, 75, 75, 75, 75, 0, 75, 0, 0, + 0, 0, 0, 0, 75, 75, 75, 137, 137, 137, + 137, 0, 0, 0, 0, 0, 137, 0, 0, 0, + 137, 137, 0, 0, 0, 0, 0, 0, 0, 0, + 137, 137, 0, 137, 137, 137, 137, 0, 0, 0, + 0, 0, 0, 0, 0, 137, 137, 137, 0, 76, + 76, 76, 76, 0, 0, 0, 0, 0, 76, 0, + 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, + 0, 0, 76, 76, 0, 76, 76, 76, 76, 0, + 0, 0, 0, 0, 0, 0, 0, 76, 76, 76, + 77, 77, 77, 77, 63, 0, 0, 63, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 62, 62, 0, 0, 0, 0, 0, 60, 0, 60, + 0, 63, 63, 77, 77, 0, 77, 77, 77, 77, + 0, 0, 0, 0, 0, 0, 0, 0, 77, 77, + 77, 0, 78, 78, 78, 78, 0, 0, 0, 0, + 0, 78, 0, 0, 63, 79, 63, 0, 79, 0, + 0, 0, 0, 0, 0, 78, 78, 0, 78, 78, + 78, 78, 79, 79, 0, 79, 0, 79, 0, 0, + 78, 78, 78, 0, 0, 0, 63, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 81, 0, 0, 81, + 0, 0, 0, 0, 0, 79, 82, 79, 0, 82, + 0, 0, 0, 81, 81, 0, 81, 0, 81, 0, + 0, 0, 0, 82, 82, 0, 82, 0, 82, 0, + 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, + 0, 0, 0, 0, 0, 0, 81, 80, 81, 0, + 80, 0, 0, 0, 85, 0, 82, 85, 82, 65, + 0, 0, 65, 0, 80, 80, 0, 80, 0, 80, + 0, 85, 85, 0, 85, 0, 65, 65, 81, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, + 0, 0, 0, 0, 0, 0, 0, 80, 0, 80, + 0, 0, 0, 0, 85, 66, 85, 0, 66, 65, + 71, 65, 0, 71, 0, 0, 0, 0, 0, 0, + 0, 0, 66, 66, 0, 0, 0, 71, 71, 80, + 63, 63, 63, 63, 0, 0, 85, 0, 0, 0, + 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 63, 66, 0, 66, 0, 0, + 71, 70, 71, 0, 70, 0, 0, 0, 63, 63, + 63, 0, 0, 0, 0, 0, 0, 0, 70, 70, + 0, 79, 79, 79, 79, 0, 0, 66, 0, 0, + 79, 0, 71, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 79, 0, 79, 79, 79, + 0, 70, 0, 70, 0, 0, 0, 0, 0, 79, + 79, 79, 81, 81, 81, 81, 0, 0, 0, 0, + 0, 81, 82, 82, 82, 82, 0, 0, 0, 0, + 0, 82, 0, 70, 0, 81, 81, 146, 81, 81, + 146, 0, 0, 0, 0, 82, 82, 0, 82, 0, + 81, 81, 81, 0, 146, 146, 0, 146, 0, 146, + 82, 82, 82, 80, 80, 80, 80, 0, 0, 0, + 85, 85, 85, 85, 0, 65, 65, 65, 65, 0, + 0, 0, 0, 0, 0, 0, 80, 80, 69, 146, + 0, 69, 0, 85, 85, 0, 0, 0, 65, 65, + 0, 80, 80, 80, 0, 69, 69, 0, 85, 85, + 85, 0, 0, 65, 65, 65, 0, 68, 0, 0, + 68, 66, 66, 66, 66, 0, 71, 71, 71, 71, + 0, 0, 0, 0, 68, 68, 67, 0, 69, 67, + 69, 0, 0, 0, 66, 66, 0, 0, 0, 71, + 71, 0, 0, 67, 67, 0, 0, 0, 0, 66, + 66, 66, 0, 0, 71, 71, 71, 68, 0, 68, + 69, 0, 0, 0, 0, 0, 0, 70, 70, 70, + 70, 0, 0, 0, 0, 0, 67, 64, 67, 0, + 64, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 70, 70, 0, 0, 64, 64, 87, 0, 0, 87, + 0, 0, 0, 0, 0, 70, 70, 70, 67, 0, + 0, 0, 0, 87, 87, 0, 87, 0, 87, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 76, 76, 76, 76, 63, 0, 0, 63, 0, 76, - 0, 0, 0, 62, 0, 62, 0, 0, 0, 60, - 0, 63, 63, 76, 76, 0, 76, 76, 76, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 76, 76, - 76, 78, 78, 78, 78, 62, 0, 0, 0, 0, - 78, 0, 0, 0, 63, 68, 63, 0, 68, 0, - 67, 0, 0, 67, 78, 78, 66, 78, 78, 66, - 0, 0, 68, 68, 0, 0, 0, 67, 67, 78, - 78, 78, 0, 66, 66, 0, 63, 0, 0, 0, + 0, 0, 0, 90, 0, 0, 90, 0, 87, 0, + 0, 0, 0, 146, 146, 146, 146, 0, 0, 64, + 90, 90, 146, 90, 0, 90, 146, 146, 146, 146, + 0, 0, 0, 0, 0, 0, 146, 146, 0, 146, + 146, 146, 146, 0, 146, 146, 0, 0, 146, 0, + 0, 146, 146, 91, 0, 90, 91, 0, 0, 0, + 0, 0, 0, 0, 69, 69, 69, 69, 0, 0, + 91, 91, 0, 91, 0, 91, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 69, 69, 92, + 0, 0, 92, 68, 68, 68, 68, 0, 0, 0, + 0, 0, 69, 69, 69, 91, 92, 92, 0, 92, + 0, 92, 67, 67, 67, 67, 68, 68, 0, 0, + 0, 0, 0, 0, 0, 95, 0, 0, 95, 0, + 0, 68, 68, 68, 0, 67, 67, 0, 0, 0, + 0, 92, 95, 95, 0, 95, 0, 95, 0, 0, + 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 64, 64, 64, 64, 0, 0, 0, + 0, 0, 96, 0, 0, 96, 0, 95, 0, 0, + 0, 0, 87, 87, 87, 87, 64, 64, 0, 96, + 96, 87, 96, 0, 96, 87, 87, 87, 87, 0, + 0, 64, 64, 64, 0, 87, 87, 0, 87, 87, + 87, 87, 0, 87, 87, 0, 0, 87, 0, 88, + 0, 0, 88, 0, 96, 0, 0, 0, 0, 90, + 90, 90, 90, 0, 0, 0, 88, 88, 90, 88, + 0, 88, 90, 90, 90, 90, 0, 0, 0, 0, + 0, 0, 90, 90, 0, 90, 90, 90, 90, 0, + 90, 90, 0, 0, 90, 0, 0, 89, 0, 0, + 89, 88, 0, 0, 0, 0, 0, 0, 0, 91, + 91, 91, 91, 0, 89, 89, 0, 89, 91, 89, + 0, 0, 91, 91, 91, 91, 0, 0, 0, 0, + 0, 0, 91, 91, 0, 91, 91, 91, 91, 0, + 91, 91, 0, 0, 91, 92, 92, 92, 92, 89, + 0, 0, 0, 0, 92, 0, 0, 0, 92, 92, + 92, 92, 0, 0, 0, 0, 0, 0, 92, 92, + 0, 92, 92, 92, 92, 0, 92, 92, 0, 0, + 92, 95, 95, 95, 95, 0, 0, 0, 0, 0, + 95, 0, 0, 0, 95, 95, 95, 95, 0, 0, + 0, 0, 0, 0, 95, 95, 0, 95, 95, 95, + 95, 0, 95, 95, 0, 0, 95, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, + 96, 96, 0, 0, 0, 0, 0, 96, 0, 0, + 0, 96, 96, 96, 96, 0, 0, 0, 0, 0, + 0, 96, 96, 0, 96, 96, 96, 96, 0, 96, + 96, 98, 0, 96, 0, 0, 105, 107, 0, 0, + 0, 0, 117, 0, 0, 88, 88, 88, 88, 0, + 0, 0, 0, 0, 88, 0, 0, 0, 88, 88, + 88, 88, 0, 0, 0, 0, 0, 0, 88, 88, + 0, 88, 88, 88, 88, 0, 88, 88, 0, 0, + 88, 0, 0, 172, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 89, 89, 89, 89, 0, 0, 0, + 0, 0, 89, 0, 0, 0, 89, 89, 89, 89, + 0, 0, 0, 0, 0, 0, 89, 89, 0, 89, + 89, 89, 89, 0, 89, 89, 0, 0, 89, 0, + 0, 0, 0, 0, 0, 0, 214, 215, 216, 217, + 219, 221, 222, 223, 224, 225, 227, 229, 231, 233, + 235, 236, 238, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79, 79, 79, 79, 0, 68, 0, 68, 0, 79, - 67, 0, 67, 0, 0, 0, 66, 65, 66, 0, - 65, 0, 0, 79, 79, 0, 79, 64, 0, 0, - 64, 0, 0, 0, 65, 65, 0, 68, 79, 79, - 79, 0, 67, 0, 64, 64, 0, 0, 66, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, - 0, 61, 60, 60, 60, 60, 0, 65, 0, 65, - 0, 0, 0, 0, 0, 61, 61, 64, 0, 64, - 0, 0, 0, 0, 0, 60, 60, 0, 62, 62, - 62, 62, 0, 0, 0, 0, 0, 0, 0, 65, - 60, 60, 60, 0, 0, 0, 0, 0, 61, 64, - 61, 62, 62, 0, 0, 0, 0, 0, 0, 0, - 81, 0, 0, 81, 0, 0, 62, 62, 62, 63, - 63, 63, 63, 0, 0, 0, 0, 81, 81, 0, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 63, 63, - 81, 0, 81, 0, 0, 0, 0, 0, 0, 0, - 68, 68, 68, 68, 0, 67, 67, 67, 67, 0, - 0, 66, 66, 66, 66, 0, 0, 0, 0, 0, - 0, 0, 81, 68, 68, 0, 0, 0, 67, 67, - 0, 0, 0, 0, 66, 66, 0, 0, 68, 68, - 68, 0, 0, 67, 67, 67, 0, 0, 0, 66, - 66, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 65, 65, 65, 65, 0, 0, 0, 0, - 0, 0, 64, 64, 64, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 65, 0, 0, 0, - 0, 0, 0, 0, 0, 64, 64, 0, 0, 0, - 65, 65, 65, 61, 61, 61, 61, 0, 0, 0, - 64, 64, 64, 0, 0, 0, 0, 143, 0, 0, - 143, 0, 0, 0, 0, 0, 61, 61, 0, 0, - 0, 0, 0, 0, 143, 143, 0, 143, 0, 143, - 0, 61, 61, 61, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, - 87, 0, 0, 0, 0, 81, 81, 81, 81, 143, - 0, 0, 0, 0, 87, 87, 0, 87, 0, 87, - 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, - 0, 0, 0, 88, 0, 0, 88, 0, 0, 0, - 0, 0, 0, 81, 81, 81, 0, 0, 0, 87, - 88, 88, 0, 88, 0, 88, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 88, 89, 89, 0, 89, - 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 92, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 89, 92, 92, 0, 92, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 93, 0, 0, 93, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, - 0, 93, 0, 93, 0, 0, 0, 0, 0, 0, + 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, + 214, 0, 214, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 284, 0, 285, 0, 0, 0, + 0, 0, 287, 0, 288, 0, 289, 0, 290, 0, + 291, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 143, 143, 143, 143, 0, 0, 0, 0, - 0, 143, 0, 93, 0, 143, 143, 143, 143, 0, - 0, 0, 0, 0, 0, 143, 143, 0, 143, 143, - 143, 143, 85, 143, 143, 85, 0, 143, 0, 0, - 143, 143, 87, 87, 87, 87, 0, 0, 0, 85, - 85, 87, 85, 0, 85, 87, 87, 87, 87, 0, - 0, 0, 0, 0, 0, 87, 87, 0, 87, 87, - 87, 87, 0, 87, 87, 0, 0, 87, 88, 88, - 88, 88, 0, 0, 85, 0, 0, 88, 0, 0, - 0, 88, 88, 88, 88, 0, 0, 0, 0, 0, - 0, 88, 88, 0, 88, 88, 88, 88, 0, 88, - 88, 0, 0, 88, 89, 89, 89, 89, 0, 0, - 0, 0, 0, 89, 0, 0, 0, 89, 89, 89, - 89, 0, 0, 0, 0, 0, 0, 89, 89, 0, - 89, 89, 89, 89, 0, 89, 89, 0, 0, 89, - 92, 92, 92, 92, 0, 0, 0, 0, 0, 92, - 0, 0, 0, 92, 92, 92, 92, 0, 0, 0, - 0, 0, 0, 92, 92, 0, 92, 92, 92, 92, - 0, 92, 92, 0, 0, 92, 93, 93, 93, 93, - 0, 0, 93, 0, 0, 93, 0, 100, 102, 93, - 93, 93, 93, 112, 0, 0, 0, 0, 0, 93, - 93, 0, 93, 93, 93, 93, 86, 93, 93, 86, - 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 86, 0, 86, 0, 86, 0, - 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 85, 85, - 85, 0, 0, 0, 0, 0, 85, 0, 86, 0, - 85, 85, 85, 85, 0, 0, 0, 0, 0, 0, - 85, 85, 0, 85, 85, 85, 85, 0, 85, 85, - 0, 0, 85, 0, 0, 208, 209, 210, 211, 213, - 215, 216, 217, 218, 219, 221, 223, 225, 227, 229, - 230, 232, 0, 0, 0, 0, 0, 0, 0, 0, + 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 208, 0, 0, 0, 0, 0, 0, 0, 208, 0, - 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 278, 0, 279, 0, 0, 0, 0, 0, - 281, 0, 282, 0, 283, 0, 284, 0, 285, 0, - 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 299, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 317, 86, 86, 86, 86, 0, 0, 0, 0, 0, - 86, 0, 0, 0, 86, 86, 86, 86, 0, 0, - 0, 0, 0, 0, 86, 86, 0, 86, 86, 86, - 86, 0, 86, 86, 0, 0, 86, + 0, 0, 323, }; short yycheck[] = { 5, - 81, 91, 36, 91, 175, 59, 12, 59, 12, 123, - 16, 41, 18, 40, 44, 96, 257, 40, 40, 40, - 91, 27, 28, 29, 30, 40, 107, 44, 177, 110, - 278, 37, 125, 123, 23, 123, 40, 43, 91, 44, - 91, 41, 257, 291, 44, 49, 44, 36, 169, 53, - 171, 41, 123, 42, 44, 41, 44, 44, 58, 59, - 44, 61, 44, 63, 91, 54, 55, 56, 57, 58, - 123, 123, 123, 59, 41, 123, 93, 272, 84, 83, - 86, 85, 88, 87, 90, 89, 59, 91, 93, 123, - 44, 95, 59, 93, 243, 93, 123, 41, 41, 0, - 123, 123, 123, 184, 281, 93, 93, 96, 123, 93, - 44, 93, 261, 194, 40, 59, 59, 266, 107, 268, - 41, 298, 41, 129, 301, 59, 40, 131, 132, 133, - 134, 302, 33, 40, 305, 36, 37, 38, 59, 40, - 59, 42, 43, 257, 45, 44, 44, 59, 152, 40, - 44, 44, 156, 157, 158, 159, 160, 161, 59, 40, - 59, 59, 0, 64, 245, 59, 59, 306, 258, 262, - 263, 264, 265, 344, 44, 179, 44, 281, 282, 300, - 301, 185, 186, 36, 188, 41, 307, 40, 44, 59, - 91, 59, 196, 297, 298, 33, 40, 301, 36, 37, - 38, 41, 40, 257, 42, 43, 36, 45, 289, 40, - 40, 44, 333, 36, 41, 123, 297, 44, 306, 125, - 91, 59, 123, 257, 125, 126, 64, 261, 41, 41, - 234, 44, 236, 304, 305, 306, 266, 267, 268, 269, - 59, 41, 41, 249, 44, 251, 41, 253, 254, 44, - 123, 257, 91, 91, 260, 259, 125, 298, 301, 41, - 301, 61, 44, 63, 40, 269, 266, 267, 268, 269, - 41, 40, 276, 44, 40, 275, 58, 59, 41, 279, - 280, 281, 282, 0, 125, 123, 59, 125, 126, 289, - 290, 125, 292, 293, 294, 295, 125, 297, 298, 125, - 304, 301, 308, 125, 304, 305, 306, 270, 271, 91, - 125, 93, 266, 267, 268, 269, 33, 41, 41, 36, - 37, 38, 125, 40, 59, 42, 43, 331, 45, 41, - 279, 280, 281, 282, 340, 262, 263, 264, 265, 345, - 41, 123, 59, 292, 293, 294, 295, 64, 297, 298, - 41, 41, 301, 59, 59, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 41, - 73, 331, 273, 274, 91, 276, 277, 278, 12, 259, - -1, -1, 283, 284, 285, 286, 287, 288, -1, -1, - 291, -1, -1, -1, -1, 296, 281, 282, -1, 300, - -1, 302, 303, -1, -1, 306, 123, 58, 125, 126, - 61, -1, 63, 298, -1, -1, 301, -1, 256, 257, + 181, 59, 123, 91, 91, 91, 59, 13, 40, 13, + 40, 183, 18, 44, 20, 41, 40, 44, 44, 23, + 40, 91, 44, 44, 30, 31, 32, 33, 40, 257, + 279, 36, 58, 59, 40, 123, 123, 123, 41, 43, + 46, 44, 44, 292, 175, 44, 177, 257, 52, 44, + 91, 282, 56, 123, 44, 123, 41, 59, 44, 44, + 44, 91, 93, 41, 40, 91, 93, 93, 299, 59, + 123, 302, 93, 58, 59, 125, 41, 249, 61, 44, + 63, 59, 123, 89, 88, 91, 90, 93, 92, 95, + 94, 123, 96, 123, 93, 267, 100, 123, 93, 123, + 272, 41, 274, 123, 0, 41, 91, 93, 93, 93, + 59, 123, 36, 41, 44, 40, 40, 299, 123, 59, + 302, 41, 36, 59, 257, 41, 40, 308, 134, 59, + 311, 59, 136, 137, 138, 139, 257, 33, 123, 59, + 36, 37, 38, 59, 40, 40, 42, 43, 280, 45, + 282, 283, 40, 157, 282, 283, 273, 161, 162, 163, + 164, 165, 166, 59, 0, 44, 298, 299, 64, 350, + 302, 299, 258, 59, 302, 306, 307, 44, 44, 44, + 59, 185, 313, 41, 40, 307, 44, 191, 192, 40, + 194, 41, 59, 59, 59, 91, 44, 33, 202, 257, + 36, 37, 38, 40, 40, 36, 42, 43, 339, 45, + 123, 59, 262, 263, 264, 265, 266, 305, 306, 307, + 307, 41, 41, 59, 44, 44, 125, 123, 64, 125, + 126, 41, 0, 44, 44, 41, 240, 41, 242, 91, + 44, 267, 268, 269, 270, 267, 268, 269, 270, 255, + 59, 257, 257, 259, 260, 91, 261, 263, 271, 272, + 266, 265, 41, 123, 290, 33, 125, 91, 36, 37, + 38, 275, 40, 302, 42, 43, 40, 45, 282, 305, + 306, 307, 267, 268, 269, 270, 40, 123, 40, 125, + 126, 59, 41, 276, 59, 125, 64, 280, 281, 282, + 283, 41, 267, 268, 269, 270, 310, 125, 314, 125, + 293, 294, 295, 296, 41, 298, 299, 125, 125, 302, + 305, 306, 307, 91, 125, 280, 281, 282, 283, 125, + 41, 41, 41, 337, 41, 262, 263, 264, 265, 266, + 346, 296, 59, 298, 299, 351, 41, 302, 41, 337, + 61, 59, 63, 59, 76, 123, 13, 125, 126, 265, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, -1, -1, -1, 274, 275, + -1, 277, 278, 279, 26, -1, -1, -1, 284, 285, + 286, 287, 288, 289, -1, -1, 292, 39, -1, -1, + -1, 297, -1, 45, -1, 301, -1, 303, 304, -1, + -1, 307, -1, -1, -1, 57, 58, 59, 60, 61, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, -1, -1, -1, 274, 275, + -1, 277, 278, 279, -1, -1, -1, 86, 284, 285, + 286, 287, 288, 289, 63, -1, 292, -1, -1, 101, + -1, 297, 101, -1, -1, 301, -1, 303, 304, -1, + 112, -1, -1, 112, 33, -1, 115, 36, 37, 38, + -1, 40, -1, 42, 43, -1, 45, -1, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, -1, -1, -1, 273, 274, -1, 276, 277, - 278, 63, -1, -1, -1, 283, 284, 285, 286, 287, - 288, -1, -1, 291, 279, 280, 281, 282, 296, -1, - -1, -1, 300, -1, 302, 303, -1, 0, 293, 294, - 295, -1, 297, 298, -1, 275, 301, -1, -1, 279, - 280, 281, 282, -1, 266, 267, 268, 269, -1, 289, - 290, -1, 292, 293, 294, 295, -1, 297, 298, -1, - 33, 301, -1, 36, 37, 38, -1, 40, -1, 42, - 43, -1, 45, -1, 279, 280, 281, 282, -1, -1, - -1, -1, 304, 305, 306, -1, 59, -1, -1, 294, - 295, 64, 297, 298, -1, -1, 301, -1, -1, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, -1, -1, -1, 273, 274, 91, 276, - 277, 278, -1, -1, -1, -1, 283, 284, 285, 286, - 287, 288, -1, -1, 291, -1, -1, -1, -1, 296, - -1, -1, -1, 300, -1, 302, 303, -1, -1, -1, - 123, 33, -1, 126, 36, 37, 38, -1, 40, 41, - 42, 43, 44, 45, 44, 45, 46, 47, 48, -1, - -1, 51, 52, -1, -1, -1, 58, 59, -1, 61, - -1, 63, 64, -1, 275, -1, -1, -1, 279, 280, - 281, 282, -1, -1, -1, -1, -1, -1, 289, 290, - -1, 292, 293, 294, 295, 41, 297, 298, 44, 91, - 301, 93, -1, 275, -1, -1, -1, 279, 280, 281, - 282, -1, 58, 59, -1, 61, -1, 63, -1, -1, - 292, 293, 294, 295, -1, 297, 298, -1, -1, 301, - -1, 123, 33, -1, 126, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, -1, -1, 93, 279, 280, - 281, 282, -1, -1, -1, -1, -1, 58, 59, -1, - 61, -1, 63, 64, 295, -1, 297, 298, -1, -1, - 301, -1, -1, 256, 257, 258, 259, 260, 261, -1, - -1, -1, -1, 266, 267, 268, 269, -1, -1, -1, - 273, 274, 93, 276, 277, 278, -1, -1, -1, -1, - 283, 284, 285, 286, 287, 288, -1, -1, 291, 41, - -1, -1, -1, 296, -1, -1, -1, 300, -1, 302, - 303, 279, 280, 281, 282, 126, -1, -1, -1, 61, - -1, 63, -1, -1, -1, -1, -1, -1, -1, 297, - 298, -1, -1, 301, -1, -1, -1, -1, -1, 33, - -1, -1, 36, 37, 38, -1, 40, -1, 42, 43, - -1, 45, -1, -1, -1, 257, 258, 259, 260, 261, - -1, -1, -1, -1, 266, 267, 268, 269, -1, -1, - 64, -1, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 91, 300, 301, - 302, 303, 304, 305, 306, -1, -1, -1, -1, -1, - 266, 267, 268, 269, 61, -1, 63, -1, -1, 275, - -1, -1, -1, 279, 280, 281, 282, -1, -1, 123, - -1, -1, 126, 289, 290, -1, 292, 293, 294, 295, - -1, 297, 298, -1, -1, 301, 257, 258, 259, 260, - 261, -1, -1, -1, -1, 266, 267, 268, 269, -1, - -1, -1, -1, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, -1, 300, - 301, 302, 303, 304, 305, 306, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 279, -1, 281, 282, -1, - 33, -1, -1, 36, 37, 38, -1, 40, -1, 42, - 43, -1, 45, 297, 298, -1, -1, 301, -1, -1, - -1, -1, -1, 275, -1, -1, 59, 279, 280, 281, - 282, 64, -1, -1, -1, -1, -1, 289, 290, -1, - 292, 293, 294, 295, -1, 297, 298, -1, -1, 301, - -1, -1, -1, 257, 258, 259, 260, 261, 91, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 274, -1, 276, 277, 278, 61, -1, 63, -1, 283, - 284, 285, 286, 287, 288, -1, -1, 291, -1, -1, - 123, -1, 296, 126, -1, -1, 300, -1, 302, 303, - 33, -1, 306, 36, 37, 38, -1, 40, -1, 42, - 43, -1, 45, -1, -1, -1, -1, -1, 275, -1, - -1, -1, 279, 280, 281, 282, 59, -1, -1, -1, - -1, 64, 289, 290, -1, 292, 293, 294, 295, 23, - 297, 298, -1, -1, 301, -1, -1, 31, -1, -1, - -1, -1, 36, 37, -1, 39, 33, -1, 91, 36, - 37, 38, -1, 40, -1, 42, 43, -1, 45, -1, - 54, 55, 56, 57, 58, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, 64, -1, -1, - 123, -1, -1, 126, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, - -1, 36, 37, 38, 91, 40, 41, 42, 43, 103, - 45, -1, -1, 256, 257, 258, 259, 260, 261, -1, - -1, -1, -1, 266, 267, 268, 269, -1, -1, 64, - 273, 274, -1, 276, 277, 278, 123, -1, -1, 126, - 283, 284, 285, 286, 287, 288, -1, -1, 291, -1, - -1, -1, -1, 296, -1, -1, 91, 300, -1, 302, - 303, 33, -1, -1, 36, 37, 38, -1, 40, -1, - 42, 43, -1, 45, -1, -1, -1, -1, -1, 275, - -1, -1, -1, 279, 280, 281, 282, -1, 123, -1, - -1, 126, 64, -1, 290, -1, 292, 293, 294, 295, - -1, 297, 298, -1, -1, 301, -1, -1, -1, -1, - -1, -1, -1, 256, 257, 258, 259, 260, 261, 91, - -1, 93, -1, 266, 267, 268, 269, -1, -1, -1, - 273, 274, -1, 276, 277, 278, -1, -1, -1, -1, - 283, 284, 285, 286, 287, 288, -1, -1, 291, -1, - -1, 123, -1, 296, 126, -1, -1, 300, -1, 302, - 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 257, 258, 259, 260, 261, 61, 33, 63, -1, 36, - 37, 38, -1, 40, -1, 42, 43, 274, 45, 276, - 277, 278, -1, -1, -1, -1, 283, 284, 285, 286, - 287, 288, -1, -1, 291, -1, -1, 64, -1, 296, - -1, -1, -1, 300, -1, 302, 303, -1, -1, -1, - -1, -1, 257, 258, 259, 260, 261, -1, -1, -1, - -1, -1, -1, -1, 91, -1, -1, -1, -1, 274, - -1, 276, 277, 278, -1, -1, -1, -1, 283, 284, - 285, 286, 287, 288, -1, -1, 291, -1, -1, -1, - -1, 296, -1, -1, -1, 300, 123, 302, 303, 126, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 257, 258, 259, 260, 261, - -1, 33, -1, -1, 36, 37, 38, -1, 40, 41, - 42, 43, 274, 45, 276, 277, 278, -1, -1, -1, - -1, 283, 284, 285, 286, 287, 288, -1, -1, 291, - -1, -1, 64, -1, 296, -1, -1, -1, 300, -1, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, -1, 91, - 36, 37, 38, -1, 40, -1, 42, 43, -1, 45, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 61, -1, -1, 64, -1, - -1, 123, -1, -1, 126, -1, -1, -1, -1, 275, - -1, -1, -1, 279, 280, 281, 282, -1, -1, 256, - 257, 258, 259, 260, 261, 91, 292, 293, 294, 295, - -1, 297, 298, -1, -1, 301, -1, 274, -1, 276, - 277, 278, -1, -1, -1, -1, 283, 284, 285, 286, - 287, 288, -1, -1, 291, -1, -1, 123, -1, 296, - 126, -1, -1, 300, -1, 302, 303, 33, -1, -1, + 268, 269, 270, -1, 0, 64, 274, 275, -1, 277, + 278, 279, -1, -1, -1, -1, 284, 285, 286, 287, + 288, 289, -1, -1, 292, -1, -1, -1, -1, 297, + -1, -1, 91, 301, -1, 303, 304, 33, -1, -1, 36, 37, 38, -1, 40, -1, 42, 43, -1, 45, + -1, 190, -1, -1, -1, 280, 281, 282, 283, -1, + -1, 200, -1, 59, 123, 276, -1, 126, 64, 280, + 281, 282, 283, 298, 299, -1, -1, 302, -1, 290, + 291, -1, 293, 294, 295, 296, -1, 298, 299, 33, + -1, 302, 36, 37, 38, 91, 40, 41, 42, 43, + 44, 45, -1, -1, -1, 282, 283, -1, -1, -1, + 26, -1, 251, -1, 58, 59, -1, 61, 34, 63, + 64, 298, 299, 39, 40, 302, 42, 123, -1, -1, + 126, -1, 47, 48, 49, 50, 51, -1, -1, 54, + 55, 57, 58, 59, 60, 61, -1, 91, -1, 93, + 33, -1, -1, 36, 37, 38, 295, 40, 41, 42, + 43, 44, 45, -1, 303, -1, -1, 276, -1, -1, + -1, 280, 281, 282, 283, 58, 59, -1, 61, 123, + 63, 64, 126, -1, 293, 294, 295, 296, -1, 298, + 299, -1, 108, 302, -1, -1, -1, -1, 257, 258, + 259, 260, 261, -1, -1, -1, -1, -1, -1, -1, + 93, -1, -1, -1, -1, -1, 275, -1, 277, 278, + 279, -1, -1, -1, -1, 284, 285, 286, 287, 288, + 289, -1, -1, 292, 280, 281, 282, 283, 297, -1, + -1, -1, 301, 126, 303, 304, -1, -1, 307, 295, + 296, -1, 298, 299, -1, -1, 302, -1, -1, -1, + 256, 257, 258, 259, 260, 261, -1, -1, -1, -1, + -1, 267, 268, 269, 270, -1, -1, -1, 274, 275, + -1, 277, 278, 279, -1, -1, -1, -1, 284, 285, + 286, 287, 288, 289, -1, -1, 292, -1, -1, -1, + -1, 297, -1, -1, -1, 301, -1, 303, 304, -1, + -1, -1, -1, 257, 258, 259, 260, 261, -1, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, -1, + -1, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, -1, 301, 302, 303, + 304, 305, 306, 307, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 257, 258, 259, 260, 261, -1, + -1, -1, -1, -1, 267, 268, 269, 270, -1, 61, + -1, 63, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, -1, 301, 302, + 303, 304, 305, 306, 307, 33, -1, -1, 36, 37, + 38, -1, 40, -1, 42, 43, -1, 45, -1, 280, + 281, 282, 283, -1, -1, -1, -1, -1, -1, -1, + -1, 59, 293, 294, 295, 296, 64, 298, 299, -1, + -1, 302, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, + 38, -1, 40, 91, 42, 43, -1, 45, -1, 280, + 281, 282, 283, -1, -1, -1, -1, -1, -1, -1, + -1, 59, -1, 294, 295, 296, 64, 298, 299, 41, + -1, 302, 44, -1, -1, 123, -1, -1, 126, -1, + -1, -1, -1, -1, -1, 33, 58, 59, 36, 37, + 38, -1, 40, 91, 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 61, -1, -1, 64, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, - -1, 40, -1, 42, 43, 91, 45, -1, -1, -1, - -1, -1, -1, -1, -1, 257, 258, 259, 260, 261, - -1, -1, 61, -1, -1, 64, -1, -1, -1, -1, - -1, -1, 274, -1, 276, 277, 278, 123, -1, -1, - 126, 283, 284, 285, 286, 287, 288, -1, -1, 291, - -1, -1, 91, -1, 296, -1, -1, -1, 300, 41, - 302, 303, 44, -1, -1, -1, -1, -1, -1, -1, - -1, 257, 258, 259, 260, 261, 58, 59, -1, 61, - -1, 63, -1, -1, 123, -1, -1, 126, 274, -1, - 276, 277, 278, -1, -1, -1, -1, 283, 284, 285, - 286, 287, 288, -1, -1, 291, -1, -1, -1, 91, - 296, 93, -1, -1, 300, -1, 302, 303, 33, -1, - -1, 36, 37, 38, -1, 40, -1, 42, 43, -1, - 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 123, -1, -1, -1, -1, 61, -1, -1, 64, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, -1, -1, -1, -1, 64, -1, -1, 91, + -1, 93, -1, -1, -1, 123, -1, -1, 126, -1, + -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, + 38, -1, 40, 91, 42, 43, -1, 45, -1, -1, + -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, -1, -1, 276, -1, 64, -1, 280, 281, + 282, 283, -1, -1, -1, 123, -1, -1, 126, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, -1, 33, 91, -1, 36, 37, 38, -1, 40, + 41, 42, 43, -1, 45, -1, -1, -1, 256, 257, + 258, 259, 260, 261, -1, -1, -1, -1, -1, 267, + 268, 269, 270, 64, -1, 123, 274, 275, 126, 277, + 278, 279, -1, -1, -1, -1, 284, 285, 286, 287, + 288, 289, -1, -1, 292, -1, -1, -1, -1, 297, + 91, -1, -1, 301, -1, 303, 304, -1, 256, 257, + 258, 259, 260, 261, -1, -1, -1, -1, -1, 267, + 268, 269, 270, -1, -1, -1, 274, 275, -1, 277, + 278, 279, 123, -1, -1, 126, 284, 285, 286, 287, + 288, 289, -1, -1, 292, 267, 268, 269, 270, 297, + -1, -1, -1, 301, -1, 303, 304, -1, -1, 257, + 258, 259, 260, 261, 33, -1, -1, 36, 37, 38, + -1, 40, -1, 42, 43, -1, 45, 275, -1, 277, + 278, 279, -1, 305, 306, 307, 284, 285, 286, 287, + 288, 289, -1, -1, 292, 64, -1, -1, -1, 297, + -1, -1, -1, 301, -1, 303, 304, -1, -1, 257, + 258, 259, 260, 261, -1, -1, -1, -1, -1, -1, + -1, -1, 91, 41, 93, -1, 44, 275, -1, 277, + 278, 279, -1, -1, -1, -1, 284, 285, 286, 287, + 288, 289, -1, 61, 292, 63, -1, -1, -1, 297, + -1, -1, -1, 301, 123, 303, 304, 126, -1, -1, + -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, + 261, 33, -1, -1, 36, 37, 38, -1, 40, -1, + 42, 43, -1, 45, 275, -1, 277, 278, 279, -1, + -1, -1, -1, 284, 285, 286, 287, 288, 289, -1, + -1, 292, 64, -1, -1, -1, 297, -1, -1, -1, + 301, -1, 303, 304, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, + -1, -1, -1, -1, -1, -1, 33, -1, -1, 36, + 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 257, 258, 259, 260, 261, 91, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 274, -1, - 276, 277, 278, -1, -1, -1, -1, 283, 284, 285, - 286, 287, 288, -1, -1, 291, -1, -1, 123, -1, - 296, 126, -1, -1, 300, -1, 302, 303, 257, 258, - 259, 260, 261, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 274, -1, 276, 277, 278, - -1, -1, -1, -1, 283, 284, 285, 286, 287, 288, - -1, -1, 291, -1, -1, -1, -1, 296, -1, -1, - -1, 300, 33, 302, 303, 36, 37, 38, -1, 40, - -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 266, 267, 268, 269, -1, -1, - 61, -1, -1, 64, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 289, 290, 33, - -1, -1, 36, 37, 38, -1, 40, -1, 42, 43, - 91, 45, 304, 305, 306, -1, -1, -1, -1, -1, - 41, -1, -1, 44, -1, -1, -1, 61, -1, -1, - 64, -1, 257, 258, 259, 260, 261, 58, 59, -1, - -1, -1, 123, -1, -1, 126, -1, -1, -1, 274, - -1, 276, 277, 278, -1, -1, -1, 91, 283, 284, - 285, 286, 287, 288, -1, -1, 291, -1, -1, -1, - 91, 296, 93, -1, -1, 300, 33, 302, 303, 36, - 37, 38, -1, 40, -1, 42, 43, -1, 45, 123, - -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 123, -1, 61, -1, -1, 64, -1, -1, + -1, 123, -1, -1, 126, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, 260, 261, 33, 91, -1, 36, 37, 38, -1, + 40, -1, 42, 43, -1, 45, 275, -1, 277, 278, + 279, -1, -1, -1, -1, 284, 285, 286, 287, 288, + 289, 61, -1, 292, 64, -1, 123, -1, 297, 126, + -1, -1, 301, -1, 303, 304, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, -1, - 40, -1, 42, 43, 91, 45, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 61, -1, -1, 64, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 123, -1, -1, 126, - -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, - 261, 91, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 274, -1, 276, 277, 278, -1, -1, - -1, -1, 283, 284, 285, 286, 287, 288, -1, -1, - 291, -1, -1, 123, -1, 296, 126, -1, -1, 300, - -1, 302, 303, 257, 258, 259, 260, 261, -1, -1, + 40, 91, 42, 43, -1, 45, -1, -1, 276, -1, + -1, -1, 280, 281, 282, 283, -1, -1, -1, -1, + -1, 61, 290, 291, 64, 293, 294, 295, 296, -1, + 298, 299, -1, 123, 302, -1, 126, -1, -1, -1, + -1, -1, -1, -1, 256, 257, 258, 259, 260, 261, + -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 275, -1, 277, 278, 279, -1, 61, + -1, 63, 284, 285, 286, 287, 288, 289, -1, -1, + 292, -1, -1, 123, -1, 297, 126, -1, -1, 301, + 33, 303, 304, 36, 37, 38, -1, 40, -1, 42, + 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, + 257, 258, 259, 260, 261, -1, -1, -1, 61, -1, + -1, 64, -1, -1, -1, -1, -1, -1, 275, -1, + 277, 278, 279, -1, -1, -1, -1, 284, 285, 286, + 287, 288, 289, -1, -1, 292, -1, -1, 91, -1, + 297, -1, -1, -1, 301, -1, 303, 304, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, + 260, 261, 33, -1, -1, 36, 37, 38, -1, 40, + 123, 42, 43, 126, 45, 275, -1, 277, 278, 279, + -1, -1, -1, -1, 284, 285, 286, 287, 288, 289, + 61, -1, 292, 64, -1, -1, -1, 297, -1, -1, + -1, 301, -1, 303, 304, -1, -1, 257, 258, 259, + 260, 261, -1, -1, -1, -1, -1, -1, -1, -1, + 91, -1, -1, -1, -1, 275, -1, 277, 278, 279, + -1, -1, -1, -1, 284, 285, 286, 287, 288, 289, + -1, -1, 292, -1, -1, -1, -1, 297, -1, -1, + -1, 301, 123, 303, 304, 126, 33, -1, -1, 36, + 37, 38, -1, 40, -1, 42, 43, -1, 45, -1, + -1, -1, -1, -1, 276, -1, -1, -1, 280, 281, + 282, 283, -1, -1, 61, -1, -1, 64, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, -1, -1, -1, 257, 258, 259, 260, 261, -1, + -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, + 41, -1, 275, 44, 277, 278, 279, -1, -1, -1, + -1, 284, 285, 286, 287, 288, 289, 58, 59, 292, + 61, -1, 63, -1, 297, -1, 123, -1, 301, 126, + 303, 304, 33, -1, -1, 36, 37, 38, -1, 40, + -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, + 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, + 61, -1, -1, 64, -1, -1, 257, 258, 259, 260, + 261, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 123, -1, 275, -1, 277, 278, 279, -1, + 91, -1, -1, 284, 285, 286, 287, 288, 289, -1, + -1, 292, 58, -1, -1, 61, 297, 63, -1, -1, + 301, -1, 303, 304, -1, -1, -1, -1, -1, -1, + -1, -1, 123, -1, -1, 126, 33, -1, -1, 36, + 37, 38, -1, 40, -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 274, -1, 276, 277, 278, 266, 267, 268, 269, 283, - 284, 285, 286, 287, 288, -1, -1, 291, -1, -1, - -1, -1, 296, -1, -1, -1, 300, 33, 302, 303, + -1, -1, -1, -1, 61, -1, -1, 64, -1, -1, + 257, 258, 259, 260, 261, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 275, -1, + 277, 278, 279, -1, 91, -1, -1, 284, 285, 286, + 287, 288, 289, -1, -1, 292, -1, -1, -1, -1, + 297, -1, -1, -1, 301, 33, 303, 304, 36, 37, + 38, -1, 40, -1, 42, 43, 123, 45, -1, 126, + -1, -1, -1, -1, -1, -1, 267, 268, 269, 270, + -1, -1, -1, 61, -1, 276, 64, -1, -1, 280, + 281, -1, -1, -1, -1, -1, -1, -1, -1, 290, + 291, -1, 293, 294, 295, 296, 257, 258, 259, 260, + 261, -1, -1, 91, 305, 306, 307, -1, -1, -1, + -1, -1, -1, -1, 275, -1, 277, 278, 279, -1, + -1, -1, -1, 284, 285, 286, 287, 288, 289, -1, + -1, 292, -1, -1, -1, 123, 297, -1, 126, -1, + 301, -1, 303, 304, -1, 33, -1, -1, 36, 37, + 38, -1, 40, 41, 42, 43, -1, 45, -1, -1, + 276, -1, -1, -1, 280, 281, 282, 283, -1, -1, + -1, -1, -1, -1, 290, 291, 64, 293, 294, 295, + 296, -1, 298, 299, -1, -1, 302, -1, -1, -1, + 257, 258, 259, 260, 261, -1, -1, -1, -1, -1, + -1, -1, -1, 91, -1, -1, -1, -1, 275, -1, + 277, 278, 279, -1, -1, -1, -1, 284, 285, 286, + 287, 288, 289, -1, -1, 292, -1, -1, 41, -1, + 297, 44, -1, -1, 301, 123, 303, 304, 126, -1, + -1, -1, -1, -1, 33, 58, 59, 36, 37, 38, + -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, + 258, 259, 260, 261, -1, 64, -1, -1, 91, -1, + 93, -1, -1, -1, -1, -1, -1, 275, -1, 277, + 278, 279, -1, -1, -1, -1, 284, 285, 286, 287, + 288, 289, 91, -1, 292, -1, -1, -1, -1, 297, + 123, -1, -1, 301, -1, 303, 304, 33, -1, -1, 36, 37, 38, -1, 40, 41, 42, 43, -1, 45, - -1, -1, -1, 304, 305, 306, -1, -1, -1, -1, + -1, -1, -1, -1, 123, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - 257, 258, 259, 260, 261, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 274, -1, 276, - 277, 278, -1, -1, -1, 91, 283, 284, 285, 286, - 287, 288, -1, -1, 291, -1, -1, -1, -1, 296, - -1, -1, -1, 300, -1, 302, 303, 257, 258, 259, - 260, 261, -1, -1, -1, -1, -1, 123, -1, -1, - 126, -1, -1, -1, 274, -1, 276, 277, 278, -1, - -1, -1, -1, 283, 284, 285, 286, 287, 288, -1, - -1, 291, -1, -1, -1, -1, 296, -1, -1, -1, - 300, 33, 302, 303, 36, 37, 38, -1, 40, 41, - 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, - -1, 36, 37, 38, -1, 40, 41, 42, 43, 91, - 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 123, -1, -1, 126, -1, -1, -1, -1, -1, - -1, 257, 258, 259, 260, 261, 91, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, -1, 274, 44, - 276, 277, 278, -1, -1, -1, -1, 283, 284, 285, - 286, 287, 288, 58, 59, 291, 61, -1, 123, -1, - 296, 126, -1, -1, 300, 33, 302, 303, 36, 37, - 38, -1, 40, -1, 42, 43, -1, 45, -1, -1, - -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, - -1, 59, -1, -1, -1, -1, 64, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 33, -1, -1, 36, 37, 38, 123, 40, - 41, 42, 43, 91, 45, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 64, -1, 257, 258, 259, 260, 261, - -1, -1, -1, -1, -1, 123, -1, -1, 126, -1, - -1, -1, 274, -1, 276, 277, 278, -1, -1, -1, - 91, 283, 284, 285, 286, 287, 288, -1, -1, 291, - -1, -1, -1, -1, 296, -1, -1, -1, 300, -1, - 302, 303, 257, 258, 259, 260, 261, -1, -1, -1, - -1, -1, 123, -1, -1, 126, -1, -1, -1, 274, - -1, 276, 277, 278, -1, -1, -1, -1, 283, 284, - 285, 286, 287, 288, -1, -1, 291, -1, -1, -1, - -1, 296, -1, -1, -1, 300, 33, 302, 303, 36, - 37, 38, -1, 40, -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 266, 267, 268, 269, -1, -1, 64, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, + 258, 259, 260, 261, -1, 91, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 275, -1, 277, + 278, 279, -1, -1, -1, -1, 284, 285, 286, 287, + 288, 289, -1, -1, 292, -1, -1, 123, -1, 297, + 126, -1, -1, 301, -1, 303, 304, 33, -1, -1, + 36, 37, 38, -1, 40, -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 289, 290, -1, -1, -1, 257, - 258, 259, 260, 261, 91, -1, 93, -1, -1, 304, - 305, 306, -1, -1, -1, -1, 274, -1, 276, 277, - 278, -1, -1, -1, -1, 283, 284, 285, 286, 287, - 288, -1, -1, 291, -1, -1, 123, -1, 296, 126, - -1, -1, 300, -1, 302, 303, 257, 258, 259, 260, - 261, -1, 33, -1, -1, 36, 37, 38, -1, 40, - -1, 42, 43, 274, 45, 276, 277, 278, -1, -1, - -1, -1, 283, 284, 285, 286, 287, 288, -1, -1, - 291, -1, -1, 64, -1, 296, -1, -1, -1, 300, - -1, 302, 303, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 33, -1, -1, 36, 37, 38, -1, 40, - 91, 42, 43, -1, 45, -1, -1, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, 64, -1, + -1, -1, -1, -1, 267, 268, 269, 270, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, 260, 261, -1, -1, 91, -1, 290, 291, -1, + -1, -1, -1, -1, 41, -1, 275, 44, 277, 278, + 279, -1, 305, 306, 307, 284, 285, 286, 287, 288, + 289, 58, 59, 292, 61, -1, 63, 123, 297, -1, + 126, -1, 301, -1, 303, 304, 33, -1, -1, 36, + 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, + -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, + -1, 257, 258, 259, 260, 261, -1, 64, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 275, + -1, 277, 278, 279, -1, -1, 123, -1, 284, 285, + 286, 287, 288, 289, 91, -1, 292, -1, -1, -1, + -1, 297, -1, -1, -1, 301, -1, 303, 304, 33, + -1, -1, 36, 37, 38, -1, 40, -1, 42, 43, + -1, 45, -1, -1, -1, -1, 123, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 64, -1, -1, 41, -1, -1, 44, - -1, -1, 123, -1, -1, 126, -1, -1, -1, -1, - -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, - 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 257, 258, 259, 260, 261, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 91, 274, 93, 276, - 277, 278, 123, -1, -1, 126, 283, 284, 285, 286, - 287, 288, 41, -1, 291, 44, -1, -1, -1, 296, - -1, -1, -1, 300, -1, 302, 303, -1, 123, 58, - 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 257, 258, 259, 260, 261, -1, 91, -1, 93, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 275, + -1, 277, 278, 279, -1, -1, -1, -1, 284, 285, + 286, 287, 288, 289, -1, -1, 292, -1, -1, 123, + -1, 297, 126, -1, -1, 301, -1, 303, 304, 33, + -1, -1, 36, 37, 38, -1, 40, -1, 42, 43, + -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, + 267, 268, 269, 270, -1, -1, -1, -1, -1, 276, + 64, -1, -1, 280, 281, -1, -1, -1, -1, -1, + -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, + 257, 258, 259, 260, 261, -1, -1, 91, 305, 306, + 307, -1, -1, -1, -1, -1, -1, -1, 275, -1, + 277, 278, 279, -1, -1, -1, -1, 284, 285, 286, + 287, 288, 289, -1, -1, 292, -1, -1, -1, 123, + 297, -1, 126, -1, 301, -1, 303, 304, 33, -1, + -1, 36, 37, 38, -1, 40, -1, 42, 43, -1, + 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 257, 258, 259, 260, 261, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, - -1, 44, -1, -1, -1, -1, 257, 258, 259, 260, - 261, -1, -1, -1, 123, 58, 59, -1, 61, -1, - 63, -1, -1, 274, -1, 276, 277, 278, -1, -1, - -1, -1, 283, 284, 285, 286, 287, 288, -1, -1, - 291, -1, -1, -1, -1, 296, 41, -1, 91, 300, - 93, 302, 303, -1, -1, -1, 257, 258, 259, 260, - 261, -1, -1, 58, 59, -1, 61, -1, 63, -1, - -1, -1, -1, 274, -1, 276, 277, 278, -1, -1, - 123, -1, 283, 284, 285, 286, 287, 288, -1, -1, - 291, 266, 267, 268, 269, 296, 91, -1, 93, 300, - 275, 302, 303, -1, 279, 280, 281, 282, -1, -1, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, -1, 297, 298, 41, -1, 301, 44, 123, 304, - 305, 306, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 266, 267, 268, - 269, -1, -1, -1, -1, -1, 275, -1, -1, -1, - 279, 280, 281, 282, -1, -1, 93, -1, -1, -1, - 289, 290, -1, 292, 293, 294, 295, -1, 297, 298, - -1, -1, 301, -1, -1, 304, 305, 306, -1, -1, - -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, + -1, 275, -1, 277, 278, 279, -1, -1, -1, -1, + 284, 285, 286, 287, 288, 289, 91, 41, 292, -1, + 44, -1, -1, 297, -1, -1, -1, 301, -1, 303, + 304, -1, -1, -1, 58, 59, -1, 61, -1, 63, + -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, + -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, + -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, 257, 258, 259, 260, 261, -1, 58, + 59, -1, 61, -1, 63, -1, -1, -1, -1, 123, + -1, 275, -1, 277, 278, 279, -1, -1, -1, -1, + 284, 285, 286, 287, 288, 289, 41, -1, 292, 44, + -1, -1, 91, 297, 93, -1, -1, 301, -1, 303, + 304, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 266, 267, 268, 269, -1, -1, -1, - -1, -1, 275, -1, -1, -1, 279, 280, 281, 282, - -1, -1, -1, -1, -1, -1, 289, 290, -1, 292, - 293, 294, 295, -1, 297, 298, -1, -1, 301, -1, - -1, 304, 305, 306, -1, -1, -1, -1, -1, -1, - -1, 266, 267, 268, 269, -1, -1, -1, -1, -1, - 275, -1, -1, -1, 279, 280, 281, 282, -1, -1, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, 41, 297, 298, 44, -1, 301, -1, -1, 304, - 305, 306, -1, -1, -1, -1, -1, -1, 58, 59, + -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, + -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 257, 258, 259, 260, 261, -1, 58, 59, + -1, 61, -1, 63, -1, -1, -1, -1, 123, -1, + 275, -1, 277, 278, 279, -1, -1, -1, -1, 284, + 285, 286, 287, 288, 289, -1, -1, 292, -1, -1, + -1, 91, 297, 93, -1, -1, 301, -1, 303, 304, + -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, + 44, -1, -1, 267, 268, 269, 270, -1, -1, -1, + -1, -1, 276, 123, 58, 59, 280, 281, 282, 283, + -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, + 294, 295, 296, -1, 298, 299, -1, -1, 302, -1, + -1, 305, 306, 307, -1, -1, -1, 91, -1, 93, + -1, -1, -1, -1, -1, -1, -1, -1, 267, 268, + 269, 270, -1, -1, -1, -1, -1, 276, -1, -1, + -1, 280, 281, 282, 283, -1, -1, -1, -1, 123, + -1, 290, 291, -1, 293, 294, 295, 296, -1, 298, + 299, -1, 41, 302, -1, 44, 305, 306, 307, -1, + -1, -1, 267, 268, 269, 270, -1, -1, -1, 58, + 59, 276, 61, -1, 63, 280, 281, 282, 283, -1, + -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, + 295, 296, -1, 298, 299, -1, -1, 302, -1, -1, + 305, 306, 307, -1, 93, -1, -1, 41, -1, -1, + 44, -1, -1, -1, -1, -1, -1, 267, 268, 269, + 270, -1, -1, -1, 58, 59, 276, 61, -1, 63, + 280, 281, 282, 283, 123, -1, -1, -1, -1, -1, + 290, 291, -1, 293, 294, 295, 296, -1, 298, 299, + 41, -1, 302, 44, -1, 305, 306, 307, -1, 93, + -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, + 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, 123, + -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, + 91, -1, 93, -1, -1, -1, 290, 291, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, + -1, 305, 306, 307, -1, -1, -1, -1, -1, -1, + -1, -1, 123, 41, -1, -1, 44, -1, -1, -1, + -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, + 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 266, - 267, 268, 269, 93, -1, -1, -1, -1, 275, -1, - -1, -1, 279, 280, 281, 282, -1, -1, -1, -1, - -1, -1, 289, 290, -1, 292, 293, 294, 295, 41, - 297, 298, 44, 123, 301, -1, -1, 304, 305, 306, + -1, -1, -1, 123, -1, -1, -1, -1, 267, 268, + 269, 270, -1, -1, -1, 93, -1, 276, -1, -1, + -1, 280, 281, 282, 283, -1, -1, -1, -1, -1, + -1, 290, 291, -1, 293, 294, 295, 296, -1, 298, + 299, -1, -1, 302, -1, -1, 305, 306, 307, -1, + -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, -1, + 58, 59, 276, 61, -1, 63, 280, 281, 282, 283, + -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, + 294, 295, 296, -1, 298, 299, -1, -1, 302, -1, + -1, 305, 306, 307, -1, 93, 267, 268, 269, 270, + -1, -1, -1, -1, -1, 276, -1, -1, -1, 280, + 281, 282, 283, -1, -1, -1, -1, -1, -1, 290, + 291, -1, 293, 294, 295, 296, -1, 298, 299, -1, + -1, -1, -1, -1, 305, 306, 307, 267, 268, 269, + 270, -1, -1, -1, -1, -1, 276, -1, -1, -1, + 280, 281, 282, 283, -1, -1, -1, -1, -1, -1, + 290, 291, -1, 293, 294, 295, 296, -1, 298, 299, + -1, -1, -1, -1, -1, 305, 306, 307, -1, 267, + 268, 269, 270, -1, -1, -1, -1, -1, 276, -1, + -1, -1, 280, 281, 282, 283, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, 41, + 298, 299, 44, -1, 302, -1, -1, 305, 306, 307, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 41, -1, -1, 44, -1, -1, -1, -1, -1, 91, - -1, 93, -1, -1, -1, -1, -1, 58, 59, -1, - 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 123, 41, -1, -1, 44, -1, -1, -1, -1, - 91, -1, 93, -1, -1, -1, -1, -1, -1, 58, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, 93, 44, -1, -1, -1, -1, -1, -1, 267, + 268, 269, 270, -1, -1, -1, 58, 59, 276, 61, + -1, 63, 280, 281, 282, 283, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, + 298, 299, 41, -1, 302, 44, -1, 305, 306, 307, + -1, 93, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, -1, 41, -1, -1, 44, - -1, -1, -1, -1, -1, -1, 266, 267, 268, 269, - -1, -1, -1, 58, 59, 275, 61, -1, 63, 279, - 280, 281, 282, -1, -1, -1, -1, -1, -1, 289, - 290, -1, 292, 293, 294, 295, -1, 297, 298, 41, - -1, 301, 44, -1, 304, 305, 306, -1, 93, -1, + -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, + -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, + 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, -1, 44, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 267, 268, 269, 270, 91, + -1, 93, -1, -1, 276, -1, -1, -1, 280, 281, + 282, 283, -1, -1, -1, -1, -1, -1, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, 123, -1, 305, 306, 307, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 267, 268, 269, 270, -1, + -1, -1, -1, -1, 276, -1, -1, -1, 280, 281, + 282, 283, -1, -1, -1, -1, -1, -1, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, -1, -1, 305, 306, 307, -1, -1, 267, 268, + 269, 270, -1, -1, -1, -1, -1, 276, -1, -1, + -1, 280, 281, 282, 283, -1, -1, -1, -1, -1, + -1, 290, 291, -1, 293, 294, 295, 296, -1, 298, + 299, -1, -1, 302, -1, -1, 305, 306, 307, 267, + 268, 269, 270, -1, -1, -1, -1, -1, 276, -1, + -1, -1, 280, 281, 282, 283, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, + 298, -1, -1, -1, -1, -1, -1, 305, 306, 307, + -1, -1, -1, -1, -1, 267, 268, 269, 270, -1, + -1, -1, -1, -1, 276, -1, -1, -1, 280, 281, + 41, 283, -1, 44, -1, -1, -1, -1, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 58, 59, -1, + 61, -1, 63, 305, 306, 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 266, 267, 268, 269, -1, -1, - -1, 93, -1, 275, -1, -1, -1, 279, 280, 281, - 282, -1, -1, -1, -1, -1, -1, 289, 290, -1, - 292, 293, 294, 295, -1, 297, 298, -1, -1, -1, - -1, -1, 304, 305, 306, 266, 267, 268, 269, -1, - -1, -1, -1, -1, 275, -1, -1, -1, 279, 280, - 281, 282, -1, -1, -1, -1, -1, -1, 289, 290, - -1, 292, 293, 294, 295, -1, 297, 298, -1, -1, - -1, -1, -1, 304, 305, 306, -1, 266, 267, 268, - 269, -1, -1, -1, -1, -1, 275, -1, -1, -1, - 279, 280, 281, 282, -1, -1, -1, -1, -1, -1, - 289, 290, -1, 292, 293, 294, 295, -1, 297, 298, - -1, -1, 301, -1, -1, 304, 305, 306, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, - -1, 266, 267, 268, 269, -1, -1, -1, 58, 59, - 275, 61, -1, 63, 279, 280, 281, 282, -1, -1, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, -1, 297, 298, -1, -1, 301, -1, -1, 304, - 305, 306, -1, 93, 266, 267, 268, 269, -1, -1, - -1, -1, -1, 275, -1, -1, -1, 279, 280, 281, - 282, -1, -1, -1, -1, -1, -1, 289, 290, -1, - 292, 293, 294, 295, 41, 297, 298, 44, -1, 301, - -1, -1, 304, 305, 306, -1, -1, -1, -1, -1, + 91, -1, 93, -1, -1, -1, -1, -1, 58, 59, + -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 123, 41, -1, -1, 44, -1, -1, -1, + -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, + 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 123, 41, -1, -1, 44, -1, -1, + -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, + -1, -1, -1, -1, -1, 123, 41, -1, -1, 44, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, - -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, + -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 123, -1, -1, 41, - -1, -1, 44, -1, -1, 91, -1, 93, -1, -1, - -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, - -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 41, 93, -1, 44, -1, -1, 266, 267, 268, 269, - -1, -1, -1, -1, -1, 275, -1, 58, 59, 279, - 280, 281, 282, -1, -1, -1, -1, -1, -1, 289, - 290, 123, 292, 293, 294, 295, -1, 297, 298, -1, - -1, 301, -1, -1, 304, 305, 306, -1, -1, -1, - 91, -1, 93, -1, -1, -1, 41, -1, -1, 44, + -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, + -1, -1, -1, -1, -1, -1, 267, 268, 269, 270, + -1, -1, -1, -1, -1, 276, -1, -1, -1, 280, + 281, -1, -1, -1, -1, -1, -1, -1, 123, 290, + 291, -1, 293, 294, 295, 296, -1, 298, -1, -1, + -1, -1, -1, -1, 305, 306, 307, 267, 268, 269, + 270, -1, -1, -1, -1, -1, 276, -1, -1, -1, + 280, 281, -1, -1, -1, -1, -1, -1, -1, -1, + 290, 291, -1, 293, 294, 295, 296, -1, -1, -1, + -1, -1, -1, -1, -1, 305, 306, 307, -1, 267, + 268, 269, 270, -1, -1, -1, -1, -1, 276, -1, + -1, -1, -1, 281, -1, -1, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, + -1, -1, -1, -1, -1, -1, -1, 305, 306, 307, + 267, 268, 269, 270, 41, -1, -1, 44, -1, 276, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 58, 59, 290, 291, -1, 293, 294, 295, 296, + -1, -1, -1, -1, -1, -1, -1, -1, 305, 306, + 307, -1, 267, 268, 269, 270, -1, -1, -1, -1, + -1, 276, -1, -1, 91, 41, 93, -1, 44, -1, + -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, + 295, 296, 58, 59, -1, 61, -1, 63, -1, -1, + 305, 306, 307, -1, -1, -1, 123, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, + -1, -1, -1, -1, -1, 91, 41, 93, -1, 44, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, - -1, -1, 123, -1, -1, -1, -1, -1, -1, 266, - 267, 268, 269, -1, -1, -1, -1, -1, 275, -1, - -1, -1, 279, 280, 281, 282, 91, -1, 93, -1, - -1, -1, 289, 290, -1, 292, 293, 294, 295, -1, - 297, -1, -1, -1, -1, -1, -1, 304, 305, 306, - 266, 267, 268, 269, -1, -1, -1, -1, 123, 275, - -1, -1, -1, 279, 280, -1, 282, -1, -1, -1, - -1, -1, -1, 289, 290, -1, 292, 293, 294, 295, - -1, 297, -1, -1, -1, -1, -1, -1, 304, 305, - 306, -1, -1, -1, 266, 267, 268, 269, -1, -1, - -1, -1, -1, 275, -1, -1, -1, 279, 280, 41, - -1, -1, 44, -1, -1, -1, -1, 289, 290, -1, - 292, 293, 294, 295, -1, 297, 58, 59, -1, 61, - -1, 63, 304, 305, 306, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 266, 267, 268, 269, -1, - -1, -1, -1, -1, -1, 41, -1, -1, 44, 91, - -1, 93, -1, -1, -1, -1, -1, -1, 289, 290, - -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, - -1, -1, -1, 304, 305, 306, -1, -1, -1, -1, - -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 266, 267, 268, 269, 91, -1, 93, -1, -1, - 275, -1, -1, -1, 279, 280, 41, -1, -1, 44, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, -1, -1, 58, 59, -1, 61, 123, 63, 304, - 305, 306, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, -1, -1, -1, -1, -1, 91, -1, 93, -1, - -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, + -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, + -1, -1, -1, -1, -1, -1, 91, 41, 93, -1, + 44, -1, -1, -1, 41, -1, 91, 44, 93, 41, + -1, -1, 44, -1, 58, 59, -1, 61, -1, 63, + -1, 58, 59, -1, 61, -1, 58, 59, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, - -1, -1, 41, -1, -1, 44, -1, 91, -1, 93, - -1, -1, -1, -1, -1, 41, -1, -1, 44, 58, - 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, - -1, -1, 58, 59, 266, 267, 268, 269, -1, 123, - -1, -1, -1, 275, -1, -1, -1, 279, 280, -1, - -1, -1, 91, -1, 93, -1, -1, 289, 290, -1, - 292, 293, 294, 295, -1, 91, -1, 93, -1, -1, - -1, -1, 304, 305, 306, -1, -1, -1, -1, -1, - 266, 267, 268, 269, 123, -1, -1, -1, -1, 275, - -1, -1, -1, 279, 280, 41, -1, 123, 44, -1, - -1, -1, -1, 289, 290, -1, 292, 293, 294, 295, - -1, -1, 58, 59, -1, 61, -1, 63, 304, 305, - 306, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, - -1, 266, 267, 268, 269, 91, -1, 93, -1, -1, - 275, -1, -1, 58, 59, 280, 61, -1, 63, -1, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, -1, -1, -1, -1, -1, -1, 123, -1, 304, - 305, 306, 266, 267, 268, 269, 91, -1, 93, -1, - -1, 275, -1, -1, -1, 41, -1, -1, 44, -1, - -1, -1, -1, -1, -1, 289, 290, -1, 292, 293, - 294, 295, 58, 59, -1, 61, -1, 63, 123, -1, - 304, 305, 306, -1, -1, -1, -1, 266, 267, 268, - 269, -1, -1, -1, -1, -1, 275, -1, -1, -1, - 266, 267, 268, 269, -1, 91, -1, 93, -1, -1, - 289, 290, -1, 292, 293, 294, 295, 41, -1, -1, - 44, -1, -1, 289, 290, 304, 305, 306, -1, -1, - -1, -1, -1, -1, 58, 59, -1, 123, 304, 305, - 306, -1, -1, 41, -1, -1, 44, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 58, 59, -1, -1, -1, -1, -1, 91, -1, 93, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 266, 267, 268, 269, 41, -1, -1, 44, -1, 275, - -1, -1, -1, 91, -1, 93, -1, -1, -1, 123, - -1, 58, 59, 289, 290, -1, 292, 293, 294, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 304, 305, - 306, 266, 267, 268, 269, 123, -1, -1, -1, -1, - 275, -1, -1, -1, 91, 41, 93, -1, 44, -1, - 41, -1, -1, 44, 289, 290, 41, 292, 293, 44, - -1, -1, 58, 59, -1, -1, -1, 58, 59, 304, - 305, 306, -1, 58, 59, -1, 123, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, + -1, -1, -1, -1, 91, 41, 93, -1, 44, 91, + 41, 93, -1, 44, -1, -1, -1, -1, -1, -1, + -1, -1, 58, 59, -1, -1, -1, 58, 59, 123, + 267, 268, 269, 270, -1, -1, 123, -1, -1, -1, + -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 290, 291, 91, -1, 93, -1, -1, + 91, 41, 93, -1, 44, -1, -1, -1, 305, 306, + 307, -1, -1, -1, -1, -1, -1, -1, 58, 59, + -1, 267, 268, 269, 270, -1, -1, 123, -1, -1, + 276, -1, 123, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, + -1, 91, -1, 93, -1, -1, -1, -1, -1, 305, + 306, 307, 267, 268, 269, 270, -1, -1, -1, -1, + -1, 276, 267, 268, 269, 270, -1, -1, -1, -1, + -1, 276, -1, 123, -1, 290, 291, 41, 293, 294, + 44, -1, -1, -1, -1, 290, 291, -1, 293, -1, + 305, 306, 307, -1, 58, 59, -1, 61, -1, 63, + 305, 306, 307, 267, 268, 269, 270, -1, -1, -1, + 267, 268, 269, 270, -1, 267, 268, 269, 270, -1, + -1, -1, -1, -1, -1, -1, 290, 291, 41, 93, + -1, 44, -1, 290, 291, -1, -1, -1, 290, 291, + -1, 305, 306, 307, -1, 58, 59, -1, 305, 306, + 307, -1, -1, 305, 306, 307, -1, 41, -1, -1, + 44, 267, 268, 269, 270, -1, 267, 268, 269, 270, + -1, -1, -1, -1, 58, 59, 41, -1, 91, 44, + 93, -1, -1, -1, 290, 291, -1, -1, -1, 290, + 291, -1, -1, 58, 59, -1, -1, -1, -1, 305, + 306, 307, -1, -1, 305, 306, 307, 91, -1, 93, + 123, -1, -1, -1, -1, -1, -1, 267, 268, 269, + 270, -1, -1, -1, -1, -1, 91, 41, 93, -1, + 44, -1, -1, -1, -1, -1, -1, -1, -1, 123, + 290, 291, -1, -1, 58, 59, 41, -1, -1, 44, + -1, -1, -1, -1, -1, 305, 306, 307, 123, -1, + -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, + -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 266, 267, 268, 269, -1, 91, -1, 93, -1, 275, - 91, -1, 93, -1, -1, -1, 91, 41, 93, -1, - 44, -1, -1, 289, 290, -1, 292, 41, -1, -1, - 44, -1, -1, -1, 58, 59, -1, 123, 304, 305, - 306, -1, 123, -1, 58, 59, -1, -1, 123, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, - -1, 44, 266, 267, 268, 269, -1, 91, -1, 93, - -1, -1, -1, -1, -1, 58, 59, 91, -1, 93, - -1, -1, -1, -1, -1, 289, 290, -1, 266, 267, - 268, 269, -1, -1, -1, -1, -1, -1, -1, 123, - 304, 305, 306, -1, -1, -1, -1, -1, 91, 123, - 93, 289, 290, -1, -1, -1, -1, -1, -1, -1, - 41, -1, -1, 44, -1, -1, 304, 305, 306, 266, - 267, 268, 269, -1, -1, -1, -1, 58, 59, -1, - 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 289, 290, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 304, 305, 306, - 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, - 266, 267, 268, 269, -1, 266, 267, 268, 269, -1, - -1, 266, 267, 268, 269, -1, -1, -1, -1, -1, - -1, -1, 123, 289, 290, -1, -1, -1, 289, 290, - -1, -1, -1, -1, 289, 290, -1, -1, 304, 305, - 306, -1, -1, 304, 305, 306, -1, -1, -1, 304, - 305, 306, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 266, 267, 268, 269, -1, -1, -1, -1, - -1, -1, 266, 267, 268, 269, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 289, 290, -1, -1, -1, - -1, -1, -1, -1, -1, 289, 290, -1, -1, -1, - 304, 305, 306, 266, 267, 268, 269, -1, -1, -1, - 304, 305, 306, -1, -1, -1, -1, 41, -1, -1, - 44, -1, -1, -1, -1, -1, 289, 290, -1, -1, - -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, - -1, 304, 305, 306, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, -1, -1, -1, -1, 266, 267, 268, 269, 93, - -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, - -1, -1, -1, -1, -1, -1, -1, -1, 289, -1, - -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, - -1, -1, -1, 304, 305, 306, -1, -1, -1, 93, + -1, -1, -1, 41, -1, -1, 44, -1, 93, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, 123, + 58, 59, 276, 61, -1, 63, 280, 281, 282, 283, + -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, + 294, 295, 296, -1, 298, 299, -1, -1, 302, -1, + -1, 305, 306, 41, -1, 93, 44, -1, -1, -1, + -1, -1, -1, -1, 267, 268, 269, 270, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, 58, 59, -1, 61, - -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 290, 291, 41, + -1, -1, 44, 267, 268, 269, 270, -1, -1, -1, + -1, -1, 305, 306, 307, 93, 58, 59, -1, 61, + -1, 63, 267, 268, 269, 270, 290, 291, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 305, 306, 307, -1, 290, 291, -1, -1, -1, -1, 93, 58, 59, -1, 61, -1, 63, -1, -1, + 305, 306, 307, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, -1, + -1, -1, 41, -1, -1, 44, -1, 93, -1, -1, + -1, -1, 267, 268, 269, 270, 290, 291, -1, 58, + 59, 276, 61, -1, 63, 280, 281, 282, 283, -1, + -1, 305, 306, 307, -1, 290, 291, -1, 293, 294, + 295, 296, -1, 298, 299, -1, -1, 302, -1, 41, + -1, -1, 44, -1, 93, -1, -1, -1, -1, 267, + 268, 269, 270, -1, -1, -1, 58, 59, 276, 61, + -1, 63, 280, 281, 282, 283, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, + 298, 299, -1, -1, 302, -1, -1, 41, -1, -1, + 44, 93, -1, -1, -1, -1, -1, -1, -1, 267, + 268, 269, 270, -1, 58, 59, -1, 61, 276, 63, + -1, -1, 280, 281, 282, 283, -1, -1, -1, -1, + -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, + 298, 299, -1, -1, 302, 267, 268, 269, 270, 93, + -1, -1, -1, -1, 276, -1, -1, -1, 280, 281, + 282, 283, -1, -1, -1, -1, -1, -1, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, 267, 268, 269, 270, -1, -1, -1, -1, -1, + 276, -1, -1, -1, 280, 281, 282, 283, -1, -1, + -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, + 296, -1, 298, 299, -1, -1, 302, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 267, 268, + 269, 270, -1, -1, -1, -1, -1, 276, -1, -1, + -1, 280, 281, 282, 283, -1, -1, -1, -1, -1, + -1, 290, 291, -1, 293, 294, 295, 296, -1, 298, + 299, 35, -1, 302, -1, -1, 40, 41, -1, -1, + -1, -1, 46, -1, -1, 267, 268, 269, 270, -1, + -1, -1, -1, -1, 276, -1, -1, -1, 280, 281, + 282, 283, -1, -1, -1, -1, -1, -1, 290, 291, + -1, 293, 294, 295, 296, -1, 298, 299, -1, -1, + 302, -1, -1, 87, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 267, 268, 269, 270, -1, -1, -1, + -1, -1, 276, -1, -1, -1, 280, 281, 282, 283, + -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, + 294, 295, 296, -1, 298, 299, -1, -1, 302, -1, + -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, 58, 59, - -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 266, 267, 268, 269, -1, -1, -1, -1, - -1, 275, -1, 93, -1, 279, 280, 281, 282, -1, - -1, -1, -1, -1, -1, 289, 290, -1, 292, 293, - 294, 295, 41, 297, 298, 44, -1, 301, -1, -1, - 304, 305, 266, 267, 268, 269, -1, -1, -1, 58, - 59, 275, 61, -1, 63, 279, 280, 281, 282, -1, - -1, -1, -1, -1, -1, 289, 290, -1, 292, 293, - 294, 295, -1, 297, 298, -1, -1, 301, 266, 267, - 268, 269, -1, -1, 93, -1, -1, 275, -1, -1, - -1, 279, 280, 281, 282, -1, -1, -1, -1, -1, - -1, 289, 290, -1, 292, 293, 294, 295, -1, 297, - 298, -1, -1, 301, 266, 267, 268, 269, -1, -1, - -1, -1, -1, 275, -1, -1, -1, 279, 280, 281, - 282, -1, -1, -1, -1, -1, -1, 289, 290, -1, - 292, 293, 294, 295, -1, 297, 298, -1, -1, 301, - 266, 267, 268, 269, -1, -1, -1, -1, -1, 275, - -1, -1, -1, 279, 280, 281, 282, -1, -1, -1, - -1, -1, -1, 289, 290, -1, 292, 293, 294, 295, - -1, 297, 298, -1, -1, 301, 266, 267, 268, 269, - -1, -1, 32, -1, -1, 275, -1, 37, 38, 279, - 280, 281, 282, 43, -1, -1, -1, -1, -1, 289, - 290, -1, 292, 293, 294, 295, 41, 297, 298, 44, - -1, 301, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, - -1, -1, 82, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 266, 267, 268, - 269, -1, -1, -1, -1, -1, 275, -1, 93, -1, - 279, 280, 281, 282, -1, -1, -1, -1, -1, -1, - 289, 290, -1, 292, 293, 294, 295, -1, 297, 298, - -1, -1, 301, -1, -1, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 196, -1, -1, -1, -1, -1, -1, -1, + 204, -1, 206, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 218, -1, 220, -1, -1, -1, + -1, -1, 226, -1, 228, -1, 230, -1, 232, -1, + 234, -1, -1, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 190, -1, -1, -1, -1, -1, -1, -1, 198, -1, - 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 212, -1, 214, -1, -1, -1, -1, -1, - 220, -1, 222, -1, 224, -1, 226, -1, 228, -1, - -1, 231, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 248, -1, + 254, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 280, 266, 267, 268, 269, -1, -1, -1, -1, -1, - 275, -1, -1, -1, 279, 280, 281, 282, -1, -1, - -1, -1, -1, -1, 289, 290, -1, 292, 293, 294, - 295, -1, 297, 298, -1, -1, 301, + -1, -1, 286, }; #define YYFINAL 1 #ifndef YYDEBUG #define YYDEBUG 0 #endif -#define YYMAXTOKEN 306 +#define YYMAXTOKEN 307 #if YYDEBUG char *yyname[] = { "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -1402,8 +1384,8 @@ char *yyname[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"WORD","METHOD","THING", -"PMFUNC","PRIVATEREF","LABEL","FORMAT","SUB","PACKAGE","WHILE","UNTIL","IF", -"UNLESS","ELSE","ELSIF","CONTINUE","FOR","LOOPEX","DOTDOT","FUNC0","FUNC1", +"PMFUNC","PRIVATEREF","LABEL","FORMAT","SUB","PACKAGE","HINT","WHILE","UNTIL", +"IF","UNLESS","ELSE","ELSIF","CONTINUE","FOR","LOOPEX","DOTDOT","FUNC0","FUNC1", "FUNC","RELOP","EQOP","MULOP","ADDOP","DOLSHARP","DO","LOCAL","DELETE", "HASHBRACK","NOAMP","OROP","ANDOP","LSTOP","OROR","ANDAND","BITOROP","BITANDOP", "UNIOP","SHIFTOP","MATCHOP","UMINUS","REFGEN","POWOP","PREINC","PREDEC", @@ -1454,12 +1436,15 @@ char *yyrule[] = { "decl : format", "decl : subrout", "decl : package", +"decl : hint", "format : FORMAT WORD block", "format : FORMAT block", "subrout : SUB WORD block", "subrout : SUB WORD ';'", "package : PACKAGE WORD ';'", "package : PACKAGE ';'", +"hint : HINT WORD ';'", +"hint : HINT WORD expr ';'", "expr : expr ',' sexpr", "expr : sexpr", "listop : LSTOP indirob listexpr", @@ -1593,9 +1578,9 @@ int yyerrflag; int yychar; YYSTYPE yyval; YYSTYPE yylval; -#line 611 "perly.y" +#line 621 "perly.y" /* PROGRAM */ -#line 1604 "y.tab.c" +#line 1589 "y.tab.c" #define YYABORT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab @@ -1808,13 +1793,13 @@ case 2: break; case 3: #line 122 "perly.y" -{ int nbs = needblockscope; +{ int needblockscope = hints & HINT_BLOCK_SCOPE; yyval.opval = scalarseq(yyvsp[-1].opval); if (copline > (line_t)yyvsp[-3].ival) copline = yyvsp[-3].ival; LEAVE_SCOPE(yyvsp[-2].ival); - if (nbs) - needblockscope = TRUE; /* propagate outward */ + if (needblockscope) + hints |= HINT_BLOCK_SCOPE; /* propagate out */ pad_leavemy(comppad_name_fill); } break; case 4: @@ -1825,8 +1810,8 @@ case 4: SAVEINT(max_intro_pending); min_intro_pending = 0; SAVEINT(comppad_name_fill); - SAVEINT(needblockscope); - needblockscope = FALSE; } + SAVEINT(hints); + hints &= ~HINT_BLOCK_SCOPE; } break; case 5: #line 144 "perly.y" @@ -1840,7 +1825,7 @@ case 7: #line 148 "perly.y" { yyval.opval = append_list(OP_LINESEQ, (LISTOP*)yyvsp[-1].opval, (LISTOP*)yyvsp[0].opval); pad_reset(); - if (yyvsp[-1].opval && yyvsp[0].opval) needblockscope = TRUE; } + if (yyvsp[-1].opval && yyvsp[0].opval) hints |= HINT_BLOCK_SCOPE; } break; case 8: #line 154 "perly.y" @@ -1897,77 +1882,78 @@ break; case 20: #line 189 "perly.y" { copline = yyvsp[-5].ival; - yyval.opval = newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval); } + yyval.opval = newSTATEOP(0, 0, + newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); } break; case 21: -#line 194 "perly.y" +#line 195 "perly.y" { copline = yyvsp[-5].ival; yyval.opval = newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval); } break; case 22: -#line 197 "perly.y" +#line 198 "perly.y" { copline = yyvsp[-5].ival; yyval.opval = newCONDOP(0, invert(scalar(yyvsp[-3].opval)), scope(yyvsp[-1].opval), yyvsp[0].opval); } break; case 23: -#line 201 "perly.y" +#line 202 "perly.y" { copline = yyvsp[-3].ival; yyval.opval = newCONDOP(0, scope(yyvsp[-2].opval), scope(yyvsp[-1].opval), yyvsp[0].opval); } break; case 24: -#line 204 "perly.y" +#line 205 "perly.y" { copline = yyvsp[-3].ival; yyval.opval = newCONDOP(0, invert(scalar(scope(yyvsp[-2].opval))), scope(yyvsp[-1].opval), yyvsp[0].opval); } break; case 25: -#line 210 "perly.y" +#line 211 "perly.y" { yyval.opval = Nullop; } break; case 26: -#line 212 "perly.y" +#line 213 "perly.y" { yyval.opval = scope(yyvsp[0].opval); } break; case 27: -#line 216 "perly.y" +#line 217 "perly.y" { copline = yyvsp[-5].ival; yyval.opval = newSTATEOP(0, yyvsp[-6].pval, newWHILEOP(0, 1, (LOOP*)Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval) ); } break; case 28: -#line 221 "perly.y" +#line 222 "perly.y" { copline = yyvsp[-5].ival; yyval.opval = newSTATEOP(0, yyvsp[-6].pval, newWHILEOP(0, 1, (LOOP*)Nullop, invert(scalar(yyvsp[-3].opval)), yyvsp[-1].opval, yyvsp[0].opval) ); } break; case 29: -#line 226 "perly.y" +#line 227 "perly.y" { copline = yyvsp[-3].ival; yyval.opval = newSTATEOP(0, yyvsp[-4].pval, newWHILEOP(0, 1, (LOOP*)Nullop, scope(yyvsp[-2].opval), yyvsp[-1].opval, yyvsp[0].opval) ); } break; case 30: -#line 231 "perly.y" +#line 232 "perly.y" { copline = yyvsp[-3].ival; yyval.opval = newSTATEOP(0, yyvsp[-4].pval, newWHILEOP(0, 1, (LOOP*)Nullop, invert(scalar(scope(yyvsp[-2].opval))), yyvsp[-1].opval, yyvsp[0].opval)); } break; case 31: -#line 236 "perly.y" +#line 237 "perly.y" { yyval.opval = newFOROP(0, yyvsp[-7].pval, yyvsp[-6].ival, mod(yyvsp[-5].opval, OP_ENTERLOOP), yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval); } break; case 32: -#line 239 "perly.y" +#line 240 "perly.y" { yyval.opval = newFOROP(0, yyvsp[-6].pval, yyvsp[-5].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval); } break; case 33: -#line 242 "perly.y" +#line 243 "perly.y" { copline = yyvsp[-8].ival; yyval.opval = append_elem(OP_LINESEQ, newSTATEOP(0, yyvsp[-9].pval, scalar(yyvsp[-6].opval)), @@ -1976,348 +1962,360 @@ case 33: scalar(yyvsp[-4].opval), yyvsp[0].opval, scalar(yyvsp[-2].opval)) )); } break; case 34: -#line 249 "perly.y" +#line 250 "perly.y" { yyval.opval = newSTATEOP(0, yyvsp[-2].pval, newWHILEOP(0, 1, (LOOP*)Nullop, Nullop, yyvsp[-1].opval, yyvsp[0].opval)); } break; case 35: -#line 255 "perly.y" +#line 256 "perly.y" { yyval.opval = Nullop; } break; case 37: -#line 260 "perly.y" +#line 261 "perly.y" { (void)scan_num("1"); yyval.opval = yylval.opval; } break; case 39: -#line 265 "perly.y" +#line 266 "perly.y" { yyval.pval = Nullch; } break; case 41: -#line 270 "perly.y" +#line 271 "perly.y" { yyval.ival = 0; } break; case 42: -#line 272 "perly.y" +#line 273 "perly.y" { yyval.ival = 0; } break; case 43: -#line 274 "perly.y" +#line 275 "perly.y" { yyval.ival = 0; } break; case 44: -#line 278 "perly.y" -{ newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } +#line 277 "perly.y" +{ yyval.ival = 0; } break; case 45: -#line 280 "perly.y" -{ newFORM(yyvsp[-1].ival, Nullop, yyvsp[0].opval); } +#line 281 "perly.y" +{ newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } break; case 46: -#line 284 "perly.y" -{ newSUB(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } +#line 283 "perly.y" +{ newFORM(yyvsp[-1].ival, Nullop, yyvsp[0].opval); } break; case 47: -#line 286 "perly.y" -{ newSUB(yyvsp[-2].ival, yyvsp[-1].opval, Nullop); expect = XSTATE; } +#line 287 "perly.y" +{ newSUB(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } break; case 48: -#line 290 "perly.y" -{ package(yyvsp[-1].opval); } +#line 289 "perly.y" +{ newSUB(yyvsp[-2].ival, yyvsp[-1].opval, Nullop); expect = XSTATE; } break; case 49: -#line 292 "perly.y" -{ package(Nullop); } +#line 293 "perly.y" +{ package(yyvsp[-1].opval); } break; case 50: -#line 296 "perly.y" -{ yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); } +#line 295 "perly.y" +{ package(Nullop); } +break; +case 51: +#line 299 "perly.y" +{ hint(yyvsp[-2].ival, yyvsp[-1].opval, Nullop); } break; case 52: #line 301 "perly.y" +{ hint(yyvsp[-3].ival, yyvsp[-2].opval, list(force_list(yyvsp[-1].opval))); } +break; +case 53: +#line 305 "perly.y" +{ yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 55: +#line 310 "perly.y" { yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED, prepend_elem(OP_LIST, newGVREF(yyvsp[-1].opval), yyvsp[0].opval) ); } break; -case 53: -#line 304 "perly.y" +case 56: +#line 313 "perly.y" { yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED, prepend_elem(OP_LIST, newGVREF(yyvsp[-2].opval), yyvsp[-1].opval) ); } break; -case 54: -#line 307 "perly.y" +case 57: +#line 316 "perly.y" { yyval.opval = convert(yyvsp[-1].ival, OPf_STACKED, prepend_elem(OP_LIST, newGVREF(yyvsp[-3].opval), yyvsp[0].opval) ); } break; -case 55: -#line 310 "perly.y" +case 58: +#line 319 "perly.y" { yyval.opval = convert(yyvsp[-3].ival, OPf_STACKED, prepend_elem(OP_LIST, newGVREF(yyvsp[-5].opval), yyvsp[-1].opval) ); } break; -case 56: -#line 313 "perly.y" +case 59: +#line 322 "perly.y" { yyval.opval = convert(OP_ENTERSUBR, OPf_STACKED|OPf_SPECIAL, prepend_elem(OP_LIST, newMETHOD(yyvsp[-5].opval,yyvsp[-3].opval), list(yyvsp[-1].opval))); } break; -case 57: -#line 317 "perly.y" +case 60: +#line 326 "perly.y" { yyval.opval = convert(OP_ENTERSUBR, OPf_STACKED|OPf_SPECIAL, prepend_elem(OP_LIST, newMETHOD(yyvsp[-1].opval,yyvsp[-2].opval), list(yyvsp[0].opval))); } break; -case 58: -#line 321 "perly.y" +case 61: +#line 330 "perly.y" { yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); } break; -case 59: -#line 323 "perly.y" +case 62: +#line 332 "perly.y" { yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); } break; -case 60: -#line 327 "perly.y" +case 63: +#line 336 "perly.y" { yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 61: -#line 329 "perly.y" +case 64: +#line 338 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval)); } break; -case 62: -#line 332 "perly.y" +case 65: +#line 341 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval)); } break; -case 63: -#line 335 "perly.y" +case 66: +#line 344 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval));} break; -case 64: -#line 338 "perly.y" +case 67: +#line 347 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval)); } break; -case 65: -#line 341 "perly.y" +case 68: +#line 350 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval)); } break; -case 66: -#line 344 "perly.y" +case 69: +#line 353 "perly.y" { yyval.opval = newBINOP(yyvsp[-2].ival, OPf_STACKED, mod(scalar(yyvsp[-3].opval), yyvsp[-2].ival), scalar(yyvsp[0].opval)); } break; -case 67: -#line 347 "perly.y" +case 70: +#line 356 "perly.y" { yyval.opval = newLOGOP(OP_ANDASSIGN, 0, mod(scalar(yyvsp[-3].opval), OP_ANDASSIGN), newUNOP(OP_SASSIGN, 0, scalar(yyvsp[0].opval))); } break; -case 68: -#line 351 "perly.y" +case 71: +#line 360 "perly.y" { yyval.opval = newLOGOP(OP_ORASSIGN, 0, mod(scalar(yyvsp[-3].opval), OP_ORASSIGN), newUNOP(OP_SASSIGN, 0, scalar(yyvsp[0].opval))); } break; -case 69: -#line 357 "perly.y" +case 72: +#line 366 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 70: -#line 359 "perly.y" +case 73: +#line 368 "perly.y" { if (yyvsp[-1].ival != OP_REPEAT) scalar(yyvsp[-2].opval); yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); } break; -case 71: -#line 363 "perly.y" +case 74: +#line 372 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 72: -#line 365 "perly.y" +case 75: +#line 374 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 73: -#line 367 "perly.y" +case 76: +#line 376 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 74: -#line 369 "perly.y" +case 77: +#line 378 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 75: -#line 371 "perly.y" +case 78: +#line 380 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 76: -#line 373 "perly.y" +case 79: +#line 382 "perly.y" { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } break; -case 77: -#line 375 "perly.y" +case 80: +#line 384 "perly.y" { yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));} break; -case 78: -#line 377 "perly.y" +case 81: +#line 386 "perly.y" { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 79: -#line 379 "perly.y" +case 82: +#line 388 "perly.y" { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 80: -#line 381 "perly.y" +case 83: +#line 390 "perly.y" { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 81: -#line 383 "perly.y" +case 84: +#line 392 "perly.y" { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 82: -#line 385 "perly.y" +case 85: +#line 394 "perly.y" { yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 83: -#line 387 "perly.y" +case 86: +#line 396 "perly.y" { yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); } break; -case 84: -#line 389 "perly.y" +case 87: +#line 398 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 85: -#line 393 "perly.y" +case 88: +#line 402 "perly.y" { yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); } break; -case 86: -#line 395 "perly.y" +case 89: +#line 404 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 87: -#line 397 "perly.y" +case 90: +#line 406 "perly.y" { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); } break; -case 88: -#line 399 "perly.y" +case 91: +#line 408 "perly.y" { yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));} break; -case 89: -#line 401 "perly.y" +case 92: +#line 410 "perly.y" { yyval.opval = newUNOP(OP_REFGEN, 0, ref(yyvsp[0].opval,OP_REFGEN)); } break; -case 90: -#line 403 "perly.y" +case 93: +#line 412 "perly.y" { yyval.opval = newUNOP(OP_POSTINC, 0, mod(scalar(yyvsp[-1].opval), OP_POSTINC)); } break; -case 91: -#line 406 "perly.y" +case 94: +#line 415 "perly.y" { yyval.opval = newUNOP(OP_POSTDEC, 0, mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); } break; -case 92: -#line 409 "perly.y" +case 95: +#line 418 "perly.y" { yyval.opval = newUNOP(OP_PREINC, 0, mod(scalar(yyvsp[0].opval), OP_PREINC)); } break; -case 93: -#line 412 "perly.y" +case 96: +#line 421 "perly.y" { yyval.opval = newUNOP(OP_PREDEC, 0, mod(scalar(yyvsp[0].opval), OP_PREDEC)); } break; -case 94: -#line 415 "perly.y" +case 97: +#line 424 "perly.y" { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); } break; -case 95: -#line 417 "perly.y" +case 98: +#line 426 "perly.y" { yyval.opval = sawparens(yyvsp[-1].opval); } break; -case 96: -#line 419 "perly.y" +case 99: +#line 428 "perly.y" { yyval.opval = sawparens(newNULLLIST()); } break; -case 97: -#line 421 "perly.y" +case 100: +#line 430 "perly.y" { yyval.opval = newANONLIST(yyvsp[-1].opval); } break; -case 98: -#line 423 "perly.y" +case 101: +#line 432 "perly.y" { yyval.opval = newANONLIST(Nullop); } break; -case 99: -#line 425 "perly.y" +case 102: +#line 434 "perly.y" { yyval.opval = newANONHASH(yyvsp[-1].opval); } break; -case 100: -#line 427 "perly.y" +case 103: +#line 436 "perly.y" { yyval.opval = newANONHASH(Nullop); } break; -case 101: -#line 429 "perly.y" +case 104: +#line 438 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 102: -#line 431 "perly.y" +case 105: +#line 440 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 103: -#line 433 "perly.y" +case 106: +#line 442 "perly.y" { yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); } break; -case 104: -#line 435 "perly.y" +case 107: +#line 444 "perly.y" { yyval.opval = newBINOP(OP_AELEM, 0, ref(newAVREF(yyvsp[-4].opval),OP_RV2AV), scalar(yyvsp[-1].opval));} break; -case 105: -#line 439 "perly.y" +case 108: +#line 448 "perly.y" { yyval.opval = newBINOP(OP_AELEM, 0, ref(newAVREF(yyvsp[-3].opval),OP_RV2AV), scalar(yyvsp[-1].opval));} break; -case 106: -#line 443 "perly.y" +case 109: +#line 452 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 107: -#line 445 "perly.y" +case 110: +#line 454 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 108: -#line 447 "perly.y" +case 111: +#line 456 "perly.y" { yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));} break; -case 109: -#line 449 "perly.y" +case 112: +#line 458 "perly.y" { yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval)); expect = XOPERATOR; } break; -case 110: -#line 452 "perly.y" +case 113: +#line 461 "perly.y" { yyval.opval = newBINOP(OP_HELEM, 0, ref(newHVREF(yyvsp[-5].opval),OP_RV2HV), jmaybe(yyvsp[-2].opval)); expect = XOPERATOR; } break; -case 111: -#line 457 "perly.y" +case 114: +#line 466 "perly.y" { yyval.opval = newBINOP(OP_HELEM, 0, ref(newHVREF(yyvsp[-4].opval),OP_RV2HV), jmaybe(yyvsp[-2].opval)); expect = XOPERATOR; } break; -case 112: -#line 462 "perly.y" +case 115: +#line 471 "perly.y" { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); } break; -case 113: -#line 464 "perly.y" +case 116: +#line 473 "perly.y" { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); } break; -case 114: -#line 466 "perly.y" +case 117: +#line 475 "perly.y" { yyval.opval = prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), list( @@ -2325,8 +2323,8 @@ case 114: list(yyvsp[-1].opval), ref(yyvsp[-3].opval, OP_ASLICE)))); } break; -case 115: -#line 473 "perly.y" +case 118: +#line 482 "perly.y" { yyval.opval = prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), list( @@ -2335,197 +2333,198 @@ case 115: ref(oopsHV(yyvsp[-4].opval), OP_HSLICE)))); expect = XOPERATOR; } break; -case 116: -#line 481 "perly.y" +case 119: +#line 490 "perly.y" { yyval.opval = newBINOP(OP_DELETE, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval)); expect = XOPERATOR; } break; -case 117: -#line 484 "perly.y" +case 120: +#line 493 "perly.y" { yyval.opval = newBINOP(OP_DELETE, 0, oopsHV(yyvsp[-5].opval), jmaybe(yyvsp[-3].opval)); expect = XOPERATOR; } break; -case 118: -#line 487 "perly.y" +case 121: +#line 496 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -case 119: -#line 489 "perly.y" +case 122: +#line 498 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, 0, scalar(yyvsp[0].opval)); } break; -case 120: -#line 492 "perly.y" +case 123: +#line 501 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_STACKED, scalar(yyvsp[-2].opval)); } break; -case 121: -#line 494 "perly.y" +case 124: +#line 503 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_STACKED, list(prepend_elem(OP_LIST, scalar(yyvsp[-3].opval), yyvsp[-1].opval))); } break; -case 122: -#line 497 "perly.y" +case 125: +#line 506 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_STACKED, list(prepend_elem(OP_LIST, newCVREF(scalar(yyvsp[-1].opval)), yyvsp[0].opval))); } break; -case 123: -#line 501 "perly.y" +case 126: +#line 510 "perly.y" { yyval.opval = convert(OP_ENTERSUBR, OPf_STACKED|OPf_SPECIAL, prepend_elem(OP_LIST, newMETHOD(yyvsp[-1].opval,yyvsp[-2].opval), list(yyvsp[0].opval))); } break; -case 124: -#line 505 "perly.y" +case 127: +#line 514 "perly.y" { yyval.opval = newUNOP(OP_DOFILE, 0, scalar(yyvsp[0].opval)); } break; -case 125: -#line 507 "perly.y" +case 128: +#line 516 "perly.y" { yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); } break; -case 126: -#line 509 "perly.y" +case 129: +#line 518 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_SPECIAL|OPf_STACKED, list(prepend_elem(OP_LIST, scalar(newCVREF(scalar(yyvsp[-2].opval))), Nullop))); } break; -case 127: -#line 513 "perly.y" +case 130: +#line 522 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_SPECIAL|OPf_STACKED, list(prepend_elem(OP_LIST, scalar(newCVREF(scalar(yyvsp[-3].opval))), yyvsp[-1].opval))); } break; -case 128: -#line 518 "perly.y" +case 131: +#line 527 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_SPECIAL|OPf_STACKED, list(prepend_elem(OP_LIST, scalar(newCVREF(scalar(yyvsp[-2].opval))), Nullop)));} break; -case 129: -#line 522 "perly.y" +case 132: +#line 531 "perly.y" { yyval.opval = newUNOP(OP_ENTERSUBR, OPf_SPECIAL|OPf_STACKED, list(prepend_elem(OP_LIST, scalar(newCVREF(scalar(yyvsp[-3].opval))), yyvsp[-1].opval))); } break; -case 130: -#line 527 "perly.y" -{ yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL); needblockscope = TRUE; } -break; -case 131: -#line 529 "perly.y" -{ yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); } -break; -case 132: -#line 531 "perly.y" -{ yyval.opval = newOP(yyvsp[0].ival, 0); } -break; case 133: -#line 533 "perly.y" -{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } +#line 536 "perly.y" +{ yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL); + hints |= HINT_BLOCK_SCOPE; } break; case 134: -#line 535 "perly.y" -{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } +#line 539 "perly.y" +{ yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); } break; case 135: -#line 537 "perly.y" +#line 541 "perly.y" { yyval.opval = newOP(yyvsp[0].ival, 0); } break; case 136: -#line 539 "perly.y" -{ yyval.opval = newOP(yyvsp[-2].ival, 0); } +#line 543 "perly.y" +{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } break; case 137: -#line 541 "perly.y" -{ yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); } +#line 545 "perly.y" +{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } break; case 138: -#line 543 "perly.y" -{ yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); } +#line 547 "perly.y" +{ yyval.opval = newOP(yyvsp[0].ival, 0); } break; case 139: -#line 545 "perly.y" -{ yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); } +#line 549 "perly.y" +{ yyval.opval = newOP(yyvsp[-2].ival, 0); } break; case 140: -#line 547 "perly.y" -{ yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); } +#line 551 "perly.y" +{ yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); } break; -case 143: +case 141: #line 553 "perly.y" -{ yyval.opval = Nullop; } +{ yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); } break; -case 144: +case 142: #line 555 "perly.y" -{ yyval.opval = yyvsp[0].opval; } +{ yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); } break; -case 145: -#line 559 "perly.y" -{ yyval.opval = newCVREF(yyvsp[0].opval); } +case 143: +#line 557 "perly.y" +{ yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); } break; case 146: #line 563 "perly.y" -{ yyval.opval = newSVREF(yyvsp[0].opval); } +{ yyval.opval = Nullop; } break; case 147: -#line 567 "perly.y" -{ yyval.opval = newAVREF(yyvsp[0].opval); } +#line 565 "perly.y" +{ yyval.opval = yyvsp[0].opval; } break; case 148: -#line 571 "perly.y" -{ yyval.opval = newHVREF(yyvsp[0].opval); } +#line 569 "perly.y" +{ yyval.opval = newCVREF(yyvsp[0].opval); } break; case 149: -#line 575 "perly.y" -{ yyval.opval = newAVREF(yyvsp[0].opval); } +#line 573 "perly.y" +{ yyval.opval = newSVREF(yyvsp[0].opval); } break; case 150: -#line 579 "perly.y" -{ yyval.opval = newGVREF(yyvsp[0].opval); } +#line 577 "perly.y" +{ yyval.opval = newAVREF(yyvsp[0].opval); } break; case 151: -#line 583 "perly.y" -{ yyval.opval = scalar(yyvsp[0].opval); } +#line 581 "perly.y" +{ yyval.opval = newHVREF(yyvsp[0].opval); } break; case 152: #line 585 "perly.y" -{ yyval.opval = scalar(yyvsp[0].opval); } +{ yyval.opval = newAVREF(yyvsp[0].opval); } break; case 153: -#line 587 "perly.y" -{ yyval.opval = scalar(scope(yyvsp[0].opval)); } +#line 589 "perly.y" +{ yyval.opval = newGVREF(yyvsp[0].opval); } break; case 154: -#line 590 "perly.y" -{ yyval.opval = yyvsp[0].opval; } +#line 593 "perly.y" +{ yyval.opval = scalar(yyvsp[0].opval); } break; case 155: -#line 594 "perly.y" -{ yyval.ival = 1; } +#line 595 "perly.y" +{ yyval.opval = scalar(yyvsp[0].opval); } break; case 156: -#line 596 "perly.y" -{ yyval.ival = 0; } +#line 597 "perly.y" +{ yyval.opval = scalar(scope(yyvsp[0].opval)); } break; case 157: #line 600 "perly.y" -{ yyval.ival = 1; } +{ yyval.opval = yyvsp[0].opval; } break; case 158: -#line 602 "perly.y" -{ yyval.ival = 0; } +#line 604 "perly.y" +{ yyval.ival = 1; } break; case 159: #line 606 "perly.y" -{ yyval.ival = 1; } +{ yyval.ival = 0; } break; case 160: -#line 608 "perly.y" +#line 610 "perly.y" +{ yyval.ival = 1; } +break; +case 161: +#line 612 "perly.y" +{ yyval.ival = 0; } +break; +case 162: +#line 616 "perly.y" +{ yyval.ival = 1; } +break; +case 163: +#line 618 "perly.y" { yyval.ival = 0; } break; -#line 2484 "y.tab.c" +#line 2483 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/perly.h b/perly.h index 3dbb284f6d..012ecfa158 100644 --- a/perly.h +++ b/perly.h @@ -7,47 +7,48 @@ #define FORMAT 263 #define SUB 264 #define PACKAGE 265 -#define WHILE 266 -#define UNTIL 267 -#define IF 268 -#define UNLESS 269 -#define ELSE 270 -#define ELSIF 271 -#define CONTINUE 272 -#define FOR 273 -#define LOOPEX 274 -#define DOTDOT 275 -#define FUNC0 276 -#define FUNC1 277 -#define FUNC 278 -#define RELOP 279 -#define EQOP 280 -#define MULOP 281 -#define ADDOP 282 -#define DOLSHARP 283 -#define DO 284 -#define LOCAL 285 -#define DELETE 286 -#define HASHBRACK 287 -#define NOAMP 288 -#define OROP 289 -#define ANDOP 290 -#define LSTOP 291 -#define OROR 292 -#define ANDAND 293 -#define BITOROP 294 -#define BITANDOP 295 -#define UNIOP 296 -#define SHIFTOP 297 -#define MATCHOP 298 -#define UMINUS 299 -#define REFGEN 300 -#define POWOP 301 -#define PREINC 302 -#define PREDEC 303 -#define POSTINC 304 -#define POSTDEC 305 -#define ARROW 306 +#define HINT 266 +#define WHILE 267 +#define UNTIL 268 +#define IF 269 +#define UNLESS 270 +#define ELSE 271 +#define ELSIF 272 +#define CONTINUE 273 +#define FOR 274 +#define LOOPEX 275 +#define DOTDOT 276 +#define FUNC0 277 +#define FUNC1 278 +#define FUNC 279 +#define RELOP 280 +#define EQOP 281 +#define MULOP 282 +#define ADDOP 283 +#define DOLSHARP 284 +#define DO 285 +#define LOCAL 286 +#define DELETE 287 +#define HASHBRACK 288 +#define NOAMP 289 +#define OROP 290 +#define ANDOP 291 +#define LSTOP 292 +#define OROR 293 +#define ANDAND 294 +#define BITOROP 295 +#define BITANDOP 296 +#define UNIOP 297 +#define SHIFTOP 298 +#define MATCHOP 299 +#define UMINUS 300 +#define REFGEN 301 +#define POWOP 302 +#define PREINC 303 +#define PREDEC 304 +#define POSTINC 305 +#define POSTDEC 306 +#define ARROW 307 typedef union { I32 ival; char *pval; diff --git a/perly.h.yacc b/perly.h.yacc deleted file mode 100644 index 579cc44cb2..0000000000 --- a/perly.h.yacc +++ /dev/null @@ -1,56 +0,0 @@ - -typedef union { - I32 ival; - char *pval; - OP *opval; - GV *gvval; -} YYSTYPE; -extern YYSTYPE yylval; -# define WORD 257 -# define METHOD 258 -# define THING 259 -# define PMFUNC 260 -# define PRIVATEREF 261 -# define LABEL 262 -# define FORMAT 263 -# define SUB 264 -# define PACKAGE 265 -# define WHILE 266 -# define UNTIL 267 -# define IF 268 -# define UNLESS 269 -# define ELSE 270 -# define ELSIF 271 -# define CONTINUE 272 -# define FOR 273 -# define LOOPEX 274 -# define DOTDOT 275 -# define FUNC0 276 -# define FUNC1 277 -# define FUNC 278 -# define RELOP 279 -# define EQOP 280 -# define MULOP 281 -# define ADDOP 282 -# define DOLSHARP 283 -# define DO 284 -# define LOCAL 285 -# define DELETE 286 -# define HASHBRACK 287 -# define LSTOP 288 -# define OROR 289 -# define ANDAND 290 -# define BITOROP 291 -# define BITANDOP 292 -# define UNIOP 293 -# define SHIFTOP 294 -# define MATCHOP 295 -# define ARROW 296 -# define UMINUS 297 -# define REFGEN 298 -# define POWOP 299 -# define PREINC 300 -# define PREDEC 301 -# define POSTINC 302 -# define POSTDEC 303 -extern YYSTYPE yylval; diff --git a/perly.y b/perly.y index ac73fc0818..691d6682e0 100644 --- a/perly.y +++ b/perly.y @@ -58,7 +58,7 @@ %token WORD METHOD THING PMFUNC PRIVATEREF %token LABEL -%token FORMAT SUB PACKAGE +%token FORMAT SUB PACKAGE HINT %token WHILE UNTIL IF UNLESS ELSE ELSIF CONTINUE FOR %token LOOPEX DOTDOT %token FUNC0 FUNC1 FUNC @@ -119,13 +119,13 @@ prog : /* NULL */ ; block : '{' remember lineseq '}' - { int nbs = needblockscope; + { int needblockscope = hints & HINT_BLOCK_SCOPE; $$ = scalarseq($3); if (copline > (line_t)$1) copline = $1; LEAVE_SCOPE($2); - if (nbs) - needblockscope = TRUE; /* propagate outward */ + if (needblockscope) + hints |= HINT_BLOCK_SCOPE; /* propagate out */ pad_leavemy(comppad_name_fill); } ; @@ -136,8 +136,8 @@ remember: /* NULL */ /* in case they push a package name */ SAVEINT(max_intro_pending); min_intro_pending = 0; SAVEINT(comppad_name_fill); - SAVEINT(needblockscope); - needblockscope = FALSE; } + SAVEINT(hints); + hints &= ~HINT_BLOCK_SCOPE; } ; lineseq : /* NULL */ @@ -147,7 +147,7 @@ lineseq : /* NULL */ | lineseq line { $$ = append_list(OP_LINESEQ, (LISTOP*)$1, (LISTOP*)$2); pad_reset(); - if ($1 && $2) needblockscope = TRUE; } + if ($1 && $2) hints |= HINT_BLOCK_SCOPE; } ; line : label cond @@ -187,7 +187,8 @@ else : /* NULL */ { $$ = scope($2); } | ELSIF '(' expr ')' block else { copline = $1; - $$ = newCONDOP(0, $3, scope($5), $6); } + $$ = newSTATEOP(0, 0, + newCONDOP(0, $3, scope($5), $6)); } ; cond : IF '(' expr ')' block else @@ -272,6 +273,8 @@ decl : format { $$ = 0; } | package { $$ = 0; } + | hint + { $$ = 0; } ; format : FORMAT WORD block @@ -292,6 +295,12 @@ package : PACKAGE WORD ';' { package(Nullop); } ; +hint : HINT WORD ';' + { hint($1, $2, Nullop); } + | HINT WORD expr ';' + { hint($1, $2, list(force_list($3))); } + ; + expr : expr ',' sexpr { $$ = append_elem(OP_LIST, $1, $3); } | sexpr @@ -524,7 +533,8 @@ term : '-' term %prec UMINUS scalar(newCVREF(scalar($2))), $4))); } | LOOPEX - { $$ = newOP($1, OPf_SPECIAL); needblockscope = TRUE; } + { $$ = newOP($1, OPf_SPECIAL); + hints |= HINT_BLOCK_SCOPE; } | LOOPEX sexpr { $$ = newLOOPEX($1,$2); } | UNIOP diff --git a/perly.y.save b/perly.y.save deleted file mode 100644 index 8babbb9b97..0000000000 --- a/perly.y.save +++ /dev/null @@ -1,591 +0,0 @@ -/* $RCSfile: perly.y,v $$Revision: 4.1 $$Date: 92/08/07 18:26:16 $ - * - * Copyright (c) 1991, Larry Wall - * - * You may distribute under the terms of either the GNU General Public - * License or the Artistic License, as specified in the README file. - * - * $Log: perly.y,v $ - * Revision 4.1 92/08/07 18:26:16 lwall - * - * Revision 4.0.1.5 92/06/11 21:12:50 lwall - * patch34: expectterm incorrectly set to indicate start of program or block - * - * Revision 4.0.1.4 92/06/08 17:33:25 lwall - * patch20: one of the backdoors to expectterm was on the wrong reduction - * - * Revision 4.0.1.3 92/06/08 15:18:16 lwall - * patch20: an expression may now start with a bareword - * patch20: relaxed requirement for semicolon at the end of a block - * patch20: added ... as variant on .. - * patch20: fixed double debug break in foreach with implicit array assignment - * patch20: if {block} {block} didn't work any more - * patch20: deleted some minor memory leaks - * - * Revision 4.0.1.2 91/11/05 18:17:38 lwall - * patch11: extra comma at end of list is now allowed in more places (Hi, Felix!) - * patch11: once-thru blocks didn't display right in the debugger - * patch11: debugger got confused over nested subroutine definitions - * - * Revision 4.0.1.1 91/06/07 11:42:34 lwall - * patch4: new copyright notice - * - * Revision 4.0 91/03/20 01:38:40 lwall - * 4.0 baseline. - * - */ - -%{ -#include "EXTERN.h" -#include "perl.h" - -/*SUPPRESS 530*/ -/*SUPPRESS 593*/ -/*SUPPRESS 595*/ - -%} - -%start prog - -%union { - int ival; - char *cval; - OP *opval; - COP *copval; - struct compcmd compval; - GV *stabval; - FF *formval; -} - -%token '{' ')' - -%token WORD -%token LABEL -%token APPEND OPEN SSELECT LOOPEX DOTDOT DOLSHARP -%token USING FORMAT DO SHIFT PUSH POP LVALFUN -%token WHILE UNTIL IF UNLESS ELSE ELSIF CONTINUE SPLIT FLIST -%token FOR FILOP FILOP2 FILOP3 FILOP4 FILOP22 FILOP25 -%token FUNC0 FUNC1 FUNC2 FUNC2x FUNC3 FUNC4 FUNC5 HSHFUN HSHFUN3 -%token FLIST2 SUB LOCAL DELETE FUNC -%token RELOP EQOP MULOP ADDOP PACKAGE -%token FORMLIST -%token THING STRING - -%type prog decl format remember crp -%type block lineseq line loop cond sideff nexpr else -%type expr sexpr term scalar ary hsh arylen star amper -%type listexpr indirob -%type texpr listop -%type label -%type compblock - -%nonassoc LSTOP -%left ',' -%right '=' -%right '?' ':' -%nonassoc DOTDOT -%left OROR -%left ANDAND -%left BITOROP -%left BITANDOP -%nonassoc EQOP -%nonassoc RELOP -%nonassoc UNIOP -%left SHIFTOP -%left ADDOP -%left MULOP -%left MATCHOP -%right '!' '~' UMINUS -%right POWOP -%nonassoc INC DEC -%left '(' - -%% /* RULES */ - -prog : /* NULL */ - { -#if defined(YYDEBUG) && defined(DEBUGGING) - yydebug = (debug & 1); -#endif - expectterm = 2; - } - /*CONTINUED*/ lineseq - { if (in_eval) - eval_root = block_head($2); - else - main_root = block_head($2); } - ; - -compblock: block CONTINUE block - { $$.comp_true = $1; $$.comp_alt = $3; } - | block else - { $$.comp_true = $1; $$.comp_alt = $2; } - ; - -else : /* NULL */ - { $$ = Nullcop; } - | ELSE block - { $$ = $2; } - | ELSIF '(' expr ')' compblock - { cmdline = $1; - $$ = newCCOP(OP_ELSIF,1,$3,$5); } - ; - -block : '{' remember lineseq '}' - { $$ = block_head($3); - if (cmdline > (line_t)$1) - cmdline = $1; - if (savestack->av_fill > $2) - leave_scope($2); - expectterm = 2; } - ; - -remember: /* NULL */ /* in case they push a package name */ - { $$ = savestack->av_fill; } - ; - -lineseq : /* NULL */ - { $$ = Nullcop; } - | lineseq line - { $$ = append_elem(OP_LINESEQ,$1,$2); } - ; - -line : decl - { $$ = Nullcop; } - | label cond - { $$ = add_label($1,$2); } - | loop /* loops add their own labels */ - | label ';' - { if ($1 != Nullch) { - $$ = add_label($1, newACOP(Nullgv, Nullop) ); - } - else { - $$ = Nullcop; - cmdline = NOLINE; - } - expectterm = 2; } - | label sideff ';' - { $$ = add_label($1,$2); - expectterm = 2; } - ; - -sideff : error - { $$ = Nullcop; } - | expr - { $$ = newACOP(Nullgv, $1); } - | expr IF expr - { $$ = addcond( - newACOP(Nullgv, Nullop, $1), $3); } - | expr UNLESS expr - { $$ = addcond(invert( - newACOP(Nullgv, Nullop, $1)), $3); } - | expr WHILE expr - { $$ = addloop( - newACOP(Nullgv, Nullop, $1), $3); } - | expr UNTIL expr - { $$ = addloop(invert( - newACOP(Nullgv, Nullop, $1)), $3); } - ; - -cond : IF '(' expr ')' compblock - { cmdline = $1; - $$ = newICOP(OP_IF,$3,$5); } - | UNLESS '(' expr ')' compblock - { cmdline = $1; - $$ = invert(newICOP(OP_IF,$3,$5)); } - | IF block compblock - { cmdline = $1; - $$ = newICOP(OP_IF,$2,$3); } - | UNLESS block compblock - { cmdline = $1; - $$ = invert(newICOP(OP_IF,$2,$3)); } - ; - -loop : label WHILE '(' texpr ')' compblock - { cmdline = $2; - $$ = wopt(add_label($1, - newCCOP(OP_WHILE,1,$4,$6) )); } - | label UNTIL '(' expr ')' compblock - { cmdline = $2; - $$ = wopt(add_label($1, - invert(newCCOP(OP_WHILE,1,$4,$6)) )); } - | label WHILE block compblock - { cmdline = $2; - $$ = wopt(add_label($1, - newCCOP(OP_WHILE, 1, $3,$4) )); } - | label UNTIL block compblock - { cmdline = $2; - $$ = wopt(add_label($1, - invert(newCCOP(OP_WHILE,1,$3,$4)) )); } - | label FOR scalar '(' expr crp compblock - { cmdline = $2; - /* - * The following gobbledygook catches EXPRs that - * aren't explicit array refs and translates - * foreach VAR (EXPR) { - * into - * @ary = EXPR; - * foreach VAR (@ary) { - * where @ary is a hidden array made by newGVgen(). - * (Note that @ary may become a local array if - * it is determined that it might be called - * recursively. See cmd_tosave().) - */ - if ($5->op_type != OP_ARRAY) { - scrstab = gv_AVadd(newGVgen()); - $$ = append_elem(OP_LINESEQ, - newACOP(Nullgv, - newBINOP(OP_ASSIGN, - listref(newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab))), - forcelist($5))), - wopt(over($3,add_label($1, - newCCOP(OP_WHILE, 0, - newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab)), - $7))))); - $$->cop_line = $2; - $$->cop_head->cop_line = $2; - } - else { - $$ = wopt(over($3,add_label($1, - newCCOP(OP_WHILE,1,$5,$7) ))); - } - } - | label FOR '(' expr crp compblock - { cmdline = $2; - if ($4->op_type != OP_ARRAY) { - scrstab = gv_AVadd(newGVgen()); - $$ = append_elem(OP_LINESEQ, - newACOP(Nullgv, - newBINOP(OP_ASSIGN, - listref(newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab))), - forcelist($4))), - wopt(over(defstab,add_label($1, - newCCOP(OP_WHILE, 0, - newUNOP(OP_ARRAY, - gv_to_op(A_STAB,scrstab)), - $6))))); - $$->cop_line = $2; - $$->cop_head->cop_line = $2; - } - else { /* lisp, anyone? */ - $$ = wopt(over(defstab,add_label($1, - newCCOP(OP_WHILE,1,$4,$6) ))); - } - } - | label FOR '(' nexpr ';' texpr ';' nexpr ')' block - /* basically fake up an initialize-while lineseq */ - { yyval.compval.comp_true = $10; - yyval.compval.comp_alt = $8; - cmdline = $2; - $$ = append_elem(OP_LINESEQ,$4,wopt(add_label($1, - newCCOP(OP_WHILE,1,$6,yyval.compval) ))); } - | label compblock /* a block is a loop that happens once */ - { $$ = add_label($1,newCCOP(OP_BLOCK,1,Nullop,$2)); } - ; - -nexpr : /* NULL */ - { $$ = Nullcop; } - | sideff - ; - -texpr : /* NULL means true */ - { (void)scan_num("1"); $$ = yylval.op; } - | expr - ; - -label : /* empty */ - { $$ = Nullch; } - | LABEL - ; - -decl : format - { $$ = 0; } - | subrout - { $$ = 0; } - | package - { $$ = 0; } - ; - -format : FORMAT WORD '=' FORMLIST - { if (strEQ($2,"stdout")) - newFORM(newGV("STDOUT",TRUE),$4); - else if (strEQ($2,"stderr")) - newFORM(newGV("STDERR",TRUE),$4); - else - newFORM(newGV($2,TRUE),$4); - Safefree($2); $2 = Nullch; } - | FORMAT '=' FORMLIST - { newFORM(newGV("STDOUT",TRUE),$3); } - ; - -subrout : SUB WORD block - { newSUB($2,$3); - cmdline = NOLINE; - if (savestack->av_fill > $1) - leave_scope($1); } - ; - -package : PACKAGE WORD ';' - { char tmpbuf[256]; - GV *tmpstab; - - save_hptr(&curstash); - save_item(curstname); - sv_setpv(curstname,$2); - sprintf(tmpbuf,"'_%s",$2); - tmpstab = newGV(tmpbuf,TRUE); - if (!GvHV(tmpstab)) - GvHV(tmpstab) = newHV(0); - curstash = GvHV(tmpstab); - if (!curstash->hv_name) - curstash->hv_name = savestr($2); - curstash->hv_coeffsize = 0; - Safefree($2); $2 = Nullch; - cmdline = NOLINE; - expectterm = 2; - } - ; - -expr : expr ',' sexpr - { $$ = append_elem(OP_LIST, $1, $3); } - | sexpr - ; - -sexpr : sexpr '=' sexpr - { $$ = newBINOP(OP_ASSIGN, ref($1), $3); } - | sexpr POWOP '=' sexpr - { $$ = newBINOP($2, ref($1), $4); } - | sexpr MULOP '=' sexpr - { $$ = newBINOP($2, ref($1), $4); } - | sexpr ADDOP '=' sexpr - { $$ = newBINOP($2, ref($1), $4);} - | sexpr SHIFTOP '=' sexpr - { $$ = newBINOP($2, ref($1), $4); } - | sexpr BITANDOP '=' sexpr - { $$ = newBINOP($2, ref($1), $4); } - | sexpr BITOROP '=' sexpr - { $$ = newBINOP($2, ref($1), $4); } - - - | sexpr POWOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr MULOP sexpr - { if ($2 == OP_REPEAT) - $1 = forcelist($1); - $$ = newBINOP($2, $1, $3); - if ($2 == OP_REPEAT) { - if ($$[1].op_type != A_EXPR || - $$[1].op_ptr.op_op->op_type != OP_LIST) - $$[1].op_flags &= ~AF_ARYOK; - } } - | sexpr ADDOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr SHIFTOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr RELOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr EQOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr BITANDOP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr BITOROP sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr DOTDOT sexpr - { $$ = newBINOP($2, $1, $3); } - | sexpr ANDAND sexpr - { $$ = newBINOP(OP_AND, $1, $3); } - | sexpr OROR sexpr - { $$ = newBINOP(OP_OR, $1, $3); } - | sexpr '?' sexpr ':' sexpr - { $$ = newCONDOP(OP_COND_EXPR, $1, $3, $5); } - | sexpr MATCHOP sexpr - { $$ = bind_match($2, $1, $3); } - | term - { $$ = $1; } - ; - -term : '-' term %prec UMINUS - { $$ = newUNOP(OP_NEGATE, $2); } - | '+' term %prec UMINUS - { $$ = $2; } - | '!' term - { $$ = newUNOP(OP_NOT, $2); } - | '~' term - { $$ = newUNOP(OP_COMPLEMENT, $2);} - | term INC - { $$ = newUNOP(OP_POSTINC,ref($1)); } - | term DEC - { $$ = newUNOP(OP_POSTDEC,ref($1)); } - | INC term - { $$ = newUNOP(OP_PREINC,ref($2)); } - | DEC term - { $$ = newUNOP(OP_PREDEC,ref($2)); } - | LOCAL '(' expr crp - { $$ = localize(forcelist($3)); } - | '(' expr crp - { $$ = $2; } - | '(' ')' - { $$ = Nullop; } /* XXX may be insufficient */ - | scalar %prec '(' - { $$ = gv_to_op(A_STAB,$1); } - | star %prec '(' - { $$ = gv_to_op(A_STAR,$1); } - | scalar '[' expr ']' %prec '(' - { $$ = newBINOP(OP_AELEM, - gv_to_op(A_STAB,gv_AVadd($1)), $3); } - | hsh %prec '(' - { $$ = newUNOP(OP_HASH, gv_to_op(A_STAB,$1)); } - | ary %prec '(' - { $$ = newUNOP(OP_ARRAY, gv_to_op(A_STAB,$1)); } - | arylen %prec '(' - { $$ = newUNOP(OP_ARYLEN, gv_to_op(A_STAB,$1)); } - | scalar '{' expr ';' '}' %prec '(' - { $$ = newBINOP(OP_HELEM, - gv_to_op(A_STAB,gv_HVadd($1)), - jmaybe($3)); - expectterm = FALSE; } - | '(' expr crp '[' expr ']' %prec '(' - { $$ = newSLICEOP(OP_LSLICE, Nullop, - forcelist($5), - forcelist($2)); } - | '(' ')' '[' expr ']' %prec '(' - { $$ = newSLICEOP(OP_LSLICE, Nullop, - forcelist($4), Nullop); } - | ary '[' expr ']' %prec '(' - { $$ = newBINOP(OP_ASLICE, - gv_to_op(A_STAB,gv_AVadd($1)), - forcelist($3)); } - | ary '{' expr ';' '}' %prec '(' - { $$ = newBINOP(OP_HSLICE, - gv_to_op(A_STAB,gv_HVadd($1)), - forcelist($3)); - expectterm = FALSE; } - | DELETE scalar '{' expr ';' '}' %prec '(' - { $$ = newBINOP(OP_DELETE, - gv_to_op(A_STAB,gv_HVadd($2)), - jmaybe($4)); - expectterm = FALSE; } - | DELETE '(' scalar '{' expr ';' '}' ')' %prec '(' - { $$ = newBINOP(OP_DELETE, - gv_to_op(A_STAB,gv_HVadd($3)), - jmaybe($5)); - expectterm = FALSE; } - | THING %prec '(' - { $$ = $1; } - - | amper - { $$ = newUNIOP(OP_SUBR, - gv_to_op(A_STAB,$1)); } - | amper '(' ')' - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_STAB,$1), - flatten(Nullop)); } - | amper '(' expr crp - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_STAB,$1), - $3); } - - | DO sexpr %prec UNIOP - { $$ = newUNOP(OP_DOFILE,$2); - allgvs = TRUE;} - | DO block %prec '(' - { $$ = $2; } - | DO WORD '(' ')' - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_WORD,newGV($2,MULTI)), - Nullop); - Safefree($2); $2 = Nullch; - $$->op_flags |= AF_DEPR; } - | DO WORD '(' expr crp - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_WORD,newGV($2,MULTI)), - $4); Safefree($2); $2 = Nullch; - $$->op_flags |= AF_DEPR; } - | DO scalar '(' ')' - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_STAB,$2), - flatten(Nullop)); - $$->op_flags |= AF_DEPR; } - | DO scalar '(' expr crp - { $$ = newBINOP(OP_SUBR, - gv_to_op(A_STAB,$2), - $4); - $$->op_flags |= AF_DEPR; } - | LOOPEX - { $$ = newOP($1); } - | LOOPEX WORD - { $$ = newUNIOP($1,pv_to_op($2)); } - | UNIOP - { $$ = newOP($1); } - | UNIOP block - { $$ = newUNOP($1,$2); } - | UNIOP sexpr - { $$ = newUNOP($1,$2); } - | FUNC0 - { $$ = newOP($1); } - | FUNC0 '(' ')' - { $$ = newOP($1); } - | FUNC1 '(' ')' - { $$ = newOP($1); } - | FUNC1 '(' expr ')' - { $$ = newUNIOP($1,$3); } - | WORD - | listop - ; - -listop : LSTOP listexpr - { $$ = newUNOP($1, $2); } - | FUNC '(' listexpr ')' - { $$ = newUNOP($1, $3); } - ; - -listexpr: /* NULL */ - { $$ = newNULLLIST(); } - | expr - { $$ = $1; } - | indirob expr - { $$ = prepend_elem(OP_LIST, $1, $2); } - ; - -amper : '&' indirob - { $$ = $2; } - ; - -scalar : '$' indirob - { $$ = $2; } - ; - -ary : '@' indirob - { $$ = $2; } - ; - -hsh : '%' indirob - { $$ = $2; } - ; - -arylen : DOLSHARP indirob - { $$ = $2; } - ; - -star : '*' indirob - { $$ = $2; } - ; - -indirob : WORD - { $$ = newINDIROB($1); } - | scalar - { $$ = newINDIROB($1); } - | block - { $$ = newINDIROB($1); } - ; - -crp : ',' ')' - { $$ = 1; } - | ')' - { $$ = 0; } - ; - -%% /* PROGRAM */ diff --git a/pp.c b/pp.c index 0713690bc7..b8b2bbd5bc 100644 --- a/pp.c +++ b/pp.c @@ -23,11 +23,13 @@ #include "perl.h" #ifdef HAS_SOCKET -#include -#include -#ifndef ENOTSOCK -#include -#endif +# include +# include +# ifndef ENOTSOCK +# ifdef I_NET_ERRNO +# include +# endif +# endif #endif #ifdef HAS_SELECT @@ -42,12 +44,26 @@ extern int h_errno; #endif -#ifdef I_PWD -#include +#ifdef HAS_PASSWD +# ifdef I_PWD +# include +# else + struct passwd *getpwnam P((char *)); + struct passwd *getpwuid P((Uid_t)); +# endif + struct passwd *getpwent(); #endif -#ifdef I_GRP -#include + +#ifdef HAS_GROUP +# ifdef I_GRP +# include +# else + struct group *getgrnam P((char *)); + struct group *getgrgid P((Gid_t)); +# endif + struct group *getgrent(); #endif + #ifdef I_UTIME #include #endif @@ -58,6 +74,30 @@ extern int h_errno; #include #endif +#ifdef HAS_GETPGRP2 +# define getpgrp getpgrp2 +#endif + +#ifdef HAS_SETPGRP2 +# define setpgrp setpgrp2 +#endif + +#ifdef HAS_GETPGRP2 +# define getpgrp getpgrp2 +#endif + +#ifdef HAS_SETPGRP2 +# define setpgrp setpgrp2 +#endif + +#ifdef HAS_GETPGRP2 +# define getpgrp getpgrp2 +#endif + +#ifdef HAS_SETPGRP2 +# define setpgrp setpgrp2 +#endif + static I32 dopoptosub P((I32 startingblock)); /* Nothing. */ @@ -179,13 +219,26 @@ PP(pp_padsv) PP(pp_padav) { dSP; dTARGET; - XPUSHs(TARG); if (op->op_flags & OPf_INTRO) SAVECLEARSV(curpad[op->op_targ]); - if (op->op_flags & OPf_LVAL) + EXTEND(SP, 1); + if (op->op_flags & OPf_LVAL) { + PUSHs(TARG); RETURN; - PUTBACK; - return pp_rv2av(); + } + if (GIMME == G_ARRAY) { + I32 maxarg = AvFILL((AV*)TARG) + 1; + EXTEND(SP, maxarg); + Copy(AvARRAY((AV*)TARG), SP+1, maxarg, SV*); + SP += maxarg; + } + else { + SV* sv = sv_newmortal(); + I32 maxarg = AvFILL((AV*)TARG) + 1; + sv_setiv(sv, maxarg); + PUSHs(sv); + } + RETURN; } PP(pp_padhv) @@ -196,8 +249,20 @@ PP(pp_padhv) SAVECLEARSV(curpad[op->op_targ]); if (op->op_flags & OPf_LVAL) RETURN; - PUTBACK; - return pp_rv2hv(); + if (GIMME == G_ARRAY) { /* array wanted */ + return do_kv(ARGS); + } + else { + SV* sv = sv_newmortal(); + if (HvFILL((HV*)TARG)) { + sprintf(buf, "%d/%d", HvFILL((HV*)TARG), HvMAX((HV*)TARG)+1); + sv_setpv(sv, buf); + } + else + sv_setiv(sv, 0); + SETs(sv); + RETURN; + } } PP(pp_padany) @@ -220,13 +285,15 @@ PP(pp_rv2gv) if (SvROK(sv)) { sv = SvRV(sv); if (SvTYPE(sv) != SVt_PVGV) - DIE("Not a glob reference"); + DIE("Not a symbol reference"); } else { if (SvTYPE(sv) != SVt_PVGV) { if (!SvOK(sv)) - DIE(no_usym, "a glob"); - sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE); + DIE(no_usym, "a symbol"); + if (op->op_private & HINT_STRICT_REFS) + DIE(no_hardref, "a symbol"); + sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE, SVt_PVGV); } } if (op->op_flags & OPf_INTRO) { @@ -279,28 +346,36 @@ PP(pp_rv2sv) if (SvTYPE(gv) != SVt_PVGV) { if (!SvOK(sv)) DIE(no_usym, "a scalar"); - gv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE); + if (op->op_private & HINT_STRICT_REFS) + DIE(no_hardref, "a scalar"); + gv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE, SVt_PV); } sv = GvSV(gv); - if (op->op_private == OP_RV2HV && - (!SvROK(sv) || SvTYPE(SvRV(sv)) != SVt_PVHV)) { - SvREFCNT_dec(sv); - sv = NEWSV(0,0); - sv_upgrade(sv, SVt_RV); - SvRV(sv) = SvREFCNT_inc(newHV()); - SvROK_on(sv); - ++sv_rvcount; - GvSV(gv) = sv; - } - else if (op->op_private == OP_RV2AV && - (!SvROK(sv) || SvTYPE(SvRV(sv)) != SVt_PVAV)) { - SvREFCNT_dec(sv); - sv = NEWSV(0,0); - sv_upgrade(sv, SVt_RV); - SvRV(sv) = SvREFCNT_inc(newAV()); - SvROK_on(sv); - ++sv_rvcount; - GvSV(gv) = sv; + if (op->op_private & (OPpDEREF_AV|OPpDEREF_HV)) { + if (op->op_private & OPpDEREF_HV && + (!SvROK(sv) || SvTYPE(SvRV(sv)) != SVt_PVHV)) { + if (op->op_private & HINT_STRICT_REFS && !SvROK(sv) && SvOK(sv)) + DIE(no_hardref, "a hash"); + SvREFCNT_dec(sv); + sv = NEWSV(0,0); + sv_upgrade(sv, SVt_RV); + SvRV(sv) = SvREFCNT_inc(newHV()); + SvROK_on(sv); + ++sv_rvcount; + GvSV(gv) = sv; + } + else if (op->op_private & OPpDEREF_AV && + (!SvROK(sv) || SvTYPE(SvRV(sv)) != SVt_PVAV)) { + if (op->op_private & HINT_STRICT_REFS && !SvROK(sv) && SvOK(sv)) + DIE(no_hardref, "an array"); + SvREFCNT_dec(sv); + sv = NEWSV(0,0); + sv_upgrade(sv, SVt_RV); + SvRV(sv) = SvREFCNT_inc(newAV()); + SvROK_on(sv); + ++sv_rvcount; + GvSV(gv) = sv; + } } } if (op->op_flags & OPf_INTRO) @@ -641,7 +716,7 @@ PP(pp_readline) PP(pp_indread) { - last_in_gv = gv_fetchpv(SvPVx(GvSV((GV*)(*stack_sp--)), na), TRUE); + last_in_gv = gv_fetchpv(SvPVx(GvSV((GV*)(*stack_sp--)), na), TRUE,SVt_PVIO); return do_readline(); } @@ -660,21 +735,24 @@ PP(pp_regcomp) { dSP; register PMOP *pm = (PMOP*)cLOGOP->op_other; register char *t; - I32 global; SV *tmpstr; - register REGEXP *rx = pm->op_pmregexp; STRLEN len; - global = pm->op_pmflags & PMf_GLOBAL; tmpstr = POPs; t = SvPV(tmpstr, len); - if (!global && rx) - regfree(rx); - pm->op_pmregexp = Null(REGEXP*); /* crucial if regcomp aborts */ - pm->op_pmregexp = regcomp(t, t + len, - pm->op_pmflags & PMf_FOLD); + + if (pm->op_pmregexp) { + regfree(pm->op_pmregexp); + pm->op_pmregexp = Null(REGEXP*); /* crucial if regcomp aborts */ + } + + pm->op_pmregexp = regcomp(t, t + len, pm->op_pmflags & PMf_FOLD); + if (!pm->op_pmregexp->prelen && curpm) pm = curpm; + else if (strEQ("\\s+", pm->op_pmregexp->precomp)) + pm->op_pmflags |= PMf_WHITE; + if (pm->op_pmflags & PMf_KEEP) { if (!(pm->op_pmflags & PMf_FOLD)) scan_prefix(pm, pm->op_pmregexp->precomp, @@ -682,7 +760,7 @@ PP(pp_regcomp) { pm->op_pmflags &= ~PMf_RUNTIME; /* no point compiling again */ hoistmust(pm); cLOGOP->op_first->op_next = op->op_next; - /* XXX delete push code */ + /* XXX delete push code? */ } RETURN; } @@ -1274,10 +1352,10 @@ PP(pp_aassign) DIE(no_modify); if (relem <= lastrelem) relem++; + break; } if (SvROK(sv)) sv_unref(sv); - break; } if (relem <= lastrelem) { sv_setsv(sv, *relem); @@ -1291,6 +1369,9 @@ PP(pp_aassign) } if (delaymagic & ~DM_DELAY) { if (delaymagic & DM_UID) { +#ifdef HAS_SETRESUID + (void)setresuid(uid,euid,(Uid_t)-1); +#else /* not HAS_SETRESUID */ #ifdef HAS_SETREUID (void)setreuid(uid,euid); #else /* not HAS_SETREUID */ @@ -1300,6 +1381,7 @@ PP(pp_aassign) delaymagic =~ DM_RUID; } #endif /* HAS_SETRUID */ +#endif /* HAS_SETRESUID */ #ifdef HAS_SETEUID if ((delaymagic & DM_UID) == DM_EUID) { (void)seteuid(uid); @@ -1316,15 +1398,22 @@ PP(pp_aassign) euid = (int)geteuid(); } if (delaymagic & DM_GID) { +#ifdef HAS_SETRESGID + (void)setresgid(gid,egid,(Gid_t)-1); +#else /* not HAS_SETREGID */ #ifdef HAS_SETREGID (void)setregid(gid,egid); #else /* not HAS_SETREGID */ +#endif /* not HAS_SETRESGID */ #ifdef HAS_SETRGID if ((delaymagic & DM_GID) == DM_RGID) { (void)setrgid(gid); delaymagic =~ DM_RGID; } #endif /* HAS_SETRGID */ +#ifdef HAS_SETRESGID + (void)setresgid(gid,egid,(Gid_t)-1); +#else /* not HAS_SETREGID */ #ifdef HAS_SETEGID if ((delaymagic & DM_GID) == DM_EGID) { (void)setegid(gid); @@ -1336,6 +1425,7 @@ PP(pp_aassign) DIE("No setregid available"); (void)setgid(gid); } +#endif /* not HAS_SETRESGID */ #endif /* not HAS_SETREGID */ gid = (int)getgid(); egid = (int)getegid(); @@ -1444,7 +1534,7 @@ PP(pp_undef) break; case SVt_PVCV: sub_generation++; - cv_clear((CV*)sv); + cv_undef((CV*)sv); break; default: if (sv != GvSV(defgv)) { @@ -1691,13 +1781,6 @@ PP(pp_add) RETURN; } -PP(pp_intadd) -{ - dSP; dATARGET; dPOPTOPiirl; - SETi( left + right ); - RETURN; -} - PP(pp_subtract) { dSP; dATARGET; dPOPTOPnnrl; @@ -1708,27 +1791,29 @@ PP(pp_subtract) PP(pp_concat) { dSP; dATARGET; dPOPTOPssrl; - SvSetSV(TARG, lstr); - sv_catsv(TARG, rstr); + STRLEN len; + char *s; + if (TARG != lstr) { + s = SvPV(lstr,len); + sv_setpvn(TARG,s,len); + } + s = SvPV(rstr,len); + sv_catpvn(TARG,s,len); SETTARG; RETURN; } PP(pp_left_shift) { - dSP; dATARGET; - I32 anum = POPi; - double value = TOPn; - SETi( U_L(value) << anum ); + dSP; dATARGET; dPOPTOPiirl; + SETi( left << right ); RETURN; } PP(pp_right_shift) { - dSP; dATARGET; - I32 anum = POPi; - double value = TOPn; - SETi( U_L(value) >> anum ); + dSP; dATARGET; dPOPTOPiirl; + SETi( left >> right ); RETURN; } @@ -1839,13 +1924,12 @@ PP(pp_scmp) RETURN; } -PP(pp_bit_and) -{ +PP(pp_bit_and) { dSP; dATARGET; dPOPTOPssrl; if (SvNIOK(lstr) || SvNIOK(rstr)) { - I32 value = SvIV(lstr); - value = value & SvIV(rstr); - SETi(value); + unsigned long value = U_L(SvNV(lstr)); + value = value & U_L(SvNV(rstr)); + SETn((double)value); } else { do_vop(op->op_type, TARG, lstr, rstr); @@ -1858,9 +1942,9 @@ PP(pp_xor) { dSP; dATARGET; dPOPTOPssrl; if (SvNIOK(lstr) || SvNIOK(rstr)) { - I32 value = SvIV(lstr); - value = value ^ SvIV(rstr); - SETi(value); + unsigned long value = U_L(SvNV(lstr)); + value = value ^ U_L(SvNV(rstr)); + SETn((double)value); } else { do_vop(op->op_type, TARG, lstr, rstr); @@ -1873,9 +1957,9 @@ PP(pp_bit_or) { dSP; dATARGET; dPOPTOPssrl; if (SvNIOK(lstr) || SvNIOK(rstr)) { - I32 value = SvIV(lstr); - value = value | SvIV(rstr); - SETi(value); + unsigned long value = U_L(SvNV(lstr)); + value = value | U_L(SvNV(rstr)); + SETn((double)value); } else { do_vop(op->op_type, TARG, lstr, rstr); @@ -1929,6 +2013,148 @@ PP(pp_complement) RETURN; } +/* integer versions of some of the above */ + +PP(pp_i_preinc) +{ + dSP; dTOPiv; + sv_setiv(TOPs, value + 1); + SvSETMAGIC(TOPs); + return NORMAL; +} + +PP(pp_i_predec) +{ + dSP; dTOPiv; + sv_setiv(TOPs, value - 1); + SvSETMAGIC(TOPs); + return NORMAL; +} + +PP(pp_i_postinc) +{ + dSP; dTARGET; + sv_setsv(TARG, TOPs); + sv_setiv(TOPs, SvIV(TOPs) + 1); + SvSETMAGIC(TOPs); + if (!SvOK(TARG)) + sv_setiv(TARG, 0); + SETs(TARG); + return NORMAL; +} + +PP(pp_i_postdec) +{ + dSP; dTARGET; + sv_setsv(TARG, TOPs); + sv_setiv(TOPs, SvIV(TOPs) - 1); + SvSETMAGIC(TOPs); + SETs(TARG); + return NORMAL; +} + +PP(pp_i_multiply) +{ + dSP; dATARGET; dPOPTOPiirl; + SETi( left * right ); + RETURN; +} + +PP(pp_i_divide) +{ + dSP; dATARGET; dPOPiv; + if (value == 0) + DIE("Illegal division by zero"); + value = POPi / value; + PUSHi( value ); + RETURN; +} + +PP(pp_i_modulo) +{ + dSP; dATARGET; dPOPTOPiirl; + SETi( left % right ); + RETURN; +} + +PP(pp_i_add) +{ + dSP; dATARGET; dPOPTOPiirl; + SETi( left + right ); + RETURN; +} + +PP(pp_i_subtract) +{ + dSP; dATARGET; dPOPTOPiirl; + SETi( left - right ); + RETURN; +} + +PP(pp_i_lt) +{ + dSP; dPOPTOPiirl; + SETs((left < right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_gt) +{ + dSP; dPOPTOPiirl; + SETs((left > right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_le) +{ + dSP; dPOPTOPiirl; + SETs((left <= right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_ge) +{ + dSP; dPOPTOPiirl; + SETs((left >= right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_eq) +{ + dSP; dPOPTOPiirl; + SETs((left == right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_ne) +{ + dSP; dPOPTOPiirl; + SETs((left != right) ? &sv_yes : &sv_no); + RETURN; +} + +PP(pp_i_ncmp) +{ + dSP; dTARGET; dPOPTOPiirl; + I32 value; + + if (left > right) + value = 1; + else if (left < right) + value = -1; + else + value = 0; + SETi(value); + RETURN; +} + +PP(pp_i_negate) +{ + dSP; dTARGET; + SETi(-TOPi); + RETURN; +} + /* High falutin' math. */ PP(pp_atan2) @@ -1995,7 +2221,7 @@ PP(pp_srand) { dSP; I32 anum; - time_t when; + Time_t when; if (MAXARG < 1) { (void)time(&when); @@ -2171,7 +2397,7 @@ PP(pp_substr) if (SvREADONLY(sv) && curcop != &compiling) DIE(no_modify); if (SvROK(sv)) - sv_unref(sv); + DIE("Can't modify substr of a reference"); } LvTYPE(TARG) = 's'; LvTARG(TARG) = sv; @@ -2227,7 +2453,7 @@ PP(pp_vec) if (SvREADONLY(src) && curcop != &compiling) DIE(no_modify); if (SvROK(src)) - sv_unref(src); + DIE("Can't modify vec of a reference"); } LvTYPE(TARG) = 'v'; LvTARG(TARG) = src; @@ -2502,6 +2728,7 @@ PP(pp_formline) register char *send; register I32 arg; register SV *sv; + char *item; I32 itemsize; I32 fieldsize; I32 lines = 0; @@ -2592,7 +2819,7 @@ PP(pp_formline) break; case FF_CHECKNL: - s = SvPV(sv, len); + item = s = SvPV(sv, len); itemsize = len; if (itemsize > fieldsize) itemsize = fieldsize; @@ -2604,17 +2831,17 @@ PP(pp_formline) break; s++; } - itemsize = s - SvPVX(sv); + itemsize = s - item; break; case FF_CHECKCHOP: - s = SvPV(sv, len); + item = s = SvPV(sv, len); itemsize = len; if (itemsize <= fieldsize) { send = chophere = s + itemsize; while (s < send) { if (*s == '\r') { - itemsize = s - SvPVX(sv); + itemsize = s - item; break; } if (*s++ & ~31) @@ -2639,7 +2866,7 @@ PP(pp_formline) } s++; } - itemsize = chophere - SvPVX(sv); + itemsize = chophere - item; } break; @@ -2664,7 +2891,7 @@ PP(pp_formline) case FF_ITEM: arg = itemsize; - s = SvPVX(sv); + s = item; while (arg--) { if ((*t++ = *s++) < ' ') t[-1] = ' '; @@ -2681,7 +2908,7 @@ PP(pp_formline) break; case FF_LINEGLOB: - s = SvPV(sv, len); + item = s = SvPV(sv, len); itemsize = len; if (itemsize) { gotsome = TRUE; @@ -2695,7 +2922,7 @@ PP(pp_formline) } } SvCUR_set(formtarget, t - SvPVX(formtarget)); - sv_catpvn(formtarget, SvPVX(sv), itemsize); + sv_catpvn(formtarget, item, itemsize); SvGROW(formtarget, SvCUR(formtarget) + SvCUR(form) + 1); t = SvPVX(formtarget) + SvCUR(formtarget); } @@ -2753,7 +2980,7 @@ PP(pp_formline) break; case FF_MORE: - if (SvCUROK(sv)) { + if (itemsize) { arg = fieldsize - itemsize; if (arg) { fieldsize -= arg; @@ -2958,7 +3185,9 @@ PP(pp_rv2av) if (SvTYPE(sv) != SVt_PVGV) { if (!SvOK(sv)) DIE(no_usym, "an array"); - sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE); + if (op->op_private & HINT_STRICT_REFS) + DIE(no_hardref, "an array"); + sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE, SVt_PVAV); } av = GvAVn(sv); if (op->op_flags & OPf_LVAL) { @@ -3007,7 +3236,7 @@ PP(pp_aelem) if (op->op_flags & OPf_INTRO) save_svref(svp); else if (!SvOK(*svp)) { - if (op->op_private == OP_RV2HV) { + if (op->op_private & OPpDEREF_HV) { SvREFCNT_dec(*svp); *svp = NEWSV(0,0); sv_upgrade(*svp, SVt_RV); @@ -3015,7 +3244,7 @@ PP(pp_aelem) SvROK_on(*svp); ++sv_rvcount; } - else if (op->op_private == OP_RV2AV) { + else if (op->op_private & OPpDEREF_AV) { SvREFCNT_dec(*svp); *svp = NEWSV(0,0); sv_upgrade(*svp, SVt_RV); @@ -3124,7 +3353,7 @@ PP(pp_rv2hv) HV *hv; - if (SvTYPE(sv) == SVt_RV) { + if (SvROK(sv)) { hv = (HV*)SvRV(sv); if (SvTYPE(hv) != SVt_PVHV) DIE("Not an associative array reference"); @@ -3147,7 +3376,9 @@ PP(pp_rv2hv) if (SvTYPE(sv) != SVt_PVGV) { if (!SvOK(sv)) DIE(no_usym, "a hash"); - sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE); + if (op->op_private & HINT_STRICT_REFS) + DIE(no_hardref, "a hash"); + sv = (SV*)gv_fetchpv(SvPV(sv, na), TRUE, SVt_PVHV); } hv = GvHVn(sv); if (op->op_flags & OPf_LVAL) { @@ -3192,7 +3423,7 @@ PP(pp_helem) if (op->op_flags & OPf_INTRO) save_svref(svp); else if (!SvOK(*svp)) { - if (op->op_private == OP_RV2HV) { + if (op->op_private & OPpDEREF_HV) { SvREFCNT_dec(*svp); *svp = NEWSV(0,0); sv_upgrade(*svp, SVt_RV); @@ -3200,7 +3431,7 @@ PP(pp_helem) SvROK_on(*svp); ++sv_rvcount; } - else if (op->op_private == OP_RV2AV) { + else if (op->op_private & OPpDEREF_AV) { SvREFCNT_dec(*svp); *svp = NEWSV(0,0); sv_upgrade(*svp, SVt_RV); @@ -4316,7 +4547,7 @@ PP(pp_split) oldstack = stack; SWITCHSTACK(stack, ary); } - base = SP - stack_base + 1; + base = SP - stack_base; orig = s; if (pm->op_pmflags & PMf_SKIPWHITE) { while (isSPACE(*s)) @@ -4324,7 +4555,7 @@ PP(pp_split) } if (!limit) limit = maxiters + 2; - if (strEQ("\\s+", rx->precomp)) { + if (pm->op_pmflags & PMf_WHITE) { while (--limit) { /*SUPPRESS 530*/ for (m = s; m < strend && !isSPACE(*m); m++) ; @@ -4457,7 +4688,6 @@ PP(pp_split) if (gimme == G_ARRAY) RETURN; } - SP = stack_base + base; GETTARGET; PUSHi(iters); RETURN; @@ -4550,7 +4780,9 @@ PP(pp_anonlist) PP(pp_anonhash) { dSP; dMARK; dORIGMARK; + STRLEN len; HV* hv = newHV(); + SvREFCNT(hv) = 0; while (MARK < SP) { SV* key = *++MARK; @@ -4558,8 +4790,8 @@ PP(pp_anonhash) SV *val = NEWSV(46, 0); if (MARK < SP) sv_setsv(val, *++MARK); - tmps = SvPVX(key); - (void)hv_store(hv,tmps,SvCUROK(key),val,0); + tmps = SvPV(key,len); + (void)hv_store(hv,tmps,len,val,0); } SP = ORIGMARK; SvOK_on(hv); @@ -4911,6 +5143,7 @@ PP(pp_sort) } if (op->op_flags & OPf_STACKED) { + ENTER; if (op->op_flags & OPf_SPECIAL) { OP *kid = cLISTOP->op_first->op_sibling; /* pass pushmark */ kid = kUNOP->op_first; /* pass rv2gv */ @@ -4939,6 +5172,9 @@ PP(pp_sort) sortcop = CvSTART(cv); SAVESPTR(CvROOT(cv)->op_ppaddr); CvROOT(cv)->op_ppaddr = ppaddr[OP_NULL]; + + SAVESPTR(curpad); + curpad = AvARRAY((AV*)AvARRAY(CvPADLIST(cv))[1]); } } else { @@ -4962,7 +5198,6 @@ PP(pp_sort) if (sortcop) { AV *oldstack; - ENTER; SAVETMPS; SAVESPTR(op); @@ -4975,8 +5210,8 @@ PP(pp_sort) } SWITCHSTACK(stack, sortstack); if (sortstash != stash) { - firstgv = gv_fetchpv("a", TRUE); - secondgv = gv_fetchpv("b", TRUE); + firstgv = gv_fetchpv("a", TRUE, SVt_PV); + secondgv = gv_fetchpv("b", TRUE, SVt_PV); sortstash = stash; } @@ -5307,7 +5542,7 @@ char *message; I32 gimme; SV **newsp; - sv_setpv(GvSV(gv_fetchpv("@",TRUE)),message); + sv_setpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),message); cxix = dopoptoeval(cxstack_ix); if (cxix >= 0) { I32 optype; @@ -5328,7 +5563,7 @@ char *message; LEAVE; if (optype == OP_REQUIRE) - DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE)), na)); + DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE, SVt_PV)), na)); return pop_return(); } } @@ -5406,7 +5641,7 @@ PP(pp_method) IO* io; if (!SvOK(sv) || - !(iogv = gv_fetchpv(SvPVX(sv), FALSE)) || + !(iogv = gv_fetchpv(SvPVX(sv), FALSE, SVt_PVIO)) || !(ob=(SV*)GvIO(iogv))) { char *name = SvPVX(((SVOP*)cLOGOP->op_other)->op_sv); @@ -5464,7 +5699,9 @@ PP(pp_entersubr) if (!SvROK(sv)) { if (!SvOK(sv)) DIE(no_usym, "a subroutine"); - gv = gv_fetchpv(SvPV(sv, na), FALSE); + if (op->op_private & HINT_STRICT_REFS) + DIE(no_hardref, "a subroutine"); + gv = gv_fetchpv(SvPV(sv, na), FALSE, SVt_PVCV); if (!gv) cv = 0; else @@ -5513,7 +5750,7 @@ PP(pp_entersubr) DIE("Undefined subroutine called"); } - if ((op->op_private & OPpSUBR_DB) && !CvUSERSUB(cv)) { + if ((op->op_private & OPpDEREF_DB) && !CvUSERSUB(cv)) { sv = GvSV(DBsub); save_item(sv); gv = CvGV(cv); @@ -5702,7 +5939,8 @@ PP(pp_caller) if (!dbargs) { GV* tmpgv; - dbargs = GvAV(gv_AVadd(tmpgv = gv_fetchpv("DB::args", TRUE))); + dbargs = GvAV(gv_AVadd(tmpgv = gv_fetchpv("DB::args", TRUE, + SVt_PVAV))); SvMULTI_on(tmpgv); AvREAL_off(dbargs); } @@ -5772,7 +6010,7 @@ PP(pp_warn) tmps = SvPV(TOPs, na); } if (!tmps || !*tmps) { - SV *error = GvSV(gv_fetchpv("@", TRUE)); + SV *error = GvSV(gv_fetchpv("@", TRUE, SVt_PV)); SvUPGRADE(error, SVt_PV); if (SvPOK(error) && SvCUR(error)) sv_catpv(error, "\t...caught"); @@ -5798,7 +6036,7 @@ PP(pp_die) tmps = SvPV(TOPs, na); } if (!tmps || !*tmps) { - SV *error = GvSV(gv_fetchpv("@", TRUE)); + SV *error = GvSV(gv_fetchpv("@", TRUE, SVt_PV)); SvUPGRADE(error, SVt_PV); if (SvPOK(error) && SvCUR(error)) sv_catpv(error, "\t...propagated"); @@ -5897,7 +6135,20 @@ PP(pp_enter) { dSP; register CONTEXT *cx; - I32 gimme = GIMME; + I32 gimme; + + /* + * We don't just use the GIMME macro here because it assumes there's + * already a context, which ain't necessarily so at initial startup. + */ + + if (op->op_flags & OPf_KNOW) + gimme = op->op_flags & OPf_LIST; + else if (cxstack_ix >= 0) + gimme = cxstack[cxstack_ix].blk_gimme; + else + gimme = G_SCALAR; + ENTER; SAVETMPS; @@ -5916,7 +6167,14 @@ PP(pp_leave) POPBLOCK(cx); - if (GIMME == G_SCALAR) { + if (op->op_flags & OPf_KNOW) + gimme = op->op_flags & OPf_LIST; + else if (cxstack_ix >= 0) + gimme = cxstack[cxstack_ix].blk_gimme; + else + gimme = G_SCALAR; + + if (gimme == G_SCALAR) { MARK = newsp + 1; if (MARK <= SP) if (SvFLAGS(TOPs) & (SVs_PADTMP|SVs_TEMP)) @@ -5950,8 +6208,13 @@ PP(pp_enteriter) { dSP; dMARK; register CONTEXT *cx; - SV **svp = &GvSV((GV*)POPs); I32 gimme = GIMME; + SV **svp; + + if (op->op_targ) + svp = &curpad[op->op_targ]; /* "my" variable */ + else + svp = &GvSV((GV*)POPs); /* symbol table variable */ ENTER; SAVETMPS; @@ -6072,11 +6335,11 @@ PP(pp_return) else *++newsp = &sv_undef; if (optype == OP_REQUIRE && !SvTRUE(*newsp)) - DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE)), na)); + DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE, SVt_PV)), na)); } else { if (optype == OP_REQUIRE && MARK == SP) - DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE)), na)); + DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE, SVt_PV)), na)); while (MARK < SP) *++newsp = sv_mortalcopy(*++MARK); } @@ -6708,6 +6971,8 @@ PP(pp_tie) run(); SPAGAIN; + if (!sv_isobject(TOPs)) + DIE("new didn't return an object"); sv = TOPs; if (SvTYPE(varsv) == SVt_PVHV || SvTYPE(varsv) == SVt_PVAV) sv_magic(varsv, sv, 'P', 0, 0); @@ -7032,13 +7297,13 @@ PP(pp_leavewrite) if (!IoFMT_NAME(io)) IoFMT_NAME(io) = savestr(GvNAME(gv)); sprintf(tmpbuf, "%s_TOP", IoFMT_NAME(io)); - topgv = gv_fetchpv(tmpbuf,FALSE); + topgv = gv_fetchpv(tmpbuf,FALSE, SVt_PVFM); if (topgv && GvFORM(topgv)) IoTOP_NAME(io) = savestr(tmpbuf); else IoTOP_NAME(io) = savestr("top"); } - topgv = gv_fetchpv(IoTOP_NAME(io),FALSE); + topgv = gv_fetchpv(IoTOP_NAME(io),FALSE, SVt_PVFM); if (!topgv || !GvFORM(topgv)) { IoLINES_LEFT(io) = 100000000; goto forget_top; @@ -7103,16 +7368,16 @@ PP(pp_prtf) gv = defoutgv; if (!(io = GvIO(gv))) { if (dowarn) - warn("Filehandle never opened"); + warn("Filehandle %s never opened", GvNAME(gv)); errno = EBADF; goto just_say_no; } else if (!(fp = IoOFP(io))) { if (dowarn) { if (IoIFP(io)) - warn("Filehandle opened only for input"); + warn("Filehandle %s opened only for input", GvNAME(gv)); else - warn("printf on closed filehandle"); + warn("printf on closed filehandle %s", GvNAME(gv)); } errno = EBADF; goto just_say_no; @@ -7151,16 +7416,16 @@ PP(pp_print) gv = defoutgv; if (!(io = GvIO(gv))) { if (dowarn) - warn("Filehandle never opened"); + warn("Filehandle %s never opened", GvNAME(gv)); errno = EBADF; goto just_say_no; } else if (!(fp = IoOFP(io))) { if (dowarn) { if (IoIFP(io)) - warn("Filehandle opened only for input"); + warn("Filehandle %s opened only for input", GvNAME(gv)); else - warn("print on closed filehandle"); + warn("print on closed filehandle %s", GvNAME(gv)); } errno = EBADF; goto just_say_no; @@ -7248,12 +7513,14 @@ PP(pp_sysread) bufsize = sizeof buf; SvGROW(bufstr, length+1), (buffer = SvPV(bufstr, blen)); /* sneaky */ length = recvfrom(fileno(IoIFP(io)), buffer, length, offset, - buf, &bufsize); + (struct sockaddr *)buf, &bufsize); if (length < 0) RETPUSHUNDEF; SvCUR_set(bufstr, length); *SvEND(bufstr) = '\0'; SvPOK_only(bufstr); + if (tainting) + sv_magic(bufstr, 0, 't', 0, 0); SP = ORIGMARK; sv_setpvn(TARG, buf, bufsize); PUSHs(TARG); @@ -7272,7 +7539,7 @@ PP(pp_sysread) if (IoTYPE(io) == 's') { bufsize = sizeof buf; length = recvfrom(fileno(IoIFP(io)), buffer+offset, length, 0, - buf, &bufsize); + (struct sockaddr *)buf, &bufsize); } else #endif @@ -7282,6 +7549,8 @@ PP(pp_sysread) SvCUR_set(bufstr, length+offset); *SvEND(bufstr) = '\0'; SvPOK_only(bufstr); + if (tainting) + sv_magic(bufstr, 0, 't', 0, 0); SP = ORIGMARK; PUSHi(length); RETURN; @@ -7339,7 +7608,8 @@ PP(pp_send) if (SP > MARK) warn("Too many args on send"); buffer = SvPVx(*++MARK, mlen); - length = sendto(fileno(IoIFP(io)), buffer, blen, length, buffer, mlen); + length = sendto(fileno(IoIFP(io)), buffer, blen, length, + (struct sockaddr *)buffer, mlen); } else length = send(fileno(IoIFP(io)), buffer, blen, length); @@ -7404,7 +7674,7 @@ PP(pp_seek) PP(pp_truncate) { dSP; - off_t len = (off_t)POPn; + Off_t len = (Off_t)POPn; int result = 1; GV *tmpgv; @@ -7412,7 +7682,7 @@ PP(pp_truncate) #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE) #ifdef HAS_TRUNCATE if (op->op_flags & OPf_SPECIAL) { - tmpgv = gv_fetchpv(POPp,FALSE); + tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO); if (!tmpgv || !GvIO(tmpgv) || !IoIFP(GvIO(tmpgv)) || ftruncate(fileno(IoIFP(GvIO(tmpgv))), len) < 0) result = 0; @@ -7421,7 +7691,7 @@ PP(pp_truncate) result = 0; #else if (op->op_flags & OPf_SPECIAL) { - tmpgv = gv_fetchpv(POPp,FALSE); + tmpgv = gv_fetchpv(POPp,FALSE, SVt_PVIO); if (!tmpgv || !GvIO(tmpgv) || !IoIFP(GvIO(tmpgv)) || chsize(fileno(IoIFP(GvIO(tmpgv))), len) < 0) result = 0; @@ -7663,7 +7933,7 @@ PP(pp_bind) addr = SvPV(addrstr, len); TAINT_PROPER("bind"); - if (bind(fileno(IoIFP(io)), addr, len) >= 0) + if (bind(fileno(IoIFP(io)), (struct sockaddr *)addr, len) >= 0) RETPUSHYES; else RETPUSHUNDEF; @@ -7693,7 +7963,7 @@ PP(pp_connect) addr = SvPV(addrstr, len); TAINT_PROPER("connect"); - if (connect(fileno(IoIFP(io)), addr, len) >= 0) + if (connect(fileno(IoIFP(io)), (struct sockaddr *)addr, len) >= 0) RETPUSHYES; else RETPUSHUNDEF; @@ -7904,11 +8174,11 @@ PP(pp_getpeername) fd = fileno(IoIFP(io)); switch (optype) { case OP_GETSOCKNAME: - if (getsockname(fd, SvPVX(sv), (int*)&SvCUR(sv)) < 0) + if (getsockname(fd, (struct sockaddr *)SvPVX(sv), (int*)&SvCUR(sv)) < 0) goto nuts2; break; case OP_GETPEERNAME: - if (getpeername(fd, SvPVX(sv), (int*)&SvCUR(sv)) < 0) + if (getpeername(fd, (struct sockaddr *)SvPVX(sv), (int*)&SvCUR(sv)) < 0) goto nuts2; break; } @@ -7991,7 +8261,7 @@ PP(pp_stat) PUSHs(sv_2mortal(newSViv((I32)statcache.st_atime))); PUSHs(sv_2mortal(newSViv((I32)statcache.st_mtime))); PUSHs(sv_2mortal(newSViv((I32)statcache.st_ctime))); -#ifdef STATBLOCKS +#ifdef USE_STAT_BLOCKS PUSHs(sv_2mortal(newSViv((I32)statcache.st_blksize))); PUSHs(sv_2mortal(newSViv((I32)statcache.st_blocks))); #else @@ -8274,7 +8544,7 @@ PP(pp_fttty) tmps = ""; } else - gv = gv_fetchpv(tmps = POPp, FALSE); + gv = gv_fetchpv(tmps = POPp, FALSE, SVt_PVIO); if (gv && GvIO(gv) && IoIFP(GvIO(gv))) fd = fileno(IoIFP(GvIO(gv))); else if (isDIGIT(*tmps)) @@ -8313,7 +8583,7 @@ PP(pp_fttext) io = GvIO(statgv); } if (io && IoIFP(io)) { -#if defined(STDSTDIO) || defined(atarist) /* this will work with atariST */ +#if defined(USE_STD_STDIO) || defined(atarist) /* this will work with atariST */ fstat(fileno(IoIFP(io)), &statcache); if (S_ISDIR(statcache.st_mode)) /* handle NFS glitch */ if (op->op_type == OP_FTTEXT) @@ -8688,8 +8958,8 @@ PP(pp_readdir) { dSP; #if defined(DIRENT) && defined(HAS_READDIR) -#ifndef apollo - struct DIRENT *readdir(); +#ifndef I_DIRENT + struct DIRENT *readdir P((DIR *)); /* XXX is this *ever* needed? */ #endif register struct DIRENT *dp; GV *gv = (GV*)POPs; @@ -8700,7 +8970,7 @@ PP(pp_readdir) if (GIMME == G_ARRAY) { /*SUPPRESS 560*/ - while (dp = readdir(IoDIRP(io))) { + while (dp = (struct DIRENT *)readdir(IoDIRP(io))) { #ifdef DIRNAMLEN XPUSHs(sv_2mortal(newSVpv(dp->d_name, dp->d_namlen))); #else @@ -8709,7 +8979,7 @@ PP(pp_readdir) } } else { - if (!(dp = readdir(IoDIRP(io)))) + if (!(dp = (struct DIRENT *)readdir(IoDIRP(io)))) goto nope; #ifdef DIRNAMLEN XPUSHs(sv_2mortal(newSVpv(dp->d_name, dp->d_namlen))); @@ -8838,7 +9108,7 @@ PP(pp_fork) RETSETUNDEF; if (!childpid) { /*SUPPRESS 560*/ - if (tmpgv = gv_fetchpv("$", TRUE)) + if (tmpgv = gv_fetchpv("$", TRUE, SVt_PV)) sv_setiv(GvSV(tmpgv), (I32)getpid()); hv_clear(pidstatus); /* no kids, so don't wait for 'em */ } @@ -9085,7 +9355,7 @@ PP(pp_setpriority) PP(pp_time) { dSP; dTARGET; - XPUSHi( time(Null(long*)) ); + XPUSHi( time(Null(Time_t*)) ); RETURN; } @@ -9097,7 +9367,7 @@ PP(pp_tms) { dSP; -#ifdef MSDOS +#if defined(MSDOS) || !defined(HAS_TIMES) DIE("times not implemented"); #else EXTEND(SP, 4); @@ -9122,7 +9392,7 @@ PP(pp_localtime) PP(pp_gmtime) { dSP; - time_t when; + Time_t when; struct tm *tmbuf; static char *dayname[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; static char *monname[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", @@ -9131,7 +9401,7 @@ PP(pp_gmtime) if (MAXARG < 1) (void)time(&when); else - when = (time_t)SvIVx(POPs); + when = (Time_t)SvIVx(POPs); if (op->op_type == OP_LOCALTIME) tmbuf = localtime(&when); @@ -9194,8 +9464,8 @@ PP(pp_sleep) dSP; dTARGET; char *tmps; I32 duration; - time_t lasttime; - time_t when; + Time_t lasttime; + Time_t when; (void)time(&lasttime); if (MAXARG < 1) @@ -9417,7 +9687,7 @@ doeval() lex_end(); LEAVE; if (optype == OP_REQUIRE) - DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE)), na)); + DIE("%s", SvPVx(GvSV(gv_fetchpv("@",TRUE, SVt_PV)), na)); rs = nrs; rslen = nrslen; rschar = nrschar; @@ -9437,7 +9707,7 @@ doeval() /* compiled okay, so do it */ - sv_setpv(GvSV(gv_fetchpv("@",TRUE)),""); + sv_setpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),""); RETURNOP(eval_start); } @@ -9515,6 +9785,10 @@ PP(pp_require) RETPUSHUNDEF; } + /* Assume success here to prevent recursive requirement. */ + (void)hv_store(GvHVn(incgv), name, strlen(name), + newSVsv(GvSV(compiling.cop_filegv)), 0 ); + ENTER; SAVETMPS; lex_start(sv_2mortal(newSVpv("",0))); @@ -9609,17 +9883,18 @@ PP(pp_leaveeval) if (optype != OP_ENTEREVAL) { char *name = cx->blk_eval.old_name; - if (gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp) { - (void)hv_store(GvHVn(incgv), name, - strlen(name), newSVsv(GvSV(curcop->cop_filegv)), 0 ); + if (!(gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp)) { + /* Unassume the success we assumed earlier. */ + (void)hv_delete(GvHVn(incgv), name, strlen(name)); + + if (optype == OP_REQUIRE) + retop = die("%s did not return a true value", name); } - else if (optype == OP_REQUIRE) - retop = die("%s did not return a true value", name); } lex_end(); LEAVE; - sv_setpv(GvSV(gv_fetchpv("@",TRUE)),""); + sv_setpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),""); RETURNOP(retop); } @@ -9657,7 +9932,7 @@ PP(pp_entertry) eval_root = op; /* Only needed so that goto works right. */ in_eval = 1; - sv_setpv(GvSV(gv_fetchpv("@",TRUE)),""); + sv_setpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),""); RETURN; } @@ -9696,7 +9971,7 @@ PP(pp_leavetry) } LEAVE; - sv_setpv(GvSV(gv_fetchpv("@",TRUE)),""); + sv_setpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),""); RETURN; } @@ -10148,9 +10423,6 @@ PP(pp_gpwent) I32 which = op->op_type; register AV *ary = stack; register SV *sv; - struct passwd *getpwnam(); - struct passwd *getpwuid(); - struct passwd *getpwent(); struct passwd *pwent; if (which == OP_GPWNAM) @@ -10158,7 +10430,7 @@ PP(pp_gpwent) else if (which == OP_GPWUID) pwent = getpwuid(POPi); else - pwent = getpwent(); + pwent = (struct passwd *)getpwent(); EXTEND(SP, 10); if (GIMME != G_ARRAY) { @@ -10265,9 +10537,6 @@ PP(pp_ggrent) I32 which = op->op_type; register char **elem; register SV *sv; - struct group *getgrnam(); - struct group *getgrgid(); - struct group *getgrent(); struct group *grent; if (which == OP_GGRNAM) @@ -10275,7 +10544,7 @@ PP(pp_ggrent) else if (which == OP_GGRGID) grent = getgrgid(POPi); else - grent = getgrent(); + grent = (struct group *)getgrent(); EXTEND(SP, 4); if (GIMME != G_ARRAY) { @@ -10440,3 +10709,4 @@ PP(pp_syscall) DIE(no_func, "syscall"); #endif } + diff --git a/pp.h b/pp.h index 84ca50fcc8..502ced016d 100644 --- a/pp.h +++ b/pp.h @@ -153,21 +153,14 @@ sp = stack_base + AvFILL(t); \ stack = t; -/* XXX need to diffentiate on marked operators? */ -#define FETCH_GV(s) PUTBACK, s = fetch_gv(op,1), SPAGAIN -#define FETCH_GV1(s) PUTBACK, s = fetch_gv(op,1), SPAGAIN -#define FETCH_GV2(s) PUTBACK, s = fetch_gv(op,2), SPAGAIN -#define FETCH_IO(s) PUTBACK, s = fetch_io(op,1), SPAGAIN -#define FETCH_IO1(s) PUTBACK, s = fetch_io(op,1), SPAGAIN -#define FETCH_IO2(s) PUTBACK, s = fetch_io(op,2), SPAGAIN - #define ENTER push_scope() #define LEAVE pop_scope() #define SAVEINT(i) save_int((int*)(&i)); -#define SAVEI32(i) save_int((I32*)(&i)); -#define SAVELONG(l) save_int((long*)(&l)); +#define SAVEI32(i) save_I32((I32*)(&i)); +#define SAVELONG(l) save_long((long*)(&l)); #define SAVESPTR(s) save_sptr((SV**)(&s)) +#define SAVEPPTR(s) save_pptr((char**)(&s)) #define SAVETMPS save_int(&tmps_floor), tmps_floor = tmps_ix #define SAVEFREESV(s) save_freesv((SV*)(s)) #define SAVEFREEOP(o) save_freeop((OP*)(o)) diff --git a/predump b/predump deleted file mode 100644 index 272c3734c9..0000000000 --- a/predump +++ /dev/null @@ -1,41 +0,0 @@ - SV *sv; - GV* tmpgv; - - /* initialize everything that won't change if we undump */ - - if (siggv = gv_fetchpv("SIG",allgvs)) { - HV *hv; - SvMULTI_on(siggv); - hv = GvHVn(siggv); - hv_magic(hv, siggv, 'S'); - - /* initialize signal stack */ - signalstack = newAV(); - av_store(signalstack, 32, Nullsv); - av_clear(signalstack); - AvREAL_off(signalstack); - } - - magicalize("!#?^~=-%.+&*()<>,\\/[|`':\004\t\020\024\027\006"); - - ampergv = gv_fetchpv("&",allgvs); - leftgv = gv_fetchpv("`",allgvs); - rightgv = gv_fetchpv("'",allgvs); - sawampersand = (ampergv || leftgv || rightgv); - if (tmpgv = gv_fetchpv(":",allgvs)) - sv_setpv(GvSV(tmpgv),chopset); - - /* these aren't necessarily magical */ - if (tmpgv = gv_fetchpv("\014",allgvs)) { - sv_setpv(GvSV(tmpgv),"\f"); - formfeed = GvSV(tmpgv); - } - if (tmpgv = gv_fetchpv(";",allgvs)) - sv_setpv(GvSV(tmpgv),"\034"); - if (tmpgv = gv_fetchpv("]",allgvs)) { - sv = GvSV(tmpgv); - sv_upgrade(sv, SVt_PVNV); - sv_setpv(sv,rcsid); - SvNV(sv) = atof(patchlevel); - SvNOK_on(sv); - } diff --git a/proto.h b/proto.h index 00c31c842f..0d2270bdff 100644 --- a/proto.h +++ b/proto.h @@ -10,7 +10,6 @@ void av_clear P((AV* ar)); AV* av_fake P((I32 size, SV** svp)); SV** av_fetch P((AV* ar, I32 key, I32 lval)); void av_fill P((AV* ar, I32 fill)); -void av_free P((AV* ar)); I32 av_len P((AV* ar)); AV* av_make P((I32 size, SV** svp)); SV* av_pop P((AV* ar)); @@ -23,7 +22,7 @@ void av_unshift P((AV* ar, I32 num)); OP* bind_match P((I32 type, OP* left, OP* pat)); OP* block_head P((OP* o, OP** startp)); int boot_DB_File P((int ix, int sp, int items)); -int boot_DynamicLoader P((void)); +/* int boot_DynamicLoader P((void)); */ int boot_NDBM_File P((int ix, int sp, int items)); int boot_GDBM_File P((int ix, int sp, int items)); int boot_SDBM_File P((int ix, int sp, int items)); @@ -33,8 +32,8 @@ int boot_POSIX P((int ix, int sp, int items)); void calllist P((AV* list)); I32 cando P((I32 bit, I32 effective, struct stat* statbufp)); U32 cast_ulong P((double f)); -void checkcomma P((char* s, char* name, char* what)); -I32 chsize P((int fd, off_t length)); +static void checkcomma P((char* s, char* name, char* what)); +I32 chsize P((int fd, Off_t length)); OP* convert P((I32 optype, I32 flags, OP* op)); OP* cop_to_arg P((OP* cmd)); I32 copyopt P((OP* cmd, OP* which)); @@ -43,7 +42,7 @@ char* cpytill P((char* to, char* from, char* fromend, I32 delim, I32* retlen)); void croak P((char* pat,...)); void cryptfilter P((FILE* fil)); void cryptswitch P((void)); -void cv_clear P((CV* cv)); +void cv_undef P((CV* cv)); void deb P((char* pat,...)); void deb_growlevel P((void)); OP* die P((char* pat,...)); @@ -81,6 +80,7 @@ void dump_cop P((OP* cmd, OP* alt)); void dump_eval P((void)); int dump_fds P((char* s)); void dump_flags P((char* b, U32 flags)); +void dump_form P((GV* gv)); void dump_gv P((GV* gv)); void dump_op P((OP* arg)); void dump_pm P((PMOP* pm)); @@ -88,12 +88,10 @@ void dump_packsubs P((HV* stash)); void dump_sub P((GV* gv)); void fbm_compile P((SV* sv, I32 iflag)); char* fbm_instr P((unsigned char* big, unsigned char* bigend, SV* littlesv)); -IO* fetch_io P((OP* op, I32 num)); -GV* fetch_gv P((OP* op, I32 num)); HV* fetch_stash P((SV* sv, I32 create)); OP* flatten P((OP* arg)); -void force_ident P((char* s)); -char* force_word P((char* start, int token, int check_keyword, int allow_tick)); +static void force_ident P((char* s)); +static char* force_word P((char* start, int token, int check_keyword, int allow_tick)); OP* forcelist P((OP* arg)); void free_tmps P((void)); OP* gen_constant_list P((OP* op)); @@ -106,7 +104,7 @@ void gv_check P((HV* stash)); void gv_efullname P((SV* sv, GV* gv)); GV* gv_fetchfile P((char* name)); GV* gv_fetchmethod P((HV* stash, char* name)); -GV* gv_fetchpv P((char* name, I32 add)); +GV* gv_fetchpv P((char* name, I32 add, I32 svtype)); void gv_fullname P((SV* sv, GV* gv)); STRLEN gv_len P((SV* sv)); SV* gv_str P((SV* sv)); @@ -117,7 +115,6 @@ void hoistmust P((PMOP* pm)); void hv_clear P((HV* tb)); SV* hv_delete P((HV* tb, char* key, U32 klen)); SV** hv_fetch P((HV* tb, char* key, U32 klen, I32 lval)); -void hv_free P((HV* tb)); I32 hv_iterinit P((HV* tb)); char* hv_iterkey P((HE* entry, I32* retlen)); HE* hv_iternext P((HV* tb)); @@ -141,6 +138,7 @@ OP* localize P((OP* arg, I32 lexical)); I32 looks_like_number P((SV* sv)); OP* loopscope P((OP* o)); I32 lop P((I32 f, char* s)); +int magic_clearenv P((SV* sv, MAGIC* mg)); int magic_clearpack P((SV* sv, MAGIC* mg)); int magic_get P((SV* sv, MAGIC* mg)); int magic_getarylen P((SV* sv, MAGIC* mg)); @@ -180,7 +178,9 @@ void mg_magical P((SV* sv)); int mg_set P((SV* sv)); OP* mod P((OP* op, I32 type)); char* moreswitches P((char* s)); +#ifdef MSTATS void mstats P((char* s)); +#endif char* my_bcopy P((char* from, char* to, I32 len)); char* my_bzero P((char* loc, I32 len)); void my_exit P((I32 status)); @@ -290,8 +290,12 @@ void run_format P((struct Outrec* orec, FF* fcmd)); #ifndef safemalloc void safefree P((char* where)); char* safemalloc P((MEM_SIZE size)); +#ifndef MSDOS +char* saferealloc P((char* where, MEM_SIZE size)); +#else char* saferealloc P((char* where, unsigned long size)); #endif +#endif void safexfree P((char* where)); char* safexmalloc P((I32 x, MEM_SIZE size)); char* safexrealloc P((char* where, MEM_SIZE size)); @@ -320,24 +324,24 @@ OP* scalar P((OP* o)); OP* scalarkids P((OP* op)); OP* scalarseq P((OP* o)); OP* scalarvoid P((OP* op)); -char* scan_formline P((char* s)); +static char* scan_formline P((char* s)); unsigned long scan_hex P((char* start, I32 len, I32* retlen)); -char* scan_heredoc P((char* s)); -char* scan_inputsymbol P((char* s)); -char* scan_ident P((char* s, char* send, char* dest, I32 ck_uni)); +static char* scan_heredoc P((char* s)); +static char* scan_inputsymbol P((char* s)); +static char* scan_ident P((char* s, char* send, char* dest, I32 ck_uni)); char* scan_num P((char* s)); unsigned long scan_oct P((char* start, I32 len, I32* retlen)); -char* scan_pat P((char* s)); +static char* scan_pat P((char* s)); void scan_prefix P((PMOP* pm, char* string, I32 len)); -char* scan_str P((char* start)); -char* scan_subst P((char* start)); -char* scan_trans P((char* start)); -char* scan_word P((char* s, char* dest, int allow_package, STRLEN *slp)); +static char* scan_str P((char* start)); +static char* scan_subst P((char* start)); +static char* scan_trans P((char* start)); +static char* scan_word P((char* s, char* dest, int allow_package, STRLEN *slp)); OP* scope P((OP* o)); char* screaminstr P((SV* bigsv, SV* littlesv)); I32 setenv_getix P((char* nam)); VOIDRET sighandler P((I32 sig)); -char* skipspace P((char* s)); +static char* skipspace P((char* s)); int start_subparse P((void)); bool sv_2bool P((SV* sv)); CV* sv_2cv P((SV* sv, HV** st, GV** gvp, I32 lref)); @@ -345,7 +349,6 @@ I32 sv_2iv P((SV* sv)); SV* sv_2mortal P((SV* sv)); double sv_2nv P((SV* sv)); char* sv_2pv P((SV* sv, STRLEN* lp)); -char* sv_append_till P((SV* sv, char* from, char* fromend, I32 delim, char* keeplist)); int sv_backoff P((SV* sv)); void sv_catpv P((SV* sv, char* ptr)); void sv_catpvn P((SV* sv, char* ptr, STRLEN len)); @@ -370,6 +373,8 @@ void sv_inc P((SV* sv)); void sv_insert P((SV* bigsv, STRLEN offset, STRLEN len, char* little, STRLEN littlelen)); SV* sv_interp P((SV* sv, SV* src, I32 sp)); void sv_intrpcompile P((SV* src)); +int sv_isa P((SV* sv, char* name)); +int sv_isobject P((SV* sv)); STRLEN sv_len P((SV* sv)); void sv_magic P((SV* sv, SV* obj, char how, char* name, I32 namlen)); SV* sv_mortalcopy P((SV* oldsv)); diff --git a/re_tests b/re_tests deleted file mode 100644 index deda458028..0000000000 --- a/re_tests +++ /dev/null @@ -1 +0,0 @@ -'multiple words'i MULTIPLE WORDS, YEAH y $& MULTIPLE WORDS diff --git a/run.c b/run.c index eb3230298c..371717ad6a 100644 --- a/run.c +++ b/run.c @@ -30,13 +30,6 @@ run() { #endif -I32 -getgimme(op) -OP *op; -{ - return cxstack[cxstack_ix].blk_gimme; -} - I32 debop(op) OP *op; diff --git a/save_ary.bad b/save_ary.bad deleted file mode 100644 index 807e33978d..0000000000 --- a/save_ary.bad +++ /dev/null @@ -1,44 +0,0 @@ -AV * -save_ary(av) -AV *av; -{ - register SV *sv; - - sv = NEWSV(10,0); - sv->sv_state = SVs_SARY; - sv_setpv(sv, (char*)av, sizeof(AV)); - - av->av_sv.sv_rare = AVf_REAL; - av->av_magic = NEWSV(7,0); - av->av_alloc = av->av_array = 0; - /* sv_magic(av->av_magic, gv, '#', Nullch, 0); */ - av->av_max = av->av_fill = -1; - - sv->sv_u.sv_av = av; - (void)av_push(savestack,sv); /* save array ptr */ - return av; -} - -HV * -save_hash(hv) -HV *hv; -{ - register SV *sv; - - sv = NEWSV(11,0); - sv->sv_state = SVs_SHASH; - sv_setpv(sv, (char*)hv, sizeof(HV)); - - hv->hv_array = 0; - hv->hv_max = 7; - hv->hv_dosplit = hv->hv_max * FILLPCT / 100; - hv->hv_fill = 0; -#ifdef SOME_DBM - hv->hv_dbm = 0; -#endif - (void)hv_iterinit(hv); /* so each() will start off right */ - - sv->sv_u.sv_hv = hv; - (void)av_push(savestack,sv); /* save hash ptr */ - return hv; -} diff --git a/scope.c b/scope.c index 2575e56043..c52e099b84 100644 --- a/scope.c +++ b/scope.c @@ -96,6 +96,8 @@ GV *gv; sv = GvSV(gv) = NEWSV(0,0); if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv)) { sv_upgrade(sv, SvTYPE(osv)); + mg_get(osv); + SvFLAGS(osv) |= (SvFLAGS(osv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; SvMAGIC(sv) = SvMAGIC(osv); localizing = TRUE; SvSETMAGIC(sv); @@ -199,6 +201,16 @@ int *intp; SSPUSHINT(SAVEt_INT); } +void +save_long(longp) +long *longp; +{ + SSCHECK(3); + SSPUSHLONG(*longp); + SSPUSHPTR(longp); + SSPUSHINT(SAVEt_LONG); +} + void save_I32(intp) I32 *intp; @@ -209,6 +221,19 @@ I32 *intp; SSPUSHINT(SAVEt_I32); } +/* Cannot use save_sptr() to store a char* since the SV** cast will + * force word-alignment and we'll miss the pointer. + */ +void +save_pptr(pptr) +char **pptr; +{ + SSCHECK(3); + SSPUSHPTR(*pptr); + SSPUSHPTR(pptr); + SSPUSHINT(SAVEt_PPTR); +} + void save_sptr(sptr) SV **sptr; @@ -233,7 +258,7 @@ save_hptr(hptr) HV **hptr; { SSCHECK(3); - SSPUSHINT(*hptr); + SSPUSHPTR(*hptr); SSPUSHPTR(hptr); SSPUSHINT(SAVEt_HPTR); } @@ -243,7 +268,7 @@ save_aptr(aptr) AV **aptr; { SSCHECK(3); - SSPUSHINT(*aptr); + SSPUSHPTR(*aptr); SSPUSHPTR(aptr); SSPUSHINT(SAVEt_APTR); } @@ -340,8 +365,10 @@ I32 base; value = (SV*)SSPOPPTR; gv = (GV*)SSPOPPTR; sv = GvSV(gv); - if (SvTYPE(sv) >= SVt_PVMG) + if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { + SvMAGIC(value) = SvMAGIC(sv); SvMAGIC(sv) = 0; + } SvREFCNT_dec(sv); GvSV(gv) = sv = value; SvSETMAGIC(sv); @@ -371,6 +398,10 @@ I32 base; ptr = SSPOPPTR; *(int*)ptr = (int)SSPOPINT; break; + case SAVEt_LONG: /* long reference */ + ptr = SSPOPPTR; + *(long*)ptr = (long)SSPOPLONG; + break; case SAVEt_I32: /* I32 reference */ ptr = SSPOPPTR; *(I32*)ptr = (I32)SSPOPINT; @@ -379,6 +410,10 @@ I32 base; ptr = SSPOPPTR; *(SV**)ptr = (SV*)SSPOPPTR; break; + case SAVEt_PPTR: /* char* reference */ + ptr = SSPOPPTR; + *(char**)ptr = (char*)SSPOPPTR; + break; case SAVEt_HPTR: /* HV* reference */ ptr = SSPOPPTR; *(HV**)ptr = (HV*)SSPOPPTR; @@ -432,7 +467,7 @@ I32 base; break; case SVt_PVCV: sub_generation++; - cv_clear((CV*)sv); + cv_undef((CV*)sv); break; default: if (SvPOK(sv) && SvLEN(sv)) diff --git a/scope.h b/scope.h index e2e2004fb2..7699d54f18 100644 --- a/scope.h +++ b/scope.h @@ -3,23 +3,27 @@ #define SAVEt_AV 2 #define SAVEt_HV 3 #define SAVEt_INT 4 -#define SAVEt_I32 5 -#define SAVEt_SPTR 6 -#define SAVEt_HPTR 7 +#define SAVEt_LONG 5 +#define SAVEt_I32 6 +#define SAVEt_SPTR 7 #define SAVEt_APTR 8 -#define SAVEt_NSTAB 9 -#define SAVEt_SVREF 10 -#define SAVEt_GP 11 -#define SAVEt_FREESV 12 -#define SAVEt_FREEOP 13 -#define SAVEt_FREEPV 14 -#define SAVEt_CLEARSV 15 -#define SAVEt_DELETE 16 +#define SAVEt_HPTR 9 +#define SAVEt_PPTR 10 +#define SAVEt_NSTAB 11 +#define SAVEt_SVREF 12 +#define SAVEt_GP 13 +#define SAVEt_FREESV 14 +#define SAVEt_FREEOP 15 +#define SAVEt_FREEPV 16 +#define SAVEt_CLEARSV 17 +#define SAVEt_DELETE 18 #define SSCHECK(need) if (savestack_ix + need > savestack_max) savestack_grow() #define SSPUSHINT(i) (savestack[savestack_ix++].any_i32 = (I32)(i)) +#define SSPUSHLONG(i) (savestack[savestack_ix++].any_long = (long)(i)) #define SSPUSHPTR(p) (savestack[savestack_ix++].any_ptr = (void*)(p)) #define SSPOPINT (savestack[--savestack_ix].any_i32) +#define SSPOPLONG (savestack[--savestack_ix].any_long) #define SSPOPPTR (savestack[--savestack_ix].any_ptr) #define FREE_TMPS() if (tmps_ix > tmps_floor) free_tmps() diff --git a/server b/server deleted file mode 100755 index 49a140a4c2..0000000000 --- a/server +++ /dev/null @@ -1,27 +0,0 @@ -#!./perl - -$pat = 'S n C4 x8'; -$inet = 2; -$echo = 7; -$smtp = 25; -$nntp = 119; - -$this = pack($pat,$inet,2345, 0,0,0,0); -select(NS); $| = 1; select(stdout); - -if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; } -if (bind(S,$this)) { print "bind ok\n"; } else { die $!; } -if (listen(S,5)) { print "listen ok\n"; } else { die $!; } -for (;;) { - print "Listening again\n"; - if ($addr = accept(NS,S)) { print "accept ok\n"; } else { die $!; } - - @ary = unpack($pat,$addr); - $, = ' '; - print @ary; print "\n"; - - while () { - print; - print NS; - } -} diff --git a/sortfunc b/sortfunc deleted file mode 100755 index fe9971fc84..0000000000 --- a/sortfunc +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/perl - -print sort byfuncname <>; - -sub byfuncname { - ($A) = $a =~ /\b(\w+) P\(/; - ($B) = $b =~ /\b(\w+) P\(/; - $A cmp $B; -} diff --git a/sv.c b/sv.c index 152a767c5d..fce9feb2e0 100644 --- a/sv.c +++ b/sv.c @@ -82,6 +82,7 @@ more_sv() register SV* svend; sv_root = (SV*)safemalloc(1012); sv = sv_root; + Zero(sv, 1012, char); svend = &sv[1008 / sizeof(SV) - 1]; while (sv < svend) { SvANY(sv) = (SV*)(sv + 1); @@ -127,6 +128,8 @@ sv_clean_refs() SvFLAGS(SvRV(sv)) |= SVf_BREAK; SvFLAGS(sv) |= SVf_BREAK; SvREFCNT_dec(sv); + assert(sv_root == sv); + sv_root = (SV*)SvANY(sv); /* MUST NOT REUSE */ } ++sv; } @@ -157,10 +160,13 @@ static XPVIV* more_xiv(); static XPVIV* new_xiv() { - I32* xiv; + I32** xiv; if (xiv_root) { xiv = xiv_root; - xiv_root = *(I32**)xiv; + /* + * See comment in more_xiv() -- RAM. + */ + xiv_root = (I32**)*xiv; return (XPVIV*)((char*)xiv - sizeof(XPV)); } return more_xiv(); @@ -170,26 +176,25 @@ static void del_xiv(p) XPVIV* p; { - I32* xiv = (I32*)((char*)(p) + sizeof(XPV)); - *(I32**)xiv = xiv_root; + I32** xiv = (I32**)((char*)(p) + sizeof(XPV)); + *xiv = (I32 *)xiv_root; xiv_root = xiv; } static XPVIV* more_xiv() { - register int i; - register I32* xiv; - register I32* xivend; - xiv = (I32*)safemalloc(1008); - xivend = &xiv[1008 / sizeof(I32) - 1]; - xiv += (sizeof(XPV) - 1) / sizeof(I32) + 1; /* fudge by size of XPV */ + register I32** xiv; + register I32** xivend; + xiv = (I32**)safemalloc(1008); + xivend = &xiv[1008 / sizeof(I32 *) - 1]; + xiv += (sizeof(XPV) - 1) / sizeof(I32 *) + 1; /* fudge by size of XPV */ xiv_root = xiv; while (xiv < xivend) { - *(I32**)xiv = (I32*)(xiv + 1); /* XXX busted on Alpha? */ + *xiv = (I32 *)(xiv + 1); xiv++; } - *(I32**)xiv = 0; + *xiv = 0; return new_xiv(); } @@ -338,7 +343,7 @@ more_xpv() #define new_XIV() (void*)safemalloc(sizeof(XPVIV)) #define del_XIV(p) free((char*)p) #else -#define new_XIV() new_xiv() +#define new_XIV() (void*)new_xiv() #define del_XIV(p) del_xiv(p) #endif @@ -346,7 +351,7 @@ more_xpv() #define new_XNV() (void*)safemalloc(sizeof(XPVNV)) #define del_XNV(p) free((char*)p) #else -#define new_XNV() new_xnv() +#define new_XNV() (void*)new_xnv() #define del_XNV(p) del_xnv(p) #endif @@ -354,7 +359,7 @@ more_xpv() #define new_XRV() (void*)safemalloc(sizeof(XRV)) #define del_XRV(p) free((char*)p) #else -#define new_XRV() new_xrv() +#define new_XRV() (void*)new_xrv() #define del_XRV(p) del_xrv(p) #endif @@ -362,7 +367,7 @@ more_xpv() #define new_XPV() (void*)safemalloc(sizeof(XPV)) #define del_XPV(p) free((char*)p) #else -#define new_XPV() new_xpv() +#define new_XPV() (void*)new_xpv() #define del_XPV(p) del_xpv(p) #endif @@ -673,9 +678,9 @@ U32 mt; IoIFP(sv) = 0; IoOFP(sv) = 0; IoDIRP(sv) = 0; - IoLINES(sv) = 60; + IoLINES(sv) = 0; IoPAGE(sv) = 0; - IoPAGE_LEN(sv) = 0; + IoPAGE_LEN(sv) = 60; IoLINES_LEFT(sv)= 0; IoTOP_NAME(sv) = 0; IoTOP_GV(sv) = 0; @@ -846,7 +851,7 @@ unsigned long newlen; else s = SvPVX(sv); if (newlen > SvLEN(sv)) { /* need more room? */ - if (SvLEN(sv)) + if (SvLEN(sv) && s) Renew(s,newlen,char); else New(703,s,newlen,char); @@ -1615,7 +1620,7 @@ sv_magic(register SV *sv, SV *obj, char how, char *name, I32 namlen) MAGIC* mg; if (SvTHINKFIRST(sv)) { - if (SvREADONLY(sv) && curcop != &compiling) + if (SvREADONLY(sv) && curcop != &compiling && !strchr("gB", how)) croak(no_modify); } if (SvMAGICAL(sv)) { @@ -1632,8 +1637,10 @@ sv_magic(register SV *sv, SV *obj, char how, char *name, I32 namlen) SvMAGIC(sv) = mg; if (obj == sv) mg->mg_obj = obj; - else + else { mg->mg_obj = SvREFCNT_inc(obj); + mg->mg_flags |= MGf_REFCOUNTED; + } mg->mg_type = how; mg->mg_len = namlen; if (name && namlen >= 0) @@ -1880,7 +1887,7 @@ register SV *sv; SAVESPTR(op); curcop = &compiling; curstash = SvSTASH(sv); - destructor = gv_fetchpv("DESTROY", FALSE); + destructor = gv_fetchpv("DESTROY", FALSE, SVt_PVCV); if (destructor && GvCV(destructor)) { SV ref; @@ -1905,6 +1912,7 @@ register SV *sv; run(); stack_sp--; SvREFCNT(sv) = 0; + FREE_TMPS(); } SvREFCNT_dec(SvSTASH(sv)); LEAVE; @@ -1921,16 +1929,17 @@ register SV *sv; goto freemagic; case SVt_PVGV: gp_free(sv); + Safefree(GvNAME(sv)); goto freemagic; case SVt_PVCV: - cv_clear((CV*)sv); + cv_undef((CV*)sv); goto freemagic; case SVt_PVHV: - hv_clear((HV*)sv); + hv_undef((HV*)sv); SvPVX(sv)= 0; goto freemagic; case SVt_PVAV: - av_clear((AV*)sv); + av_undef((AV*)sv); SvPVX(sv)= 0; goto freemagic; case SVt_PVLV: @@ -2126,13 +2135,13 @@ register SV *str2; if (cur1 < cur2) { /*SUPPRESS 560*/ - if (retval = memcmp(pv1, pv2, cur1)) + if (retval = memcmp((void*)pv1, (void*)pv2, cur1)) return retval < 0 ? -1 : 1; else return -1; } /*SUPPRESS 560*/ - else if (retval = memcmp(pv1, pv2, cur2)) + else if (retval = memcmp((void*)pv1, (void*)pv2, cur2)) return retval < 0 ? -1 : 1; else if (cur1 == cur2) return 0; @@ -2171,7 +2180,7 @@ I32 append; } } while (i != EOF); } -#ifdef STDSTDIO /* Here is some breathtakingly efficient cheating */ +#ifdef USE_STD_STDIO /* Here is some breathtakingly efficient cheating */ cnt = fp->_cnt; /* get count into register */ SvPOK_only(sv); /* validate pointer */ if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */ @@ -2238,7 +2247,7 @@ thats_really_all_folks: *bp = '\0'; SvCUR_set(sv, bp - SvPVX(sv)); /* set length */ -#else /* !STDSTDIO */ /* The big, slow, and stupid way */ +#else /* !USE_STD_STDIO */ /* The big, slow, and stupid way */ { char buf[8192]; @@ -2271,7 +2280,7 @@ screamer: } } -#endif /* STDSTDIO */ +#endif /* USE_STD_STDIO */ if (rspara) { while (i != EOF) { @@ -2646,7 +2655,7 @@ I32 lref; if (isGV(sv)) gv = (GV*)sv; else - gv = gv_fetchpv(SvPV(sv, na), lref); + gv = gv_fetchpv(SvPV(sv, na), lref, SVt_PVCV); *gvp = gv; if (!gv) return Nullcv; @@ -2695,6 +2704,17 @@ register SV *sv; } #endif /* SvTRUE */ +#ifndef SvIV +I32 SvIV(Sv) +register SV *Sv; +{ + if (SvIOK(Sv)) + return SvIVX(Sv); + return sv_2iv(Sv); +} +#endif /* SvIV */ + + #ifndef SvNV double SvNV(Sv) register SV *Sv; @@ -2713,12 +2733,26 @@ sv_pvn(sv, lp) SV *sv; STRLEN *lp; { - if (SvPOK(sv)) + if (SvPOK(sv)) { + *lp = SvCUR(sv); return SvPVX(sv) + } return sv_2pv(sv, lp); } #endif +int +sv_isobject(sv) +SV *sv; +{ + if (!SvROK(sv)) + return 0; + sv = (SV*)SvRV(sv); + if (!SvOBJECT(sv)) + return 0; + return 1; +} + int sv_isa(sv, name) SV *sv; @@ -2770,6 +2804,13 @@ SV* sv; SvREFCNT_dec(SvRV(sv)); SvRV(sv) = 0; SvROK_off(sv); + if (!(SvFLAGS(sv) & (SVp_IOK|SVp_NOK))) { + SvFLAGS(sv) &= ~SVf_OK; + if (SvTYPE(sv) == SVt_RV) { + del_XRV(SvANY(sv)); + SvFLAGS(sv) &= ~SVTYPEMASK; /* Make into type NULL. */ + } + } --sv_rvcount; } diff --git a/sv.h b/sv.h index 77671c57cb..69545d8daf 100644 --- a/sv.h +++ b/sv.h @@ -43,7 +43,7 @@ typedef enum { SVt_PVCV, SVt_PVGV, SVt_PVFM, - SVt_PVIO, + SVt_PVIO } svtype; /* Using C's structural equivalence to help emulate C++ inheritance here... */ @@ -413,8 +413,6 @@ struct xpvio { do { assert(SvTYPE(sv) >= SVt_PV); \ (((XPV*) SvANY(sv))->xpv_cur = val - SvPVX(sv)); } while (0) -#define SvCUROK(sv) (SvPOK(sv) ? SvCUR(sv) : 0) - #define BmRARE(sv) ((XPVBM*) SvANY(sv))->xbm_rare #define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xbm_useful #define BmPREVIOUS(sv) ((XPVBM*) SvANY(sv))->xbm_previous @@ -447,7 +445,7 @@ struct xpvio { #ifdef CRIPPLED_CC -double SvIV(); +I32 SvIV(); double SvNV(); #define SvPV(sv, lp) sv_pvn(sv, &lp) char *sv_pvn(); diff --git a/sv_append_till b/sv_append_till deleted file mode 100644 index c2299ea692..0000000000 --- a/sv_append_till +++ /dev/null @@ -1,39 +0,0 @@ -char * -sv_append_till(sv,from,fromend,delim,keeplist) -register SV *sv; -register char *from; -register char *fromend; -register I32 delim; -char *keeplist; -{ - register char *to; - register STRLEN len; - - if (SvREADONLY(sv)) - fatal(no_modify); - if (!from) - return Nullch; - len = fromend - from; - if (!SvUPGRADE(sv, SVt_PV)) - return 0; - SvGROW(sv, SvCUR(sv) + len + 1); - SvPOK_only(sv); /* validate pointer */ - to = SvPV(sv)+SvCUR(sv); - for (; from < fromend; from++,to++) { - if (*from == '\\' && from+1 < fromend && delim != '\\') { - if (!keeplist) - *to++ = *from++; - else if (from[1] && index(keeplist,from[1])) - *to++ = *from++; - else - from++; - } - else if (*from == delim) - break; - *to = *from; - } - *to = '\0'; - SvCUR_set(sv, to - SvPV(sv)); - return from; -} - diff --git a/syntax b/syntax deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/t/foo b/t/foo index 57d87eb167..034c5c6457 100755 --- a/t/foo +++ b/t/foo @@ -1,2 +1,282 @@ #!./perl +BEGIN { @INC = '../lib' } +require "bigint.pl"; + +$test = 0; +$| = 1; +print "1..246\n"; +while () { + chop; + if (/^&/) { + $f = $_; + } else { + ++$test; + @args = split(/:/,$_,99); + $ans = pop(@args); + $try = "$f('" . join("','", @args) . "');"; + if (($ans1 = eval($try)) eq $ans) { + print "ok $test\n"; + } else { + print "not ok $test\n"; + print "# '$try' expected: '$ans' got: '$ans1'\n"; + } + } +} +__END__ +&bnorm +abc:NaN + 1 a:NaN +1bcd2:NaN +11111b:NaN ++1z:NaN +-1z:NaN +0:+0 ++0:+0 ++00:+0 ++0 0 0:+0 +000000 0000000 00000:+0 +-0:+0 +-0000:+0 ++1:+1 ++01:+1 ++001:+1 ++00000100000:+100000 +123456789:+123456789 +-1:-1 +-01:-1 +-001:-1 +-123456789:-123456789 +-00000100000:-100000 +&bneg +abd:NaN ++0:+0 ++1:-1 +-1:+1 ++123456789:-123456789 +-123456789:+123456789 +&babs +abc:NaN ++0:+0 ++1:+1 +-1:+1 ++123456789:+123456789 +-123456789:+123456789 +&bcmp +abc:abc: +abc:+0: ++0:abc: ++0:+0:0 +-1:+0:-1 ++0:-1:1 ++1:+0:1 ++0:+1:-1 +-1:+1:-1 ++1:-1:1 +-1:-1:0 ++1:+1:0 ++123:+123:0 ++123:+12:1 ++12:+123:-1 +-123:-123:0 +-123:-12:-1 +-12:-123:1 ++123:+124:-1 ++124:+123:1 +-123:-124:1 +-124:-123:-1 +&badd +abc:abc:NaN +abc:+0:NaN ++0:abc:NaN ++0:+0:+0 ++1:+0:+1 ++0:+1:+1 ++1:+1:+2 +-1:+0:-1 ++0:-1:-1 +-1:-1:-2 +-1:+1:+0 ++1:-1:+0 ++9:+1:+10 ++99:+1:+100 ++999:+1:+1000 ++9999:+1:+10000 ++99999:+1:+100000 ++999999:+1:+1000000 ++9999999:+1:+10000000 ++99999999:+1:+100000000 ++999999999:+1:+1000000000 ++9999999999:+1:+10000000000 ++99999999999:+1:+100000000000 ++10:-1:+9 ++100:-1:+99 ++1000:-1:+999 ++10000:-1:+9999 ++100000:-1:+99999 ++1000000:-1:+999999 ++10000000:-1:+9999999 ++100000000:-1:+99999999 ++1000000000:-1:+999999999 ++10000000000:-1:+9999999999 ++123456789:+987654321:+1111111110 +-123456789:+987654321:+864197532 +-123456789:-987654321:-1111111110 ++123456789:-987654321:-864197532 +&bsub +abc:abc:NaN +abc:+0:NaN ++0:abc:NaN ++0:+0:+0 ++1:+0:+1 ++0:+1:-1 ++1:+1:+0 +-1:+0:-1 ++0:-1:+1 +-1:-1:+0 +-1:+1:-2 ++1:-1:+2 ++9:+1:+8 ++99:+1:+98 ++999:+1:+998 ++9999:+1:+9998 ++99999:+1:+99998 ++999999:+1:+999998 ++9999999:+1:+9999998 ++99999999:+1:+99999998 ++999999999:+1:+999999998 ++9999999999:+1:+9999999998 ++99999999999:+1:+99999999998 ++10:-1:+11 ++100:-1:+101 ++1000:-1:+1001 ++10000:-1:+10001 ++100000:-1:+100001 ++1000000:-1:+1000001 ++10000000:-1:+10000001 ++100000000:-1:+100000001 ++1000000000:-1:+1000000001 ++10000000000:-1:+10000000001 ++123456789:+987654321:-864197532 +-123456789:+987654321:-1111111110 +-123456789:-987654321:+864197532 ++123456789:-987654321:+1111111110 +&bmul +abc:abc:NaN +abc:+0:NaN ++0:abc:NaN ++0:+0:+0 ++0:+1:+0 ++1:+0:+0 ++0:-1:+0 +-1:+0:+0 ++123456789123456789:+0:+0 ++0:+123456789123456789:+0 +-1:-1:+1 +-1:+1:-1 ++1:-1:-1 ++1:+1:+1 ++2:+3:+6 +-2:+3:-6 ++2:-3:-6 +-2:-3:+6 ++111:+111:+12321 ++10101:+10101:+102030201 ++1001001:+1001001:+1002003002001 ++100010001:+100010001:+10002000300020001 ++10000100001:+10000100001:+100002000030000200001 ++11111111111:+9:+99999999999 ++22222222222:+9:+199999999998 ++33333333333:+9:+299999999997 ++44444444444:+9:+399999999996 ++55555555555:+9:+499999999995 ++66666666666:+9:+599999999994 ++77777777777:+9:+699999999993 ++88888888888:+9:+799999999992 ++99999999999:+9:+899999999991 +&bdiv +abc:abc:NaN +abc:+1:abc:NaN ++1:abc:NaN ++0:+0:NaN ++0:+1:+0 ++1:+0:NaN ++0:-1:+0 +-1:+0:NaN ++1:+1:+1 +-1:-1:+1 ++1:-1:-1 +-1:+1:-1 ++1:+2:+0 ++2:+1:+2 ++1000000000:+9:+111111111 ++2000000000:+9:+222222222 ++3000000000:+9:+333333333 ++4000000000:+9:+444444444 ++5000000000:+9:+555555555 ++6000000000:+9:+666666666 ++7000000000:+9:+777777777 ++8000000000:+9:+888888888 ++9000000000:+9:+1000000000 ++35500000:+113:+314159 ++71000000:+226:+314159 ++106500000:+339:+314159 ++1000000000:+3:+333333333 ++10:+5:+2 ++100:+4:+25 ++1000:+8:+125 ++10000:+16:+625 ++999999999999:+9:+111111111111 ++999999999999:+99:+10101010101 ++999999999999:+999:+1001001001 ++999999999999:+9999:+100010001 ++999999999999999:+99999:+10000100001 +&bmod +abc:abc:NaN +abc:+1:abc:NaN ++1:abc:NaN ++0:+0:NaN ++0:+1:+0 ++1:+0:NaN ++0:-1:+0 +-1:+0:NaN ++1:+1:+0 +-1:-1:+0 ++1:-1:+0 +-1:+1:+0 ++1:+2:+1 ++2:+1:+0 ++1000000000:+9:+1 ++2000000000:+9:+2 ++3000000000:+9:+3 ++4000000000:+9:+4 ++5000000000:+9:+5 ++6000000000:+9:+6 ++7000000000:+9:+7 ++8000000000:+9:+8 ++9000000000:+9:+0 ++35500000:+113:+33 ++71000000:+226:+66 ++106500000:+339:+99 ++1000000000:+3:+1 ++10:+5:+0 ++100:+4:+0 ++1000:+8:+0 ++10000:+16:+0 ++999999999999:+9:+0 ++999999999999:+99:+0 ++999999999999:+999:+0 ++999999999999:+9999:+0 ++999999999999999:+99999:+0 +&bgcd +abc:abc:NaN +abc:+0:NaN ++0:abc:NaN ++0:+0:+0 ++0:+1:+1 ++1:+0:+1 ++1:+1:+1 ++2:+3:+1 ++3:+2:+1 ++100:+625:+25 ++4096:+81:+1 diff --git a/t/lib/ndbm.t b/t/lib/ndbm.t new file mode 100755 index 0000000000..c69e2f8739 --- /dev/null +++ b/t/lib/ndbm.t @@ -0,0 +1,117 @@ +#!./perl + +# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $ + +BEGIN { + @INC = '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bNDBM_File\b/) { + print "1..0\n"; + exit 0; + } +} + +require NDBM_File; + +print "1..12\n"; + +unlink ; + +umask(0); +print (tie(%h,NDBM_File,'Op.dbmx', 0x202, 0640) ? "ok 1\n" : "not ok 1\n"); + +$Dfile = "Op.dbmx.pag"; +if (! -e $Dfile) { + ($Dfile) = ; +} +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat($Dfile); +print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n"); +while (($key,$value) = each(%h)) { + $i++; +} +print (!$i ? "ok 3\n" : "not ok 3\n"); + +$h{'goner1'} = 'snork'; + +$h{'abc'} = 'ABC'; +$h{'def'} = 'DEF'; +$h{'jkl','mno'} = "JKL\034MNO"; +$h{'a',2,3,4,5} = join("\034",'A',2,3,4,5); +$h{'a'} = 'A'; +$h{'b'} = 'B'; +$h{'c'} = 'C'; +$h{'d'} = 'D'; +$h{'e'} = 'E'; +$h{'f'} = 'F'; +$h{'g'} = 'G'; +$h{'h'} = 'H'; +$h{'i'} = 'I'; + +$h{'goner2'} = 'snork'; +delete $h{'goner2'}; + +untie(%h); +print (tie(%h,NDBM_File,'Op.dbmx', 0x2, 0640) ? "ok 4\n" : "not ok 4\n"); + +$h{'j'} = 'J'; +$h{'k'} = 'K'; +$h{'l'} = 'L'; +$h{'m'} = 'M'; +$h{'n'} = 'N'; +$h{'o'} = 'O'; +$h{'p'} = 'P'; +$h{'q'} = 'Q'; +$h{'r'} = 'R'; +$h{'s'} = 'S'; +$h{'t'} = 'T'; +$h{'u'} = 'U'; +$h{'v'} = 'V'; +$h{'w'} = 'W'; +$h{'x'} = 'X'; +$h{'y'} = 'Y'; +$h{'z'} = 'Z'; + +$h{'goner3'} = 'snork'; + +delete $h{'goner1'}; +delete $h{'goner3'}; + +@keys = keys(%h); +@values = values(%h); + +if ($#keys == 29 && $#values == 29) {print "ok 5\n";} else {print "not ok 5\n";} + +while (($key,$value) = each(h)) { + if ($key eq $keys[$i] && $value eq $values[$i] && $key gt $value) { + $key =~ y/a-z/A-Z/; + $i++ if $key eq $value; + } +} + +if ($i == 30) {print "ok 6\n";} else {print "not ok 6\n";} + +@keys = ('blurfl', keys(h), 'dyick'); +if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";} + +$h{'foo'} = ''; +$h{''} = 'bar'; + +# check cache overflow and numeric keys and contents +$ok = 1; +for ($i = 1; $i < 200; $i++) { $h{$i + 0} = $i + 0; } +for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; } +print ($ok ? "ok 8\n" : "not ok 8\n"); + +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat($Dfile); +print ($size > 0 ? "ok 9\n" : "not ok 9\n"); + +@h{0..200} = 200..400; +@foo = @h{0..200}; +print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n"; + +print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n"); +print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n"); + +unlink 'Op.dbmx.dir', $Dfile; diff --git a/t/lib/sdbm.t b/t/lib/sdbm.t index 79d95f315f..1304be29b2 100755 --- a/t/lib/sdbm.t +++ b/t/lib/sdbm.t @@ -2,7 +2,14 @@ # $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $ -BEGIN { @INC = '../lib' } +BEGIN { + @INC = '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bSDBM_File\b/) { + print STDERR "1..0\n"; + exit 0; + } +} require SDBM_File; print "1..12\n"; diff --git a/t/perl5a1.tar b/t/perl5a1.tar new file mode 100644 index 0000000000..0c0b43ce1b Binary files /dev/null and b/t/perl5a1.tar differ diff --git a/tofix b/tofix deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/toke.c b/toke.c index 6c582a5a5d..9bfc0eaaba 100644 --- a/toke.c +++ b/toke.c @@ -77,6 +77,7 @@ static U32 lex_state = LEX_NORMAL; /* next token is determined */ static U32 lex_defer; /* state after determined token */ static expectation lex_expect; /* expect after determined token */ static I32 lex_brackets; /* bracket count */ +static I32 lex_formbrack; /* bracket count at outer format level */ static I32 lex_fakebrack; /* outer bracket is mere delimiter */ static I32 lex_casemods; /* casemod count */ static I32 lex_dojoin; /* doing an array interpolation */ @@ -106,8 +107,6 @@ static I32 nexttoke = 0; #include "keywords.h" -void checkcomma(); - #ifdef CLINE #undef CLINE #endif @@ -222,12 +221,12 @@ SV *line; SAVEINT(lex_inpat); SAVEINT(lex_inwhat); SAVEINT(curcop->cop_line); - SAVESPTR(bufptr); - SAVESPTR(bufend); - SAVESPTR(oldbufptr); - SAVESPTR(oldoldbufptr); + SAVEPPTR(bufptr); + SAVEPPTR(bufend); + SAVEPPTR(oldbufptr); + SAVEPPTR(oldoldbufptr); SAVESPTR(linestr); - SAVESPTR(lex_brackstack); + SAVEPPTR(lex_brackstack); SAVESPTR(rsfp); lex_state = LEX_NORMAL; @@ -236,7 +235,7 @@ SV *line; lex_brackets = 0; lex_fakebrack = 0; if (lex_brackstack) - SAVESPTR(lex_brackstack); + SAVEPPTR(lex_brackstack); New(899, lex_brackstack, 120, char); SAVEFREEPV(lex_brackstack); lex_casemods = 0; @@ -319,7 +318,7 @@ static char * skipspace(s) register char *s; { - if (in_format && lex_brackets <= 1) { + if (lex_formbrack && lex_brackets <= lex_formbrack) { while (s < bufend && (*s == ' ' || *s == '\t')) s++; return s; @@ -542,11 +541,11 @@ sublex_start() SAVEINT(lex_inpat); SAVEINT(lex_inwhat); SAVEINT(curcop->cop_line); - SAVESPTR(bufptr); - SAVESPTR(oldbufptr); - SAVESPTR(oldoldbufptr); + SAVEPPTR(bufptr); + SAVEPPTR(oldbufptr); + SAVEPPTR(oldoldbufptr); SAVESPTR(linestr); - SAVESPTR(lex_brackstack); + SAVEPPTR(lex_brackstack); linestr = lex_stuff; lex_stuff = Nullsv; @@ -664,7 +663,7 @@ char *start; s++; } } - else if (*s == '@') + else if (*s == '@' && s[1] && (isALNUM(s[1]) || strchr(":'{", s[1]))) break; else if (*s == '$') { if (!lex_inpat) /* not a regexp, so $ must be var */ @@ -828,7 +827,7 @@ register char *s; weight -= seen[un_char] * 10; if (isALNUM(s[1])) { scan_ident(s,send,tmpbuf,FALSE); - if (strlen(tmpbuf) > 1 && gv_fetchpv(tmpbuf,FALSE)) + if (strlen(tmpbuf) > 1 && gv_fetchpv(tmpbuf,FALSE, SVt_PV)) weight -= 100; else weight -= 10; @@ -1199,9 +1198,9 @@ yylex() } } } - if (in_format && lex_brackets <= 1) { + if (lex_formbrack && lex_brackets <= lex_formbrack) { s = scan_formline(s); - if (!in_format) + if (!lex_formbrack) goto rightbracket; OPERATOR(';'); } @@ -1218,9 +1217,9 @@ yylex() if (s < d) s++; incline(s); - if (in_format && lex_brackets <= 1) { + if (lex_formbrack && lex_brackets <= lex_formbrack) { s = scan_formline(s); - if (!in_format) + if (!lex_formbrack) goto rightbracket; OPERATOR(';'); } @@ -1259,9 +1258,9 @@ yylex() case 't': FTST(OP_FTTTY); case 'T': FTST(OP_FTTEXT); case 'B': FTST(OP_FTBINARY); - case 'M': gv_fetchpv("\024",TRUE); FTST(OP_FTMTIME); - case 'A': gv_fetchpv("\024",TRUE); FTST(OP_FTATIME); - case 'C': gv_fetchpv("\024",TRUE); FTST(OP_FTCTIME); + case 'M': gv_fetchpv("\024",TRUE, SVt_PV); FTST(OP_FTMTIME); + case 'A': gv_fetchpv("\024",TRUE, SVt_PV); FTST(OP_FTATIME); + case 'C': gv_fetchpv("\024",TRUE, SVt_PV); FTST(OP_FTCTIME); default: s -= 2; break; @@ -1394,8 +1393,6 @@ yylex() TOKEN(']'); case '{': leftbracket: - if (in_format == 2) - in_format = 0; s++; if (lex_brackets > 100) { char* newlb = (char*)realloc(lex_brackstack, lex_brackets + 1); @@ -1443,6 +1440,8 @@ yylex() yyerror("Unmatched right bracket"); else expect = (expectation)lex_brackstack[--lex_brackets]; + if (lex_brackets < lex_formbrack) + lex_formbrack = 0; if (lex_state == LEX_INTERPNORMAL) { if (lex_brackets == 0) { if (lex_fakebrack) { @@ -1499,8 +1498,7 @@ yylex() if (dowarn && tmp && isSPACE(*s) && strchr("+-*/%.^&|<",tmp)) warn("Reversed %c= operator",tmp); s--; - if (in_format == 2 && (tmp == '\n' || s[1] == '\n')) { - in_format = 1; + if (lex_brackets < lex_formbrack && (tmp == '\n' || s[1] == '\n')) { s--; expect = XBLOCK; goto leftbracket; @@ -1552,7 +1550,7 @@ yylex() if (s[1] == '#' && (isALPHA(s[2]) || s[2] == '_' || s[2] == '{')) { s = scan_ident(s+1, bufend, tokenbuf, FALSE); if (expect == XOPERATOR) { - if (in_format) + if (lex_formbrack && lex_brackets == lex_formbrack) OPERATOR(','); /* grandfather non-comma-format format */ else no_op("Array length",s); @@ -1563,7 +1561,7 @@ yylex() } s = scan_ident(s, bufend, tokenbuf+1, FALSE); if (expect == XOPERATOR) { - if (in_format) + if (lex_formbrack && lex_brackets == lex_formbrack) OPERATOR(','); /* grandfather non-comma-format format */ else no_op("Scalar",s); @@ -1654,11 +1652,12 @@ yylex() TERM('@'); } } - if (dowarn && *s == '[') { - char *t; - for (t = s+1; *t && (isALNUM(*t) || strchr(" \t$#+-", *t)); t++) - ; - if (*t++ == ']') { + if (dowarn && (*s == '[' || *s == '{')) { + char *t = s + 1; + while (*t && (isALNUM(*t) || strchr(" \t$#+-'\"", *t))) + t++; + if (*t == '}' || *t == ']') { + t++; bufptr = skipspace(bufptr); warn("Scalar value %.*s better written as $%.*s", t-bufptr, bufptr, t-bufptr-1, bufptr+1); @@ -1686,8 +1685,8 @@ yylex() OPERATOR(tmp); case '.': - if (in_format == 2) { - in_format = 0; + if (lex_formbrack && lex_brackets == lex_formbrack && s == oldbufptr) { + lex_formbrack = 0; expect = XSTATE; goto rightbracket; } @@ -1718,26 +1717,26 @@ yylex() case '\'': s = scan_str(s); if (expect == XOPERATOR) { - if (in_format) + if (lex_formbrack && lex_brackets == lex_formbrack) OPERATOR(','); /* grandfather non-comma-format format */ else no_op("String",s); } if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_CONST; TERM(sublex_start()); case '"': s = scan_str(s); if (expect == XOPERATOR) { - if (in_format) + if (lex_formbrack && lex_brackets == lex_formbrack) OPERATOR(','); /* grandfather non-comma-format format */ else no_op("String",s); } if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_SCALAR; TERM(sublex_start()); @@ -1746,7 +1745,7 @@ yylex() if (expect == XOPERATOR) no_op("Backticks",s); if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_BACKTICK; set_csh(); TERM(sublex_start()); @@ -1830,7 +1829,7 @@ yylex() /* Look for a subroutine with this name in current package. */ - gv = gv_fetchpv(tokenbuf,FALSE); + gv = gv_fetchpv(tokenbuf,FALSE, SVt_PVCV); /* See if it's the indirect object for a list operator. */ @@ -1884,7 +1883,7 @@ yylex() s = scan_word(s, tmpbuf, TRUE, &len); if (!keyword(tmpbuf, len)) { SV* tmpsv = newSVpv(tmpbuf,0); - indirgv = gv_fetchpv(tmpbuf,FALSE); + indirgv = gv_fetchpv(tmpbuf,FALSE, SVt_PVCV); if (!indirgv || !GvCV(indirgv)) { if (!gv || !GvCV(gv) || fetch_stash(tmpsv, FALSE)) { nextval[nexttoke].opval = @@ -1916,6 +1915,11 @@ yylex() force_next(WORD); TOKEN(NOAMP); } + else if (hints & HINT_STRICT_SUBS) { + warn("Bareword \"%s\" not allowed while \"strict subs\" averred", + tokenbuf); + ++error_count; + } /* Call it a bare word */ @@ -1940,7 +1944,8 @@ yylex() int fd; /*SUPPRESS 560*/ - if (!in_eval && (gv = gv_fetchpv("DATA",FALSE))) { + if (!in_eval) { + gv = gv_fetchpv("DATA",TRUE, SVt_PVIO); SvMULTI_on(gv); if (!GvIO(gv)) GvIO(gv) = newIO(); @@ -1986,6 +1991,11 @@ yylex() case KEY_atan2: LOP(OP_ATAN2); + case KEY_aver: + s = force_word(s,WORD,FALSE,FALSE); + yylval.ival = 1; + OPERATOR(HINT); + case KEY_bind: LOP(OP_BIND); @@ -2002,7 +2012,7 @@ yylex() PREBLOCK(CONTINUE); case KEY_chdir: - (void)gv_fetchpv("ENV",TRUE); /* may use HOME */ + (void)gv_fetchpv("ENV",TRUE, SVt_PVHV); /* may use HOME */ UNI(OP_CHDIR); case KEY_close: @@ -2045,6 +2055,11 @@ yylex() case KEY_chroot: UNI(OP_CHROOT); + case KEY_deny: + s = force_word(s,WORD,FALSE,FALSE); + yylval.ival = 0; + OPERATOR(HINT); + case KEY_do: s = skipspace(s); if (*s == '{') @@ -2063,6 +2078,7 @@ yylex() OPERATOR(DELETE); case KEY_dbmopen: + gv_fetchpv("Any_DBM_FILE::ISA", 2, SVt_PVAV); LOP(OP_DBMOPEN); case KEY_dbmclose: @@ -2387,14 +2403,14 @@ yylex() case KEY_q: s = scan_str(s); if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_CONST; TERM(sublex_start()); case KEY_qw: s = scan_str(s); if (!s) - missingterm(0); + missingterm((char*)0); force_next(')'); nextval[nexttoke].opval = (OP*)newSVOP(OP_CONST, 0, q(lex_stuff)); lex_stuff = Nullsv; @@ -2408,7 +2424,7 @@ yylex() case KEY_qq: s = scan_str(s); if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_SCALAR; if (SvIVX(lex_stuff) == '\'') SvIVX(lex_stuff) = 0; /* qq'$foo' should intepolate */ @@ -2417,7 +2433,7 @@ yylex() case KEY_qx: s = scan_str(s); if (!s) - missingterm(0); + missingterm((char*)0); yylval.ival = OP_BACKTICK; set_csh(); TERM(sublex_start()); @@ -2604,10 +2620,7 @@ yylex() really_sub: yylval.ival = start_subparse(); s = skipspace(s); - if (tmp == KEY_format) - expect = XTERM; - else - expect = XBLOCK; + expect = XBLOCK; if (isIDFIRST(*s) || *s == '\'' || *s == ':') { char tmpbuf[128]; d = scan_word(s, tmpbuf, TRUE, &len); @@ -2626,8 +2639,9 @@ yylex() if (tmp != KEY_format) PREBLOCK(SUB); - in_format = 2; - lex_brackets = 0; + s = skipspace(s); + if (*s == '=') + lex_formbrack = lex_brackets + 1; OPERATOR(FORMAT); case KEY_system: @@ -2730,6 +2744,7 @@ yylex() FUN0(OP_WANTARRAY); case KEY_write: + gv_fetchpv("\f",TRUE, SVt_PV); /* Make sure $^L is defined */ UNI(OP_ENTERWRITE); case KEY_x: @@ -2767,6 +2782,9 @@ I32 len; if (strEQ(d,"and")) return KEY_and; if (strEQ(d,"abs")) return KEY_abs; break; + case 4: + if (strEQ(d,"aver")) return KEY_aver; + break; case 5: if (strEQ(d,"alarm")) return KEY_alarm; if (strEQ(d,"atan2")) return KEY_atan2; @@ -2826,6 +2844,7 @@ I32 len; if (strEQ(d,"die")) return KEY_die; break; case 4: + if (strEQ(d,"deny")) return KEY_deny; if (strEQ(d,"dump")) return KEY_dump; break; case 6: @@ -3918,7 +3937,7 @@ char *start; if (!len) (void)strcpy(d,"ARGV"); if (*d == '$') { - GV *gv = gv_fetchpv(d+1,TRUE); + GV *gv = gv_fetchpv(d+1,TRUE, SVt_PV); lex_op = (OP*)newUNOP(OP_READLINE, 0, newUNOP(OP_RV2GV, 0, newUNOP(OP_RV2SV, 0, @@ -3928,7 +3947,7 @@ char *start; else { IO *io; - GV *gv = gv_fetchpv(d,TRUE); + GV *gv = gv_fetchpv(d,TRUE, SVt_PVIO); io = GvIOn(gv); if (strEQ(d,"ARGV")) { GvAVn(gv); @@ -4149,7 +4168,7 @@ register char *s; bool needargs = FALSE; while (!needargs) { - if (*s == '.') { + if (*s == '.' || *s == '}') { /*SUPPRESS 530*/ for (t = s+1; *t == ' ' || *t == '\t'; t++) ; if (*t == '\n') @@ -4190,8 +4209,6 @@ register char *s; nextval[nexttoke].ival = 0; force_next(','); } - else - in_format = 2; nextval[nexttoke].opval = (OP*)newSVOP(OP_CONST, 0, stuff); force_next(THING); nextval[nexttoke].ival = OP_FORMLINE; @@ -4199,7 +4216,7 @@ register char *s; } else { SvREFCNT_dec(stuff); - in_format = 0; + lex_formbrack = 0; bufptr = s; } return s; @@ -4292,7 +4309,7 @@ char *s; " (Might be a runaway multi-line %c%c string starting on line %d)\n", multi_open,multi_close,multi_start); if (in_eval) - sv_catpv(GvSV(gv_fetchpv("@",TRUE)),buf); + sv_catpv(GvSV(gv_fetchpv("@",TRUE, SVt_PV)),buf); else fputs(buf,stderr); if (++error_count >= 10) diff --git a/toke.c.pat1 b/toke.c.pat1 new file mode 100644 index 0000000000..60ec8bb721 --- /dev/null +++ b/toke.c.pat1 @@ -0,0 +1,21 @@ +*** /scalpel/lwall/perl5alpha6/toke.c Tue Feb 15 16:27:34 1994 +--- toke.c Thu Feb 17 11:13:27 1994 +*************** +*** 1398,1405 **** + if (expect == XTERM) + OPERATOR(HASHBRACK); + else if (expect == XBLOCK || expect == XOPERATOR) { +! lex_brackstack[lex_brackets-1] = XBLOCK; +! expect = XBLOCK; + } + else { + char *t; +--- 1398,1405 ---- + if (expect == XTERM) + OPERATOR(HASHBRACK); + else if (expect == XBLOCK || expect == XOPERATOR) { +! lex_brackstack[lex_brackets-1] = XSTATE; +! expect = XSTATE; + } + else { + char *t; diff --git a/trace.out b/trace.out new file mode 100644 index 0000000000..e69de29bb2 diff --git a/trans_stuff b/trans_stuff deleted file mode 100644 index ea10582eeb..0000000000 --- a/trans_stuff +++ /dev/null @@ -1,40 +0,0 @@ - if (complement) { - Zero(tbl, 256, short); - for (i = 0; i < tlen; i++) - tbl[t[i] & 0377] = -1; - for (i = 0, j = 0; i < 256; i++) { - if (!tbl[i]) { - if (j >= rlen) { - if (delete) - tbl[i] = -2; - else if (rlen) - tbl[i] = r[j-1] & 0377; - else - tbl[i] = i; - } - else - tbl[i] = r[j++] & 0377; - } - } - } - else { - 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 (tbl[t[i] & 0377] == -1) - tbl[t[i] & 0377] = -2; - continue; - } - --j; - } - if (tbl[t[i] & 0377] == -1) - tbl[t[i] & 0377] = r[j] & 0377; - } - } - sv_free(tstr); - sv_free(rstr); diff --git a/usersub.c b/usersub.c index a3ae42ce05..11cf321a7d 100644 --- a/usersub.c +++ b/usersub.c @@ -124,7 +124,7 @@ void cryptswitch() { int ch; -#ifdef STDSTDIO +#ifdef USE_STD_STDIO /* cheat on stdio if possible */ if (rsfp->_cnt > 0 && (*rsfp->_ptr & 0xff) != CRYPT_MAGIC_1) return; diff --git a/util.c b/util.c index 8f6845a7c4..1ebb847abe 100644 --- a/util.c +++ b/util.c @@ -51,7 +51,7 @@ #include #endif -#ifdef STANDARD_C +#ifdef I_UNISTD # include #endif @@ -86,10 +86,6 @@ MEM_SIZE size; #endif /* MSDOS */ { char *ptr; -#ifndef STANDARD_C - char *malloc(); -#endif /* ! STANDARD_C */ - #ifdef MSDOS if (size > 0xffff) { fprintf(stderr, "Allocation too large: %lx\n", size) FLUSH; @@ -810,7 +806,7 @@ mess(pat, args) SV *tmpstr; I32 usermess; #ifndef HAS_VPRINTF -#ifdef CHARVSPRINTF +#ifdef USE_CHAR_VSPRINTF char *vsprintf(); #else I32 vsprintf(); @@ -992,7 +988,7 @@ char *f; } #endif -#if !defined(HAS_BCOPY) || !defined(SAFE_BCOPY) +#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY) char * my_bcopy(from,to,len) register char *from; @@ -1049,7 +1045,7 @@ register I32 len; #ifdef I_VARARGS #ifndef HAS_VPRINTF -#ifdef CHARVSPRINTF +#ifdef USE_CHAR_VSPRINTF char * #else int @@ -1067,7 +1063,7 @@ char *dest, *pat, *args; fakebuf._flag = _IOWRT|_IOSTRG; _doprnt(pat, args, &fakebuf); /* what a kludge */ (void)putc('\0', &fakebuf); -#ifdef CHARVSPRINTF +#ifdef USE_CHAR_VSPRINTF return(dest); #else return 0; /* perl doesn't use return value */ @@ -1287,7 +1283,7 @@ char *mode; _exit(1); } /*SUPPRESS 560*/ - if (tmpgv = gv_fetchpv("$",TRUE)) + if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV)) sv_setiv(GvSV(tmpgv),(I32)getpid()); forkprocess = 0; hv_clear(pidstatus); /* we have no children */ diff --git a/writemain b/writemain index 3dfa7cff95..667030939c 100755 --- a/writemain +++ b/writemain @@ -1,44 +1,24 @@ #!/bin/sh - -cat <<'EOF' -#include "INTERN.h" -#include "perl.h" - -main(argc, argv, env) -int argc; -char **argv; -char **env; -{ - int exitstatus; - PerlInterpreter *my_perl; - - my_perl = perl_alloc(); - if (!my_perl) - exit(1); - perl_construct( my_perl ); - - exitstatus = perl_parse( my_perl, argc, argv, env ); - if (exitstatus) - exit( exitstatus ); - - exitstatus = perl_run( my_perl ); - - perl_destruct( my_perl ); - perl_free( my_perl ); - - exit( exitstatus ); -} - -/* Register any extra external extensions */ - -void -perl_init_ext() -{ - char *file = __FILE__; - +: This script takes the plain miniperlmain.c and writes out perlmain.c +: which includes all the extensions. +: The command line arguments name extensions to be used. +: E.g.: sh writemain SDBM_File POSIX > perlmain.c +: +args="$*" +if test X"$args" = "X" ; then + cat miniperlmain.c +else + sed '/Do not delete this line--writemain depends on it/q' miniperlmain.c + cat << 'EOP' + +#ifdef USE_DYNAMIC_LOADING boot_DynamicLoader(); -EOF +#endif -sed -e 's/\(.*\)/ newXSUB("\1::bootstrap", 0, boot_\1, file);/' <$1 +EOP + for ext in $args; do + echo " newXSUB(\"${ext}::bootstrap\", 0, boot_${ext}, file);" + done + echo '}' +fi -echo '}' diff --git a/writemain.SH b/writemain.SH new file mode 100644 index 0000000000..ea8aeabbd2 --- /dev/null +++ b/writemain.SH @@ -0,0 +1,55 @@ +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find config.sh."; exit 1 + fi + . $TOP/config.sh + ;; +esac +: This forces SH files to create target in same directory as SH file. +: This is so that make depend always knows where to find SH derivatives. +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting writemain (with variable substitutions)" +: This section of the file will have variable substitutions done on it. +: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. +: Protect any dollar signs and backticks that you do not want interpreted +: by putting a backslash in front. You may delete these comments. +$spitshell >writemain <>writemain <<'!NO!SUBS!' +: This script takes the plain miniperlmain.c and writes out perlmain.c +: which includes all the extensions. +: The command line arguments name extensions to be used. +: E.g.: sh writemain SDBM_File POSIX > perlmain.c +: +args="$*" +if test X"$args" = "X" ; then + cat miniperlmain.c +else + sed '/Do not delete this line--writemain depends on it/q' miniperlmain.c + cat << 'EOP' + +#ifdef USE_DYNAMIC_LOADING + boot_DynamicLoader(); +#endif + +EOP + for ext in $args; do + echo " newXSUB(\"${ext}::bootstrap\", 0, boot_${ext}, file);" + done + echo '}' +fi + +!NO!SUBS! +chmod 755 writemain +$eunicefix writemain diff --git a/x2p/Makefile b/x2p/Makefile index 2d2ff74b8f..6e87e87a23 100644 --- a/x2p/Makefile +++ b/x2p/Makefile @@ -1,4 +1,4 @@ -# $RCSfile: Makefile.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:29:07 $ +# $RCSfile: Makefile.SH,v 3314Revision: 4.1 3314Date: 92/08/07 18:29:07 $ # # $Log: Makefile.SH,v $ # Revision 4.1 92/08/07 18:29:07 lwall @@ -32,7 +32,7 @@ mallocsrc = malloc.c mallocobj = malloc.o shellflags = -libs = -ldl -lm -lposix +libs = -ldbm -ldl -lm -lposix CCCMD = `sh $(shellflags) cflags $@` diff --git a/x2p/makefile b/x2p/makefile index 18b8e0b428..fc29d5de95 100644 --- a/x2p/makefile +++ b/x2p/makefile @@ -1,4 +1,4 @@ -# $RCSfile: Makefile.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:29:07 $ +# $RCSfile: Makefile.SH,v 3314Revision: 4.1 3314Date: 92/08/07 18:29:07 $ # # $Log: Makefile.SH,v $ # Revision 4.1 92/08/07 18:29:07 lwall @@ -32,7 +32,7 @@ mallocsrc = malloc.c mallocobj = malloc.o shellflags = -libs = -ldl -lm -lposix +libs = -ldbm -ldl -lm -lposix CCCMD = `sh $(shellflags) cflags $@` diff --git a/x2p/malloc.c b/x2p/malloc.c index d5c4717131..396d31cef2 100644 --- a/x2p/malloc.c +++ b/x2p/malloc.c @@ -64,7 +64,7 @@ static int morecore(); */ union overhead { union overhead *ov_next; /* when free */ -#if ALIGNBYTES > 4 +#if MEM_ALIGNBYTES > 4 double strut; /* alignment problems */ #endif struct { diff --git a/x2p/str.c b/x2p/str.c index ceea2e53d9..bda549164d 100644 --- a/x2p/str.c +++ b/x2p/str.c @@ -287,7 +287,7 @@ str_gets(str,fp) register STR *str; register FILE *fp; { -#ifdef STDSTDIO /* Here is some breathtakingly efficient cheating */ +#ifdef USE_STD_STDIO /* Here is some breathtakingly efficient cheating */ register char *bp; /* we're going to steal some values */ register int cnt; /* from the stdio struct and put EVERYTHING */ @@ -339,7 +339,7 @@ thats_all_folks: *bp = '\0'; str->str_cur = bp - str->str_ptr; /* set length */ -#else /* !STDSTDIO */ /* The big, slow, and stupid way */ +#else /* !USE_STD_STDIO */ /* The big, slow, and stupid way */ static char buf[4192]; @@ -348,7 +348,7 @@ thats_all_folks: else str_set(str, No); -#endif /* STDSTDIO */ +#endif /* USE_STD_STDIO */ return str->str_cur ? str->str_ptr : Nullch; } diff --git a/xf b/xf index be92503e1c..14cefda8c0 100755 --- a/xf +++ b/xf @@ -2,7 +2,6 @@ while (<>) { study; - s/\bFCMD\b/FF/g && study; s/\bSTR\b/SV/g && study; s/\bARRAY\b/AV/g && study; s/\bARG\b/OP/g && study; @@ -13,9 +12,8 @@ while (<>) { s/\bSTIO\b/IO/g && study; s/\bSTAB\b/GV/g && study; s/\bSTBP\b/GP/g && study; - s/\bSUBR\b/SUB/g && study; + s/\bSUBR\b/CV/g && study; - s/\bNullfcmd\b/Nullfield/g && study; s/\bNullstr\b/Nullsv/g && study; s/\bNullarg\b/Nullop/g && study; s/\bNullcmd\b/Nullcop/g && study; @@ -45,7 +43,7 @@ while (<>) { s/\bstab_xhash\b/GvHV/g && study; s/\bstab_array\b/GvAVn/g && study; s/\bstab_xarray\b/GvAV/g && study; - s/\bstab_sub\b/GvSUB/g && study; + s/\bstab_sub\b/GvCV/g && study; s/\bstab_form\b/GvFORM/g && study; s/\bstab_magic\b/GvMAGIC/g && study; s/\bstab_val\b/GvSV/g && study; @@ -69,12 +67,8 @@ while (<>) { s/\bSTABSET\b/SvSETMAGIC/g && study; s/\bstabset\b/sv_setmagic/g && study; - s/\bSTR_SSET\b/SvSetSV/g && study; - s/\bSTR_SSET\b/SvSetPV/g && study; - s/\bSTR_SSET\b/SvSetNV/g && study; + s/\bSTR_SSET\b/sv_setsv/g && study; s/\bSTR_GROW\b/SvGROW/g && study; - s/SINGLE\b/CONST/g && study; - s/DOUBLE\b/INTERP/g && study; s/\bstr_true\b/SvTRUE/g && study; s/\bstr_peek\b/SvPEEK/g && study; @@ -101,76 +95,42 @@ while (<>) { s/\bastore\b/av_store/g && study; s/\baunshift\b/av_unshift/g && study; s/\bcastulong\b/cast_ulong/g && study; - s/\bcmd_exec\b/cop_exec/g && study; - s/\bcmd_free\b/cop_free/g && study; - s/\bcmd_to_arg\b/cop_to_arg/g && study; + s/\bcmd_free\b/op_free/g && study; s/\bcurcmd\b/curcop/g && study; - s/\bcval_to_arg\b/pv_to_op/g && study; - s/\bdehoist\b/dehoistXXX/g && study; - s/\bldehoist\b/ldehoistXXX/g && study; - s/\bdodb\b/CopDBadd/g && study; s/\bdump_arg\b/dump_op/g && study; - s/\bdump_cmd\b/dump_cop/g && study; + s/\bdump_cmd\b/dump_op/g && study; s/\bdump_spat\b/dump_pm/g && study; s/\bdump_stab\b/dump_gv/g && study; s/\bdumpfds\b/dump_fds/g && study; - s/\benvix\b/setenv_getix/g && study; - s/\beval\b/oldeval/g && study; - s/\bevalstatic\b/op_fold_const/g && study; s/\bfbmcompile\b/fbm_compile/g && study; s/\bfbminstr\b/fbm_instr/g && study; - s/\bfixl\b/fixlXXX/g && study; - s/\bform_parseargs\b/XXX/g && study; - s/\bformat\b/run_format/g && study; - s/\bfree_arg\b/op_behead/g && study; s/\bfstab\b/newGVfile/g && study; s/\bgenstab\b/newGVgen/g && study; s/\bgrow_dlevel\b/deb_growlevel/g && study; - s/\bgrowstr\b/cv_grow/g && study; s/\bhadd\b/gv_HVn/g && study; s/\bhclear\b/hv_clear/g && study; - s/\bhdbmclose\b/hv_dbmclose/g && study; - s/\bhdbmopen\b/hv_dbmopen/g && study; - s/\bhdbmstore\b/hv_dbmstore/g && study; s/\bhdelete\b/hv_delete/g && study; s/\bhentdelayfree\b/he_delayfree/g && study; s/\bhentfree\b/he_free/g && study; s/\bhfetch\b/hv_fetch/g && study; s/\bhfree\b/hv_free/g && study; - s/\bhide_ary\b/hide_aryXXX/g && study; s/\bhiterinit\b/hv_iterinit/g && study; s/\bhiterkey\b/hv_iterkey/g && study; s/\bhiternext\b/hv_iternext/g && study; s/\bhiterval\b/hv_iterval/g && study; s/\bhnew\b/newHV/g && study; s/\bhstore\b/hv_store/g && study; - s/\binterp\b/sv_interp/g && study; - s/\bintrpcompile\b/sv_intrpcompile/g && study; s/\blistish\b/forcelist/g && study; - s/\bload_format\b/parse_format/g && study; - s/\bmake_acmd\b/newACOP/g && study; - s/\bmake_ccmd\b/newCCOP/g && study; - s/\bmake_form\b/newFORM/g && study; - s/\bmake_icmd\b/newICOP/g && study; - s/\bmake_list\b/flatten/g && study; - s/\bmake_match\b/newPM/g && study; - s/\bmake_op\b/newOP/g && study; - s/\bmake_split\b/newSPLIT/g && study; - s/\bmake_sub\b/newSUB/g && study; - s/\bmake_usub\b/newUSUB/g && study; s/\bmaybelistish\b/maybeforcelist/g && study; - s/\bmod_match\b/bind_match/g && study; s/\bmylstat\b/my_lstat/g && study; s/\bmypclose\b/my_pclose/g && study; s/\bmypfiopen\b/my_pfiopen/g && study; s/\bmypopen\b/my_popen/g && study; s/\bmystat\b/my_stat/g && study; s/\bop_new\b/newOP/g && study; - s/\bopt_arg\b/op_optimize/g && study; - s/\bparselist\b/parse_list/g && study; s/\bperl_alloc\b/perl_alloc/g && study; - s/\bperl_callback\b/perl_callback/g && study; - s/\bperl_callv\b/perl_callv/g && study; + s/\bperl_callback\b/perl_callpv/g && study; + s/\bperl_callv\b/perl_callargv/g && study; s/\bperl_construct\b/perl_construct/g && study; s/\bperl_destruct\b/perl_destruct/g && study; s/\bperl_free\b/perl_free/g && study; @@ -203,8 +163,6 @@ while (<>) { s/\bscanstr\b/scan_str/g && study; s/\bscansubst\b/scan_subst/g && study; s/\bscantrans\b/scan_trans/g && study; - s/\bspat_free\b/pm_free/g && study; - s/\bstab2arg\b/gv_to_op/g && study; s/\bstab_check\b/gv_check/g && study; s/\bstab_clear\b/gv_clear/g && study; s/\bstab_efullname\b/gv_efullname/g && study; @@ -216,7 +174,6 @@ while (<>) { s/\bstr_2mortal\b/sv_2mortal/g && study; s/\bstr_2num\b/sv_2num/g && study; s/\bstr_2ptr\b/sv_2ptr/g && study; - s/\bstr_append_till\b/sv_append_till/g && study; s/\bstr_cat\b/sv_catpv/g && study; s/\bstr_chop\b/sv_chop/g && study; s/\bstr_cmp\b/sv_cmp/g && study; -- cgit v1.2.1