Advertisement
sbaldovi

fuse-utils fmfconv stdio

Apr 13th, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.37 KB | None | 0 0
  1.  
  2. Property changes on: .
  3. ___________________________________________________________________
  4. Modified: svn:ignore
  5.    - .deps
  6. .libs
  7. Makefile
  8. Makefile.in
  9. aclocal.m4
  10. audio2tape
  11. autom4te.cache
  12. config.cache
  13. config.guess
  14. config.h
  15. config.h.in
  16. config.log
  17. config.status
  18. config.sub
  19. configure
  20. createhdf
  21. depcomp
  22. fmfconv
  23. fuse-utils.qpg
  24. install-sh
  25. libtool
  26. listbasic
  27. ltmain.sh
  28. missing
  29. mkinstalldirs
  30. profile2map
  31. raw2hdf
  32. rzxcheck
  33. rzxdump
  34. rzxtool
  35. scl2trd
  36. snap2tzx
  37. snapconv
  38. stamp-h
  39. stamp-h.in
  40. stamp-h1
  41. tape2wav
  42. tapeconv
  43. tzxlist
  44.  
  45.    + .deps
  46. .libs
  47. Makefile
  48. Makefile.in
  49. aclocal.m4
  50. audio2tape
  51. autom4te.cache
  52. config.cache
  53. config.guess
  54. config.h
  55. config.h.in
  56. config.log
  57. config.status
  58. config.sub
  59. configure
  60. createhdf
  61. depcomp
  62. fmfconv
  63. fuse-utils.qpg
  64. install-sh
  65. libtool
  66. listbasic
  67. ltmain.sh
  68. missing
  69. mkinstalldirs
  70. profile2map
  71. raw2hdf
  72. rzxcheck
  73. rzxdump
  74. rzxtool
  75. scl2trd
  76. snap2tzx
  77. snapconv
  78. stamp-h
  79. stamp-h.in
  80. stamp-h1
  81. tape2wav
  82. tapeconv
  83. tzxlist
  84. *.exe
  85.  
  86.  
  87. Index: fmfconv.c
  88. ===================================================================
  89. --- fmfconv.c   (revision 4361)
  90. +++ fmfconv.c   (working copy)
  91. @@ -37,10 +37,6 @@
  92.  #endif /* #ifdef HAVE_STRINGS_H */
  93.  #include <fcntl.h>
  94.  
  95. -#ifdef HAVE_TERMIOS_H
  96. -#include <termios.h>
  97. -#endif
  98. -
  99.  #include "libspectrum.h"
  100.  #include "movie_tables.h"
  101.  
  102. @@ -619,20 +615,19 @@
  103.      if( out_t != TYPE_FFMPEG )
  104.  #endif
  105.    {
  106. -#ifdef HAVE_TERMIOS_H
  107. -    struct termios term;
  108. -    if( !tcgetattr( STDOUT_FILENO, &term ) ) {
  109. +
  110. +    if( isatty( fileno( stdout ) ) ) {
  111.        out_t = TYPE_NONE;
  112.        out = NULL;
  113.        out_name = "(-=null=-)";
  114.      } else {
  115. -#endif
  116.        out_t = TYPE_YUV;        /* default to YUV */
  117.        out = stdout;
  118.        out_name = "(-=stdout=-)";
  119. -#ifdef HAVE_TERMIOS_H
  120. +#ifdef WIN32
  121. +      setmode( fileno( stdout ), O_BINARY );
  122. +#endif             /* #ifdef WIN32 */
  123.      }
  124. -#endif
  125.    }
  126.  
  127.    if( out_t == TYPE_NONE ) {
  128. @@ -1715,6 +1710,19 @@
  129.      printe ("Too many filenames...\n");
  130.      return ERR_BAD_PARAM;
  131.    }
  132. +
  133. +  if( !help_exit && !inp_name ) {
  134. +    if( isatty( fileno( stdin ) ) ) {
  135. +      printe( "%s: no input file specified\n", "fmfconv" );
  136. +      fprintf( stderr, "Try `fmfconv --help' for more information.\n" );
  137. +      help_exit = 1;
  138. +    }
  139. +#ifdef WIN32
  140. +    else {
  141. +      setmode( fileno( stdin ), O_BINARY );
  142. +    }
  143. +#endif             /* #ifdef WIN32 */
  144. +  }
  145.    return 0;
  146.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement