summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2014-03-28 15:33:53 +0000
committerTaco Hoekwater <taco@elvenkind.com>2014-03-28 15:33:53 +0000
commitcf765726d33562cf94dbd3608efb46ba0cc1e3e4 (patch)
treefa3553a9e22a3ddc42d818feb1474f893067777b /Build/source/texk/web2c/luatexdir/luatexcallbackids.h
parent137b56a5c65d26eec13dede7b8f398611aaa008d (diff)
check in luatex 0.79.0 (release version)
git-svn-id: svn://tug.org/texlive/trunk@33312 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luatexcallbackids.h')
-rw-r--r--Build/source/texk/web2c/luatexdir/luatexcallbackids.h47
1 files changed, 46 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luatexcallbackids.h b/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
index 8a8b3baa253..c05e4f6024e 100644
--- a/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
+++ b/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: luatexcallbackids.h 4877 2014-03-14 01:26:05Z luigi $ */
+/* $Id: luatexcallbackids.h 4956 2014-03-28 12:12:17Z luigi $ */
#ifndef LUATEXCALLBACKIDS_H
#define LUATEXCALLBACKIDS_H
@@ -60,6 +60,8 @@ typedef enum {
finish_pdffile_callback,
finish_pdfpage_callback,
pre_dump_callback,
+ start_file_callback, stop_file_callback,
+ show_error_message_callback,show_lua_error_hook_callback,
total_callbacks
} callback_callback_types;
@@ -94,5 +96,48 @@ extern char *get_lua_name(int i);
extern char *luatex_find_file(const char *s, int callback_index);
extern int readbinfile(FILE * f, unsigned char **b, int *s);
+#define filetype_unknown 0
+#define filetype_tex 1
+#define filetype_map 2
+#define filetype_image 3
+#define filetype_subset 4
+#define filetype_font 5
+
+static const char *const filetypes_left[] = { "?", "(", "{", "<", "<", "<<" } ;
+static const char *const filetypes_right[] = { "?", ")", "}", ">", ">", ">>" } ;
+
+#define report_start_file(left,name) do { \
+ if (tracefilenames) { \
+ int report_id = callback_defined(start_file_callback); \
+ if (report_id == 0) { \
+ if (left == 1) { \
+ /* we only do this for traditional name reporting, normally name is iname */ \
+ if (term_offset + strlen(name) > max_print_line - 2) \
+ print_ln(); \
+ else if ((term_offset > 0) || (file_offset > 0)) \
+ print_char(' '); \
+ tex_printf("%s", filetypes_left[left]); \
+ tprint_file_name(NULL, (unsigned char *) name, NULL); \
+ } else { \
+ tex_printf("%s", filetypes_left[left]); \
+ tex_printf("%s", (unsigned char *) name); \
+ } \
+ } else { \
+ /* (void) run_callback(report_id, "dS->",left,(unsigned char *) fullnameoffile); */ \
+ (void) run_callback(report_id, "dS->",left,name); \
+ } \
+ } \
+} while (0)
+
+#define report_stop_file(right) do { \
+ if (tracefilenames) { \
+ int report_id = callback_defined(stop_file_callback); \
+ if (report_id == 0) { \
+ tex_printf("%s", filetypes_right[right]); \
+ } else { \
+ (void) run_callback(report_id, "d->",right); \
+ } \
+ } \
+} while (0)
#endif