[hackers] [sent] style: move function return types to own line || Markus Teich

From: <git_AT_suckless.org>
Date: Fri, 5 Feb 2016 16:15:14 +0100 (CET)

commit 77809fae79eb8b8acbb7198615717a96b08002b2
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
AuthorDate: Fri Feb 5 16:17:43 2016 +0100
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Fri Feb 5 16:17:43 2016 +0100

    style: move function return types to own line

diff --git a/sent.c b/sent.c
index a397942..3a79b82 100644
--- a/sent.c
+++ b/sent.c
_AT_@ -159,7 +159,8 @@ filter(int fd, const char *cmd)
         return fds[0];
 }
 
-Image *ffopen(char *filename)
+Image *
+ffopen(char *filename)
 {
         unsigned char hdr[16];
         char *bin = NULL;
_AT_@ -206,7 +207,8 @@ Image *ffopen(char *filename)
         return img;
 }
 
-void fffree(Image *img)
+void
+fffree(Image *img)
 {
         free(img->buf);
         if (img->ximg)
_AT_@ -214,7 +216,8 @@ void fffree(Image *img)
         free(img);
 }
 
-int ffread(Image *img)
+int
+ffread(Image *img)
 {
         uint32_t y, x;
         uint16_t *row;
_AT_@ -277,7 +280,8 @@ int ffread(Image *img)
         return 1;
 }
 
-int ffprepare(Image *img)
+int
+ffprepare(Image *img)
 {
         int depth = DefaultDepth(xw.dpy, xw.scr);
         int width = xw.uw;
_AT_@ -319,7 +323,8 @@ int ffprepare(Image *img)
         return 1;
 }
 
-void ffscale(Image *img)
+void
+ffscale(Image *img)
 {
         unsigned int x, y;
         unsigned int width = img->ximg->width;
_AT_@ -344,7 +349,8 @@ void ffscale(Image *img)
         }
 }
 
-void ffdraw(Image *img)
+void
+ffdraw(Image *img)
 {
         int xoffset = (xw.w - img->ximg->width) / 2;
         int yoffset = (xw.h - img->ximg->height) / 2;
_AT_@ -354,7 +360,8 @@ void ffdraw(Image *img)
         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;
_AT_@ -383,7 +390,8 @@ void getfontsize(Slide *s, unsigned int *width, unsigned int *height)
         *width += fonts[j]->h;
 }
 
-void cleanup()
+void
+cleanup()
 {
         unsigned int i, j;
 
_AT_@ -408,7 +416,8 @@ void cleanup()
         }
 }
 
-void die(const char *fmt, ...)
+void
+die(const char *fmt, ...)
 {
         va_list ap;
 
_AT_@ -419,7 +428,8 @@ void die(const char *fmt, ...)
         exit(1);
 }
 
-void eprintf(const char *fmt, ...)
+void
+eprintf(const char *fmt, ...)
 {
         va_list ap;
 
_AT_@ -437,7 +447,8 @@ void eprintf(const char *fmt, ...)
         }
 }
 
-void load(FILE *fp)
+void
+load(FILE *fp)
 {
         static size_t size = 0;
         size_t blen, maxlines;
_AT_@ -493,7 +504,8 @@ void load(FILE *fp)
         }
 }
 
-void advance(const Arg *arg)
+void
+advance(const Arg *arg)
 {
         int new_idx = idx + arg->i;
         LIMIT(new_idx, 0, slidecount-1);
_AT_@ -509,12 +521,14 @@ void advance(const Arg *arg)
         }
 }
 
-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;
_AT_@ -523,7 +537,8 @@ void resize(int width, int height)
         drw_resize(d, width, height);
 }
 
-void run()
+void
+run()
 {
         XEvent ev;
 
_AT_@ -544,13 +559,15 @@ void run()
         }
 }
 
-void usage()
+void
+usage()
 {
         die("sent " VERSION " (c) 2014-2015 markus.teich_AT_stusta.mhn.de\n" \
         "usage: sent FILE1 [FILE2 ...]", argv0);
 }
 
-void xdraw()
+void
+xdraw()
 {
         unsigned int height, width, i;
         Image *im = slides[idx].img;
_AT_@ -578,7 +595,8 @@ void xdraw()
         }
 }
 
-void xhints()
+void
+xhints()
 {
         XClassHint class = {.res_name = "sent", .res_class = "presenter"};
         XWMHints wm = {.flags = InputHint, .input = True};
_AT_@ -595,7 +613,8 @@ void xhints()
         XFree(sizeh);
 }
 
-void xinit()
+void
+xinit()
 {
         XTextProperty prop;
 
_AT_@ -635,7 +654,8 @@ void xinit()
         XSync(xw.dpy, False);
 }
 
-void xloadfonts()
+void
+xloadfonts()
 {
         int i, j;
         char *fstrs[LEN(fontfallbacks)];
_AT_@ -659,7 +679,8 @@ void xloadfonts()
                         free(fstrs[j]);
 }
 
-void bpress(XEvent *e)
+void
+bpress(XEvent *e)
 {
         unsigned int i;
 
_AT_@ -668,19 +689,22 @@ void bpress(XEvent *e)
                         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;
_AT_@ -691,7 +715,8 @@ void kpress(XEvent *e)
                         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)
_AT_@ -699,7 +724,8 @@ void configure(XEvent *e)
         xdraw();
 }
 
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
 {
         int i;
         FILE *fp = NULL;
Received on Fri Feb 05 2016 - 16:15:14 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 05 2016 - 16:24:12 CET