Mercurial > hg > dmlib
comparison tools/gfxconv.c @ 1167:848a88ce7a57
Use dmMemset().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Mar 2015 07:37:35 +0200 |
parents | 5af2097ab284 |
children | 5b8245e5f785 |
comparison
equal
deleted
inserted
replaced
1166:f29fa5b6b748 | 1167:848a88ce7a57 |
---|---|
1403 goto error; | 1403 goto error; |
1404 } | 1404 } |
1405 | 1405 |
1406 while (!feof(inFile) && !error && (optItemCount < 0 || itemCount < optItemCount)) | 1406 while (!feof(inFile) && !error && (optItemCount < 0 || itemCount < optItemCount)) |
1407 { | 1407 { |
1408 memset(bufData, 0, bufSize); | 1408 dmMemset(bufData, 0, bufSize); |
1409 | 1409 |
1410 if (fread(bufData, 1, bufSize, inFile) != bufSize) | 1410 if (fread(bufData, 1, bufSize, inFile) != bufSize) |
1411 { | 1411 { |
1412 dmErrorMsg("Could not read full bufferful (%d bytes) of data at 0x%x.\n", | 1412 dmErrorMsg("Could not read full bufferful (%d bytes) of data at 0x%x.\n", |
1413 bufSize, dataOffs); | 1413 bufSize, dataOffs); |
1473 outImage->ncolors = C64_NCOLORS; | 1473 outImage->ncolors = C64_NCOLORS; |
1474 outImage->ctransp = 255; | 1474 outImage->ctransp = 255; |
1475 | 1475 |
1476 while (!feof(inFile) && (optItemCount < 0 || itemCount < optItemCount)) | 1476 while (!feof(inFile) && (optItemCount < 0 || itemCount < optItemCount)) |
1477 { | 1477 { |
1478 memset(bufData, 0, bufSize); | 1478 dmMemset(bufData, 0, bufSize); |
1479 | 1479 |
1480 if (fread(bufData, 1, bufSize, inFile) != bufSize) | 1480 if (fread(bufData, 1, bufSize, inFile) != bufSize) |
1481 { | 1481 { |
1482 dmErrorMsg("Could not read full bufferful (%d bytes) of data at 0x%x.\n", | 1482 dmErrorMsg("Could not read full bufferful (%d bytes) of data at 0x%x.\n", |
1483 bufSize, dataOffs); | 1483 bufSize, dataOffs); |