Fix issue in error handling, reported to and fixed by Axel Liljencrantz. Change val[0] and body[0] in env universal to val[1] and body[1] to support compilation with Sun Studio. Change default prompt to use pekdon instead of whoami as it does not exist under Solaris.

darcs-hash:20070822080052-cac88-326332f0df7d17ddca4a4496c93728a47f19bba5.gz
This commit is contained in:
Claes Nästén 2007-08-22 18:00:52 +10:00
parent 74a270ea32
commit c2c4b24174
4 changed files with 6 additions and 7 deletions

View File

@ -2526,9 +2526,9 @@ static int builtin_source( wchar_t ** argv )
if( res )
{
sb_printf( sb_err,
_( L"%ls: Error while reading file '%ls'\n" ),
argv[0],
argv[1]?argv[1]:L"<stdin>" );
_( L"%ls: Error while reading file '%ls'\n" ),
argv[0],
argv[1] );
}
/*

View File

@ -93,7 +93,7 @@
typedef struct var_uni_entry
{
int export; /**< Whether the variable should be exported */
wchar_t val[0]; /**< The value of the variable */
wchar_t val[1]; /**< The value of the variable */
}
var_uni_entry_t;
@ -113,7 +113,6 @@ void (*callback)( int type,
const wchar_t *key,
const wchar_t *val );
/**
Variable used by env_get_names to communicate auxiliary information
to add_key_to_hash

View File

@ -112,7 +112,7 @@ typedef struct
/**
Message body. The message must be allocated using enough memory to actually contain the message.
*/
char body[0];
char body[1];
}
message_t;

View File

@ -115,7 +115,7 @@ commence.
fish specific commands, meaning it will work even if fish is not
installed. This is used by read_i.
*/
#define DEFAULT_PROMPT L"whoami; echo @; hostname|cut -d . -f 1; echo \" \"; pwd; printf '> ';"
#define DEFAULT_PROMPT L"echo \"$USER@\"; hostname|cut -d . -f 1; echo \" \"; pwd; printf '> ';"
#define PROMPT_FUNCTION_NAME L"fish_prompt"