- char *p = s; \
- char *q = strchr(p, c); \
- if (q == 0) \
- t_error("strchr(%s,%s) returned 0, wanted str+%d\n", #s, #c, n); \
- else if (q - p != n) \
- t_error("strchr(%s,%s) returned str+%d, wanted str+%d\n", #s, #c, q-p, n); \
+ int align; \
+ for (align=0; align<8; align++) { \
+ char *p = aligncpy(s, sizeof s, align); \
+ char *q = strchr(p, c); \
+ if (q == 0) \
+ t_error("strchr(%s,%s) with align=%d returned 0, wanted str+%d\n", #s, #c, align, n); \
+ else if (q - p != n) \
+ t_error("strchr(%s,%s) with align=%d returned str+%d, wanted str+%d\n", #s, #c, align, q-p, n); \
+ } \