Minor cleanups

darcs-hash:20051129101303-ac50b-11843dc32a9d05037b907fe1ac5df6a90cb7dd36.gz
This commit is contained in:
axel 2005-11-29 20:13:03 +10:00
parent c2e6b07b35
commit 02981a1750
3 changed files with 8 additions and 13 deletions

View file

@ -1957,22 +1957,13 @@ static int builtin_complete( wchar_t **argv )
} }
/** /**
The source builtin. Can be called through either 'source' or The . (dot) builtin, sometimes called source. Evaluates the contents of a file.
'.'. Evaluates the contents of a file.
*/ */
static int builtin_source( wchar_t ** argv ) static int builtin_source( wchar_t ** argv )
{ {
int fd; int fd;
int res; int res;
/*
if( wcsstr( argv[1], L"fish_complete" ) )
{
fwprintf( stderr, L"Woot\n" );
return 0;
}
*/
if( (argv[1] == 0) || (argv[2]!=0) ) if( (argv[1] == 0) || (argv[2]!=0) )
{ {

2
env.c
View file

@ -186,7 +186,7 @@ static void start_fishd()
sb_init( &cmd ); sb_init( &cmd );
pw = getpwuid(getuid()); pw = getpwuid(getuid());
debug( 2, L"Spawning new copy of fishd" ); debug( 3, L"Spawning new copy of fishd" );
if( !pw ) if( !pw )
{ {

View file

@ -171,7 +171,7 @@ static void check_connection()
if( env_universal_server.killme ) if( env_universal_server.killme )
{ {
debug( 2, L"Lost connection to universal variable server." ); debug( 3, L"Lost connection to universal variable server." );
close( env_universal_server.fd ); close( env_universal_server.fd );
env_universal_server.fd = -1; env_universal_server.fd = -1;
env_universal_server.killme=0; env_universal_server.killme=0;
@ -190,7 +190,7 @@ static void reconnect()
if( get_socket_count >= RECONNECT_COUNT ) if( get_socket_count >= RECONNECT_COUNT )
return; return;
debug( 2, L"Get new fishd connection" ); debug( 3, L"Get new fishd connection" );
init = 0; init = 0;
env_universal_server.fd = get_socket(1); env_universal_server.fd = get_socket(1);
@ -259,6 +259,8 @@ int env_universal_read_all()
if( !init) if( !init)
return 0; return 0;
debug( 3, L"env_universal_read_all()" );
if( env_universal_server.fd == -1 ) if( env_universal_server.fd == -1 )
{ {
reconnect(); reconnect();
@ -287,11 +289,13 @@ wchar_t *env_universal_get( const wchar_t *name )
if( !name ) if( !name )
return 0; return 0;
debug( 3, L"env_universal_get( \"%ls\" )", name );
return env_universal_common_get( name ); return env_universal_common_get( name );
} }
int env_universal_get_export( const wchar_t *name ) int env_universal_get_export( const wchar_t *name )
{ {
debug( 3, L"env_universal_get_export()" );
return env_universal_common_get_export( name ); return env_universal_common_get_export( name );
} }