diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-25 16:59:06 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-25 16:59:06 +0100 |
commit | f19581be0262de07a006bd5910610047b1d99dc2 (patch) | |
tree | dbe0757f45b6d78829db234625e5fb0f257ee185 /FICS | |
parent | 9690e7a910a0d11ddc201b978596dbd2df637835 (diff) |
Reformatted ratstrii()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/utils.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index ceade5e..6fcd420 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -868,24 +868,26 @@ PUBLIC char *ratstr(int rat) return tmp[on - 1]; } -PUBLIC char *ratstrii(int rat, int reg) +PUBLIC char * +ratstrii(int rat, int reg) { - static int on = 0; - static char tmp[20][10]; + static char tmp[20][10]; + static int on = 0; + + if (on == 20) + on = 0; + if (rat) { + sprintf(tmp[on], "%4d", rat); + } else { + if (reg) { + sprintf(tmp[on], "----"); + } else { + sprintf(tmp[on], "++++"); + } + } - if (on == 20) - on = 0; - if (rat) { - sprintf(tmp[on], "%4d", rat); - } else { - if (reg) { - sprintf(tmp[on], "----"); - } else { - sprintf(tmp[on], "++++"); - } - } - on++; - return tmp[on - 1]; + on++; + return tmp[on - 1]; } /* |