Mercurial > hg > octave-thorsten
diff src/utils.cc @ 5781:faafc2d98b8d
[project @ 2006-05-02 19:40:19 by jwe]
author | jwe |
---|---|
date | Tue, 02 May 2006 19:40:21 +0000 (2006-05-02) |
parents | ace8d8d26933 |
children | 1138ced03f14 |
line wrap: on
line diff
--- a/src/utils.cc +++ b/src/utils.cc @@ -68,12 +68,6 @@ #include "utils.h" #include "variables.h" -// If TRUE, print a warning for expressions like -// -// ones (-1, 5) -// -static int Vwarn_neg_dim_as_zero; - // Return TRUE if S is a valid identifier. bool @@ -796,8 +790,8 @@ { if (nr < 0 || nc < 0) { - if (Vwarn_neg_dim_as_zero) - warning ("%s: converting negative dimension to zero", warnfor); + warning_with_id ("Octave:neg-dim-as-zero", + "%s: converting negative dimension to zero", warnfor); nr = (nr < 0) ? 0 : nr; nc = (nc < 0) ? 0 : nc; @@ -818,8 +812,9 @@ } } - if (neg && Vwarn_neg_dim_as_zero) - warning ("%s: converting negative dimension to zero", warnfor); + if (neg) + warning_with_id ("Octave:neg-dim-as-zero", + "%s: converting negative dimension to zero", warnfor); } @@ -1124,32 +1119,6 @@ } } -static int -warn_neg_dim_as_zero (void) -{ - Vwarn_neg_dim_as_zero = check_preference ("warn_neg_dim_as_zero"); - - return 0; -} - -void -symbols_of_utils (void) -{ - DEFVAR (warn_neg_dim_as_zero, false, warn_neg_dim_as_zero, - "-*- texinfo -*-\n\ -@defvr {Built-in Variable} warn_neg_dim_as_zero\n\ -If the value of @code{warn_neg_dim_as_zero} is nonzero, print a warning\n\ -for expressions like\n\ -\n\ -@example\n\ -eye (-1)\n\ -@end example\n\ -\n\ -@noindent\n\ -The default value is 0.\n\ -@end defvr"); -} - /* ;;; Local Variables: *** ;;; mode: C++ ***