File: wily.h

package info (click to toggle)
wily 0.13.33-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,500 kB
  • ctags: 1,720
  • sloc: ansic: 12,830; sh: 245; makefile: 188
file content (46 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (2)
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
#ifndef WILY_H
#define WILY_H

#include <u.h>
#include <libc.h>
#include <libg.h>
#include <frame.h>
#include <msg.h>

#include <assert.h>
#define IMPLIES(a,b) (!(a)||(b))

#include <sys/types.h>
#include <sys/stat.h>
#include "const.h"

typedef struct stat Stat;
typedef char	Path[MAXPATH];
typedef Rune	RPath[MAXPATH];

typedef struct View View;	/* see view.h */
typedef struct Scroll Scroll;	/* see scroll.c */
typedef struct Text	Text;	/* see text.h */
typedef struct Data Data;	/* see data.h */
typedef struct Undo Undo;	/* see undo.c */
typedef struct Tile Tile;		/* see tile.h */
typedef struct Rstring Rstring;
typedef struct Mbuf Mbuf;	

struct Mbuf {
	char		*buf;	/* alloced initially, never freed */
	int		alloced;
	int		n;
};

struct Rstring { Rune	*r0, *r1; };	
	/* elements of the Rstring are >= r0 and < r1 */
#define RSLEN(r) ((r).r1 -(r).r0)
#define RSOK(r) ((r).r1 >= (r).r0)
#define RSFREE(r) free((r).r0)

/* GLOBALS */
#include "global.h"
#include "proto.h"

#endif