wdvi

network DVI viewer
Log | Files | Refs

commit ebda7f5a76d285afa22017ab4f77245ad0b433d7
parent 2cf5f5a077324185c14d1ba440c7085a38b2f92b
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Sat, 11 Mar 2023 18:15:18 +0000

cleanup myatopix()

- ansi function signature
- statement bodies on newline

Diffstat:
Mspecial.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/special.c b/special.c @@ -1016,8 +1016,7 @@ atopix(const char *arg, Boolean allow_minus) static unsigned int -myatopix(pp) - const char **pp; +myatopix(const char **pp) { unsigned int value; const char *cp = *pp; @@ -1025,9 +1024,11 @@ myatopix(pp) const char *p0, *p1; p0 = cp; - while ((*cp >= '0' && *cp <= '9') || *cp == '.') ++cp; + while ((*cp >= '0' && *cp <= '9') || *cp == '.') + ++cp; p1 = cp; - while (isspace(*cp)) ++cp; + while (isspace(*cp)) + ++cp; if (*cp >= 'a' && *cp <= 'z' && cp[1] >= 'a' && cp[1] <= 'z') { /* if units are present */ if (p1 - p0 <= XtNumber(scr) - 3) {