changeset 2202:455a3849b8ac

Comments and cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 14 Jun 2019 01:56:47 +0300
parents 9f3fb4004c20
children b259312ddb59
files tools/64vw.c tools/libgfx.c tools/libgfx.h
diffstat 3 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tools/64vw.c	Fri Jun 14 00:42:36 2019 +0300
+++ b/tools/64vw.c	Fri Jun 14 01:56:47 2019 +0300
@@ -193,7 +193,8 @@
 }
 
 
-int dmReadC64Image(const char *filename, const DMC64ImageFormat *forced, const DMC64ImageFormat **fmt, DMC64Image **cimage)
+int dmReadC64Image(const char *filename, const DMC64ImageFormat *forced,
+    const DMC64ImageFormat **fmt, DMC64Image **cimage)
 {
     Uint8 *dataBuf = NULL;
     size_t dataSize;
--- a/tools/libgfx.c	Fri Jun 14 00:42:36 2019 +0300
+++ b/tools/libgfx.c	Fri Jun 14 01:56:47 2019 +0300
@@ -275,7 +275,7 @@
 }
 
 
-static int dmPaletteReadData(DMResource *fp, DMPalette *pal, int ncolors)
+static int dmPaletteReadData(DMResource *fp, DMPalette *pal, const int ncolors)
 {
     if (pal->ncolors < ncolors)
         return DMERR_INVALID_ARGS;
@@ -297,7 +297,8 @@
 }
 
 
-static int dmPaletteWriteData(DMResource *fp, const DMPalette *pal, const int ncolors, const int npad)
+static int dmPaletteWriteData(DMResource *fp, const DMPalette *pal,
+    const int ncolors, const int npad)
 {
     int i;
 
--- a/tools/libgfx.h	Fri Jun 14 00:42:36 2019 +0300
+++ b/tools/libgfx.h	Fri Jun 14 01:56:47 2019 +0300
@@ -113,10 +113,11 @@
 
 typedef struct
 {
-    char *fext;
-    char *name;
+    char *fext;  // Typical filename extension
+    char *name;  // Format name / description
     int  fmtid;  // DM_IMGFMT_*
     int  flags;  // DM_FMT_* and DM_PIXFMT_* flags
+
     int  (*probe)(const Uint8 *buf, const size_t len);
     int  (*read)(DMResource *fp, DMImage **pimg);
     int  (*write)(DMResource *fp, const DMImage *pimg, const DMImageWriteSpec *spec);
@@ -164,6 +165,9 @@
 int dmWriteIFFImage(DMResource *fp, const DMImage *img, const DMImageWriteSpec *spec);
 
 
+//
+// Simplistic bitstream reading and writing
+//
 typedef struct _DMBitStreamContext
 {
     void *handle;