Skip to content

Commit

Permalink
Qualify fscanf in namespace std
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Feb 25, 2024
1 parent c91f8f9 commit a36417c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions common/slideshw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int slideshw()
}
goto start;
case '*':
if (fscanf(fpss, "%d", &repeats) != 1
if (std::fscanf(fpss, "%d", &repeats) != 1
|| repeats <= 1
|| repeats >= 256
|| feof(fpss))
Expand Down Expand Up @@ -243,7 +243,7 @@ int slideshw()
else if (std::strcmp(buffer, "MESSAGE") == 0)
{
int secs;
if (fscanf(fpss, "%d", &secs) != 1)
if (std::fscanf(fpss, "%d", &secs) != 1)
{
slideshowerr("MESSAGE needs argument");
}
Expand All @@ -264,7 +264,7 @@ int slideshw()
}
else if (std::strcmp(buffer, "GOTO") == 0)
{
if (fscanf(fpss, "%s", buffer) != 1)
if (std::fscanf(fpss, "%s", buffer) != 1)
{
slideshowerr("GOTO needs target");
out = 0;
Expand All @@ -276,7 +276,7 @@ int slideshw()
std::strcat(buffer, ":");
do
{
err = fscanf(fpss, "%s", buffer1);
err = std::fscanf(fpss, "%s", buffer1);
}
while (err == 1 && std::strcmp(buffer1, buffer) != 0);
if (feof(fpss))
Expand All @@ -294,7 +294,7 @@ int slideshw()
else if (std::strcmp("WAIT", buffer) == 0)
{
float fticks;
err = fscanf(fpss, "%f", &fticks); // how many ticks to wait
err = std::fscanf(fpss, "%f", &fticks); // how many ticks to wait
driver_set_keyboard_timeout((int)(fticks*1000.f));
fticks *= CLOCKS_PER_SEC; // convert from seconds to ticks
if (err == 1)
Expand Down

0 comments on commit a36417c

Please sign in to comment.