mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-21 02:10:05 +00:00
f4017d2057
1997-11-26 04:28 Ulrich Drepper <drepper@cygnus.com> * eld/dl-profile.c (_dl_start_profile): Avoid FP calculation when computing s_scale. Patch by a sun <asun@zoology.washington.edu>. * iconv/gconv_close.c: Correct freeing of descriptor data. * iconv/gconv_simple.c: Return correct error values for illegal or incomplete characters. * Makefile (iconvdata/%): Special goal to simplify iconvdata development. * iconvdata/Makefile: New file. * iconvdata/configure: Likewise. * iconvdata/extra-module.mk: Likewise. * iconvdata/gconv-modules: Likewise. * iconvdata/iso6937.c: Likewise. * iconvdata/iso8859-1.c: Likewise. * iconvdata/iso8859-10.c: Likewise. * iconvdata/iso8859-10.h: Likewise. * iconvdata/iso8859-2.c: Likewise. * iconvdata/iso8859-2.h: Likewise. * iconvdata/iso8859-3.c: Likewise. * iconvdata/iso8859-3.h: Likewise. * iconvdata/iso8859-4.c: Likewise. * iconvdata/iso8859-4.h: Likewise. * iconvdata/iso8859-5.c: Likewise. * iconvdata/iso8859-5.h: Likewise. * iconvdata/iso8859-6.c: Likewise. * iconvdata/iso8859-6.h: Likewise. * iconvdata/iso8859-7.c: Likewise. * iconvdata/iso8859-7.h: Likewise. * iconvdata/iso8859-8.c: Likewise. * iconvdata/iso8859-8.h: Likewise. * iconvdata/iso8859-9.c: Likewise. * iconvdata/iso8859-9.h: Likewise. * iconvdata/iso8859-generic.c: Likewise. * iconvdata/t61.c: Likewise. * string/Makefile (routines): Add strcasestr. * string/string.h: Add prototype for strcasestr. * sysdeps/generic/strcasestr.c: New file. * wcsmbs/mbrtowc.c: Simplify special case a bit. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/mbsnrtowcs.c: Correctly handle incomplete characters. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/mbsrtowcs.c: Make sure SRC argument is correct when partial character is read. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wmemrtombs.c: Likewise. * wcsmbs/wmemrtowcs.c: Likewise. * io/ftw.h: Include <sys/stat.h> instead of <bits/stat.h>. * login/pty.h: Include <sys/ioctl.h> instead og <bits/ioctl-types.h>. * sysdeps/i386/__longjmp.S: Define _SETJMP_H. * sysdeps/i386/elf/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/kernel_termios.h: Do include <bits/termios.h>. * sysdeps/posix/mk-stdiolim.c: Output file with comment. * sysdeps/unix/sysv/linux/stdio_lim.h.in: Add comment. * sysdeps/unix/sysv/linux/sys/mman.h: Pretty print. * sysvipc/sys/ipc.h: Likewise. * sysvipc/sys/msg.h: Likewise. * sysvipc/sys/sem.h: Likewise. * sysvipc/sys/shm.h: Likewise. * sysdeps/alpha/bits/endian.h: Issue error message if the header is used directly. * sysdeps/alpha/bits/setjmp.h: Likewise. * sysdeps/alpha/fpu/bits/fenv.h: Likewise. * sysdeps/arm/bits/endian.h: Likewise. * sysdeps/arm/bits/setjmp.h: Likewise. * sysdeps/generic/bits/byteswap.h: Likewise. * sysdeps/generic/bits/confname.h: Likewise. * sysdeps/generic/bits/dirent.h: Likewise. * sysdeps/generic/bits/dlfcn.h: Likewise. * sysdeps/generic/bits/endian.h: Likewise. * sysdeps/generic/bits/fenv.h: Likewise. * sysdeps/generic/bits/huge_val.h: Likewise. * sysdeps/generic/bits/in.h: Likewise. * sysdeps/generic/bits/ioctl-types.h: Likewise. * sysdeps/generic/bits/ioctls.h: Likewise. * sysdeps/generic/bits/ipc.h: Likewise. * sysdeps/generic/bits/msq.h: Likewise. * sysdeps/generic/bits/poll.h: Likewise. * sysdeps/generic/bits/resource.h: Likewise. * sysdeps/generic/bits/sched.h: Likewise. * sysdeps/generic/bits/sem.h: Likewise. * sysdeps/generic/bits/setjmp.h: Likewise. * sysdeps/generic/bits/shm.h: Likewise. * sysdeps/generic/bits/sigaction.h: Likewise. * sysdeps/generic/bits/sigcontext.h: Likewise. * sysdeps/generic/bits/socket.h: Likewise. * sysdeps/generic/bits/stat.h: Likewise. * sysdeps/generic/bits/statfs.h: Likewise. * sysdeps/generic/bits/stdio_lim.h: Likewise. * sysdeps/generic/bits/termios.h: Likewise. * sysdeps/generic/bits/time.h: Likewise. * sysdeps/generic/bits/uio.h: Likewise. * sysdeps/generic/bits/utmp.h: Likewise. * sysdeps/generic/bits/utmpx.h: Likewise. * sysdeps/generic/bits/utsname.h: Likewise. * sysdeps/generic/bits/waitflags.h: Likewise. * sysdeps/generic/bits/waitstatus.h: Likewise. * sysdeps/gnu/bits/utmp.h: Likewise. * sysdeps/gnu/bits/utmpx.h: Likewise. * sysdeps/i386/bits/byteswap.h: Likewise. * sysdeps/i386/bits/endian.h: Likewise. * sysdeps/i386/bits/huge_val.h: Likewise. * sysdeps/i386/bits/setjmp.h: Likewise. * sysdeps/i386/fpu/bits/fenv.h: Likewise. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/m68k/bits/byteswap.h: Likewise. * sysdeps/m68k/bits/endian.h: Likewise. * sysdeps/m68k/bits/setjmp.h: Likewise. * sysdeps/m68k/fpu/bits/fenv.h: Likewise. * sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/bits/ioctls.h: Likewise. * sysdeps/mach/hurd/bits/stat.h: Likewise. * sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/i386/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise. * sysdeps/mips/bits/dlfcn.h: Likewise. * sysdeps/mips/bits/endian.h: Likewise. * sysdeps/mips/bits/setjmp.h: Likewise. * sysdeps/mips/dec/bits/endian.h: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Likewise. * sysdeps/mips/mipsel/bits/endian.h: Likewise. * sysdeps/mips/p40/bits/endian.h: Likewise. * sysdeps/powerpc/bits/endian.h: Likewise. * sysdeps/powerpc/bits/fenv.h: Likewise. * sysdeps/powerpc/bits/setjmp.h: Likewise. * sysdeps/sparc/sparc32/bits/endian.h: Likewise. * sysdeps/sparc/sparc32/bits/setjmp.h: Likewise. * sysdeps/sparc/sparc32/fpu/bits/fenv.h: Likewise. * sysdeps/sparc/sparc64/bits/endian.h: Likewise. * sysdeps/sparc/sparc64/fpu/bits/fenv.h: Likewise. * sysdeps/unix/bsd/bits/dirent.h: Likewise. * sysdeps/unix/bsd/bits/stat.h: Likewise. * sysdeps/unix/bsd/bits/waitflags.h: Likewise. * sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Likewise. * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise. * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise. * sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/resource.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/termios.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/utsname.h: Likewise. * sysdeps/unix/bsd/ultrix4/bits/utsname.h: Likewise. * sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h: Likewise. * sysdeps/unix/common/bits/dirent.h: Likewise. * sysdeps/unix/sysv/bits/dirent.h: Likewise. * sysdeps/unix/sysv/bits/stat.h: Likewise. * sysdeps/unix/sysv/bits/utmp.h: Likewise. * sysdeps/unix/sysv/bits/utsname.h: Likewise. * sysdeps/unix/sysv/irix4/bits/confname.h: Likewise. * sysdeps/unix/sysv/irix4/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/dirent.h: Likewise. * sysdeps/unix/sysv/linux/bits/in.h: Likewise. * sysdeps/unix/sysv/linux/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/bits/resource.h: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. * sysdeps/unix/sysv/linux/bits/sem.h: Likewise. * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/uio.h: Likewise. * sysdeps/unix/sysv/linux/bits/utsname.h: Likewise. * sysdeps/unix/sysv/linux/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/endian.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Likewise. * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/confname.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/utsname.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h: Likewise. * sysdeps/vax/bits/huge_val.h: Likewise. * sysdeps/vax/bits/setjmp.h: Likewise. * sysdeps/wordsize-32/bits/elfclass.h: Likewise. * sysdeps/wordsize-64/bits/elfclass.h: Likewise. 1997-11-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * libio/stdio.h: Correct comment of sys_nerr/sys_errlist 1997-11-25 Paul Eggert <eggert@shade.twinsun.com> * strftime.c (strftime): No longer any need to undef or declare if emacs is defined. (my_strftime): When checking a -1 returned by mktime, don't blow up if localtime_r returns NULL. 1997-11-24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * README.template: Fix spelling. 1997-11-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * configure.in: Enhance --enable-add-ons description a wee bit. 1997-11-24 Andreas Jaeger <aj@arthur.rhein-neckar.de> * glibcbug.in: Add more information of build environment and flags. 1997-11-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/posix/getcwd.c: Recognize EOF from readdir and translate it into ENOENT.
269 lines
6.7 KiB
Bash
269 lines
6.7 KiB
Bash
#! /bin/sh
|
||
#
|
||
# glibcbug - create a bug report and mail it to the bug address.
|
||
#
|
||
# configuration section:
|
||
# these variables are filled in by configure
|
||
#
|
||
VERSION="@VERSION@"
|
||
BUGGLIBC="bugs@gnu.org"
|
||
ADDONS="@subdirs@"
|
||
HOST="@host@"
|
||
CC='@CC@'
|
||
CFLAGS="@CFLAGS@"
|
||
VERSIONING="@VERSIONING@"
|
||
BUILD_STATIC="@static@"
|
||
BUILD_SHARED="@shared@"
|
||
BUILD_PIC_DEFAULT="@pic_default@"
|
||
BUILD_PROFILE="@profile@"
|
||
BUILD_OMITFP="@omitfp@"
|
||
BUILD_BOUNDED="@bounded@"
|
||
BUILD_STATIC_NSS="@static_nss@"
|
||
STDIO="@stdio@"
|
||
|
||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||
export PATH
|
||
|
||
TEMP=/tmp/glibcbug.$$
|
||
|
||
BUGADDR=${1-$BUGGLIBC}
|
||
ENVIRONMENT=`uname -a`
|
||
|
||
: ${EDITOR=emacs}
|
||
|
||
: ${USER=${LOGNAME-`whoami`}}
|
||
|
||
trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
|
||
trap 'rm -f $TEMP $TEMP.x' 0
|
||
|
||
|
||
# How to read the passwd database.
|
||
PASSWD="cat /etc/passwd"
|
||
|
||
if [ -f /usr/lib/sendmail ] ; then
|
||
MAIL_AGENT="/usr/lib/sendmail -oi -t"
|
||
elif [ -f /usr/sbin/sendmail ] ; then
|
||
MAIL_AGENT="/usr/sbin/sendmail -oi -t"
|
||
else
|
||
MAIL_AGENT=rmail
|
||
fi
|
||
|
||
# Figure out how to echo a string without a trailing newline
|
||
N=`echo 'hi there\c'`
|
||
case "$N" in
|
||
*c) ECHON1='echo -n' ECHON2= ;;
|
||
*) ECHON1=echo ECHON2='\c' ;;
|
||
esac
|
||
|
||
# Find out the name of the originator of this PR.
|
||
if [ -n "$NAME" ]; then
|
||
ORIGINATOR="$NAME"
|
||
elif [ -f $HOME/.fullname ]; then
|
||
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
|
||
else
|
||
# Must use temp file due to incompatibilities in quoting behavior
|
||
# and to protect shell metacharacters in the expansion of $LOGNAME
|
||
$PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP
|
||
ORIGINATOR="`cat $TEMP`"
|
||
rm -f $TEMP
|
||
fi
|
||
|
||
if [ -n "$ORGANIZATION" ]; then
|
||
if [ -f "$ORGANIZATION" ]; then
|
||
ORGANIZATION="`cat $ORGANIZATION`"
|
||
fi
|
||
else
|
||
if [ -f $HOME/.organization ]; then
|
||
ORGANIZATION="`cat $HOME/.organization`"
|
||
elif [ -f $HOME/.signature ]; then
|
||
ORGANIZATION=`sed -e "s/^/ /" $HOME/.signature; echo ">"`
|
||
fi
|
||
fi
|
||
|
||
# If they don't have a preferred editor set, then use
|
||
if [ -z "$VISUAL" ]; then
|
||
if [ -z "$EDITOR" ]; then
|
||
EDIT=vi
|
||
else
|
||
EDIT="$EDITOR"
|
||
fi
|
||
else
|
||
EDIT="$VISUAL"
|
||
fi
|
||
|
||
# Find out some information.
|
||
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
|
||
( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
|
||
ARCH=`[ -f /bin/arch ] && /bin/arch`
|
||
MACHINE=`[ -f /bin/machine ] && /bin/machine`
|
||
|
||
ORGANIZATION_C='<organization of PR author (multiple lines)>'
|
||
SYNOPSIS_C='<synopsis of the problem (one line)>'
|
||
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
|
||
PRIORITY_C='<[ low | medium | high ] (one line)>'
|
||
CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
|
||
RELEASE_C='<release number or tag (one line)>'
|
||
ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
|
||
DESCRIPTION_C='<precise description of the problem (multiple lines)>'
|
||
HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
|
||
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
|
||
|
||
|
||
cat > $TEMP <<EOF
|
||
SEND-PR: -*- send-pr -*-
|
||
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
|
||
SEND-PR: will all comments (text enclosed in \`<' and \`>').
|
||
SEND-PR:
|
||
From: ${USER}
|
||
To: ${BUGADDR}
|
||
Subject: [50 character or so descriptive subject here (for reference)]
|
||
|
||
>Submitter-Id: net
|
||
>Originator: ${ORIGINATOR}
|
||
>Organization:
|
||
${ORGANIZATION- $ORGANIZATION_C}
|
||
>Confidential: no
|
||
>Synopsis: $SYNOPSIS_C
|
||
>Severity: $SEVERITY_C
|
||
>Priority: $PRIORITY_C
|
||
>Category: libc
|
||
>Class: $CLASS_C
|
||
>Release: libc-${VERSION}
|
||
>Environment:
|
||
$ENVIRONMENT_C
|
||
`[ -n "$HOST" ] && echo Host type: $HOST`
|
||
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
|
||
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
|
||
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
|
||
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
|
||
`[ -n "$CFLAGS" ] && echo Build CFLAGS: $CFLAGS`
|
||
`[ -n "$CC" ] && echo Build CC: $CC`
|
||
`[ -n "$VERSIONING" ] && echo Versioning: $VERSIONING`
|
||
`[ -n "$BUILD_STATIC" ] && echo Build static: $BUILD_STATIC`
|
||
`[ -n "$BUILD_SHARED" ] && echo Build shared: $BUILD_SHARED`
|
||
`[ -n "$BUILD_PIC_DEFAULT" ] && echo Build pic-default: $BUILD_PIC_DEFAULT`
|
||
`[ -n "$BUILD_PROFILE" ] && echo Build profile: $BUILD_PROFILE`
|
||
`[ -n "$BUILD_OMITFP" ] && echo Build omitfp: $BUILD_OMITFP`
|
||
`[ -n "$BUILD_BOUNDED" ] && echo Build bounded: $BUILD_BOUNDED`
|
||
`[ -n "$BUILD_STATIC_NSS" ] && echo Build static-nss: $BUILD_STATIC_NSS`
|
||
`[ -n "$STDIO" ] && echo Stdio: $STDIO`
|
||
|
||
>Description:
|
||
$DESCRIPTION_C
|
||
>How-To-Repeat:
|
||
$HOW_TO_REPEAT_C
|
||
>Fix:
|
||
$FIX_C
|
||
EOF
|
||
|
||
chmod u+w $TEMP
|
||
cp $TEMP $TEMP.x
|
||
|
||
eval $EDIT $TEMP
|
||
|
||
if cmp -s $TEMP $TEMP.x; then
|
||
echo "File not changed, no bug report submitted."
|
||
exit 1
|
||
fi
|
||
|
||
#
|
||
# Check the enumeration fields
|
||
|
||
# This is a "sed-subroutine" with one keyword parameter
|
||
# (with workaround for Sun sed bug)
|
||
#
|
||
SED_CMD='
|
||
/$PATTERN/{
|
||
s|||
|
||
s|<.*>||
|
||
s|^[ ]*||
|
||
s|[ ]*$||
|
||
p
|
||
q
|
||
}'
|
||
|
||
|
||
while :; do
|
||
CNT=0
|
||
|
||
#
|
||
# 1) Severity
|
||
#
|
||
PATTERN=">Severity:"
|
||
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$SEVERITY" in
|
||
""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
|
||
esac
|
||
#
|
||
# 2) Priority
|
||
#
|
||
PATTERN=">Priority:"
|
||
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$PRIORITY" in
|
||
""|low|medium|high) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
|
||
esac
|
||
#
|
||
# 3) Class
|
||
#
|
||
PATTERN=">Class:"
|
||
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$CLASS" in
|
||
""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
|
||
esac
|
||
|
||
[ $CNT -lt 3 ] &&
|
||
echo "Errors were found with the problem report."
|
||
|
||
while :; do
|
||
$ECHON1 "a)bort, e)dit or s)end? $ECHON2"
|
||
read input
|
||
case "$input" in
|
||
a*)
|
||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||
cat $TEMP >> $HOME/dead.glibcbug
|
||
xs=1; exit
|
||
;;
|
||
e*)
|
||
eval $EDIT $TEMP
|
||
continue 2
|
||
;;
|
||
s*)
|
||
break 2
|
||
;;
|
||
esac
|
||
done
|
||
done
|
||
#
|
||
# Remove comments and send the problem report
|
||
# (we have to use patterns, where the comment contains regex chars)
|
||
#
|
||
# /^>Originator:/s;$ORIGINATOR;;
|
||
sed -e "
|
||
/^SEND-PR:/d
|
||
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
|
||
/^>Confidential:/s;<.*>;;
|
||
/^>Synopsis:/s;$SYNOPSIS_C;;
|
||
/^>Severity:/s;<.*>;;
|
||
/^>Priority:/s;<.*>;;
|
||
/^>Class:/s;<.*>;;
|
||
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
|
||
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
|
||
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
|
||
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
|
||
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
|
||
" $TEMP > $TEMP.x
|
||
|
||
if $MAIL_AGENT < $TEMP.x; then
|
||
echo "$COMMAND: problem report sent"
|
||
xs=0; exit
|
||
else
|
||
echo "$COMMAND: mysterious mail failure, report not sent."
|
||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||
cat $TEMP >> $HOME/dead.glibcbug
|
||
fi
|
||
|
||
exit 0
|