From bug-octave-request at bevo dot che dot wisc dot edu Thu Jan 8 12:11:10 1998 Subject: function name != file name => load broken From: "John W. Eaton" To: Frederic Gobry Cc: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 8 Jan 1998 12:06:18 -0600 On 8-Jan-1998, Frederic Gobry wrote: | Bug report for Octave 2.0.9 configured for sparc-sun-solaris2.5.1 | | Description: | ----------- | | When I create a file named identic.m that contains the definition of a | function whose name isn't `identic', the builtin function `load' doesn't | work anymore... (the filename seems to be mandatory, whereas any function | name seems to "work") | | Repeat-By: | --------- | | Create the file `identic.m' somewhere in octave's LOADPATH containing the | following lines : | | function broker | endfunction | | ...launch octave and type `identic' or even `which identic'. | Then when I try to use the `load' function, I get : | | >> load foo | parse error: | | >>> load foo Please try the following patch. Thanks! jwe Thu Jan 8 11:54:33 1998 John W. Eaton * symtab.cc (symbol_table::rename): Properly insert new item at the front of the list to avoid losing the rest of the items. *** octave-2.0.9.95/src/symtab.cc Fri Nov 21 14:36:40 1997 --- src/symtab.cc Thu Jan 8 11:54:27 1998 *************** *** 930,935 **** --- 930,936 ---- prev->chain (ptr->next ()); index = hash (new_name) & HASH_MASK; + ptr->chain (table[index].next ()); table[index].chain (ptr); ptr->rename (new_name);