3 # Copyright (C) 2000-2003 Simon Huggins
4 # checksigsep checks for an existing sigsep and allows you to quit without
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the Free
9 # Software Foundation; either version 2 of the License, or (at your option)
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc., 59
19 # Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 return if ($cfg{'msgfile'} eq "-");
26 open(MSG, "<$cfg{'msgfile'}") or return;
31 if (grep { /\n-- \n/ } $msg) {
33 print STDERR "Looks like this message already has an unquoted sigsep:\n";
34 $oldmsg =~ s/.*(-- $)/$1/ms;
36 print STDERR "\n\nAdd another? ([N]o/(y)es)\n";
38 return 255 if /^q(?:uit)?$/i;
39 return 255 if /^(?:no?|\n)$/i;