mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Get rid of unlocked_stdio functions
Those did not provide a significant speedup, and are not provided by mingw
This commit is contained in:
@@ -150,8 +150,7 @@ static void writeBank(struct SortedSection *bankSections, uint16_t baseOffset,
|
|||||||
|
|
||||||
/* Output padding up to the next SECTION */
|
/* Output padding up to the next SECTION */
|
||||||
while (offset + baseOffset < section->org) {
|
while (offset + baseOffset < section->org) {
|
||||||
putc_unlocked(overlayFile ? getc_unlocked(overlayFile)
|
putc(overlayFile ? getc(overlayFile) : padValue,
|
||||||
: padValue,
|
|
||||||
outputFile);
|
outputFile);
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
@@ -162,7 +161,7 @@ static void writeBank(struct SortedSection *bankSections, uint16_t baseOffset,
|
|||||||
if (overlayFile) {
|
if (overlayFile) {
|
||||||
/* Skip bytes even with pipes */
|
/* Skip bytes even with pipes */
|
||||||
for (uint16_t i = 0; i < section->size; i++)
|
for (uint16_t i = 0; i < section->size; i++)
|
||||||
getc_unlocked(overlayFile);
|
getc(overlayFile);
|
||||||
}
|
}
|
||||||
offset += section->size;
|
offset += section->size;
|
||||||
|
|
||||||
@@ -170,9 +169,7 @@ static void writeBank(struct SortedSection *bankSections, uint16_t baseOffset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (offset < size) {
|
while (offset < size) {
|
||||||
putc_unlocked(overlayFile ? getc_unlocked(overlayFile)
|
putc(overlayFile ? getc(overlayFile) : padValue, outputFile);
|
||||||
: padValue,
|
|
||||||
outputFile);
|
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ static char const * const commands[] = {
|
|||||||
|
|
||||||
static int readChar(FILE *file)
|
static int readChar(FILE *file)
|
||||||
{
|
{
|
||||||
int curchar = getc_unlocked(file);
|
int curchar = getc(file);
|
||||||
|
|
||||||
if (curchar == EOF && ferror(file))
|
if (curchar == EOF && ferror(file))
|
||||||
err(1, "%s(%u): Unexpected error in %s", linkerScriptName,
|
err(1, "%s(%u): Unexpected error in %s", linkerScriptName,
|
||||||
|
|||||||
Reference in New Issue
Block a user