Loading...
Searching...
No Matches
error.c File Reference

Error code handling routines. More...

Include dependency graph for error.c:

## Functions

const char * | snd_strerror (int errnum)
| Returns the message for an error code.
snd_lib_log_handler_t | snd_lib_log_set_local (snd_lib_log_handler_t func)
| Install local log handler.
const char * | snd_lib_log_priority (int prio)
| Function to convert log priority level to text.
const char * | snd_lib_log_interface (int interface)
| Function to convert interface code to text.
int | snd_lib_log_filter (int prio, int interface, const char *configstr)
| Check if a log message should be shown based on LIBASOUND_DEBUG.
void | snd_lib_log (int prio, int interface, const char *file, int line, const char *function, int errcode, const char *fmt,...)
| Root log handler function.
void | snd_lib_check (int interface, const char *file, int line, const char *function, int errcode, const char *fmt,...)
| The check point function.
snd_lib_log_handler_t | snd_lib_log_set_handler (snd_lib_log_handler_t handler)
| Sets the log handler.
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_log_handler_t | snd_lib_vlog = snd_lib_vlog_default
snd_lib_error_handler_t | snd_lib_error = snd_lib_error_default

## Detailed Description

Error code handling routines.

Author
  Jaroslav Kysela perex.nosp@m.@per.nosp@m.ex.cz

Date
  1998-2001

Error code handling routines.

## Function Documentation

## snd_strlcat()

size_t snd_strlcat | ( | char * | dst,
|  | const char * | src,
|  | size_t | size )

Append a C-string into a sized buffer.

Parameters

  dst | Where to append the string to
  src | Where to copy the string from
  size | Size of destination buffer

Return values

  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.

## snd_strlcpy()

size_t snd_strlcpy | ( | char * | dst,
|  | const char * | src,
|  | size_t | size )

Copy a C-string into a sized buffer.

Parameters

  dst | Where to copy the string to
  src | Where to copy the string from
  size | Size of destination buffer

Return values

  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.