P99
|
◆ P99_STRCATS
Value:
p00_strcat_terminate \
(P99_BIGFUNC \
(p00_strcat, \
P99_NARG(TARG, __VA_ARGS__), \
(&(p00_strcat_state){ .p00_buf = (TARG), .p00_pos = 0 }), \
__VA_ARGS__))
Append all argument strings after TARG to TARG. TARG should be compatible with This macro ensures linear complexity in the operation. In particular each position in the argument strings is accessed at most twice, once by a call to strlen and once by a call to memcpy. This uses some small inlined helper functions, since the repeated use of bare The resulting replacement produced by this macro evaluates each of the arguments at most once. |