2313
|
1 ## Copyright (C) 1996 John W. Eaton |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 2, or (at your option) |
|
8 ## any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
|
18 ## 02111-1307, USA. |
796
|
19 |
2311
|
20 ## usage: bug_report |
|
21 ## |
|
22 ## Have Octave create a bug report template file, invoke your favorite |
|
23 ## editor, and submit the report to the bug-octave mailing list when |
|
24 ## you are finished editing. |
796
|
25 |
2311
|
26 function bug_report () |
796
|
27 |
|
28 if (nargin != 0) |
904
|
29 warning ("bug_report: ignoring extra arguments"); |
796
|
30 endif |
|
31 |
|
32 printf ("Please enter a one-line description of your bug report.\n\n"); |
|
33 fflush (stdout); |
|
34 |
|
35 subject = ""; |
|
36 subject = input ("Subject: ", "s"); |
|
37 |
2303
|
38 ## XXX FIXME XXX -- really need a better system command, one that will |
|
39 ## automatically send output from the command to stdout... |
796
|
40 |
800
|
41 prefs = octave_tmp_file_name (); |
|
42 |
|
43 if (! isempty (prefs)) |
|
44 fopen (prefs, "w"); |
|
45 dump_prefs (prefs); |
|
46 fclose (prefs); |
796
|
47 endif |
|
48 |
800
|
49 cmd = "octave-bug"; |
|
50 |
|
51 if (length (subject) > 0) |
|
52 cmd = sprintf ("%s -s \"%s\"", cmd, subject); |
|
53 endif |
|
54 |
|
55 if (! isempty (prefs)) |
|
56 cmd = sprintf ("%s %s", cmd, prefs); |
|
57 endif |
|
58 |
|
59 system (sprintf ("%s > /dev/tty", cmd)); |
|
60 |
802
|
61 if (! isempty (prefs)) |
|
62 system (sprintf ("rm -f %s", prefs)); |
|
63 endif |
|
64 |
796
|
65 endfunction |