Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for scripts/ep/dummy/dummy.c between version 1.4 and 1.5

version 1.4, 2001/12/13 17:33:42 version 1.5, 2001/12/16 20:44:38
Line 5 
Line 5 
 int print_to_stdout(char *s);  int print_to_stdout(char *s);
 int print_to_stderr(char *s);  int print_to_stderr(char *s);
 int print_to_both(char *s);  int print_to_both(char *s);
   int write_stream_statistics(FILE *stream, FILE *to_stream);
   
 int main(void) {  int main(void) {
         char buf[BUFSIZE];          char buf[BUFSIZE];
Line 12  int main(void) {
Line 13  int main(void) {
         //setvbuf(stdout, NULL, _IONBF, 0);          //setvbuf(stdout, NULL, _IONBF, 0);
         //setbuf(stdout, NULL);          //setbuf(stdout, NULL);
   
         fprintf(stderr, "DEBUG: stdout->_fileno = %d\n", stdout->_fileno);          fputs("Statisctics for stdout:\n", stderr);
         fprintf(stderr, "DEBUG: stderr->_fileno = %d\n", stderr->_fileno);          write_stream_statistics(stdout, stderr);
           fputs("Statisctics for stdout:\n", stderr);
           write_stream_statistics(stderr, stderr);
   
         while (fgets(buf, BUFSIZE - 1, stdin) != NULL) {          while (fgets(buf, BUFSIZE - 1, stdin) != NULL) {
                 if (print_to_both(buf)) {                  if (print_to_both(buf)) {
Line 45  int print_to_both(char *s)
Line 48  int print_to_both(char *s)
                 || print_to_stderr(s);                  || print_to_stderr(s);
 }  }
   
   int write_stream_statistics(FILE *stream, FILE *to_stream)
   {
           fprintf(to_stream, "_fileno = %d\n", stream->_fileno);
           fprintf(to_stream, "_flags = %d\n", stream->_flags);
           fprintf(to_stream, "_IO_read_ptr = %p, _IO_read_base = %p, _IO_read_end = %p, diff = %d\n",
                           stream->_IO_read_ptr, stream->_IO_read_end, stream->_IO_read_base,
                           stream->_IO_read_end - stream->_IO_read_base);
           fprintf(to_stream, "_IO_write_ptr = %p, _IO_write_base = %p, _IO_write_end = %p, diff = %d\n",
                           stream->_IO_write_ptr, stream->_IO_write_end, stream->_IO_write_base,
                           stream->_IO_write_end - stream->_IO_write_base);
           fprintf(to_stream, "_IO_buf_base = %p, _IO_buf_end = %p, diff = %d\n",
                           stream->_IO_buf_end, stream->_IO_buf_base,
                           stream->_IO_buf_end - stream->_IO_buf_base);
           fprintf(to_stream, "_IO_backup_base = %p, _IO_save_base = %p, _IO_save_end = %p, diff = %d\n",
                           stream->_IO_backup_base, stream->_IO_save_end, stream->_IO_save_base,
                           stream->_IO_save_end - stream->_IO_save_base);
   
           return 0;
   }
   
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top