This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathio.h
103 lines (88 loc) · 2.31 KB
/
io.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* FED - Folding Editor
*
* By Shawn Hargreaves, 1994
*
* See README.TXT for copyright conditions
*
* Include wrapper for the system-specific IO routines.
*/
#ifndef IO_H
#define IO_H
#ifdef TARGET_DJGPP
#include "iodjgpp.h"
#else
#ifdef TARGET_CURSES
#include "iocurses.h"
#else
#ifdef TARGET_ALLEG
#include "ioalleg.h"
#else
#ifdef TARGET_WIN
#include "iowin.h"
#else
#error Unknown compile target
#endif
#endif
#endif
#endif
#define BACKSPACE 8
#define TAB 9
#define LF 10
#define FF 12
#define CR 13
#define ESC 27
#define CTRL_C 11779
#define CTRL_G 8711
#define CTRL_R 4882
#define UP_ARROW 18432
#define DOWN_ARROW 20480
#define LEFT_ARROW 19200
#define RIGHT_ARROW 19712
#define PAGE_UP 18688
#define PAGE_DOWN 20736
#define K_HOME 18176
#define K_END 20224
#define K_DELETE 21248
#define ESC_SCANCODE 283
extern int m_x, m_y, m_b;
void mouse_init();
void display_mouse();
void hide_mouse();
int mouse_changed(int *x, int *y);
int poll_mouse();
void set_mouse_pos(int x, int y);
void set_mouse_height(int h);
int mouse_dclick(int mode);
void term_init(int screenheight);
void term_exit();
void term_reinit(int wait);
void my_setcursor(int shape);
#ifdef TARGET_WIN
void pch(int c);
#else
void pch(unsigned char c);
#endif
void mywrite(char *s);
void del_to_eol();
void cr_scroll();
void screen_block(int s_s, int s_o, int s_g, int d_s, int d_o, int d_g, int w, int h);
char *save_screen(int x, int y, int w, int h);
void restore_screen(int x, int y, int w, int h, char *buf);
void clear_keybuf();
MYFILE *open_file(char *name, int mode);
int close_file(MYFILE *f);
int refill_buffer(MYFILE *f, int peek_flag);
int flush_buffer(MYFILE *f);
long file_time(char *p);
int search_path(char *result, char *prog, char *exts, char *var);
int find_program(char *name, char *ext);
int do_for_each_file(char *name, int (*call_back)(char *, int), int param);
int do_for_each_directory(char *name, int (*call_back)(char *, int), int param);
void windows_init();
int set_window_title(char *title);
int got_clipboard();
int got_clipboard_data();
int set_clipboard_data(char *data, int size);
char *get_clipboard_data(int *size);
#endif /* IO_H */