xref: /plan9/sys/src/cmd/acme/fns.h (revision 588d0145e19f8596f2f4442d05dd8a9eda147983)
1 #pragma	varargck	argpos	warning	2
2 
3 void	warning(Mntdir*, char*, ...);
4 
5 #define	fbufalloc()	emalloc(BUFSIZE)
6 #define	fbuffree(x)	free(x)
7 
8 void	plumblook(Plumbmsg*m);
9 void	plumbshow(Plumbmsg*m);
10 void	putsnarf(void);
11 void	getsnarf(void);
12 int	tempfile(void);
13 void	scrlresize(void);
14 Font*	getfont(int, int, char*);
15 char*	getarg(Text*, int, int, Rune**, int*);
16 char*	getbytearg(Text*, int, int, char**);
17 void	new(Text*, Text*, Text*, int, int, Rune*, int);
18 void	undo(Text*, Text*, Text*, int, int, Rune*, int);
19 char*	getname(Text*, Text*, Rune*, int, int);
20 void	scrsleep(uint);
21 void	savemouse(Window*);
22 int	restoremouse(Window*);
23 void	clearmouse(void);
24 void	allwindows(void(*)(Window*, void*), void*);
25 uint loadfile(int, uint, int*, int(*)(void*, uint, Rune*, int), void*);
26 void	movetodel(Window*);
27 
28 Window*	errorwin(Mntdir*, int);
29 Window*	errorwinforwin(Window*);
30 Runestr cleanrname(Runestr);
31 void	run(Window*, char*, Rune*, int, int, char*, char*, int);
32 void fsysclose(void);
33 void	setcurtext(Text*, int);
34 int	isfilec(Rune);
35 void	rxinit(void);
36 int rxnull(void);
37 Runestr	dirname(Text*, Rune*, int);
38 void	error(char*);
39 void	cvttorunes(char*, int, Rune*, int*, int*, int*);
40 void*	tmalloc(uint);
41 void	tfree(void);
42 void	killprocs(void);
43 void	killtasks(void);
44 int	runeeq(Rune*, uint, Rune*, uint);
45 int	ALEF_tid(void);
46 void	iconinit(void);
47 Timer*	timerstart(int);
48 void	timerstop(Timer*);
49 void	timercancel(Timer*);
50 void	timerinit(void);
51 void	cut(Text*, Text*, Text*, int, int, Rune*, int);
52 void	paste(Text*, Text*, Text*, int, int, Rune*, int);
53 void	get(Text*, Text*, Text*, int, int, Rune*, int);
54 void	put(Text*, Text*, Text*, int, int, Rune*, int);
55 void	putfile(File*, int, int, Rune*, int);
56 void	fontx(Text*, Text*, Text*, int, int, Rune*, int);
57 int	isalnum(Rune);
58 void	execute(Text*, uint, uint, int, Text*);
59 int	search(Text*, Rune*, uint);
60 void	look3(Text*, uint, uint, int);
61 void	editcmd(Text*, Rune*, uint);
62 uint	min(uint, uint);
63 uint	max(uint, uint);
64 Window*	lookfile(Rune*, int);
65 Window*	lookid(int, int);
66 char*	runetobyte(Rune*, int);
67 Rune*	bytetorune(char*, int*);
68 void	fsysinit(void);
69 Mntdir*	fsysmount(Rune*, int, Rune**, int);
70 void		fsysincid(Mntdir*);
71 void		fsysdelid(Mntdir*);
72 Xfid*		respond(Xfid*, Fcall*, char*);
73 int		rxcompile(Rune*);
74 int		rgetc(void*, uint);
75 int		tgetc(void*, uint);
76 int		isaddrc(int);
77 int		isregexc(int);
78 void *emalloc(uint);
79 void *erealloc(void*, uint);
80 char	*estrdup(char*);
81 Range		address(Mntdir*, Text*, Range, Range, void*, uint, uint, int (*)(void*, uint),  int*, uint*);
82 int		rxexecute(Text*, Rune*, uint, uint, Rangeset*);
83 int		rxbexecute(Text*, uint, Rangeset*);
84 Window*	makenewwindow(Text *t);
85 int	expand(Text*, uint, uint, Expand*);
86 Rune*	skipbl(Rune*, int, int*);
87 Rune*	findbl(Rune*, int, int*);
88 char*	edittext(Window*, int, Rune*, int);
89 void		flushwarnings(void);
90 
91 #define	runemalloc(a)		(Rune*)emalloc((a)*sizeof(Rune))
92 #define	runerealloc(a, b)	(Rune*)erealloc((a), (b)*sizeof(Rune))
93 #define	runemove(a, b, c)	memmove((a), (b), (c)*sizeof(Rune))
94