| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflcons.h" int console_capture (const char *filename, char mode)
Starts capturing console output to the specified file. If the mode is 'w', creates an empty capture file. If the mode is 'a', appends to any existing data. Returns 0 if okay, -1 if there was an error - in this case you can test the value of errno. If the filename is NULL or an empty string, closes any current capture file.
{ if (console_file) { file close (console_file); console_file = NULL; } if (filename && *filename) { ASSERT (mode == 'w' || mode == 'a'); console_file = file open (filename, mode); if (console_file == NULL) return (-1); } return (0); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |