mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-04 18:27:36 +00:00
3abb7730b2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3772 d0543943-73ff-0310-b7d9-9358b9ac24b2
16 lines
385 B
C
16 lines
385 B
C
#ifndef SSTRING_H_INCLUDED
|
|
#define SSTRING_H_INCLUDED
|
|
|
|
/* This file contains string functions that are cognizant of the
|
|
declared size of the destination data structure.
|
|
*/
|
|
|
|
|
|
/* Copy string pointed by B to array A with size checking. */
|
|
#define SSTRCPY(A,B) \
|
|
(strncpy((A), (B), sizeof(A)), *((A)+sizeof(A)-1) = '\0')
|
|
#define SSTRCMP(A,B) \
|
|
(strncmp((A), (B), sizeof(A)))
|
|
|
|
#endif
|