mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-26 07:57:57 -04:00
globa: Export snd_strlcpy()
Export snd_strlcpy() for use in the Topology2.0 pre-processor in alsatplg. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
c90834b8d4
commit
7c6e359954
2 changed files with 13 additions and 1 deletions
|
|
@ -153,6 +153,19 @@ typedef struct timeval snd_timestamp_t;
|
||||||
/** Hi-res timestamp */
|
/** Hi-res timestamp */
|
||||||
typedef struct timespec snd_htimestamp_t;
|
typedef struct timespec snd_htimestamp_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Copy a C-string into a sized buffer
|
||||||
|
* \param dst Where to copy the string to
|
||||||
|
* \param src Where to copy the string from
|
||||||
|
* \param size Size of destination buffer
|
||||||
|
* \retval 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.
|
||||||
|
*/
|
||||||
|
size_t snd_strlcpy(char *dst, const char *src, size_t size);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,6 @@ int safe_strtol(const char *str, long *val);
|
||||||
|
|
||||||
int snd_send_fd(int sock, void *data, size_t len, int fd);
|
int snd_send_fd(int sock, void *data, size_t len, int fd);
|
||||||
int snd_receive_fd(int sock, void *data, size_t len, int *fd);
|
int snd_receive_fd(int sock, void *data, size_t len, int *fd);
|
||||||
size_t snd_strlcpy(char *dst, const char *src, size_t size);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* error messages
|
* error messages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue