#include "ClientSocket.h"
static const struct default_language_entry msgtab[] = {
- {"TIME_MASK_2_ITEMS", "%s and %s"},
- {"TIME_MASK_3_ITEMS", "%s, %s and %s"},
+ {"TIME_MASK_2_ITEMS", "%s and %s"}, /* {ARGS: "2 days", "1 hour"} */
+ {"TIME_MASK_3_ITEMS", "%s, %s and %s"}, /* {ARGS: "2 days", "1 hour", "20 minutes"} */
{"TIME_YEAR", "year"},
{"TIME_YEARS", "years"},
{"TIME_MONTH", "month"},
}
buf[p++] = ' ';
}
- buf[p-1] = '\0';
+ buf[(p ? p-1 : 0)] = '\0';
}
return buf;
}
int unit_multiplikator;
while(*str) {
p = str;
+ while(*p && !isdigit(*p)) //skip leading chars
+ p++;
+ str = p;
while(*p && isdigit(*p)) //get the value
p++;
tmpchar = *p;
*p = '\0';
cvalue = isdigit(*str) ? atoi(str) : 0;
*p = tmpchar;
+ while(*p == ' ') //skip spaces
+ p++;
str = p;
while(*p && !isdigit(*p)) //get the unit
p++;