From octave-maintainers-request at bevo dot che dot wisc dot edu Sat Mar 15 18:11:51 1997 From: al at hadamard dot math dot washington dot edu To: octave-maintainers at bevo dot che dot wisc dot edu Date: Sat, 15 Mar 1997 16:12:23 -0800 #! /bin/sh - # # octave-bug - create a bug report and mail it to the bug-octave # mailing list. # # Patterned after the bashbug script from bash 1.14. # # John W. Eaton # jwe at bevo dot che dot wisc dot edu # University of Wisconsin-Madison # Department of Chemical Engineering # Configuration: these variables are filled in when running make to # compile Octave. config_opts="" VERSION="2.0" MACHINE="i386-pc-solaris2.5" F77="g77" FFLAGS="-O" FPICFLAG="-fPIC" FLIBS="-lf2c -L /usr/ccs/lib -L /usr/lib /usr/ccs/lib/values-Xa.o -L/usr/local/lib/gcc-lib/i586-sun-solaris2.5/2.7.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -lgcc" F2C="" F2CFLAGS="" CPPFLAGS="" INCFLAGS="-I/usr/local/include -I/usr/local/include/octave-2.0" CC="gcc" CC_VERSION="2.7.2" CFLAGS="-DHAVE_CONFIG_H -mieee-fp -g -O2 -Wall" CPICFLAG="-fPIC" CXX="c++" CXX_VERSION="2.7.2" CXXFLAGS="-DHAVE_CONFIG_H -fno-implicit-templates -mieee-fp -O2 -Wall" CXXPICFLAG="-fPIC" LDFLAGS="-g" LIBFLAGS="-L/usr/local/lib" RLD_FLAG="" CXXLIBS="-lsocket -lsocket -lstdc++ -lm -L/usr/local/lib/gcc-lib/i586-sun-solaris2.5/2.7.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -lsocket -lstdc++ -lm -lgcc -lc -lgcc" TERMLIBS="-ltermcap" LIBS="" LEXLIB="" LIBPLPLOT="" LIBDLFCN="" DEFS="-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=\":\" -DUSE_GNU_INFO=1 -DUSE_READLINE=1 -DHAVE_LIBSOCKET=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DF77_APPEND_UNDERSCORE=1 -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_ASSERT_H=1 -DHAVE_CURSES_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOAT_H=1 -DHAVE_FLOATINGPOINT_H=1 -DHAVE_GRP_H=1 -DHAVE_IEEEFP_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_NAN_H=1 -DHAVE_PWD_H=1 -DHAVE_SGTTY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_TERMIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_VARARGS_H=1 -DNPSOL_MISSING=1 -DQPSOL_MISSING=1 -DFSQP_MISSING=1 -DHAVE_ATEXIT=1 -DHAVE_BCOPY=1 -DHAVE_BZERO=1 -DHAVE_DUP2=1 -DHAVE_ENDGRENT=1 -DHAVE_ENDPWENT=1 -DHAVE_EXECVP=1 -DHAVE_FCNTL=1 -DHAVE_FORK=1 -DHAVE_GETCWD=1 -DHAVE_GETEGID=1 -DHAVE CC_AND_VERSION= if test -n "$CC_VERSION"; then CC_AND_VERSION="$CC, version $CC_VERSION" fi CXX_AND_VERSION= if test -n "$CXX_VERSION"; then CXX_AND_VERSION="$CXX, version $CXX_VERSION" fi PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH export PATH TEMP=/tmp/octave-bug.$$ : ${EDITOR=emacs} : ${PAGER=more} trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15 trap 'rm -f $TEMP $TEMP.x' 0 UN= if (uname) > /dev/null 2>&1; then UN=`uname -a` fi HAVE_FMT=false if (fmt < /dev/null) > /dev/null 2>&1; then HAVE_FMT=true fi # Check whether to use -n or \c to keep echo from printing a newline # character. Stolen from autoconf, which borrowed the idea from dist 3.0. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip dot rutgers dot edu dot if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then echo_n= echo_c=' ' else echo_n=-n echo_c= fi else echo_n= echo_c='\c' fi ss_p=`echo $VERSION | grep "^ss-"` if test -n "$ss_p"; then BUGADDR="octave-maintainers at bevo dot che dot wisc dot edu" else pretest_p=`echo $VERSION | sed 's,.*\.\([0-9]*\).*,\1,' | grep -v '\.'` if test -n "$pretest_p" && test "$pretest_p" -ge 90; then BUGADDR="octave-maintainers at bevo dot che dot wisc dot edu" else BUGADDR="bug-octave at bevo dot che dot wisc dot edu" fi fi SUBJECT="[50 character or so descriptive subject here (for reference)]" if test $# -gt 0; then case "$1" in -s) shift if test $# -gt 0; then SUBJECT="$1" shift else echo "usage: octave-bug [-s subject]" exit 1 fi ;; esac fi cat > $TEMP << EOF To: $BUGADDR Subject: $SUBJECT -------- Bug report for Octave $VERSION configured for $MACHINE Description: On execution of a new program which may contain syntax errors, the sytem hangs in a loop. After about 30 seconds the message out of memeory trying to return to the prompt appears repeatedly. Octave takes over and it is slow to kill from another process.----------- If a stable program is run before the rogue program, the rogue program becomes stable and runs. * Please replace this item with a detailed description of the problem. Suggestions or general comments are also welcome. Repeat-By: --------- * Please replace this item with a description of the sequence of events that causes the problem to occur. Fix: ? --- * If possible, replace this item with a description of how to fix the problem (if you don't have a fix for the problem, don't include this section, but please do submit your report anyway). This file was processed by fmt to be able to use vi on it. Configuration (please do not edit this section): ----------------------------------------------- uname output: $UN configure opts: $config_opts Fortran compiler: $F77 FFLAGS: $FFLAGS F2C: $F2C F2CFLAGS: $F2CFLAGS FLIBS: $FLIBS CPPFLAGS: $CPPFLAGS INCFLAGS: $INCFLAGS C compiler: $CC_AND_VERSION CFLAGS: $CFLAGS CPICFLAG: $CPICFLAG C++ compiler: $CXX_AND_VERSION CXXFLAGS: $CXXFLAGS CXXPICFLAG: $CXXPICFLAG LDFLAGS: $LDFLAGS LIBFLAGS: $LIBFLAGS RLD_FLAG: $RLD_FLAG CXXLIBS: $CXXLIBS TERMLIBS: $TERMLIBS LIBS: $LIBS LEXLIB: $LEXLIB LIBPLPLOT: $LIBPLPLOT LIBDLFCN: $LIBDLFCN DEFS: EOF if $HAVE_FMT; then echo $DEFS | fmt | sed 's/^/ /' >> $TEMP else echo $DEFS >> $TEMP fi if test $# -gt 0; then if test -f "$1"; then cat >> $TEMP << EOF User-preferences (please do not edit this section): -------------------------------------------------- EOF cat $1 >> $TEMP fi fi chmod u+w $TEMP cp $TEMP $TEMP.x status=0 editing=true while $editing; do if $EDITOR $TEMP; then while $editing; do echo $echo_n "(a)bort, (e)dit, (l)ist, (s)end? $echo_c" read ans case "$ans" in a* | A*) status=1 editing=false ;; e* | E*) break; ;; l* | L*) $PAGER $TEMP ;; s* | S*) editing=false ;; esac done else echo "problems with edit -- no bug report submitted" status=1 editing=false fi done if test $status -eq 0; then if cmp -s $TEMP $TEMP.x; then echo "file not changed -- no bug report submitted" status=1 elif test `wc $TEMP | awk '{print $1}'` -eq 0; then echo "empty bug report file -- not submitted" status=1 else # Try to extract the recipient address, in case the To: line in the # message template has been changed. Also get cc: lines. TO_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Tt][Oo]://p'` CC_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Cc][Cc]://p'` if test -z "$TO_ADDR"; then echo "no valid \`To:' field found in header -- using $BUGADDR instead" else BUGADDR="$TO_ADDR" fi BUGADDR="$BUGADDR $CC_ADDR" TMP_SUB=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^Subject://p'` if test -n "$TMP_SUB"; then SUBJECT="$TMP_SUB" fi # Delete the `--------' separator in the message. # Don't pretty-print this. Odd whitespace kills Ultrix AWK! awk 'BEGIN{in_header=1;} /^--------[ \t]*$/ { if (in_header) { in_header=0; print ""; next; } } { print $0; }' $TEMP > $TEMP.x # Now try to mail it. ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1 status=$? if test $status -ne 0; then ( Mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 status=$? if test $status -ne 0; then ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 status=$? if test $status -ne 0; then ( mailx -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 status=$? fi fi fi if test $status -ne 0; then echo "unable to send mail..." fi fi fi if test $status -ne 0; then echo "saving message in \$HOME/dead.octave-bug"; cat $TEMP >> $HOME/dead.octave-bug; exit 1 else echo "bug report sent to: $TO_ADDR" echo " cc to: $CC_ADDR" fi exit $status