// This is a replacement for atol. // I mostly use this for when dealing with // money on my MUD because I display it everywhere // With commas. It only makes sense the user can // type it in like this: deposit 10,000 // To change that you would need to make some // small changed to your is_number function so that // ',' is a digit. long p_atol(char *ptr) { char *rewind = strdup(ptr); char *p = rewind; int amt; for(;*rewind != '\0';++rewind) if (*rewind == ',') memmove(rewind,rewind+1,strlen(rewind)); amt = atoi(p); free(p); return amt; }