unsigned int i;
for (i = 0; name[i]; i++) {
- if (isalnum(name[i]))
+ if (cisalnum(name[i]))
name[i] = toupper(name[i]);
else
name[i] = '_';
if (!ask(q))
continue;
- tmpname = maybe_temp_file(score, ".h", false, e->file->name);
+ tmpname = temp_file(score, ".h", e->file->name);
out = fopen(tmpname, "w");
if (!out)
err(1, "Opening %s", tmpname);
}
static void check_idempotent(struct manifest *m,
- bool keep,
unsigned int *timeleft, struct score *score)
{
struct ccan_file *f;
+ /* We don't fail ccanlint for this. */
+ score->pass = true;
+
list_for_each(&m->h_files, f, list) {
check_idem(f, score);
}
if (!score->error) {
- score->pass = true;
score->score = score->total;
}
}
.name = "Module headers are #ifndef/#define wrapped",
.check = check_idempotent,
.handle = handle_idem,
- .needs = ""
+ .needs = "info_exists main_header_exists"
};
REGISTER_TEST(headers_idempotent);