Create a reference to a stream
#include <screen/screen.h>
int screen_ref_stream(screen_stream_t stream)
Function Type: Immediate Execution
This function creates a reference to a stream. This function can be used by libraries to prevent the stream or its buffers from disappearing while the library is using it. The stream and its buffers aren't destroyed until all references have been cleared with screen_unref_stream(). In the event that a stream is destroyed before the reference is cleared, screen_unref_stream() causes the stream buffer and/or the stream to be destroyed.
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).