1

What do you think of the following function to offer an alternative to fgets, looking for insights about portability, safety, readability and performance:
#include <stdio.h>
#include <errno.h>
int sc_gets(char *buf, int n)
{
int count = 0;
char c;
if (__glibc_unlikely(n <= 0))
...