Increase fish robustness by improving signal handling when forking jobs and minor signal handling improvements

darcs-hash:20051014114033-ac50b-8d0f6274ac590f1b6dbe82c55366f44ed7debf20.gz
This commit is contained in:
axel
2005-10-14 21:40:33 +10:00
parent f321855c02
commit 0ebf6db4b9
17 changed files with 355 additions and 292 deletions

44
wutil.c
View File

@@ -194,23 +194,26 @@ void wperror(const wchar_t *s)
#if !HAVE_WPRINTF
/*
Here is my own implementation of *wprintf, included since NetBSD does
not provide one of it's own.
*/
/**
This function is defined to help vgwprintf when it wants to call
itself recursively
*/
static int gwprintf( void (*writer)(wchar_t),
const wchar_t *filter,
... );
Generic formatting function. All other string formatting functions
are secretly a wrapper around this function. vgprintf does not
implement all the filters supported by printf, only those that are
currently used by fish. vgprintf internally uses snprintf to
implement the %f %d and %u filters.
Currently supported functionality:
/**
Generic formatting function. All other formatting functions are
secretly a wrapper around this function.
- precision specification, both through .* and .N
- width specification through *
- long versions of all filters thorugh l and ll prefix
- Character outout using %c
- String output through %s
- Floating point number output through %f
- Integer output through %d or %i
- Unsigned integer output through %u
For a full description on the usage of *printf, see use 'man 3 printf'.
*/
static int vgwprintf( void (*writer)(wchar_t),
const wchar_t *filter,
@@ -530,21 +533,6 @@ static int vgwprintf( void (*writer)(wchar_t),
return count;
}
static int gwprintf( void (*writer)(wchar_t),
const wchar_t *filter,
... )
{
va_list va;
int written;
va_start( va, filter );
written=vgwprintf( writer,
filter,
va );
va_end( va );
return written;
}
/**
Holds data for swprintf writer
*/