diff tools/gfxconv.c @ 1235:5b8245e5f785

Remove trailing whitespace.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Mar 2015 13:40:47 +0200
parents 848a88ce7a57
children 5206e3d4e6b7
line wrap: on
line diff
--- a/tools/gfxconv.c	Fri Mar 06 13:38:53 2015 +0200
+++ b/tools/gfxconv.c	Fri Mar 06 13:40:47 2015 +0200
@@ -184,7 +184,7 @@
     "  Ext | I | O | Description\n"
     "------+---+---+-----------------------------------------------\n"
     );
-    
+
     for (i = 0; i < nconvFormatList; i++)
     {
         DMConvFormat *fmt = &convFormatList[i];
@@ -363,11 +363,11 @@
         }
         value->triplet = FALSE;
     }
-    
+
     // Trim whitespace
     split++;
     while (*split && isspace(*split)) split++;
-    
+
     // Parse destination value
     if (!dmGetIntVal(split, &value->to))
     {
@@ -430,7 +430,7 @@
             return FALSE;
         }
     }
-    
+
     return TRUE;
 }
 
@@ -455,7 +455,7 @@
         start = end + 1;
     }
 
-    return TRUE;   
+    return TRUE;
 }
 
 
@@ -477,7 +477,7 @@
     {
         char *start = line;
         while (*start && isspace(*start)) start++;
-        
+
         if (*start != 0 && *start != ';')
         {
             if (!dmParseMapOptionMapItem(line, &values[*nvalue], nmax, "mapping file"))
@@ -531,7 +531,7 @@
                         dmErrorMsg("Invalid input format '%s'.\n", optArg);
                         return FALSE;
                 }
-            
+
                 char *tmp = strchr(optArg, ':');
                 if (tmp != NULL)
                 {
@@ -552,7 +552,7 @@
                                 return FALSE;
                             }
                             break;
-                        
+
                         case FFMT_BITMAP:
                             if (!dmGetC64FormatByExt(tmp, &optInFormat, &optInSubFormat))
                             {
@@ -565,7 +565,7 @@
                 }
             }
             break;
-        
+
         case 2:
             optInMulticolor = TRUE;
             break;
@@ -573,7 +573,7 @@
         case 3:
             optOutFilename = optArg;
             break;
-        
+
         case 4:
             if (!dmGetIntVal(optArg, &optInSkip))
             {
@@ -772,7 +772,7 @@
 void dmPrintByte(FILE *out, int byte, int format, BOOL multicolor)
 {
     int i;
-    
+
     if (multicolor)
     {
         for (i = DM_ASC_NBITS; i; i -= 2)
@@ -914,7 +914,7 @@
                     found = TRUE;
                 }
             }
-            
+
             if (!found)
             {
                 dmMsg(3, "No RGBA match found for map index %d, #%02x%02x%02x%02x\n",
@@ -932,7 +932,7 @@
         }
     }
 
-    
+
     // Fill in the rest
     if (optRemapRemove)
     {
@@ -971,7 +971,7 @@
         if (mapping[index] + 1 > ncolors)
             ncolors = mapping[index] + 1;
     }
-    
+
     // Copy palette entries
     for (index = 0; index < image->ncolors; index++)
     {
@@ -1103,7 +1103,7 @@
             {
                 FILE *fp;
                 char *dataFilename;
-                
+
                 // Form data file filename
                 dataFilename = dm_strdup_fext(filename, "%s.inc");
                 if (dataFilename == NULL)
@@ -1413,7 +1413,7 @@
                     bufSize, dataOffs);
                 error = TRUE;
             }
-            
+
             fprintf(outFile, "---- : -------------- #%d\n", itemCount);
 
             switch (optInFormat)
@@ -1459,12 +1459,12 @@
                 dmErrorMsg("Single-image output requires count to be set (-n).\n");
                 goto error;
             }
-            
+
             outIWidth = optPlanedWidth;
             outIHeight = (optItemCount / optPlanedWidth);
             if (optItemCount % optPlanedWidth)
                 outIHeight++;
-            
+
             outImage = dmImageAlloc(outWidthPX * outIWidth, outIHeight * outHeight);
         }
 
@@ -1472,7 +1472,7 @@
         outImage->pal      = dmC64Palette;
         outImage->ncolors  = C64_NCOLORS;
         outImage->ctransp  = 255;
-        
+
         while (!feof(inFile) && (optItemCount < 0 || itemCount < optItemCount))
         {
             dmMemset(bufData, 0, bufSize);
@@ -1499,7 +1499,7 @@
                     dmErrorMsg("Could not allocate memory for filename template?\n");
                     goto error;
                 }
-                
+
                 ret = dmWriteImage(optOutFilename, outImage, &optSpec, optOutSubFormat, TRUE);
                 if (ret != DMERR_OK)
                 {
@@ -1517,7 +1517,7 @@
                     outY++;
                 }
             }
-            
+
             itemCount++;
         }
 
@@ -1530,7 +1530,7 @@
                     ret, dmErrorStr(ret));
             }
         }
-        
+
         dmImageFree(outImage);
     }
     else
@@ -1634,7 +1634,7 @@
             dmMsg(1,"Probed %s format image, type %d, %s\n",
                 cfmt->name, cfmt->type, cfmt->fext);
         }
-        
+
         if (res == DMERR_OK)
             optInFormat = FFMT_BITMAP;
         else
@@ -1671,10 +1671,10 @@
             optInSkip, optInSkip, dmErrorStr(res));
         goto error;
     }
-    
+
     int inFormat = dmGetConvFormat(optInFormat, optInSubFormat),
         outFormat = dmGetConvFormat(optOutFormat, optOutSubFormat);
-    
+
     if (inFormat != -1 && outFormat != -1)
     {
         char *inFmtName = convFormatList[inFormat].name,
@@ -1695,7 +1695,7 @@
         case FFMT_CHAR:
             dmDumpSpritesAndChars(inFile);
             break;
-        
+
         case FFMT_BITMAP:
             {
                 DMImage *outImage = NULL;
@@ -1743,7 +1743,7 @@
                         dmErrorMsg("Unsupported output format for bitmap/image conversion.\n");
                         break;
                 }
-                
+
                 dmImageFree(outImage);
             }
             break;
@@ -1768,7 +1768,7 @@
 
                 if (res != DMERR_OK || outImage == NULL)
                     break;
-                
+
                 switch (optOutFormat)
                 {
                     case FFMT_IMAGE:
@@ -1790,7 +1790,7 @@
                     dmErrorMsg("Error writing output (%s), probably unsupported output format for bitmap/image conversion.\n",
                         dmErrorStr(res));
                 }
-                
+
                 dmImageFree(outImage);
             }
             break;