home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / BSRC_250.LZH / B_TODAY.C < prev    next >
C/C++ Source or Header  |  1991-09-15  |  6KB  |  155 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*                                                                          */
  4. /*      ------------         Bit-Bucket Software, Co.                       */
  5. /*      \ 10001101 /         Writers and Distributors of                    */
  6. /*       \ 011110 /          Freely Available<tm> Software.                 */
  7. /*        \ 1011 /                                                          */
  8. /*         ------                                                           */
  9. /*                                                                          */
  10. /*  (C) Copyright 1987-91, Bit Bucket Software Co., a Delaware Corporation. */
  11. /*                                                                          */
  12. /*                                                                          */
  13. /*            This module was originally written by Bob Hartman             */
  14. /*                                                                          */
  15. /*                                                                          */
  16. /*                  BinkleyTerm Initial Fullscreen Setup                    */
  17. /*                                                                          */
  18. /*                                                                          */
  19. /*    For complete  details  of the licensing restrictions, please refer    */
  20. /*    to the License  agreement,  which  is published in its entirety in    */
  21. /*    the MAKEFILE and BT.C, and also contained in the file LICENSE.250.    */
  22. /*                                                                          */
  23. /*    USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  24. /*    BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  25. /*    THIS  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,  OR IF YOU DO    */
  26. /*    NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  27. /*    SOFTWARE CO.  AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  28. /*    SHOULD YOU  PROCEED TO USE THIS FILE  WITHOUT HAVING  ACCEPTED THE    */
  29. /*    TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  30. /*    AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.      */
  31. /*                                                                          */
  32. /*                                                                          */
  33. /* You can contact Bit Bucket Software Co. at any one of the following      */
  34. /* addresses:                                                               */
  35. /*                                                                          */
  36. /* Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             */
  37. /* P.O. Box 460398                AlterNet 7:491/0                          */
  38. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  39. /*                                Internet f491.n343.z1.fidonet.org         */
  40. /*                                                                          */
  41. /* Please feel free to contact us at any time to share your comments about  */
  42. /* our software and/or licensing policies.                                  */
  43. /*                                                                          */
  44. /*--------------------------------------------------------------------------*/
  45.  
  46. /* Include this file before any other includes or defines! */
  47.  
  48. #include "includes.h"
  49.  
  50. #ifndef MILQ
  51. #define WHOLEWIN
  52. #endif
  53.  
  54. #ifdef MILQ
  55. #define MENU_ENABLED
  56. #if defined (MENU_ENABLED) || defined (MILQ)
  57. #define RESOURCE_ENABLED
  58. #endif
  59. #endif
  60.  
  61. extern VIOMODEINFO vfos_mode;
  62. void MilqMassageWnd( REGIONP Win, int Color );
  63.  
  64. void do_today ()
  65. {
  66.    char j[30];
  67.    ADDR tmp;
  68.  
  69.    if (fullscreen)
  70.       {
  71.  
  72.       (void) sprintf (j, "%d/%d", hist.bbs_calls, hist.mail_calls);
  73.       (void) sprintf (junk, "%-8.8s", j);
  74.       sb_move (history_hWnd, HIST_BBS_ROW, 2);
  75. #ifndef MILQ
  76.       sb_puts (history_hWnd, MSG_TXT(M_BBS_MAIL));
  77. #endif
  78.       sb_puts( GetDlgItem (history_hWnd, GD_BBS), junk );
  79.       (void) sprintf (junk, "%-6d", hist.calls_made);
  80.  
  81.       sb_move (history_hWnd, HIST_ATT_ROW, 2);
  82. #ifndef MILQ
  83.       sb_puts (history_hWnd, MSG_TXT(M_CALLS_OUT));
  84. #endif
  85.       sb_puts( GetDlgItem (history_hWnd, GD_OUT), junk );
  86.  
  87.       (void) sprintf (j, "%d/%ld", hist.connects, hist.callcost);
  88.       (void) sprintf (junk, "%-8.8s", j);
  89.  
  90.       sb_move (history_hWnd, HIST_CONN_ROW, 2);
  91. #ifndef MILQ
  92.       sb_puts (history_hWnd, MSG_TXT(M_GOOD_COST));
  93. #endif
  94.       sb_puts( history_Cost, junk );
  95.  
  96.       (void) sprintf (j, "%d/%d", hist.files_in, hist.files_out);
  97.       (void) sprintf (junk, "%-8.8s", j);
  98.  
  99.       sb_move (history_hWnd, HIST_FILE_ROW, 2);
  100. #ifndef MILQ
  101.       sb_puts (history_hWnd, MSG_TXT(M_FILES_IO));
  102. #endif
  103.       sb_puts( history_Fl, junk );
  104.  
  105.       sb_move (history_hWnd, HIST_LAST_ROW, 2);
  106. #ifndef MILQ
  107.       sb_puts (history_hWnd, MSG_TXT(M_LAST));
  108. #endif
  109.       sb_puts( history_Last, MSG_TXT(M_LAST));
  110.       }
  111.    tmp = hist.last_addr;
  112.    tmp.Domain = NULL;
  113.    last_type (hist.last_caller, &tmp);
  114. }
  115.  
  116. void bottom_line ()
  117. {
  118.    if (fullscreen)
  119.       {
  120. #ifdef WHOLEWIN
  121.       sb_move (wholewin, SB_ROWS - 1, 0);
  122.       (void) sb_putc (wholewin, ' ');
  123.       sb_puts (wholewin, ANNOUNCE);
  124. #ifdef OVERLAYS
  125.       sb_puts (wholewin, "-Overlay");
  126. #endif
  127.       sb_puts (wholewin, COMPILER_NAME);
  128.       if (serial == -1)
  129.          sb_puts (wholewin, MSG_TXT(M_UNREGISTERED));
  130.       sb_move (wholewin, SB_ROWS - 1, SB_COLS - 23);
  131.       sb_puts (wholewin, MSG_TXT(M_ALTF10));
  132. #endif
  133.       }
  134. }
  135.  
  136. void put_up_time ()
  137. {
  138.    struct tm *tp;
  139.    time_t ltime;
  140.  
  141.    if (fullscreen && (un_attended || doing_poll))
  142.       {
  143.       (void) time (<ime);
  144.       tp = localtime (<ime);
  145.  
  146.       (void) sprintf (junk, "%s %s %02d @ %02d:%02d",
  147.                wkday[tp->tm_wday], mtext[tp->tm_mon], tp->tm_mday,
  148.                tp->tm_hour, tp->tm_min);
  149.       sb_move (settings_hWnd, SET_TIME_ROW, SET_TIME_COL);
  150.       sb_puts( settings_DtTm, junk );
  151.       sb_show ();
  152.       }
  153. }
  154.  
  155.