home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tel2305s.zip / INCLUDE / WINDAT.H < prev   
C/C++ Source or Header  |  1992-04-07  |  4KB  |  99 lines

  1. /*
  2. *  Windat -- window data structures for NCSA Telnet
  3. ****************************************************************************
  4. *                                                                          *
  5. *                                                                          *
  6. *      NCSA Telnet                                                         *
  7. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  8. *                                                                          *
  9. *      National Center for Supercomputing Applications                     *
  10. *      152 Computing Applications Building                                 *
  11. *      605 E. Springfield Ave.                                             *
  12. *      Champaign, IL  61820                                                *
  13. *                                                                          *
  14. *                                                                          *
  15. ****************************************************************************
  16. *  Tim Krauskopf
  17. *
  18. *  structure to save capabilities of windows, in addition to the
  19. *  virtual vt102 screen driver.
  20. */
  21.  
  22. #ifndef WINDAT_H
  23. #define WINDAT_H
  24.  
  25. /*  
  26. *  terminal modes, can be changed by external program
  27. *  VTEK is a VT terminal that can accept graphics
  28. *  TEK  is a tek graphics mode for a VT
  29. *  VT   is a VT-only type, cannot be changed to graphics mode 
  30. */
  31. #define VTEKTYPE     1
  32. #define DUMBTYPE     2
  33. #define VTTYPE         3
  34. #define TEKTYPE     4
  35. #define RASTYPE     5
  36.  
  37. #define NCOLORS     4
  38.  
  39. struct twin {
  40.     unsigned short colors[NCOLORS];
  41.     unsigned char mname[16],    /* name of the machine connected to */
  42.         linemode_mask,          /* mask for editting modes in linemode connections */
  43.         linemode[82];            /* line mode buffer for session */
  44.     int pnum,                    /* port number associated */
  45.         vs,                        /* virtual screen associated with it */
  46.         bkscroll,                /* scroll back value */
  47.         width,                    /* width of the window */
  48.         rows,                    /* Number of rows in the window */
  49.         telstate,                /* telnet state for this connection */
  50.         substate,                /* telnet subnegotiation state */
  51.         termstate,                /* terminal type for this connection */
  52.         teks,                    /* tektronix window number */
  53.         crfollow,                /* what is supposed to follow a CR? NUL or LF? */
  54.         sstat,                    /* stat box on screen */
  55.         bksp,                    /* what keycode for backspace ?*/
  56.         del,                    /* for delete? */
  57.         slc[31],                /* line mode sub-option characters */
  58.         slm[31];                /* line mode sub-option modes */
  59.     char *ftpopts;                /* FTP cmd line paramters */
  60.     unsigned int mapoutput:1,    /* are we mapping the characters output for this window */
  61.         vtwrap:1,               /* line wrapping flag */
  62.         lmflag:1,               /* Are we in linemode? */
  63.         lmedit:1,               /* Edit lines in linemode? */
  64.         litflag:1,              /* Is the next character on this connection to be send literally (for linemode use) */
  65.         litecho:1,              /* Is the next character on this connection to be echoed literally (for linemode use) */
  66.         softtab:1,              /* Expand tabs on the client side? (for linemode use) */
  67.         trapsig:1,              /* Trap signals on the client side? (for linemode use) */
  68.         halfdup:1,              /* half duplex mode overrides line mode */
  69.         termsent:1,             /* has terminal type been sent? */
  70.         ibinary:1,              /* negotiate for binary traffic out */
  71.         iwantbinary:1,          /* flag to indicate whether we asked for binary transmission out */
  72.         ubinary:1,              /* negotiate for binary traffic in */
  73.         uwantbinary:1,          /* flag to indicate whether we asked for binary transmission in */
  74.         igoahead:1,             /* negotiation for suppress go-ahead */
  75.         ugoahead:1,                /* neg. for his suppress go-ahead */
  76.         echo:1,                    /* line mode or echo mode? */
  77.         timing:1,                /* timing marker sent */
  78.         capon:1,                /* does this session own a capture file? */
  79.         condebug:2;             /* debugging level for console output */
  80.     FILE *capfp;
  81.     struct twin *next,*prev;
  82. };
  83.  
  84. #define NUM_WINDOWS     20
  85.  
  86. #ifdef WINMASTER
  87.     struct twin *screens[NUM_WINDOWS],
  88.         *current=NULL,
  89.         *console,
  90.         *wins[NPORTS];
  91. #else
  92.     extern struct twin *screens[NUM_WINDOWS],
  93.         *current,
  94.         *console,
  95.         *wins[NPORTS];
  96. #endif
  97.  
  98. #endif
  99.