From: Ben Harris Date: Sun, 18 Aug 2024 12:18:50 +0000 (+0100) Subject: Tidy up function definitions X-Git-Tag: bedstead-002.007~13 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=214c39a92985424dd52770152a8b0dbd2412b7e7;p=bedstead-debian.git Tidy up function definitions Consistently put a newline before each function name, and use "void" as the parameter list of functions that take no parameters. --- diff --git a/bedstead.c b/bedstead.c index 9888a7e..ab4291d 100644 --- a/bedstead.c +++ b/bedstead.c @@ -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;