]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/acme/fns.h
acme: import changes from plan9port (thanks jxy)
[plan9front.git] / sys / src / cmd / acme / fns.h
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     isspace(Rune);
58 int     isalnum(Rune);
59 void    execute(Text*, uint, uint, int, Text*);
60 int     search(Text*, Rune*, uint);
61 void    look3(Text*, uint, uint, int);
62 void    editcmd(Text*, Rune*, uint);
63 uint    min(uint, uint);
64 uint    max(uint, uint);
65 Window* lookfile(Rune*, int);
66 Window* lookid(int, int);
67 char*   runetobyte(Rune*, int);
68 Rune*   bytetorune(char*, int*);
69 void    fsysinit(void);
70 Mntdir* fsysmount(Rune*, int, Rune**, int);
71 void            fsysincid(Mntdir*);
72 void            fsysdelid(Mntdir*);
73 Xfid*           respond(Xfid*, Fcall*, char*);
74 int             rxcompile(Rune*);
75 int             rgetc(void*, uint);
76 int             tgetc(void*, uint);
77 int             isaddrc(int);
78 int             isregexc(int);
79 void *emalloc(uint);
80 void *erealloc(void*, uint);
81 char    *estrdup(char*);
82 Range           address(Mntdir*, Text*, Range, Range, void*, uint, uint, int (*)(void*, uint),  int*, uint*);
83 int             rxexecute(Text*, Rune*, uint, uint, Rangeset*);
84 int             rxbexecute(Text*, uint, Rangeset*);
85 Window* makenewwindow(Text *t);
86 int     expand(Text*, uint, uint, Expand*);
87 Rune*   skipbl(Rune*, int, int*);
88 Rune*   findbl(Rune*, int, int*);
89 char*   edittext(Window*, int, Rune*, int);
90 void            flushwarnings(void);
91 long    nlcount(Text*, long, long, long*);
92 long    nlcounttopos(Text*, long, long, long);
93
94 #define runemalloc(a)           (Rune*)emalloc((a)*sizeof(Rune))
95 #define runerealloc(a, b)       (Rune*)erealloc((a), (b)*sizeof(Rune))
96 #define runemove(a, b, c)       memmove((a), (b), (c)*sizeof(Rune))