iconv: Bail out of the loop when an illegal sequence of bytes occurs.
[elinks/elinks-j605.git] / src / osdep / osdep.h
blobc31d5acee8282e9ee9ac5a165954137fb67c6c11
1 #ifndef EL__OSDEP_OSDEP_H
2 #define EL__OSDEP_OSDEP_H
4 #include "osdep/beos/beos.h"
5 #include "osdep/os2/os2.h"
6 #include "osdep/riscos/riscos.h"
7 #include "osdep/unix/unix.h"
8 #include "osdep/win32/win32.h"
10 #ifndef CHAR_DIR_SEP
11 #define CHAR_DIR_SEP '/'
12 #endif
14 #ifndef STRING_DIR_SEP
15 #define STRING_DIR_SEP "/"
16 #endif
18 int get_system_env(void);
19 int get_e(unsigned char *env);
20 int is_xterm(void);
21 int is_twterm(void);
22 void get_terminal_size(int, int *, int *);
23 void handle_terminal_resize(int, void (*)(void));
24 void unhandle_terminal_resize(int);
25 void set_bin(int);
26 int c_pipe(int *);
27 int get_input_handle(void);
28 int get_output_handle(void);
29 int get_ctl_handle(void);
30 void want_draw(void);
31 void done_draw(void);
32 void init_osdep(void);
33 void terminate_osdep(void);
34 void *handle_mouse(int, void (*)(void *, unsigned char *, int), void *);
35 void unhandle_mouse(void *);
36 void suspend_mouse(void *);
37 void resume_mouse(void *);
38 int start_thread(void (*)(void *, int), void *, int);
39 unsigned char *get_clipboard_text(void);
40 void set_clipboard_text(unsigned char *);
41 void set_window_title(unsigned char *, int codepage);
42 unsigned char *get_window_title(int codepage);
43 void block_stdin(void);
44 void unblock_stdin(void);
45 int exe(unsigned char *);
46 int resize_window(int, int, int, int);
47 int can_resize_window(int);
48 int can_open_os_shell(int);
49 void set_highpri(void);
51 #ifdef USE_OPEN_PREALLOC
52 int open_prealloc(char *, int, int, off_t);
53 void prealloc_truncate(int, off_t);
54 #else
55 static inline void prealloc_truncate(int x, int y) { }
56 #endif
58 unsigned char *get_system_str(int);
60 int set_nonblocking_fd(int);
61 int set_blocking_fd(int);
62 void set_ip_tos_throughput(int socket);
64 unsigned char *get_cwd(void);
65 void set_cwd(unsigned char *);
67 unsigned char *get_shell(void);
69 #ifdef HAVE_TERMIOS_H
70 #include <termios.h>
71 #endif
73 /* We define own cfmakeraw() wrapper because cfmakeraw() is broken on AIX,
74 * thus we fix it right away. We can also emulate cfmakeraw() if it is not
75 * available at all. Face it, we are just cool. */
76 void elinks_cfmakeraw(struct termios *t);
78 #ifndef user_appdata_directory
79 #define user_appdata_directory() NULL
80 #endif
82 #endif