cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit d05ebf8bed8ac45b50263c85ce1c0d2327d66d55
parent fd836460ae1f1879bd27cff2e4a60d29ab24de43
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  9 Mar 2020 01:58:39 -0700

token: Rename some functions

Diffstat:
Mcc.h | 4++--
Mmain.c | 2+-
Mpp.c | 4++--
Mtoken.c | 4++--
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cc.h b/cc.h @@ -370,8 +370,8 @@ struct init { extern struct token tok; extern const char *tokstr[]; -void tokprint(const struct token *); -void tokdesc(char *, size_t, enum tokenkind, const char *); +void tokenprint(const struct token *); +void tokendesc(char *, size_t, enum tokenkind, const char *); _Noreturn void error(const struct location *, const char *, ...); /* scan */ diff --git a/main.c b/main.c @@ -51,7 +51,7 @@ main(int argc, char *argv[]) ppinit(); if (pponly) { while (tok.kind != TEOF) { - tokprint(&tok); + tokenprint(&tok); next(); } } else { diff --git a/pp.c b/pp.c @@ -136,8 +136,8 @@ expect(enum tokenkind kind, const char *msg) char *lit, want[64], got[64]; if (tok.kind != kind) { - tokdesc(want, sizeof(want), kind, NULL); - tokdesc(got, sizeof(got), tok.kind, tok.lit); + tokendesc(want, sizeof(want), kind, NULL); + tokendesc(got, sizeof(got), tok.kind, tok.lit); error(&tok.loc, "expected %s %s, saw %s", want, msg, got); } lit = tok.lit; diff --git a/token.c b/token.c @@ -112,7 +112,7 @@ const char *tokstr[] = { }; void -tokprint(const struct token *t) +tokenprint(const struct token *t) { const char *str; @@ -137,7 +137,7 @@ tokprint(const struct token *t) } void -tokdesc(char *buf, size_t len, enum tokenkind kind, const char *lit) +tokendesc(char *buf, size_t len, enum tokenkind kind, const char *lit) { const char *class; bool quote;