| 2063 | */ |
| 2064 | |
| 2065 | cups_file_t * /* O - CUPS file */ |
| 2066 | cupsFileStdout(void) |
| 2067 | { |
| 2068 | _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals... */ |
| 2069 | |
| 2070 | |
| 2071 | /* |
| 2072 | * Open file descriptor 1 as needed... |
| 2073 | */ |
| 2074 | |
| 2075 | if (!cg->stdio_files[1]) |
| 2076 | { |
| 2077 | /* |
| 2078 | * Flush any pending output on the stdio file... |
| 2079 | */ |
| 2080 | |
| 2081 | fflush(stdout); |
| 2082 | |
| 2083 | /* |
| 2084 | * Open file descriptor 1... |
| 2085 | */ |
| 2086 | |
| 2087 | if ((cg->stdio_files[1] = cupsFileOpenFd(1, "w")) != NULL) |
| 2088 | cg->stdio_files[1]->is_stdio = 1; |
| 2089 | } |
| 2090 | |
| 2091 | return (cg->stdio_files[1]); |
| 2092 | } |
| 2093 | |
| 2094 | |
| 2095 | /* |
no test coverage detected