1
|
1 // gripes.cc -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
240
|
24 #ifdef HAVE_CONFIG_H |
|
25 #include "config.h" |
1
|
26 #endif |
|
27 |
|
28 #include "gripes.h" |
|
29 #include "error.h" |
|
30 |
|
31 void |
|
32 gripe_string_invalid (void) |
|
33 { |
|
34 error ("string constant used in invalid context"); |
|
35 } |
|
36 |
|
37 void |
|
38 gripe_range_invalid (void) |
|
39 { |
|
40 error ("range constant used in invalid context"); |
|
41 } |
|
42 |
|
43 void |
|
44 gripe_nonconformant (void) |
|
45 { |
|
46 error ("nonconformant matrices"); |
|
47 } |
|
48 |
|
49 void |
143
|
50 gripe_nonconformant (int r1, int c1, int r2, int c2) |
|
51 { |
|
52 error ("nonconformant matrices (op1 is %dx%d, op2 is %dx%d)", |
|
53 r1, c1, r2, c2); |
|
54 } |
|
55 |
|
56 void |
1
|
57 gripe_empty_arg (const char *name, int is_error) |
|
58 { |
|
59 if (is_error) |
|
60 error ("%s: empty matrix is invalid as an argument", name); |
|
61 else |
|
62 warning ("%s: argument is empty matrix", name); |
|
63 } |
|
64 |
|
65 void |
|
66 gripe_square_matrix_required (const char *name) |
|
67 { |
|
68 error ("%s: argument must be a square matrix", name); |
|
69 } |
|
70 |
|
71 void |
|
72 gripe_user_supplied_eval (const char *name) |
|
73 { |
|
74 error ("%s: evaluation of user-supplied function failed", name); |
|
75 } |
|
76 |
|
77 void |
|
78 gripe_user_returned_invalid (const char *name) |
|
79 { |
|
80 error ("%s: user-supplied function returned invalid value", name); |
|
81 } |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; page-delimiter: "^/\\*" *** |
|
87 ;;; End: *** |
|
88 */ |