result[write_index] = original[read_index];
if(result[write_index] == '%')
{
- // Place a duplicate % next to the one just read, to escape it
+ /* Place a duplicate % next to the one just read, to escape it */
result[++write_index] = '%';
}
}
snprintf(tmp, MAXSTR,"For test %d: Expected %s, got %s",
i, expected_msg, got_msg);
- // NOTE: ck_abort_msg() will take the passed string
- // and feed it to printf. We need to escape any
- // '%' found, else they will result in odd formatting
- // in ck_abort_msg().
+ /*
+ * NOTE: ck_abort_msg() will take the passed string
+ * and feed it to printf. We need to escape any
+ * '%' found, else they will result in odd formatting
+ * in ck_abort_msg().
+ */
char *emsg = escape_percent(tmp, MAXSTR);
free(tmp);
snprintf(tmp, MAXSTR,"Expected %s, got %s",
master_tests[_i].msg, msg);
- // NOTE: ck_abort_msg() will take the passed string
- // and feed it to printf. We need to escape any
- // '%' found, else they will result in odd formatting
- // in ck_abort_msg().
+ /*
+ * NOTE: ck_abort_msg() will take the passed string
+ * and feed it to printf. We need to escape any
+ * '%' found, else they will result in odd formatting
+ * in ck_abort_msg().
+ */
char *emsg = escape_percent(tmp, MAXSTR);
free(tmp);