home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / rpn30src.zip / MAKEDISP.C < prev    next >
Text File  |  1990-05-25  |  1KB  |  50 lines

  1. /**
  2.  ** MAKEDISP
  3.  **
  4.  ** Build the calculator-display window
  5.  **
  6.  ** The function is used by mkscreen.c to build the includable frame[]
  7.  ** array.
  8.  **
  9.  ** 90.05.20, for v3.0
  10.  ** 89.01.02ram
  11.  **/
  12. #include <conio.h>
  13. #include "rpnio.h"
  14. #include "helps.h"    /* prototype for make_display() */
  15.  
  16. char const frame[] = "\
  17. ╔╡ RPN ╞══════════════╦═════════╦════╗\
  18. ║                     ║ Base    ║    ║\
  19. ║                     ╠═════════╩════╣\
  20. ║                     ║              ║\
  21. ║ ─────────────────── ║ ──────────── ║\
  22. ║                     ║              ║\
  23. ╠═════════════════════╩═══════╦══════╣\
  24. ║                      Last X ║      ║\
  25. ╚╡ Help? F1 ╞═════════════════╩══════╝";
  26.  
  27. void make_display(
  28.     int left, int top, int right, int bottom)
  29. {
  30.     window(left, top, right, bottom+1);
  31.     textattr( (DBKGND << 4) | DBORD );
  32.     cputs(frame);
  33.  
  34.     gotoxy(10, 9);
  35.     textattr( (DBKGND << 4) | (DBORD | 0x08) );
  36.     cputs("F1");
  37.  
  38.     gotoxy(2,2);
  39.     textattr( (DBKGND << 4) | (DNUM) );
  40.     cputs(" ");
  41.  
  42.     gotoxy(2,3);
  43.     textattr( (DBKGND << 4) | (DFTN) );
  44.     cputs(" ");
  45.  
  46.     gotoxy(2,4);
  47.     textattr( (DBKGND << 4) | (DOOPS) );
  48.     cputs(" ");
  49. }
  50.