Merge branch 'master' of github.com:dragonfly-science/mdbtools into merge-108

Merge in pull request #108 with a few changes:

* Use the newer mdb_print_col function

* Redefine the last argument of mdb_print_col to be a flags argument

* Rename and redefine the BINEXPORT enums. While technically public,
  these were never intended as a public API.

* Name the command line option --escape-c
This commit is contained in:
Evan Miller
2020-12-19 13:21:32 -05:00
4 changed files with 74 additions and 43 deletions

View File

@@ -185,10 +185,11 @@ enum {
/* csv export binary options */
enum {
MDB_BINEXPORT_STRIP,
MDB_BINEXPORT_RAW,
MDB_BINEXPORT_OCTAL,
MDB_BINEXPORT_HEXADECIMAL
MDB_EXPORT_BINARY_STRIP = (1 << 0),
MDB_EXPORT_BINARY_RAW = (1 << 1),
MDB_EXPORT_BINARY_OCTAL = (1 << 2),
MDB_EXPORT_BINARY_HEXADECIMAL = (1 << 3),
MDB_EXPORT_ESCAPE_CONTROL_CHARS = (1 << 4)
};
#define IS_JET4(mdb) (mdb->f->jet_version==MDB_VER_JET4) /* obsolete */
@@ -546,7 +547,7 @@ void mdb_register_backend(MdbHandle *mdb, char *backend_name, guint32 capabiliti
gchar* (*quote_schema_name)(const gchar*, const gchar*));
int mdb_set_default_backend(MdbHandle *mdb, const char *backend_name);
void mdb_print_schema(MdbHandle *mdb, FILE *outfile, char *tabname, char *dbnamespace, guint32 export_options);
void mdb_print_col(FILE *outfile, gchar *col_val, int quote_text, int col_type, int bin_len, char *quote_char, char *escape_char, int bin_mode);
void mdb_print_col(FILE *outfile, gchar *col_val, int quote_text, int col_type, int bin_len, char *quote_char, char *escape_char, int flags);
/* sargs.c */
int mdb_test_sargs(MdbTableDef *table, MdbField *fields, int num_fields);