home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / CreativeComputers.iso / shareware / text / dvi_3.62 / source / dvisrc.lha / dviatari.c < prev    next >
C/C++ Source or Header  |  1993-10-26  |  1KB  |  70 lines

  1. /*
  2. ** Datei: DVIATARI.C
  3. ** Autor: Ingo Eichenseher
  4. */
  5.  
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #ifdef __ATARIGNU__
  9. #include <stdarg.h>
  10. #endif
  11. #include "dvi.h"
  12. #include "dvihdcp.h"
  13.  
  14. /*
  15. ** -----------------------------------------------------------------
  16. ** Atari spezifische Unterprogramme, Variablen, includes und defines
  17. ** -----------------------------------------------------------------
  18. */
  19.  
  20. #ifdef __TURBOC__
  21. #include <ext.h>
  22. #include <tos.h>
  23. #endif
  24.  
  25. #ifdef __ATARIGNU__
  26. #include <osbind.h>
  27. #include <aesbind.h>
  28. #include <vdibind.h>
  29. #endif
  30.  
  31. /*
  32. ** Die folgende Funktion stellt fest, ob die Tasten
  33. ** Control+Shift+Alternate gedrueckt wurden (in diesem Fall ist
  34. ** das Funktionsergebnis ungleich 0).
  35. */
  36.  
  37. int stop_key(void)
  38. {
  39.     return (Kbshift(-1)&14)==14;
  40. }
  41.  
  42. /* 
  43. ** Die folgende Funktion gibt ein Zeichen auf dem Drucker
  44. ** aus. 
  45. */
  46.  
  47. void prbyte(int c)
  48. {
  49.     extern int dviprn(int c);
  50.     if (red_fp == NULL)
  51.     {
  52.     int err;
  53.  
  54. #if defined(__ATARIGNU__)
  55.     err = 0;
  56.     if ( op.biosprint )
  57.         Cprnout( c );
  58.     else
  59.         err = dviprn( c );
  60. #else
  61.     if (op.biosprint) err = !Cprnout(c);
  62.     else err = dviprn(c);
  63. #endif
  64.  
  65.     if (err) halt("Printer time out");
  66.     }
  67.     else putc(c,red_fp);
  68. }
  69.  
  70.