/[ascend]/trunk/test/redirectStdStreams.h
ViewVC logotype

Diff of /trunk/test/redirectStdStreams.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 60 by jds, Sun Oct 30 01:38:20 2005 UTC revision 61 by jds, Mon Nov 14 02:37:20 2005 UTC
# Line 36  Line 36 
36  #ifndef REDIRECTSTDSTREAMS_H_SEEN  #ifndef REDIRECTSTDSTREAMS_H_SEEN
37  #define REDIRECTSTDSTREAMS_H_SEEN  #define REDIRECTSTDSTREAMS_H_SEEN
38    
39  /**  FILE *redirect_stderr(CONST char *filename);
40    /**<
41   *  Redirects stderr to the specified file.   *  Redirects stderr to the specified file.
42   *  Returns a pointer to the new stream.  If stderr was already being   *  Returns a pointer to the new stream.  If stderr was already being
43   *  redirected to a file, the previous file is closed before the new   *  redirected to a file, the previous file is closed before the new
44   *  redirection is set up.   *  redirection is set up.  Returns NULL if stderr could not be
45     *  redirected.
46   */   */
 FILE *redirect_stderr(CONST char *filename);  
47    
48  /**  FILE *reset_stderr(void);
49    /**<
50   *  Restores stderr to the console.   *  Restores stderr to the console.
51   *  This function closes the redirection file (if any) and   *  This function closes the redirection file (if any) and
52   *  restores stderr to console output.  It returns a pointer   *  restores stderr to console output.  It returns a pointer
53   *  to the new stderr stream.   *  to the new stderr stream.  Returns NULL if stderr could not
54     *  be reset.
55    
56   */   */
 FILE *reset_stderr(void);  
57    
58  /**  FILE *redirect_stdin(CONST char *filename);
59    /**<
60   *  Redirects stdin to the specified file.   *  Redirects stdin to the specified file.
61   *  Returns a pointer to the new stream.  If stdin was already being   *  Returns a pointer to the new stream.  If stdin was already being
62   *  redirected to a file, the previous file is closed before the new   *  redirected to a file, the previous file is closed before the new
63   *  redirection is set up.   *  redirection is set up.  Returns NULL if stdin could not be
64     *  redirected.
65   */   */
 FILE *redirect_stdin(CONST char *filename);  
66    
67  /**  FILE *reset_stdin(void);
68    /**<
69   *  Restores stdin to the console.   *  Restores stdin to the console.
70   *  This function closes the redirection file (if any) and   *  This function closes the redirection file (if any) and
71   *  restores stdin to console output.  It returns a pointer   *  restores stdin to console output.  It returns a pointer
72   *  to the new stdin stream.   *  to the new stdin stream.  Returns NULL if stdin could not
73     *  be reset.
74     */
75    
76    FILE *redirect_stdout(CONST char *filename);
77    /**<
78     *  Redirects stdout to the specified file.
79     *  Returns a pointer to the new stream.  If stdout was already being
80     *  redirected to a file, the previous file is closed before the new
81     *  redirection is set up.  Returns NULL if stdout could not be
82     *  redirected.
83     */
84    
85    FILE *reset_stdout(void);
86    /**<
87     *  Restores stdout to the console.
88     *  This function closes the redirection file (if any) and
89     *  restores stdout to console output.  It returns a pointer
90     *  to the new stdout stream.  Returns NULL if stdout could not
91     *  be reset.
92   */   */
 FILE *reset_stdin(void);  
93    
94  #endif  /* REDIRECTSTDSTREAMS_H_SEEN */  #endif  /* REDIRECTSTDSTREAMS_H_SEEN */

Legend:
Removed from v.60  
changed lines
  Added in v.61

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22