diff options
author | Martin Ruckert <martin.ruckert@hm.edu> | 2022-01-19 13:28:43 +0000 |
---|---|---|
committer | Martin Ruckert <martin.ruckert@hm.edu> | 2022-01-19 13:28:43 +0000 |
commit | 7f3c341a9f19795e423e8821c34bbe37fea20aed (patch) | |
tree | 5a1ea5d468e06ccb9ad37a8ea743e2677b1ff3d9 /Build/source/texk/web2c/hitexdir/hintview/src/error.h | |
parent | 257dabf9b9d3e3ac387e7d16eb06b37c8096638b (diff) |
adding files to build the Linux HINT viewer (independent of the TL build)
git-svn-id: svn://tug.org/texlive/trunk@61658 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/hitexdir/hintview/src/error.h')
-rw-r--r-- | Build/source/texk/web2c/hitexdir/hintview/src/error.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/error.h b/Build/source/texk/web2c/hitexdir/hintview/src/error.h new file mode 100644 index 00000000000..d283a6cd52e --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/hintview/src/error.h @@ -0,0 +1,59 @@ +/*357:*/ +#line 7147 "hint.w" + +#ifndef _ERROR_H +#define _ERROR_H +#include <stdlib.h> +#include <stdio.h> +#include <setjmp.h> +#define MAX_HERROR 1024 +extern char herror_string[MAX_HERROR]; +extern FILE*hlog; +extern void hint_end(void); +extern jmp_buf error_exit; + +#ifdef _MSC_VER +#define snprintf(S,N,F,...) _snprintf(S,N,F,__VA_ARGS__) +#ifndef _CONSOLE +#pragma warning(disable : 4996) +extern void hmessage(char*title,char*format,...); +#define MESSAGE(...) hmessage("HINT",__VA_ARGS__) + +extern int herror(char*title,char*msg); +#define ERROR_MESSAGE herror("HINT ERROR",herror_string) +#endif +#endif + +#ifdef __ANDROID__ +#include <android/log.h> + +#define LOG(...) __android_log_print(ANDROID_LOG_DEBUG,__FILE__,__VA_ARGS__) +#define MESSAGE(...) __android_log_print(ANDROID_LOG_INFO,__FILE__, __VA_ARGS__) +#define ERROR_MESSAGE __android_log_print(ANDROID_LOG_ERROR,__FILE__,"ERROR: %s\n", herror_string) + +#endif + +#ifndef LOG +#define LOG(...) (fprintf(hlog,__VA_ARGS__),fflush(hlog)) +#endif + +#ifndef MESSAGE +#define MESSAGE(...) (fprintf(stderr,__VA_ARGS__),fflush(stderr)) +#endif + +#ifndef ERROR_MESSAGE +#define ERROR_MESSAGE fprintf(stderr,"ERROR: %s\n",herror_string) +#endif + +#ifndef QUIT +#define QUIT(...) (snprintf(herror_string,MAX_HERROR-1,__VA_ARGS__),\ + ERROR_MESSAGE,hint_end(),longjmp(error_exit,1)) +#endif + + +#ifndef HINT_TRY +#define HINT_TRY if ((herror_string[0]= 0,setjmp(error_exit)==0)) +#endif + +#endif +/*:357*/ |