aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/fns.h
blob: c0339c23069ae9c9929f4d808580d1a8c770a6a9 (plain)
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
104
105
106
107
/*
#pragma	varargck	argpos	warning	2
#pragma	varargck	argpos	warningew	2
*/

void	warning(Mntdir*, char*, ...);
void	warningew(Window*, Mntdir*, char*, ...);

#define	fbufalloc()	emalloc(BUFSIZE)
#define	fbuffree(x)	free(x)

void	plumblook(Plumbmsg *m);
void	plumbshow(Plumbmsg*m);
void	acmeputsnarf(void);
void	acmegetsnarf(void);
int	tempfile(void);
void	scrlresize(void);
Font*	getfont(int, int, char*);
char*	getarg(Text*, int, int, Rune**, int*);
char*	getbytearg(Text*, int, int, char**);
void	new(Text*, Text*, Text*, int, int, Rune*, int);
void	undo(Text*, Text*, Text*, int, int, Rune*, int);
void	scrsleep(uint);
void	savemouse(Window*);
int	restoremouse(Window*);
void	clearmouse(void);
void	allwindows(void(*)(Window*, void*), void*);
uint loadfile(int, uint, int*, int(*)(void*, uint, Rune*, int), void*, DigestState*);
void	movetodel(Window*);

Window*	errorwin(Mntdir*, int);
Window*	errorwinforwin(Window*);
Runestr cleanrname(Runestr);
void	run(Window*, char*, Rune*, int, int, char*, char*, int);
void fsysclose(void);
void	setcurtext(Text*, int);
int	isfilec(Rune);
void	rxinit(void);
int rxnull(void);
Runestr	dirname(Text*, Rune*, int);
void	error(char*);
void	cvttorunes(char*, int, Rune*, int*, int*, int*);
void*	tmalloc(uint);
void	tfree(void);
void	killprocs(void);
void	killtasks(void);
int	runeeq(Rune*, uint, Rune*, uint);
int	ALEF_tid(void);
void	iconinit(void);
Timer*	timerstart(int);
void	timerstop(Timer*);
void	timercancel(Timer*);
void	timerinit(void);
void	cut(Text*, Text*, Text*, int, int, Rune*, int);
void	paste(Text*, Text*, Text*, int, int, Rune*, int);
void	get(Text*, Text*, Text*, int, int, Rune*, int);
void	put(Text*, Text*, Text*, int, int, Rune*, int);
void	putfile(File*, int, int, Rune*, int);
void	fontx(Text*, Text*, Text*, int, int, Rune*, int);
#undef isalnum
#define isalnum acmeisalnum
int	isalnum(Rune);
void	execute(Text*, uint, uint, int, Text*);
int	search(Text*, Rune*, uint);
void	look3(Text*, uint, uint, int);
void	editcmd(Text*, Rune*, uint);
uint	min(uint, uint);
uint	max(uint, uint);
Window*	lookfile(Rune*, int);
Window*	lookid(int, int);
char*	runetobyte(Rune*, int);
Rune*	bytetorune(char*, int*);
void	fsysinit(void);
Mntdir*	fsysmount(Rune*, int, Rune**, int);
void		fsysdelid(Mntdir*);
void		fsysincid(Mntdir*);
Xfid*		respond(Xfid*, Fcall*, char*);
int		rxcompile(Rune*);
int		rgetc(void*, uint);
int		tgetc(void*, uint);
int		isaddrc(int);
int		isregexc(int);
void *emalloc(uint);
void *erealloc(void*, uint);
char	*estrdup(char*);
Range		address(uint, Text*, Range, Range, void*, uint, uint, int (*)(void*, uint),  int*, uint*);
int		rxexecute(Text*, Rune*, uint, uint, Rangeset*);
int		rxbexecute(Text*, uint, Rangeset*);
Window*	makenewwindow(Text *t);
int	expand(Text*, uint, uint, Expand*);
Rune*	skipbl(Rune*, int, int*);
Rune*	findbl(Rune*, int, int*);
char*	edittext(Window*, int, Rune*, int);
void		flushwarnings(void);
void		startplumbing(void);
long	nlcount(Text*, long, long, long*);
long	nlcounttopos(Text*, long, long, long);
Rune*	parsetag(Window*, int, int*);

Runestr	runestr(Rune*, uint);
Range range(int, int);

#define	runemalloc(a)		(Rune*)emalloc((a)*sizeof(Rune))
#define	runerealloc(a, b)	(Rune*)erealloc((a), (b)*sizeof(Rune))
#define	runemove(a, b, c)	memmove((a), (b), (c)*sizeof(Rune))

int	ismtpt(char*);