Basic support for WordPerfect files

This commit is contained in:
2021-09-06 14:06:56 -04:00
parent 75ff57fd94
commit fe53e1a219
6 changed files with 357 additions and 22 deletions

23
libscan/wpd/wpd.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef SIST2_WPD_H
#define SIST2_WPD_H
#include "../scan.h"
#include "../util.h"
typedef struct {
long content_size;
log_callback_t log;
logf_callback_t logf;
unsigned int wpd_mime;
} scan_wpd_ctx_t;
scan_code_t parse_wpd(scan_wpd_ctx_t *ctx, vfile_t *f, document_t *doc);
__always_inline
static int is_wpd(scan_wpd_ctx_t *ctx, unsigned int mime) {
return mime == ctx->wpd_mime;
}
#endif