| 1997 | */ |
| 1998 | |
| 1999 | cups_file_t * /* O - CUPS file */ |
| 2000 | cupsFileStderr(void) |
| 2001 | { |
| 2002 | _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals... */ |
| 2003 | |
| 2004 | |
| 2005 | /* |
| 2006 | * Open file descriptor 2 as needed... |
| 2007 | */ |
| 2008 | |
| 2009 | if (!cg->stdio_files[2]) |
| 2010 | { |
| 2011 | /* |
| 2012 | * Flush any pending output on the stdio file... |
| 2013 | */ |
| 2014 | |
| 2015 | fflush(stderr); |
| 2016 | |
| 2017 | /* |
| 2018 | * Open file descriptor 2... |
| 2019 | */ |
| 2020 | |
| 2021 | if ((cg->stdio_files[2] = cupsFileOpenFd(2, "w")) != NULL) |
| 2022 | cg->stdio_files[2]->is_stdio = 1; |
| 2023 | } |
| 2024 | |
| 2025 | return (cg->stdio_files[2]); |
| 2026 | } |
| 2027 | |
| 2028 | |
| 2029 | /* |
no test coverage detected