… | |
… | |
1084 | break; /* We have more information to do below this switch */ |
1084 | break; /* We have more information to do below this switch */ |
1085 | |
1085 | |
1086 | case POWER_CRYSTAL: |
1086 | case POWER_CRYSTAL: |
1087 | if (op->stats.maxsp > 1000) |
1087 | if (op->stats.maxsp > 1000) |
1088 | { /*higher capacity crystals */ |
1088 | { /*higher capacity crystals */ |
1089 | i = (op->stats.maxsp % 100) / 10; |
1089 | i = (op->stats.maxsp % 1000) / 100; |
|
|
1090 | |
1090 | if (i) |
1091 | if (i) |
1091 | snprintf (buf, MAX_BUF, "(capacity %d.%dk). It is ", op->stats.maxsp / 100, i); |
1092 | snprintf (buf, MAX_BUF, "(capacity %d.%dk). It is ", op->stats.maxsp / 1000, i); |
1092 | else |
1093 | else |
1093 | snprintf (buf, MAX_BUF, "(capacity %dk). It is ", op->stats.maxsp / 100); |
1094 | snprintf (buf, MAX_BUF, "(capacity %dk). It is ", op->stats.maxsp / 1000); |
1094 | } |
1095 | } |
1095 | else |
1096 | else |
1096 | snprintf (buf, MAX_BUF, "(capacity %d). It is ", op->stats.maxsp); |
1097 | snprintf (buf, MAX_BUF, "(capacity %d). It is ", op->stats.maxsp); |
|
|
1098 | |
1097 | strcat (retbuf, buf); |
1099 | strcat (retbuf, buf); |
1098 | i = (op->stats.sp * 10) / op->stats.maxsp; |
1100 | i = (op->stats.sp * 10) / op->stats.maxsp; |
1099 | if (op->stats.sp == 0) |
1101 | if (op->stats.sp == 0) |
1100 | strcat (retbuf, "empty."); |
1102 | strcat (retbuf, "empty."); |
1101 | else if (i == 0) |
1103 | else if (i == 0) |