format a characteristic value, accommodating Strength's strangeness */
| 284 | |
| 285 | /* format a characteristic value, accommodating Strength's strangeness */ |
| 286 | staticfn char * |
| 287 | attrval( |
| 288 | int attrindx, |
| 289 | int attrvalue, |
| 290 | char resultbuf[]) /* should be at least [7] to hold "18/100\0" */ |
| 291 | { |
| 292 | if (attrindx != A_STR || attrvalue <= 18) |
| 293 | Sprintf(resultbuf, "%d", attrvalue); |
| 294 | else if (attrvalue > STR18(100)) /* 19 to 25 */ |
| 295 | Sprintf(resultbuf, "%d", attrvalue - 100); |
| 296 | else /* simplify "18/\**" to be "18/100" */ |
| 297 | Sprintf(resultbuf, "18/%02d", attrvalue - 18); |
| 298 | return resultbuf; |
| 299 | } |
| 300 | |
| 301 | /* format urealtime.realtime as |
| 302 | " D days, H hours, M minutes and S seconds" |
no outgoing calls
no test coverage detected