|
ALSA project - the C library reference
|
Error code handling routines. More...
Functions | |
| const char * | snd_strerror (int errnum) |
| Returns the message for an error code. | |
| snd_local_error_handler_t | snd_lib_error_set_local (snd_local_error_handler_t func) |
| Install local error handler. | |
| int | snd_lib_error_set_handler (snd_lib_error_handler_t handler) |
| Sets the error handler. | |
| const char * | snd_asoundlib_version (void) |
| Returns the ALSA sound library version in ASCII format. | |
| size_t | snd_strlcpy (char *dst, const char *src, size_t size) |
| Copy a C-string into a sized buffer. | |
| size_t | snd_strlcat (char *dst, const char *src, size_t size) |
| Append a C-string into a sized buffer. | |
Variables | |
| snd_lib_error_handler_t | snd_lib_error = snd_lib_error_default |
| snd_lib_error_handler_t | snd_err_msg = snd_err_msg_default |
Error code handling routines.
Error code handling routines.
| const char * snd_asoundlib_version | ( | void | ) |
Returns the ALSA sound library version in ASCII format.
| int snd_lib_error_set_handler | ( | snd_lib_error_handler_t | handler | ) |
Sets the error handler.
| handler | The pointer to the new error handler function. |
This function sets a new error handler, or (if handler is NULL) the default one which prints the error messages to stderr.
| snd_local_error_handler_t snd_lib_error_set_local | ( | snd_local_error_handler_t | func | ) |
Install local error handler.
| func | The local error handler function |
| Previous | local error handler function |
| const char * snd_strerror | ( | int | errnum | ) |
Returns the message for an error code.
| errnum | The error code number, which must be a system error code or an ALSA error code. |
| size_t snd_strlcat | ( | char * | dst, |
| const char * | src, | ||
| size_t | size ) |
Append a C-string into a sized buffer.
| dst | Where to append the string to |
| src | Where to copy the string from |
| size | Size of destination buffer |
| The | total string length (no trimming) |
The result is always a valid NUL-terminated string that fits in the buffer (unless, of course, the buffer size is zero). It does not pad out the result.
| size_t snd_strlcpy | ( | char * | dst, |
| const char * | src, | ||
| size_t | size ) |
Copy a C-string into a sized buffer.
| dst | Where to copy the string to |
| src | Where to copy the string from |
| size | Size of destination buffer |
| The | source string length |
The result is always a valid NUL-terminated string that fits in the buffer (unless, of course, the buffer size is zero). It does not pad out the result like strncpy() does.
| snd_lib_error_handler_t snd_err_msg = snd_err_msg_default |
The ALSA error message handler
| snd_lib_error_handler_t snd_lib_error = snd_lib_error_default |
Pointer to the error handler function. For internal use only.