home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / src / gripes.cc < prev    next >
C/C++ Source or Header  |  1995-01-03  |  3KB  |  138 lines

  1. // gripes.cc                                             -*- C++ -*-
  2. /*
  3.  
  4. Copyright (C) 1992, 1993, 1994, 1995 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.  
  24. #ifdef HAVE_CONFIG_H
  25. #include "config.h"
  26. #endif
  27.  
  28. #include "tree-const.h"
  29. #include "gripes.h"
  30. #include "error.h"
  31.  
  32. void
  33. gripe_string_invalid (void)
  34. {
  35.   error ("string constant used in invalid context");
  36. }
  37.  
  38. void
  39. gripe_range_invalid (void)
  40. {
  41.   error ("range constant used in invalid context");
  42. }
  43.  
  44. void
  45. gripe_nonconformant (void)
  46. {
  47.   error ("nonconformant matrices");
  48. }
  49.  
  50. void
  51. gripe_nonconformant (int r1, int c1, int r2, int c2)
  52. {
  53.   error ("nonconformant matrices (op1 is %dx%d, op2 is %dx%d)",
  54.      r1, c1, r2, c2);
  55. }
  56.  
  57. void
  58. gripe_empty_arg (const char *name, int is_error)
  59. {
  60.   if (is_error)
  61.     error ("%s: empty matrix is invalid as an argument", name);
  62.   else
  63.     warning ("%s: argument is empty matrix", name);
  64. }
  65.  
  66. void
  67. gripe_square_matrix_required (const char *name)
  68. {
  69.   error ("%s: argument must be a square matrix", name);
  70. }
  71.  
  72. void
  73. gripe_user_supplied_eval (const char *name)
  74. {
  75.   error ("%s: evaluation of user-supplied function failed", name);
  76. }
  77.  
  78. void
  79. gripe_user_returned_invalid (const char *name)
  80. {
  81.   error ("%s: user-supplied function returned invalid value", name);
  82. }
  83.  
  84. void
  85. gripe_invalid_conversion (const char *from, const char *to)
  86. {
  87.   error ("invalid conversion from %s to %s", from, to);
  88. }
  89.  
  90. void
  91. gripe_2_or_3_dim_plot (void)
  92. {
  93.   error ("plot: can only plot in 2 or 3 dimensions");
  94. }
  95.  
  96. void
  97. gripe_unrecognized_float_fmt (void)
  98. {
  99.   error ("unrecognized floating point format requested");
  100. }
  101.  
  102. void
  103. gripe_unrecognized_data_fmt (const char *warn_for)
  104. {
  105.   error ("%s: unrecognized data format requested", warn_for);
  106. }
  107.  
  108. void
  109. gripe_data_conversion (const char *from, const char *to)
  110. {
  111.   error ("unable to convert from %s to %s format", from, to);
  112. }
  113.  
  114. void
  115. gripe_wrong_type_arg (const char *name, const tree_constant& tc)
  116. {
  117.   error ("%s: wrong type argument `%s'", name, tc.type_as_string ());
  118. }
  119.  
  120. void
  121. gripe_wrong_type_arg_for_unary_op (const tree_constant& op)
  122. {
  123.   error ("invalid operand `%s' for unary operator", op.type_as_string ());
  124. }
  125.  
  126. void
  127. gripe_wrong_type_arg_for_binary_op (const tree_constant& op)
  128. {
  129.   error ("invalid operand `%s' for binary operator", op.type_as_string ());
  130. }
  131.  
  132. /*
  133. ;;; Local Variables: ***
  134. ;;; mode: C++ ***
  135. ;;; page-delimiter: "^/\\*" ***
  136. ;;; End: ***
  137. */
  138.