diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-20 16:46:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-20 16:46:04 +0000 |
commit | f45f622c8ebfa925e3b5340d31a0b4f9380ff675 (patch) | |
tree | 30c393373586e5d6d990ecf3f7c77cb6d9a105d9 /chars.c | |
parent | c64d9ad4033a749b71419ced2dc27c0b4a787818 (diff) | |
download | mandoc-f45f622c8ebfa925e3b5340d31a0b4f9380ff675.tar.gz |
KNF: case (FOO): -> case FOO:, remove /* LINTED */ and /* ARGSUSED */,
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
Diffstat (limited to 'chars.c')
-rw-r--r-- | chars.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -52,9 +52,10 @@ struct mchars { struct ln **htab; }; -static const struct ln *find(const struct mchars *, +static const struct ln *find(const struct mchars *, const char *, size_t); + void mchars_free(struct mchars *arg) { @@ -111,18 +112,18 @@ mchars_spec2cp(const struct mchars *arg, const char *p, size_t sz) char mchars_num2char(const char *p, size_t sz) { - int i; + int i; if ((i = mandoc_strntoi(p, sz, 10)) < 0) return('\0'); - return(i > 0 && i < 256 && isprint(i) ? - /* LINTED */ i : '\0'); + + return(i > 0 && i < 256 && isprint(i) ? i : '\0'); } int mchars_num2uc(const char *p, size_t sz) { - int i; + int i; if ((i = mandoc_strntoi(p, sz, 16)) < 0) return('\0'); @@ -131,7 +132,7 @@ mchars_num2uc(const char *p, size_t sz) } const char * -mchars_spec2str(const struct mchars *arg, +mchars_spec2str(const struct mchars *arg, const char *p, size_t sz, size_t *rsz) { const struct ln *ln; @@ -160,8 +161,8 @@ find(const struct mchars *tab, const char *p, size_t sz) hash = (int)p[0] - PRINT_LO; for (pp = tab->htab[hash]; pp; pp = pp->next) - if (0 == strncmp(pp->code, p, sz) && - '\0' == pp->code[(int)sz]) + if (0 == strncmp(pp->code, p, sz) && + '\0' == pp->code[(int)sz]) return(pp); return(NULL); |