matches = 0;
uniquematch = NULL;
for (i = 0; i < credits.num_items; i++) {
- if (strncmp(nickname, credits.credits[i].nickname, strlen(nickname)) !=
- 0) {
+ if (strncasecmp(nickname, credits.credits[i].nickname,
+ strlen(nickname)) != 0) {
continue;
}
matches++;
cprintf("\r\nCompletion:\r\n");
matches = 0;
for (i = 0; i < credits.num_items; i++) {
- if (strncmp(nickname, credits.credits[i].nickname, len) != 0) {
+ if (strncasecmp(nickname, credits.credits[i].nickname, len) != 0) {
continue;
}
if (++matches == 5) {
return *c;
}
-char *format_euro(char *s, int maxlen, int cent) {
- if (snprintf(s, maxlen, EUR_FORMAT, cent / 100, cent % 100) > maxlen)
+char *format_euro(char *s, int maxlen, int32_t cent) {
+ int32_t euros, cents;
+ euros = cent / 100;
+ cents = abs(cent % 100);
+ if (snprintf(s, maxlen, EUR_FORMAT, euros, cents) > maxlen)
return NULL;
return s;
}