Skip to content

Commit

Permalink
options/ansi: Implement %n in strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke committed Jun 9, 2024
1 parent 150710a commit ca6db6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions options/ansi/generic/time-stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ size_t strftime(char *__restrict dest, size_t max_size,
c++;
break;
}
case 'n': {
chunk = snprintf(p, space, "\n");
if(chunk >= space)
return 0;
p += chunk;
c++;
break;
}
case 't': {
chunk = snprintf(p, space, "\t");
if(chunk >= space)
Expand Down

0 comments on commit ca6db6a

Please sign in to comment.