return fds[0];
}
-Image *ffopen(char *filename)
+Image *
+ffopen(char *filename)
{
unsigned char hdr[16];
char *bin = NULL;
return img;
}
-void fffree(Image *img)
+void
+fffree(Image *img)
{
free(img->buf);
if (img->ximg)
free(img);
}
-int ffread(Image *img)
+int
+ffread(Image *img)
{
uint32_t y, x;
uint16_t *row;
return 1;
}
-int ffprepare(Image *img)
+int
+ffprepare(Image *img)
{
int depth = DefaultDepth(xw.dpy, xw.scr);
int width = xw.uw;
return 1;
}
-void ffscale(Image *img)
+void
+ffscale(Image *img)
{
unsigned int x, y;
unsigned int width = img->ximg->width;
}
}
-void ffdraw(Image *img)
+void
+ffdraw(Image *img)
{
int xoffset = (xw.w - img->ximg->width) / 2;
int yoffset = (xw.h - img->ximg->height) / 2;
img->state |= DRAWN;
}
-void getfontsize(Slide *s, unsigned int *width, unsigned int *height)
+void
+getfontsize(Slide *s, unsigned int *width, unsigned int *height)
{
int i, j;
unsigned int curw, newmax;
*width += fonts[j]->h;
}
-void cleanup()
+void
+cleanup()
{
unsigned int i, j;
}
}
-void die(const char *fmt, ...)
+void
+die(const char *fmt, ...)
{
va_list ap;
exit(1);
}
-void eprintf(const char *fmt, ...)
+void
+eprintf(const char *fmt, ...)
{
va_list ap;
}
}
-void load(FILE *fp)
+void
+load(FILE *fp)
{
static size_t size = 0;
size_t blen, maxlines;
}
}
-void advance(const Arg *arg)
+void
+advance(const Arg *arg)
{
int new_idx = idx + arg->i;
LIMIT(new_idx, 0, slidecount-1);
}
}
-void quit(const Arg *arg)
+void
+quit(const Arg *arg)
{
running = 0;
}
-void resize(int width, int height)
+void
+resize(int width, int height)
{
xw.w = width;
xw.h = height;
drw_resize(d, width, height);
}
-void run()
+void
+run()
{
XEvent ev;
}
}
-void usage()
+void
+usage()
{
die("sent " VERSION " (c) 2014-2015 markus.teich@stusta.mhn.de\n" \
"usage: sent FILE1 [FILE2 ...]", argv0);
}
-void xdraw()
+void
+xdraw()
{
unsigned int height, width, i;
Image *im = slides[idx].img;
}
}
-void xhints()
+void
+xhints()
{
XClassHint class = {.res_name = "sent", .res_class = "presenter"};
XWMHints wm = {.flags = InputHint, .input = True};
XFree(sizeh);
}
-void xinit()
+void
+xinit()
{
XTextProperty prop;
XSync(xw.dpy, False);
}
-void xloadfonts()
+void
+xloadfonts()
{
int i, j;
char *fstrs[LEN(fontfallbacks)];
free(fstrs[j]);
}
-void bpress(XEvent *e)
+void
+bpress(XEvent *e)
{
unsigned int i;
mshortcuts[i].func(&(mshortcuts[i].arg));
}
-void cmessage(XEvent *e)
+void
+cmessage(XEvent *e)
{
if (e->xclient.data.l[0] == xw.wmdeletewin)
running = 0;
}
-void expose(XEvent *e)
+void
+expose(XEvent *e)
{
if (0 == e->xexpose.count)
xdraw();
}
-void kpress(XEvent *e)
+void
+kpress(XEvent *e)
{
unsigned int i;
KeySym sym;
shortcuts[i].func(&(shortcuts[i].arg));
}
-void configure(XEvent *e)
+void
+configure(XEvent *e)
{
resize(e->xconfigure.width, e->xconfigure.height);
if (slides[idx].img)
xdraw();
}
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
int i;
FILE *fp = NULL;