beejjorgensen / bgc

Beej's Guide to C Programming source
Other
470 stars 88 forks source link

Incorrect note in `Single-Line Status Updates' section #140

Closed macarc closed 5 months ago

macarc commented 11 months ago

Thank you for this guide!

In section 21.1.2.1, the code description says:

(Note this makes use of the non-standard POSIX function sleep() from —if you’re not on a Unix-like, search for your platform and sleep for the equivalent.)

However, the code example uses thrd_sleep() from <threads.h>, not sleep() from <unistd.h>.

Section on website: https://beej.us/guide/bgc/html/split/characters-and-strings-ii.html#single-line-status-updates Section in markdown: https://github.com/beejjorgensen/bgc/blob/main/src/bgc_part_1700_strings2.md#single-line-status-updates

beejjorgensen commented 5 months ago

Thanks! Fixed in the next rev.