25 #include <freetds/pushvis.h> 
   27 extern const struct tds_dstr tds_str_empty;
 
   35 #if ENABLE_EXTRA_CHECKS 
   38 char *tds_dstr_buf(
DSTR * s);
 
   39 size_t tds_dstr_len(
DSTR * s);
 
   42 #define tds_dstr_init(s) \ 
   43     do { *(s) = (struct tds_dstr*) &tds_str_empty; } while(0) 
   46 #define tds_dstr_isempty(s) \ 
   47     ((*(s))->dstr_size == 0) 
   48 #define tds_dstr_buf(s) \ 
   50 #define tds_dstr_len(s) \ 
   54 #define tds_dstr_cstr(s) \ 
   55     ((const char* ) tds_dstr_buf(s)) 
   61 #define tds_dstr_empty(s) \ 
   64 #if ENABLE_EXTRA_CHECKS && defined(__GNUC__) && __GNUC__ >= 4 
   65 #define TDS_WUR __attribute__ ((__warn_unused_result__)) 
   81 #include <freetds/popvis.h> 
DSTR * tds_dstr_setlen(DSTR *s, size_t length)
limit length of string, MUST be <= current length 
Definition: tdsstring.c:142
#define tds_dstr_isempty(s)
test if string is empty 
Definition: string.h:46
DSTR * tds_dstr_copyn(DSTR *s, const char *src, size_t length)
Set string to a given buffer of characters. 
Definition: tdsstring.c:80
Structure to hold a string. 
Definition: tds.h:93
DSTR * tds_dstr_set(DSTR *s, char *src)
set a string from another buffer. 
Definition: tdsstring.c:110
DSTR * tds_dstr_alloc(DSTR *s, size_t length)
allocate space for length char 
Definition: tdsstring.c:162
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another 
Definition: tdsstring.c:125
#define tds_dstr_init(s)
init a string with empty 
Definition: string.h:42
void tds_dstr_zero(DSTR *s)
clear all string filling with zeroes (mainly for security reason) 
Definition: tdsstring.c:58
void tds_dstr_free(DSTR *s)
free string 
Definition: tdsstring.c:65