~mdw
/
sgt
/
halibut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for \cfg{input-charset}. Input files can now be in ASCII,
[sgt/halibut]
/
halibut.h
diff --git
a/halibut.h
b/halibut.h
index
da7a845
..
9aa2c59
100644
(file)
--- a/
halibut.h
+++ b/
halibut.h
@@
-6,6
+6,8
@@
#include <time.h>
#include <string.h>
#include <time.h>
#include <string.h>
+#include "charset.h"
+
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else
@@
-66,6
+68,10
@@
struct input_Tag {
filepos pos;
int reportcols; /* report column numbers in errors */
macrostack *stack; /* macro expansions in force */
filepos pos;
int reportcols; /* report column numbers in errors */
macrostack *stack; /* macro expansions in force */
+ int defcharset, charset; /* character sets for input files */
+ charset_state csstate;
+ wchar_t wc[16]; /* wide chars from input conversion */
+ int nwc, wcpos; /* size of, and position in, wc[] */
};
/*
};
/*
@@
-114,6
+120,10
@@
enum {
para_LcontPop, /* end continuation of list item */
para_QuotePush, /* begin block quote */
para_QuotePop, /* end block quote */
para_LcontPop, /* end continuation of list item */
para_QuotePush, /* begin block quote */
para_QuotePop, /* end block quote */
+ /*
+ * Back ends may define their own paragraph types beyond here,
+ * in case they need to use them internally.
+ */
para_NotParaType /* placeholder value */
};
para_NotParaType /* placeholder value */
};
@@
-153,7
+163,12
@@
enum {
word_XrefEnd, /* (invisible; no text) */
word_IndexRef, /* (always an invisible one) */
word_HyperLink, /* (invisible) */
word_XrefEnd, /* (invisible; no text) */
word_IndexRef, /* (always an invisible one) */
word_HyperLink, /* (invisible) */
- word_HyperEnd /* (also invisible; no text) */
+ word_HyperEnd, /* (also invisible; no text) */
+ /*
+ * Back ends may define their own word types beyond here, in
+ * case they need to use them internally.
+ */
+ word_NotWordType /* placeholder value */
};
/* aux values for attributed words */
enum {
};
/* aux values for attributed words */
enum {
@@
-326,7
+341,7
@@
struct tagWrappedLine {
int nspaces; /* number of whitespaces in line */
int shortfall; /* how much shorter than max width */
};
int nspaces; /* number of whitespaces in line */
int shortfall; /* how much shorter than max width */
};
-wrappedline *wrap_para(word *, int, int, int (*)(
word *)
);
+wrappedline *wrap_para(word *, int, int, int (*)(
void *, word *), void *, int
);
void wrap_free(wrappedline *);
/*
void wrap_free(wrappedline *);
/*