# HG changeset patch # User jwe # Date 1171938040 0 # Node ID a7a2f1596b4bfd40061daa6867d32f0c959cf211 # Parent 4905c543b3019d4195b8b6104c3e55a81dd6ee4b [project @ 2007-02-20 02:20:40 by jwe] diff -r 4905c543b301 -r a7a2f1596b4b scripts/ChangeLog --- a/scripts/ChangeLog Mon Feb 19 19:59:26 2007 +0000 +++ b/scripts/ChangeLog Tue Feb 20 02:20:40 2007 +0000 @@ -1,3 +1,10 @@ +2007-02-19 John W. Eaton + + * plot/__uiobject_alloc__.in: If next available element in + __uiobject_list__ is 0, grow list before doing anything else. + * plot/__uiobject_grow_list__.in: Only set __uiobject_head__ on + first call when size of __uiobject_list__ is 0. + 2007-02-16 John W. Eaton * miscellaneous/Makefile.in (SOURCES): Remove popen2.m from the list. diff -r 4905c543b301 -r a7a2f1596b4b scripts/plot/__uiobject_alloc__.in --- a/scripts/plot/__uiobject_alloc__.in Mon Feb 19 19:59:26 2007 +0000 +++ b/scripts/plot/__uiobject_alloc__.in Tue Feb 20 02:20:40 2007 +0000 @@ -30,7 +30,7 @@ __uiobject_globals__; if (nargin == 0) - if (! __uiobject_head__) + if (! (__uiobject_head__ && __uiobject_list__(__uiobject_head__).next)) __uiobject_grow_list__ (); endif idx = __uiobject_head__; diff -r 4905c543b301 -r a7a2f1596b4b scripts/plot/__uiobject_grow_list__.in --- a/scripts/plot/__uiobject_grow_list__.in Mon Feb 19 19:59:26 2007 +0000 +++ b/scripts/plot/__uiobject_grow_list__.in Tue Feb 20 02:20:40 2007 +0000 @@ -36,7 +36,9 @@ __uiobject_list__(new_size).in_use = false; __uiobject_list__(new_size).handle = NaN; __uiobject_list__(new_size).object = NaN; - if (curr_size) + if (curr_size == 0) + __uiobject_head__ = 1; + else __uiobject_list__(curr_size).next = curr_size+1; __uiobject_list__(curr_size).in_use = false; __uiobject_list__(curr_size).handle = NaN; @@ -48,8 +50,8 @@ __uiobject_list__(i).handle = NaN; __uiobject_list__(i).object = NaN; endfor - __uiobject_head__ = curr_size+1; else print_usage (); endif + endfunction