/* static */
static unsigned int
-textnw(const char *text, unsigned int len)
-{
+textnw(const char *text, unsigned int len) {
XRectangle r;
if(dc.font.set) {
/* extern */
void
-drawtext(const char *text, unsigned long col[ColLast])
-{
+drawtext(const char *text, unsigned long col[ColLast]) {
int x, y, w, h;
static char buf[256];
unsigned int len, olen;
}
unsigned long
-getcolor(const char *colstr)
-{
+getcolor(const char *colstr) {
Colormap cmap = DefaultColormap(dpy, screen);
XColor color;
}
void
-setfont(const char *fontstr)
-{
+setfont(const char *fontstr) {
char **missing, *def;
int i, n;
}
unsigned int
-textw(const char *text)
-{
+textw(const char *text) {
return textnw(text, strlen(text)) + dc.font.height;
}
static Window win;
static void
-calcoffsets()
-{
+calcoffsets() {
unsigned int tw, w;
if(!curr)
}
static void
-drawmenu()
-{
+drawmenu() {
Item *i;
dc.x = 0;
}
static void
-match(char *pattern)
-{
+match(char *pattern) {
unsigned int plen;
Item *i, *j;
}
static void
-kpress(XKeyEvent * e)
-{
+kpress(XKeyEvent * e) {
char buf[32];
int num, prev_nitem;
unsigned int i, len;
}
static char *
-readstdin()
-{
+readstdin() {
static char *maxname = NULL;
char *p, buf[1024];
unsigned int len = 0, max = 0;
DC dc = {0};
int
-main(int argc, char *argv[])
-{
+main(int argc, char *argv[]) {
char *maxname;
fd_set rd;
struct timeval timeout;
/* static */
static void
-badmalloc(unsigned int size)
-{
+badmalloc(unsigned int size) {
eprint("fatal: could not malloc() %u bytes\n", size);
}
/* extern */
void *
-emalloc(unsigned int size)
-{
+emalloc(unsigned int size) {
void *res = malloc(size);
if(!res)
badmalloc(size);
}
void
-eprint(const char *errstr, ...)
-{
+eprint(const char *errstr, ...) {
va_list ap;
va_start(ap, errstr);
}
char *
-estrdup(const char *str)
-{
+estrdup(const char *str) {
void *res = strdup(str);
if(!res)
badmalloc(strlen(str));