__fgets_unlocked_chk -- non-locking string input, with buffer overflow checking


#include <stdio.h>

char * __fgets_unlocked_chk(char * s, size_t size, int strsize, FILE * stream);


The interface __fgets_unlocked_chk() shall function in the same way as the interface fgets_unlocked(), except that __fgets_unlocked_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter strsize specifies the size of the object pointed to by stream.

The __fgets_unlocked_chk() function is not in the source standard; it is only in the binary standard.