static int xlsx_handle_stringval (const char *s, int r, int c, PRN *prn) { if (import_na_string(s)) { return 0; /* OK */ } else if (*s == '\0') { return 0; /* sigh */ } else { pprintf(prn, _("Expected numeric data, found string:\n" "'%s' at row %d, column %d\n"), s, r, c); return E_DATA; } }
static int stray_numeric (int vtype, char *tmp, double *x) { if (vtype == VALUE_STRING) { if (string_is_blank(tmp)) { *x = NADBL; return 1; } else if (import_na_string(tmp)) { *x = NADBL; return 1; } else if (numeric_string(tmp)) { *x = atof(tmp); return 1; } } return 0; }