56 #define ST(s) { (char*)s, sizeof(s)-1 } |
56 #define ST(s) { (char*)s, sizeof(s)-1 } |
57 |
57 |
58 /** Shortcut for the conversion of a C string to a <code>sstr_t</code>. */ |
58 /** Shortcut for the conversion of a C string to a <code>sstr_t</code>. */ |
59 #define S(s) sstrn((char*)s, sizeof(s)-1) |
59 #define S(s) sstrn((char*)s, sizeof(s)-1) |
60 |
60 |
|
61 /** Expands a sstr_t to printf arguments. */ |
|
62 #define SFMT(s) (int) (s).length, (s).ptr |
|
63 |
|
64 /** Format specifier for a sstr_t. */ |
|
65 #define PRIsstr ".*s" |
|
66 |
61 #ifdef __cplusplus |
67 #ifdef __cplusplus |
62 extern "C" { |
68 extern "C" { |
63 #endif |
69 #endif |
64 |
70 |
65 /** |
71 /** |