]> git.draconx.ca Git - liblbx.git/commitdiff
Don't use [static n] in function prototypes.
authorNick Bowler <nbowler@draconx.ca>
Tue, 21 Sep 2021 02:56:14 +0000 (22:56 -0400)
committerNick Bowler <nbowler@draconx.ca>
Tue, 21 Sep 2021 02:56:14 +0000 (22:56 -0400)
This modern C feature is mostly useless and introduces compatibility
problems for no good reason.

src/image.c
src/lbx.c
src/lbximg.c

index bd207e7d3dbc124dd82278db5bc96694665b31e9..24dce999504f62f25bba270066cd7ab8a0646542 100644 (file)
@@ -65,7 +65,7 @@ struct lbx_image_priv {
        unsigned long offsets[];
 };
 
-static struct lbx_image_priv *lbx_img_init(unsigned char hdr[static HDR_LEN])
+static struct lbx_image_priv *lbx_img_init(unsigned char *hdr)
 {
        unsigned short nframes = unpack_16_le(hdr+6);
        struct lbx_image_priv *img;
index f96344d2ce7cfc717796531f244d789414973021..17c68b15b63a75c7158aace0adfb325f2f9d2781 100644 (file)
--- a/src/lbx.c
+++ b/src/lbx.c
@@ -51,7 +51,7 @@ struct lbx_file_state {
        int eof;
 };
 
-static struct lbx_priv *lbx_init(unsigned char hdr[static LBX_HDR_SIZE])
+static struct lbx_priv *lbx_init(unsigned char *hdr)
 {
        unsigned short nfiles  = unpack_16_le(hdr+0);
        unsigned long  magic   = unpack_32_le(hdr+2);
index 5beaaaeb8f6af6275fa9a16f713fbfa52bd216f4..80ffea597ee641684394f12ed229021e64a28d2c 100644 (file)
@@ -191,10 +191,10 @@ int parserange(unsigned frames, char *str, unsigned char *bits)
        return 0;
 }
 
-int output(unsigned int frameno, const struct img_format *fmt,
-           unsigned char *pixels, unsigned char *pixel_mask,
-           unsigned int width, unsigned int height,
-           struct lbx_colour palette[static 256])
+static int output(unsigned int frameno, const struct img_format *fmt,
+                  unsigned char *pixels, unsigned char *pixel_mask,
+                  unsigned int width, unsigned int height,
+                  struct lbx_colour *palette)
 {
        char name[strlen(outname) + sizeof ".65535.png"];
        FILE *of;
@@ -227,7 +227,7 @@ int output(unsigned int frameno, const struct img_format *fmt,
        return 0;
 }
 
-static int loadoverride(FILE *f, struct lbx_colour palette[static 256])
+static int loadoverride(FILE *f, struct lbx_colour *palette)
 {
        struct lbx_image *img;
        int rc, ret = 0;