void tcheck_getnbr(t_all *all, int j, int i, int errare) { while (i < j) { if (all->simple_buff[i] < 48 || all->simple_buff[i] > 57) { my_puterr("at the case "); my_put_nbr(i); my_puterr(" there is a wrong char ("); my_putchar_err(all->simple_buff[i]); my_puterr("), please remove-it\n"); errare += 1; } i += 1; } if (errare > 0) { my_puterr("Total of "); my_put_nbr(errare); my_puterr(" error(s) on the first line\n"); free(all->simple_buff); free(all); exit(EXIT_FAILURE); } }
void my_putstr_err(char *str) { int i; i = 0; while (str[i]) my_putchar_err(str[i++]); }
void my_putstr_err(char *str) { int i; i = -1; while (str && str[++i] != '\0') my_putchar_err(str[i]); }