plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

fns.h (3359B)


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