127 /** |
127 /** |
128 * A string tokenizing context. |
128 * A string tokenizing context. |
129 */ |
129 */ |
130 typedef struct cx_strtok_ctx_s CxStrtokCtx; |
130 typedef struct cx_strtok_ctx_s CxStrtokCtx; |
131 |
131 |
132 /** |
|
133 * A literal initializer for an UCX string structure. |
|
134 * |
|
135 * The argument MUST be a string (const char*) \em literal. |
|
136 * |
|
137 * @param literal the string literal |
|
138 */ |
|
139 #define CX_STR(literal) {literal, sizeof(literal) - 1} |
|
140 |
|
141 #ifdef __cplusplus |
132 #ifdef __cplusplus |
142 extern "C" { |
133 extern "C" { |
|
134 |
|
135 /** |
|
136 * A literal initializer for an UCX string structure. |
|
137 * |
|
138 * @param literal the string literal |
|
139 */ |
|
140 #define CX_STR(literal) cxstring{literal, sizeof(literal) - 1} |
|
141 |
|
142 #else // __cplusplus |
|
143 |
|
144 /** |
|
145 * A literal initializer for an UCX string structure. |
|
146 * |
|
147 * The argument MUST be a string (const char*) \em literal. |
|
148 * |
|
149 * @param literal the string literal |
|
150 */ |
|
151 #define CX_STR(literal) (cxstring){literal, sizeof(literal) - 1} |
|
152 |
143 #endif |
153 #endif |
144 |
154 |
145 |
155 |
146 /** |
156 /** |
147 * Wraps a mutable string that must be zero-terminated. |
157 * Wraps a mutable string that must be zero-terminated. |