console.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * frontend/console.h
  3. *
  4. * This
  5. *
  6. *
  7. */
  8. #ifndef LAME_CONSOLE_H
  9. #define LAME_CONSOLE_H
  10. #if defined(_WIN32) && !defined(__CYGWIN__)
  11. # include <windows.h>
  12. #endif
  13. #if defined(__cplusplus)
  14. extern "C" {
  15. #endif
  16. typedef struct console_io_struct {
  17. unsigned long ClassID;
  18. unsigned long ClassProt;
  19. FILE *Console_fp; /* filepointer to stream reporting information */
  20. FILE *Error_fp; /* filepointer to stream fatal error reporting information */
  21. FILE *Report_fp; /* filepointer to stream reports (normally a text file or /dev/null) */
  22. #if defined(_WIN32) && !defined(__CYGWIN__)
  23. HANDLE Console_Handle;
  24. #endif
  25. int disp_width;
  26. int disp_height;
  27. char str_up[10];
  28. char str_clreoln[10];
  29. char str_emph[10];
  30. char str_norm[10];
  31. char Console_buff[2048];
  32. int Console_file_type;
  33. } Console_IO_t;
  34. extern Console_IO_t Console_IO;
  35. extern int frontend_open_console(void);
  36. extern void frontend_close_console(void);
  37. extern void frontend_msgf(const char *format, va_list ap);
  38. extern void frontend_debugf(const char *format, va_list ap);
  39. extern void frontend_errorf(const char *format, va_list ap);
  40. extern void frontend_print_null(const char *format, va_list ap);
  41. int console_printf(const char *format, ...);
  42. int error_printf(const char *format, ...);
  43. int report_printf(const char *format, ...);
  44. void console_flush(void);
  45. void error_flush(void);
  46. void report_flush(void);
  47. void console_up(int n_lines);
  48. void set_debug_file(const char *fn);
  49. #if defined(__cplusplus)
  50. }
  51. #endif
  52. #endif /* LAME_CONSOLE_H */
  53. /* end of console.h */