Debian Codegraph @

texk/dviljk/win32/stackenv.h

raw
1 #ifndef _STACKENV_H_
2
3 #define _STACKENV_H_
4
5 #include "mktexlib.h"
6
7 /*
8 We are keeping trace of the environment (ie: cwd, file redirections)
9 with the help of these ops and structures. There is a global stack
10 inidcating wich actions have been taken.
11 */
12 typedef enum { CHDIR = 1, REDIRECT } op_env;
13 typedef struct mod_env {
14 op_env op;
15 union {
16 char *path;
17 int oldfd[3];
18 } data;
19 } mod_env;
20
21 /* from stackenv.c */
22 extern void oops(const char *, ...);
23 #ifdef __GNUC__
24 extern void mt_exit(int) __attribute__((noreturn));
25 #else
26 extern MKTEXDLL void mt_exit(int);
27 #endif
28 extern MKTEXDLL void pushd(char *);
29 extern MKTEXDLL void popd(void);
30 extern MKTEXDLL void popenv(void);
31 extern char *peek_dir(int);
32 extern MKTEXDLL void push_fd(int [3]);
33 extern MKTEXDLL void pop_fd(void);
34 extern MKTEXDLL void start_redirection(int);
35 #ifdef _WIN32
36 /* extern void mt_exit(int); */
37 extern MKTEXDLL int sigint_handler(DWORD);
38 #else
39 extern void sigint_handler(int);
40 #endif
41
42 typedef void (__cdecl * pfnOutputAndCleanup)(int);
43 extern MKTEXDLL pfnOutputAndCleanup output_and_cleanup_function;
44
45 extern MKTEXDLL int redirect_stdout;
46 #endif /* _STACKENV_H_ */