comparison gfxconv.c @ 516:6f141f760c54

Constify.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 17:24:08 +0200
parents e8e244036ee4
children 5b37a2e427b7
comparison
equal deleted inserted replaced
515:a896c1153e4e 516:6f141f760c54
179 } 179 }
180 180
181 printf("\nAvailable bitmap formats:\n"); 181 printf("\nAvailable bitmap formats:\n");
182 for (i = 0; i < ndmC64ImageFormats; i++) 182 for (i = 0; i < ndmC64ImageFormats; i++)
183 { 183 {
184 DMC64ImageFormat *fmt = &dmC64ImageFormats[i]; 184 const DMC64ImageFormat *fmt = &dmC64ImageFormats[i];
185 printf("%3d | %-5s | %-15s | %s\n", 185 printf("%3d | %-5s | %-15s | %s\n",
186 i, fmt->extension, 186 i, fmt->extension,
187 dmC64ImageTypeNames[fmt->type], 187 dmC64ImageTypeNames[fmt->type],
188 fmt->name); 188 fmt->name);
189 } 189 }
1359 1359
1360 1360
1361 int main(int argc, char *argv[]) 1361 int main(int argc, char *argv[])
1362 { 1362 {
1363 FILE *inFile; 1363 FILE *inFile;
1364 DMC64ImageFormat *cfmt; 1364 const DMC64ImageFormat *cfmt;
1365 DMC64Image cimage; 1365 DMC64Image cimage;
1366 Uint8 *dataBuf = NULL; 1366 Uint8 *dataBuf = NULL;
1367 size_t dataSize; 1367 size_t dataSize;
1368 int i; 1368 int i;
1369 1369
1420 goto error; 1420 goto error;
1421 1421
1422 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_BITMAP) 1422 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_BITMAP)
1423 { 1423 {
1424 // Probe for format 1424 // Probe for format
1425 DMC64ImageFormat *forced = NULL; 1425 const DMC64ImageFormat *forced = NULL;
1426 int res; 1426 int res;
1427 1427
1428 if (optForcedFormat >= 0) 1428 if (optForcedFormat >= 0)
1429 { 1429 {
1430 forced = &dmC64ImageFormats[optForcedFormat]; 1430 forced = &dmC64ImageFormats[optForcedFormat];