[BACK]Return to ww.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / window

Diff for /src/usr.bin/window/Attic/ww.h between version 1.2 and 1.3

version 1.2, 1995/12/26 18:00:28 version 1.3, 1996/02/23 14:10:45
Line 1 
Line 1 
 /*      $NetBSD: ww.h,v 1.5 1995/12/21 11:05:58 mycroft Exp $   */  /*      $NetBSD: ww.h,v 1.8 1996/02/08 21:48:51 mycroft Exp $   */
   
 /*  /*
  * Copyright (c) 1983, 1993   * Copyright (c) 1983, 1993
Line 48 
Line 48 
   
 #define NWW     30              /* maximum number of windows */  #define NWW     30              /* maximum number of windows */
   
   /* Macros to clear/set/test flags. */
   #define SET(t, f)       (t) |= (f)
   #define CLR(t, f)       (t) &= ~(f)
   #define ISSET(t, f)     ((t) & (f))
   
         /* a rectangle */          /* a rectangle */
 struct ww_dim {  struct ww_dim {
         int nr;                 /* number of rows */          int nr;                 /* number of rows */
Line 64 
Line 69 
   
         /* the window structure */          /* the window structure */
 struct ww {  struct ww {
           int ww_flags;
   
                 /* general flags and states */                  /* general flags and states */
         char ww_state;          /* state of window */          int ww_state;           /* state of window */
         char ww_oflags;         /* wwopen flags */  #define WWS_INITIAL     0       /* just opened */
   #define WWS_HASPROC     1       /* has process on pty */
   #define WWS_DEAD        3       /* child died */
   #define ww_oflags       ww_flags
   #define WWO_REVERSE     0x0001  /* make it all reverse video */
   #define WWO_GLASS       0x0002  /* make it all glass */
   #define WWO_FRAME       0x0004  /* this is a frame window */
   #define WWO_ALLFLAGS    0x0007
   
                 /* information for overlap */                  /* information for overlap */
         struct ww *ww_forw;     /* doubly linked list, for overlapping info */          struct ww *ww_forw;     /* doubly linked list, for overlapping info */
         struct ww *ww_back;          struct ww *ww_back;
         char ww_index;          /* the window index, for wwindex[] */          unsigned char ww_index; /* the window index, for wwindex[] */
         char ww_order;          /* the overlapping order */  #define WWX_NOBODY      NWW
           int ww_order;           /* the overlapping order */
   
                 /* sizes and positions */                  /* sizes and positions */
         struct ww_dim ww_w;     /* window size and pos */          struct ww_dim ww_w;     /* window size and pos */
Line 87 
Line 102 
         short *ww_nvis;         /* how many ww_buf chars are visible per row */          short *ww_nvis;         /* how many ww_buf chars are visible per row */
   
                 /* information for wwwrite() and company */                  /* information for wwwrite() and company */
         char ww_wstate;         /* state for outputting characters */          int ww_wstate;          /* state for outputting characters */
         char ww_modes;          /* current display modes */          char ww_modes;          /* current display modes */
         char ww_insert;         /* insert mode */  #define ww_wflags       ww_flags
         char ww_mapnl;          /* map \n to \r\n */  #define WWW_INSERT      0x0008  /* insert mode */
         char ww_noupdate;       /* don't do updates in wwwrite() */  #define WWW_MAPNL       0x0010  /* map \n to \r\n */
         char ww_unctrl;         /* expand control characters */  #define WWW_NOUPDATE    0x0020  /* don't do updates in wwwrite() */
         char ww_nointr;         /* wwwrite() not interruptable */  #define WWW_UNCTRL      0x0040  /* expand control characters */
         char ww_hascursor;      /* has fake cursor */  #define WWW_NOINTR      0x0080  /* wwwrite() not interruptable */
   #define WWW_HASCURSOR   0x0100  /* has fake cursor */
   
                 /* things for the window process and io */                  /* things for the window process and io */
         char ww_type;           /* ww_pty is really a pty, not socket pair */          int ww_type;
         char ww_stopped;        /* output stopped */  #define WWT_PTY         0       /* pty */
   #define WWT_SOCKET      1       /* socket pair */
   #define WWT_INTERNAL    2
   #define ww_pflags       ww_flags
   #define WWP_STOPPED     0x0200  /* output stopped */
         int ww_pty;             /* file descriptor of pty or socket pair */          int ww_pty;             /* file descriptor of pty or socket pair */
         int ww_socket;          /* other end of socket pair */          int ww_socket;          /* other end of socket pair */
         int ww_pid;             /* pid of process, if WWS_HASPROC true */          int ww_pid;             /* pid of process, if WWS_HASPROC true */
Line 109 
Line 129 
         char *ww_obq;           /* current write position in ww_ob */          char *ww_obq;           /* current write position in ww_ob */
   
                 /* things for the user, they really don't belong here */                  /* things for the user, they really don't belong here */
         char ww_id;             /* the user window id */          int ww_id;              /* the user window id */
         char ww_center;         /* center the label */  #define ww_uflags       ww_flags
         char ww_hasframe;       /* frame it */  #define WWU_CENTER      0x0400  /* center the label */
         char ww_keepopen;       /* keep it open after the process dies */  #define WWU_HASFRAME    0x0800  /* frame it */
   #define WWU_KEEPOPEN    0x1000  /* keep it open after the process dies */
   #define WWU_ALLFLAGS    0x1c00
         char *ww_label;         /* the user supplied label */          char *ww_label;         /* the user supplied label */
         struct ww_dim ww_alt;   /* alternate position and size */          struct ww_dim ww_alt;   /* alternate position and size */
 };  };
Line 167 
Line 189 
 #define WWM_USR         0x20    /* user specified mode */  #define WWM_USR         0x20    /* user specified mode */
 #define WWM_GLS         0x40    /* window only, glass, i.e., transparent */  #define WWM_GLS         0x40    /* window only, glass, i.e., transparent */
   
         /* ww_state values */  
 #define WWS_INITIAL     0       /* just opened */  
 #define WWS_HASPROC     1       /* has process on pty */  
 #define WWS_DEAD        3       /* child died */  
   
         /* flags for ww_fmap */          /* flags for ww_fmap */
 #define WWF_U           0x01  #define WWF_U           0x01
 #define WWF_R           0x02  #define WWF_R           0x02
Line 181 
Line 198 
 #define WWF_LABEL       0x40  #define WWF_LABEL       0x40
 #define WWF_TOP         0x80  #define WWF_TOP         0x80
   
         /* ww_type values */  
 #define WWT_PTY         0       /* pty */  
 #define WWT_SOCKET      1       /* socket pair */  
 #define WWT_INTERNAL    2  
   
         /* flags to wwopen() */  
 #define WWO_PTY         0x01            /* want pty */  
 #define WWO_SOCKET      0x02            /* want socket pair */  
 #define WWO_REVERSE     0x04            /* make it all reverse video */  
 #define WWO_GLASS       0x08            /* make it all glass */  
 #define WWO_FRAME       0x10            /* this is a frame window */  
   
         /* special ww_index value */  
 #define WWX_NOBODY      NWW  
   
         /* error codes */          /* error codes */
 #define WWE_NOERR       0  #define WWE_NOERR       0
 #define WWE_SYS         1               /* system error */  #define WWE_SYS         1               /* system error */
Line 227 
Line 229 
 char wwcursormodes;             /* the modes for the fake cursor */  char wwcursormodes;             /* the modes for the fake cursor */
 char wwwrap;                    /* terminal has auto wrap around */  char wwwrap;                    /* terminal has auto wrap around */
 int wwdtablesize;               /* result of getdtablesize() call */  int wwdtablesize;               /* result of getdtablesize() call */
 char **wwsmap;                  /* the screen map */  unsigned char **wwsmap;         /* the screen map */
 union ww_char **wwos;           /* the old (current) screen */  union ww_char **wwos;           /* the old (current) screen */
 union ww_char **wwns;           /* the new (desired) screen */  union ww_char **wwns;           /* the new (desired) screen */
 union ww_char **wwcs;           /* the checkpointed screen */  union ww_char **wwcs;           /* the checkpointed screen */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3