aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_util.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-19 21:46:32 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-19 21:46:32 +1000
commit52b2525b0e07970d613ef6e9cc3da41583662e8b (patch)
tree41689cd7b3ec60b5a2a5bb08dad9f4b16dc3547c /parse_util.c
parentff96668151613be206a0c18ad7f88598b87ed30a (diff)
Make the callback for the file autoloader optional, and clarify its use
darcs-hash:20061019114632-ac50b-a0b3e1b3e7f26aa7cd674ade1a4fb2246f978ebc.gz
Diffstat (limited to 'parse_util.c')
-rw-r--r--parse_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse_util.c b/parse_util.c
index ca65a24f..7a01af9d 100644
--- a/parse_util.c
+++ b/parse_util.c
@@ -492,7 +492,8 @@ static void clear_hash_value( void *key, void *data, void *aux )
{
wchar_t *name = (wchar_t *)key;
void (*handler)(const wchar_t *)= (void (*)(const wchar_t *))aux;
- handler( name );
+ if( handler )
+ handler( name );
}
free( (void *)data );
@@ -717,7 +718,8 @@ int parse_util_load( const wchar_t *cmd,
if( hash_get( &loaded->is_loading, cmd ) )
{
debug( 0,
- _(L"Could not autoload item '%ls', it is already being autoloaded. This is a circular dependency in the autoloading scripts, please remove it."),
+ _( L"Could not autoload item '%ls', it is already being autoloaded. "
+ L"This is a circular dependency in the autoloading scripts, please remove it."),
cmd );
return 1;
}