mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-08-20 09:13:13 +08:00
Error print.
This commit is contained in:
parent
88caaa2004
commit
aa4e29f985
@ -945,11 +945,12 @@ mdb_date_to_string(MdbHandle *mdb, const char *fmt, void *buf, int start)
|
||||
// Sunday, February 4, 839 BC to Tuesday, November 28, 4637
|
||||
if (td < -1e6 || td > 1e6) {
|
||||
// an "invalid date" would perhaps be better than null (TODO)
|
||||
// fprintf(stderr, "Warning: mdb_date_to_string called on unsupported date with %f days.\n", td);
|
||||
text = g_strdup("");
|
||||
} else {
|
||||
text = g_malloc(mdb->bind_size);
|
||||
mdb_date_to_tm(td, &t);
|
||||
strftime(text, mdb->bind_size, mdb->date_fmt, &t);
|
||||
strftime(text, mdb->bind_size, fmt, &t);
|
||||
}
|
||||
|
||||
return text;
|
||||
@ -1051,9 +1052,6 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int
|
||||
size, text, mdb->bind_size);
|
||||
}
|
||||
break;
|
||||
case MDB_DATETIME:
|
||||
text = mdb_date_to_string(mdb, mdb->date_fmt, buf, start);
|
||||
break;
|
||||
case MDB_MEMO:
|
||||
text = mdb_memo_to_string(mdb, start, size);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user