File: common.h

package info (click to toggle)
sacc 1.00-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 132 kB
  • sloc: ansic: 1,586; makefile: 34
file content (37 lines) | stat: -rw-r--r-- 747 bytes parent folder | download
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
#define clear(p)	do { void **_p = (void **)(p); free(*_p); *_p = NULL; } while (0);

typedef struct item Item;
typedef struct dir Dir;

struct item {
	char type;
	char *username;
	char *selector;
	char *host;
	char *port;
	char *raw;
	char *tag;
	void *dat;
	Item *entry;
};

struct dir {
	Item *items;
	size_t nitems;
	size_t printoff;
	size_t curline;
};

#ifndef asprintf
int asprintf(char **s, const char *fmt, ...);
#endif /* asprintf */
void die(const char *fmt, ...);
size_t mbsprint(const char *s, size_t len);
const char *typedisplay(char t);
void uidisplay(Item *item);
Item *uiselectitem(Item *entry);
void uistatus(char *fmt, ...);
void uicleanup(void);
char *uiprompt(char *fmt, ...);
void uisetup(void);
void uisigwinch(int signal);