Mercurial > hg > octave-lojdl
changeset 8202:cf59d542f33e
replace all TODOs and XXXs with FIXMEs
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 08 Oct 2008 20:00:25 +0200 |
parents | 0ab4eed59455 |
children | a9da991c77aa |
files | configure.in doc/interpreter/contrib.txi emacs/Makefile.in liboctave/getopt.c liboctave/oct-inttypes.cc liboctave/oct-inttypes.h liboctave/strptime.c mk-opts.pl scripts/general/cplxpair.m scripts/miscellaneous/compare_versions.m scripts/pkg/pkg.m scripts/statistics/base/__quantile__.m scripts/strings/strtok.m scripts/testfun/assert.m scripts/testfun/demo.m scripts/testfun/speed.m scripts/testfun/test.m scripts/time/datestr.m src/ov-bool.h src/ov-float.h src/ov-scalar.h |
diffstat | 21 files changed, 64 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -1973,7 +1973,7 @@ // To be able to use long doubles for 64-bit mixed arithmetics, we need them at // least 80 bits wide and we need roundl declared in math.h -// TODO: Maybe substitute this by a more precise check in the future. +// FIXME: Maybe substitute this by a more precise check in the future. #if (SIZEOF_LONG_DOUBLE >= 10) && defined (HAVE_ROUNDL) #define OCTAVE_INT_USE_LONG_DOUBLE #endif
--- a/doc/interpreter/contrib.txi +++ b/doc/interpreter/contrib.txi @@ -148,6 +148,8 @@ The ChangeLog entries should describe what is changed, not why. The reason of the change should appear in the commit message. +The preferred comment mark for places that may need further attention is FIXME. + @node Octave Sources (m-files) @section Octave Sources (m-files)
--- a/emacs/Makefile.in +++ b/emacs/Makefile.in @@ -35,7 +35,7 @@ SOURCES = $(EL_FILES) octave-tags -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(EL_FILES) octave-tags octave-tags.1 NEWS TODO README) +DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(EL_FILES) octave-tags octave-tags.1 NEWS FIXME README) all: .PHONY: all
--- a/liboctave/getopt.c +++ b/liboctave/getopt.c @@ -267,7 +267,7 @@ static void store_args (int argc, char *const *argv) { - /* XXX This is no good solution. We should rather copy the args so + /* FIXME: This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv;
--- a/liboctave/oct-inttypes.cc +++ b/liboctave/oct-inttypes.cc @@ -194,7 +194,7 @@ // Essentially, what we do is compute sign, multiply absolute values // (as above) and impose the sign. - // TODO: Can we do something faster if we HAVE_FAST_INT_OPS? + // FIXME: Can we do something faster if we HAVE_FAST_INT_OPS? uint64_t usx = std::abs (x), usy = std::abs (y); bool positive = (x < 0) == (y < 0);
--- a/liboctave/oct-inttypes.h +++ b/liboctave/oct-inttypes.h @@ -270,7 +270,7 @@ val = xround (val); // Fool optimizations (maybe redundant) // If val is even, but orig_val is odd, we're one unit off. if (orig_val % 2 && val / 2 == xround (val / 2)) - // TODO: is this always correct? + // FIXME: is this always correct? val *= (static_cast<S>(1) - (std::numeric_limits<S>::epsilon () / 2)); return val; } @@ -534,7 +534,7 @@ return ((x > 0) ? 1 : 0) - signbit (x); } - // TODO: We do not have an authority what signed shifts should exactly do, so + // FIXME: We do not have an authority what signed shifts should exactly do, so // we define them the easy way. Note that Matlab does not define signed // shifts. @@ -871,7 +871,7 @@ xisnan (const octave_int<T>&) { return false; } -// TODO: Can/should any of these be inline? +// FIXME: Can/should any of these be inline? template <class T> extern OCTAVE_API octave_int<T>
--- a/liboctave/strptime.c +++ b/liboctave/strptime.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* XXX This version of the implementation is not really complete. +/* FIXME: This version of the implementation is not really complete. Some of the fields cannot add information alone. But if seeing some of them in the same format (such as year, week and weekday) this is enough information for determining the date. */ @@ -614,12 +614,12 @@ break; case 'g': get_number (0, 99, 2); - /* XXX This cannot determine any field in TM. */ + /* FIXME: This cannot determine any field in TM. */ break; case 'G': if (*rp < '0' || *rp > '9') return NULL; - /* XXX Ignore the number since we would need some more + /* FIXME: Ignore the number since we would need some more information to compute a real date. */ do ++rp; @@ -629,7 +629,7 @@ case 'V': case 'W': get_number (0, 53, 2); - /* XXX This cannot determine any field in TM without some + /* FIXME: This cannot determine any field in TM without some information. */ break; case 'w': @@ -656,7 +656,7 @@ want_xday = 1; break; case 'Z': - /* XXX How to handle this? */ + /* FIXME: How to handle this? */ break; case 'E': #ifdef _NL_CURRENT @@ -696,7 +696,7 @@ case 'Y': /* Match name of base year in locale's alternate representation. */ - /* XXX This is currently not implemented. It should + /* FIXME: This is currently not implemented. It should use the value _NL_CURRENT (LC_TIME, ERA). */ break; case 'x': @@ -807,7 +807,7 @@ case 'V': case 'W': get_alt_number (0, 53, 2); - /* XXX This cannot determine any field in TM without + /* FIXME: This cannot determine any field in TM without further information. */ break; case 'w':
--- a/mk-opts.pl +++ b/mk-opts.pl @@ -21,7 +21,7 @@ # Generate option handling code from a simpler input files for # Octave's functions like lsode, dassl, etc. -# TODO: +# FIXME: # # * Improve default documentation and/or individual documentation # in data files.
--- a/scripts/general/cplxpair.m +++ b/scripts/general/cplxpair.m @@ -41,10 +41,10 @@ ## @end smallexample ## @end deftypefn -## TODO: subsort returned pairs by imaginary magnitude -## TODO: Why doesn't exp(2i*pi*[0:4]'/5) produce exact conjugates. Does -## TODO: it in Matlab? The reason is that complex pairs are supposed -## TODO: to be exact conjugates, and not rely on a tolerance test. +## FIXME: subsort returned pairs by imaginary magnitude +## FIXME: Why doesn't exp(2i*pi*[0:4]'/5) produce exact conjugates. Does +## FIXME: it in Matlab? The reason is that complex pairs are supposed +## FIXME: to be exact conjugates, and not rely on a tolerance test. ## 2006-05-12 David Bateman - Modified for NDArrays
--- a/scripts/miscellaneous/compare_versions.m +++ b/scripts/miscellaneous/compare_versions.m @@ -65,7 +65,7 @@ ## Author: Bill Denney <denney@seas.upenn.edu> -## TODO?: This allows a single equal sign "=" to indicate equality, do +## FIXME?: This allows a single equal sign "=" to indicate equality, do ## we want to require a double equal since that is the boolean operator? function out = compare_versions (v1, v2, operator)
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -198,7 +198,7 @@ ## PKG_ADD: mark_as_command pkg function [local_packages, global_packages] = pkg (varargin) - ## Installation prefix (XXX: what should these be on windows?) + ## Installation prefix (FIXME: what should these be on windows?) persistent user_prefix = false; persistent prefix = -1; persistent archprefix = -1; @@ -398,7 +398,7 @@ if (length (files) == 0) error ("you must specify at least one package or 'all' when calling 'pkg describe'"); endif - ## XXX FIXME: the name of the output variables is inconsistent + ## FIXME: the name of the output variables is inconsistent ## with their content switch (nargout) case 0 @@ -871,11 +871,11 @@ endif endfor if (length (delete_idx) != length (pkgnames)) - ## XXX: We should have a better error message + ## FIXME: We should have a better error message warning ("some of the packages you want to uninstall are not installed"); endif else - ## XXX: We should have a better error message + ## FIXME: We should have a better error message warning ("some of the packages you want to uninstall are not installed."); endif endif @@ -1050,7 +1050,7 @@ if (! any (! isspace (line)) || line(1) == "#" || any (line == "=")) ## Comments, blank lines or comments about unimplemented ## functions: do nothing - ## XXX: probably comments and pointers to external functions + ## FIXME: probably comments and pointers to external functions ## could be treated better when printing to screen? elseif (! isempty (strfind (line, ">>"))) ## Skip package name and description as they are in @@ -1723,11 +1723,11 @@ endfunction ## Strip the text of spaces from the right -## Example: " hello world " => " hello world" (XXX: is this the same as deblank?) +## Example: " hello world " => " hello world" (FIXME: is this the same as deblank?) function text = rstrip (text) chars = find (! isspace (text)); if (length (chars) > 0) - ## XXX: shouldn't it be text = text(1:chars(end)); + ## FIXME: shouldn't it be text = text(1:chars(end)); text = text (chars(1):end); else text = ""; @@ -2061,7 +2061,7 @@ idx = strcmp (p, d); if (any (idx)) rmpath (d); - ## XXX: We should also check if we need to remove items from EXEC_PATH + ## FIXME: We should also check if we need to remove items from EXEC_PATH endif endfor endfunction
--- a/scripts/statistics/base/__quantile__.m +++ b/scripts/statistics/base/__quantile__.m @@ -47,7 +47,7 @@ p = p(:); ## Save length and set shape of samples. - ## TODO: does sort guarantee that NaN's come at the end? + ## FIXME: does sort guarantee that NaN's come at the end? x = sort (x); m = sum (! isnan (x)); mx = size (x, 1);
--- a/scripts/strings/strtok.m +++ b/scripts/strings/strtok.m @@ -26,7 +26,7 @@ ## ## @end deftypefn -## TODO: check what to do for a null delimiter +## FIXME: check what to do for a null delimiter function [tok, rem] = strtok (str, delim)
--- a/scripts/testfun/assert.m +++ b/scripts/testfun/assert.m @@ -51,10 +51,10 @@ ## @seealso{test} ## @end deftypefn -## TODO: Output throttling: don't print out the entire 100x100 matrix, -## TODO: but instead give a summary; don't print out the whole list, just -## TODO: say what the first different element is, etc. To do this, make -## TODO: the message generation type specific. +## FIXME: Output throttling: don't print out the entire 100x100 matrix, +## but instead give a summary; don't print out the whole list, just +## say what the first different element is, etc. To do this, make +## the message generation type specific. function assert (cond, varargin)
--- a/scripts/testfun/demo.m +++ b/scripts/testfun/demo.m @@ -70,9 +70,9 @@ ## @seealso{test, example} ## @end deftypefn -## TODO: modify subplot so that gnuplot_has_multiplot == 0 causes it to -## TODO: use the current figure window but pause if not plotting in the -## TODO: first subplot. +## FIXME: modify subplot so that gnuplot_has_multiplot == 0 causes it to +## use the current figure window but pause if not plotting in the +## first subplot. ## PKG_ADD: mark_as_command demo
--- a/scripts/testfun/speed.m +++ b/scripts/testfun/speed.m @@ -143,7 +143,7 @@ ## and @code{eval(example('speed',2))}. ## @end deftypefn -## TODO: consider two dimensional speedup surfaces for functions like kron. +## FIXME: consider two dimensional speedup surfaces for functions like kron. function [__order, __test_n, __tnew, __torig] ... = speed (__f1, __init, __max_n, __f2, __tol)
--- a/scripts/testfun/test.m +++ b/scripts/testfun/test.m @@ -68,10 +68,10 @@ ## @seealso{error, assert, fail, demo, example} ## @end deftypefn -## TODO: * Consider using keyword fail rather then error? This allows us -## TODO: to make a functional form of error blocks, which means we -## TODO: can include them in test sections which means that we can use -## TODO: octave flow control for both kinds of tests. +## FIXME: * Consider using keyword fail rather then error? This allows us +## to make a functional form of error blocks, which means we +## can include them in test sections which means that we can use +## octave flow control for both kinds of tests. ## PKG_ADD: mark_as_command test
--- a/scripts/time/datestr.m +++ b/scripts/time/datestr.m @@ -102,23 +102,23 @@ ## @seealso{datenum, datevec, date, clock, now, datetick} ## @end deftypefn -## TODO: parse arbitrary code strings. -## TODO: e.g., for Wednesday 2001-03-05 09:04:06 AM, use -## TODO: yy 01 -## TODO: yyyy 2001 -## TODO: m M -## TODO: mm 03 -## TODO: mmm Mar -## TODO: d W -## TODO: dd 05 -## TODO: ddd Wed -## TODO: HH 09 -## TODO: MM 04 -## TODO: SS 06 -## TODO: PM AM -## TODO: Vectorize. It is particularly easy since all the codes are -## TODO: fixed width. Just generate the parts in separate arrays and -## TODO: concatenate. +## FIXME: parse arbitrary code strings. +## e.g., for Wednesday 2001-03-05 09:04:06 AM, use +## yy 01 +## yyyy 2001 +## m M +## mm 03 +## mmm Mar +## d W +## dd 05 +## ddd Wed +## HH 09 +## MM 04 +## SS 06 +## PM AM +## FIXME: Vectorize. It is particularly easy since all the codes are +## fixed width. Just generate the parts in separate arrays and +## concatenate. ## Author: pkienzle <pkienzle@users.sf.net> ## Created: 10 October 2001 (CVS)
--- a/src/ov-bool.h +++ b/src/ov-bool.h @@ -158,7 +158,7 @@ SparseMatrix sparse_matrix_value (bool = false) const { return SparseMatrix (Matrix (1, 1, scalar)); } - // XXX FIXME XXX Need SparseComplexMatrix (Matrix) constructor!!! + // FIXME Need SparseComplexMatrix (Matrix) constructor!!! SparseComplexMatrix sparse_complex_matrix_value (bool = false) const { return SparseComplexMatrix (sparse_matrix_value ()); }
--- a/src/ov-float.h +++ b/src/ov-float.h @@ -159,7 +159,7 @@ SparseMatrix sparse_matrix_value (bool = false) const { return SparseMatrix (Matrix (1, 1, scalar)); } - // XXX FIXME XXX Need SparseComplexMatrix (Matrix) constructor!!! + // FIXME Need SparseComplexMatrix (Matrix) constructor!!! SparseComplexMatrix sparse_complex_matrix_value (bool = false) const { return SparseComplexMatrix (sparse_matrix_value ()); }
--- a/src/ov-scalar.h +++ b/src/ov-scalar.h @@ -160,7 +160,7 @@ SparseMatrix sparse_matrix_value (bool = false) const { return SparseMatrix (Matrix (1, 1, scalar)); } - // XXX FIXME XXX Need SparseComplexMatrix (Matrix) constructor!!! + // FIXME Need SparseComplexMatrix (Matrix) constructor!!! SparseComplexMatrix sparse_complex_matrix_value (bool = false) const { return SparseComplexMatrix (sparse_matrix_value ()); }