|
From: Paul P. <ppr...@us...> - 2004-08-13 15:57:09
|
Update of /cvsroot/forthy/forthy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22049 Modified Files: finternal.h fsystem.c Log Message: - fs_get_word_name() throws an exception if the parameter is not a word, and safely returns "" if not running protected Index: finternal.h =================================================================== RCS file: /cvsroot/forthy/forthy/finternal.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** finternal.h 5 Aug 2004 04:18:37 -0000 1.3 --- finternal.h 13 Aug 2004 15:56:54 -0000 1.4 *************** *** 23,26 **** --- 23,27 ---- #define INT_THROW(sys, result) { return fs_throw_it(sys, result); } #define VOID_THROW(sys, result) { fs_throw_it(sys, result); return; } + #define STRING_THROW(sys, result) { fs_throw_it(sys, result); return ""; } #endif Index: fsystem.c =================================================================== RCS file: /cvsroot/forthy/forthy/fsystem.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** fsystem.c 11 Aug 2004 14:33:43 -0000 1.18 --- fsystem.c 13 Aug 2004 15:56:55 -0000 1.19 *************** *** 1255,1259 **** if(!(ptr=value_dewordref(value))) ! return NULL; return string_set_temp_str(&(sys->temp_str), dict_get_name(ptr), TRUE); --- 1255,1261 ---- if(!(ptr=value_dewordref(value))) ! { ! STRING_THROW(sys, FS_BAD_REF); ! } return string_set_temp_str(&(sys->temp_str), dict_get_name(ptr), TRUE); |