Skip to content

Instantly share code, notes, and snippets.

@delihiros
Created November 30, 2019 16:01
Show Gist options
  • Save delihiros/7ae18b385a501a07ca6c86af57f9a9fb to your computer and use it in GitHub Desktop.
Save delihiros/7ae18b385a501a07ca6c86af57f9a9fb to your computer and use it in GitHub Desktop.
if ((f->_flags & _IO_LINE_BUF) && (f->_flags & _IO_CURRENTLY_PUTTING))
{
count = f->_IO_buf_end - f->_IO_write_ptr;
if (count >= n)
{
const char *p;
for (p = s + n; p > s; )
{
if (*--p == '\n')
{
count = p - s + 1;
must_flush = 1;
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment