chiark / gitweb /
Tidy up function definitions
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 18 Aug 2024 12:18:50 +0000 (13:18 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 18 Aug 2024 12:18:50 +0000 (13:18 +0100)
Consistently put a newline before each function name, and use "void"
as the parameter list of functions that take no parameters.

bedstead.c

index 9888a7e4bf3a69ec93c71172d4849326b6160323..ab4291d9ea42315389845c54428eacce5b0b5a9c 100644 (file)
@@ -2582,7 +2582,8 @@ getpix(char const data[YSIZE], int x, int y, unsigned flags)
 
 static bool plottermode = false;
 
-static char * get_fullname()
+static char *
+get_fullname(void)
 {
 #define FULLNAME_MAX 100
        static char fullname[FULLNAME_MAX];
@@ -2591,7 +2592,8 @@ static char * get_fullname()
        return fullname;
 }
 
-static char * fullname_to_fontname(char const *fullname)
+static char *
+fullname_to_fontname(char const *fullname)
 {
 #define FONTNAME_MAX 29 /* Adobe-recommended limit */
        static char fontname[FONTNAME_MAX + 1], *op = fontname;
@@ -2623,7 +2625,8 @@ compare_glyphs_by_name(const void *va, const void *vb)
        return strcmp(a->name, b->name);
 }
 
-static int compare_glyph_to_name(const void *vn, const void *vg)
+static int
+compare_glyph_to_name(const void *vn, const void *vg)
 {
        struct glyph const * const *gp = vg;
        struct glyph const *g = *gp;
@@ -2632,7 +2635,8 @@ static int compare_glyph_to_name(const void *vn, const void *vg)
        return strcmp(name, g->name);
 }
 
-static struct glyph const *get_glyph_by_name(char const *name)
+static struct glyph const *
+get_glyph_by_name(char const *name)
 {
        struct glyph const * const *gp;
 
@@ -2854,7 +2858,7 @@ main(int argc, char **argv)
 }
 
 static void
-dopanose()
+dopanose(void)
 {
        /*
         * PANOSE is a complex font categorisation scheme.  I suspect
@@ -3061,7 +3065,7 @@ static point points[MAXPOINTS];
 static int nextpoint;
 
 static void
-clearpath()
+clearpath(void)
 {
 
        nextpoint = 0;
@@ -3088,7 +3092,7 @@ lineto(unsigned x, unsigned y)
 }
 
 static void
-closepath()
+closepath(void)
 {
        struct point *p = &points[nextpoint - 1];
 
@@ -3222,7 +3226,7 @@ fix_edges(point *a0, point *b0)
 }
 
 static void
-clean_path()
+clean_path(void)
 {
        int i, j;
 
@@ -3252,7 +3256,7 @@ emit_contour(point *p0)
 }
 
 static void 
-emit_path()
+emit_path(void)
 {
        int i, pass;
        point *p;
@@ -3286,7 +3290,7 @@ emit_path()
  * correctly for the range (2 * XQTR_S - 1) < weight < (2 * XQTR_S).
  */
 static void
-adjust_weight()
+adjust_weight(void)
 {
        int i, X, Y, PX, PY, NX, NY, W = weight->weight;
        point *p;