From andyb@wndrsvr.la.ca.us Mon Jun  8 09:18:46 1992
Date: Sat, 6 Jun 92 12:13:22 PDT
From: Andy Brager <andyb@wndrsvr.la.ca.us>
To: Laurence Lundblade <lgl@cac.washington.edu>
Subject: Re: port to System V complete

> On Thu, 4 Jun 1992, Andy Brager wrote:
> 
> The alternate editor stuff is in Pine 2.28 that you can get now as
> kaypro-3.tar.Z. You set the editor variable in the .pinerc, then when you
> go into the composer you can type ^_ and your editor will be invoked.

Uh oh.  You mean I can't simply set it in the .pinerc?  I *still* have
to ask for it explicitly with ^_ ?  Everytime I go into pine?  Not good...

> We've tried to keep pico really simple for novice users. In particular
> we've run out of key strokes for more commands like block cut and paste.

Hmmm.  What about ^M to mark a block (once to mark beginning, once to
mark end.  Then a seperate menu can come up asking where you want to
paste it, or if you want to delete it or whatever.)  I don't think ^M is
taken, but I could be wrong.  I haven't looked at it in awhile.  A new
job suddenly reared it's ugly head and I had to shift gears.

I understand you want to keep it simple, but I think even novice
users would appreciate something like this.  Remember, novice 
does not necessarily mean stupid :)  Besides, if I have to *force*
myself to use pico, it won't get tested as well as if I used it in
everyday things.

pine diffs included, c-client diffs in the next...

-  Andy


*** addrbook.c	Sat Jun  6 11:03:58 1992
--- new/addrbook.c	Sat Jun  6 11:03:09 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: addrbook.c,v 1.1 1992/04/27 20:15:27 andyb Exp $";
  
  #ifdef COMMENT
  $Log: addrbook.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: addrbook.c,v 1.1 1992/04/27 20:15:27 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: addrbook.c,v $
***************
*** 47,53 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 47,53 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 77,82 ****
--- 77,85 ----
  #include "headers.h"
  #include "adrbklib.h"
  
+ #ifdef ISC
+ #define current_msgno	current_MsgNo
+ #endif
  
  /*----------------------------------------------------------------------
     Data structures for the display of the address book. There's one
***************
*** 107,113 ****
  
  
  
- 
  #ifdef ANSI
  static int   addr_book_delete(int, int, AdrBk *);
  static int   add_add(AdrBk *, int, int *);
--- 110,115 ----
***************
*** 123,131 ****
  static void  display_book(int, int, int, int, int, int, int, int);
  static int   init_addr_disp(AdrBk_Entry  *, char *);
  static void  paint_line(int, AddrScrn_Disp *, int, int);
! 
! #else ANSI
! 
  static int   addr_book_delete();
  static int   add_add();
  static int   addr_to_list();
--- 125,131 ----
  static void  display_book(int, int, int, int, int, int, int, int);
  static int   init_addr_disp(AdrBk_Entry  *, char *);
  static void  paint_line(int, AddrScrn_Disp *, int, int);
! #else
  static int   addr_book_delete();
  static int   add_add();
  static int   addr_to_list();
***************
*** 141,147 ****
  static int   init_addr_disp();
  static void  paint_line();
  
! #endif ANSI
  
  
  /*
--- 141,147 ----
  static int   init_addr_disp();
  static void  paint_line();
  
! #endif /* ANSI */
  
  
  /*
*** folder.c	Sat Jun  6 11:06:20 1992
--- new/folder.c	Wed May 27 16:08:06 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: folder.c,v 1.1 1992/04/27 20:15:27 andyb Exp $";
  
  #ifdef COMMENT
  $Log: folder.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: folder.c,v 1.1 1992/04/27 20:15:27 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: folder.c,v $
***************
*** 1637,1657 ****
  get_list_lengths(list)
       char **list;
  {
!     register char         **l;
!     register unsigned char *u, *lengths;
      int                     l_size;
  
!     for(l = list; *l != NULL; l++);
!     l_size = l - list;
  
      lengths = (unsigned char *)fs_get((l_size + 1) * sizeof(unsigned char));
  
!     for(u = lengths, l = list; *l != NULL; l++, u++) 
!       *u = strlen(*l);
  
!     *u = 0;
  
      qsort(lengths, l_size, sizeof(unsigned char), compare_lengths);
  
      return(lengths);
  }
--- 1637,1684 ----
  get_list_lengths(list)
       char **list;
  {
!     register char         **ll;
!     register unsigned char *uu, *lengths;
      int                     l_size;
  
! #ifdef ISC
! int ii;
! 
! /* 
! Pointer arithmetic?  That's a no no anywhere!  
! Counting is almost as easy
! */
!     ii=0;
!     for(ll = list; *ll != NULL; ll++, ii++);
!     l_size = ii;
! 
! #else
!     for(ll = list; *ll != NULL; ll++);
!     l_size = ll - list;
! #endif
  
      lengths = (unsigned char *)fs_get((l_size + 1) * sizeof(unsigned char));
  
! #ifdef ISC
!     uu = lengths;
!     for(ll = list; *ll != NULL; ll++, uu++) 
!       *uu = strlen(*ll);
! #else
!     for(uu = lengths, ll = list; *ll != NULL; ll++, uu++) 
!       *uu = strlen(*l);
! #endif
  
!     *uu = 0;
  
+ #ifdef ISC
+ /* I really don't know why this won't work!  "lengths" somehow gets
+ zeroed out.  Maybe we can get by without sorting */
+     /*
+     qsort(lengths, l_size, sizeof(unsigned char), compare_lengths);
+     */
+ #else
      qsort(lengths, l_size, sizeof(unsigned char), compare_lengths);
+ #endif
  
      return(lengths);
  }
*** mailcmd.c	Sat Jun  6 11:29:52 1992
--- new/mailcmd.c	Tue May 19 19:57:07 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: mailcmd.c,v 1.1 1992/04/27 20:15:27 andyb Exp $";
  
  #ifdef COMMENT
  $Log: mailcmd.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: mailcmd.c,v 1.1 1992/04/27 20:15:27 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: mailcmd.c,v $
***************
*** 44,50 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 44,50 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 68,73 ****
--- 68,76 ----
  #include "headers.h"
  
  
+ #ifdef ISC
+ #define current_msgno	current_MsgNo
+ #endif
  #ifdef ANSI
  static MESSAGECACHE *closest_not_deleted(MAILSTREAM *, int, int);
  static save(char *, MESSAGECACHE *);
***************
*** 804,809 ****
--- 807,813 ----
                        for the user reporting what happened.
    ----*/
  
+ FILE *
  append_message(folder, headertext, bodytext, from, soa, number)
       char *folder, *headertext, *bodytext, *from;
       long *soa;
***************
*** 904,910 ****
--- 908,918 ----
          int save_errno = errno;
          /*--- truncate it back to it's original length ---*/
          fclose(folder_file);
+ #ifdef ISC
+         chsize(folder_file, start_of_append);
+ #else
          truncate(filename, start_of_append);
+ #endif
          q_status_message2(2, 4, "Error writing to folder \"%s\" %s",
                            pretty_fn(folder), error_description(save_errno));
          dprint(1, (debugfile, "Error writing folder \"%s\" %s\n",
***************
*** 925,931 ****
--- 933,943 ----
                                               " and marked for deletion" : "");
      }
  
+ #ifdef ISC
+     return(folder_file);
+ #else
      return(1);
+ #endif
  }
  
  
*** newmail.c	Sat Jun  6 11:31:33 1992
--- new/newmail.c	Tue May 19 19:57:07 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: newmail.c,v 1.1 1992/04/27 20:15:27 andyb Exp $";
  
  #ifdef COMMENT
  $Log: newmail.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: newmail.c,v 1.1 1992/04/27 20:15:27 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: newmail.c,v $
***************
*** 44,50 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 44,50 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 220,225 ****
--- 220,228 ----
       char       *folder;
  
  {
+ #ifdef ISC
+ #define random rand
+ #endif
      ENVELOPE *e;
      char      subject[200], from[MAX_ADDRESS+20], intro[50 + MAXFOLDER];
      static char   *carray[] = { "regarding",
*** os-isc.c	Sat Jun  6 11:35:34 1992
--- new/os-isc.c	Wed May 27 17:05:28 1992
***************
*** 629,635 ****
--- 629,639 ----
  char *
  simple_readdir()
  {
+ #ifdef ISC
+     register struct dirent    *dp;
+ #else
      register struct direct    *dp;
+ #endif
  
      if(directory == NULL)
        return(NULL);
*** pine.c	Sat Jun  6 11:36:44 1992
--- new/pine.c	Thu May 28 17:40:01 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: pine.c,v 1.1 1992/04/28 02:07:39 andyb Exp $";
  
  #ifdef COMMENT
  $Log: pine.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: pine.c,v 1.1 1992/04/28 02:07:39 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: pine.c,v $
***************
*** 8,13 ****
--- 8,14 ----
  #endif
  
  /*----------------------------------------------------------------------
+ 
              T H E    P I N E    M A I L   S Y S T E M
  
     Laurence Lundblade and Mike Seibel
***************
*** 43,49 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 44,50 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 74,79 ****
--- 75,84 ----
  
  void who_screen();
  
+ #ifdef ISC
+ #define current_msgno	current_MsgNo
+ #endif
+ 
  #ifdef ANSI
  static void show_main_screen(int);
  static void do_menu();
***************
*** 127,133 ****
--- 132,142 ----
      ps_global->address_header_fields = address_header_fields;
                             
  
+ #ifdef ISC
+     srand(getpid());  /* for new mail notification which uses random */
+ #else
      srandom(getpid());  /* for new mail notification which uses random */
+ #endif
  
  #ifdef DYN
      /*-------------------------------------------------------------------
***************
*** 224,229 ****
--- 233,239 ----
      if(init_tty_driver(pine_state)){
          fprintf(stderr, "Can't access terminal or input is not a terminal. Redirection of\n");
          fprintf(stderr, "standard input is not allowed. For example \"pine < file\" doesn't work.\n\007");
+ 	end_signals();  /* If you start something, you should finish it */
          exit(-1);
      }
          
***************
*** 245,250 ****
--- 255,261 ----
          }
          printf("\r");
          end_tty_driver(pine_state);
+ 	end_signals();  /* If you start something, you should finish it */
          exit(-1);
      }
      init_screen();
***************
*** 344,349 ****
--- 355,361 ----
          NewLine();
          end_keyboard(pine_state->use_fkeys);
          end_tty_driver(pine_state);
+ 	end_signals();  /* If you start something, you should finish it */
          if(!good_addr) {
              fprintf(stderr, "Bad address: %s\n", error);
              exit(-1);
***************
*** 771,776 ****
--- 783,791 ----
      printf("\n\n\nPine finished\n\n");
  #ifdef MEMLOG
      dump_memlog(1);
+ #endif
+ #ifdef ISC
+     end_signals();	/* I'm surprised this wasn't already here */
  #endif
      fflush(stdout);
      exit(0);
*** send.c	Sat Jun  6 11:41:03 1992
--- new/send.c	Tue May 19 19:57:07 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: send.c,v 1.1 1992/04/28 02:07:39 andyb Exp $";
  
  #ifdef COMMENT
  $Log: send.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: send.c,v 1.1 1992/04/28 02:07:39 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: send.c,v $
***************
*** 44,50 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 44,50 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 338,343 ****
--- 338,344 ----
      char *malloced_to, *malloced_cc, *malloced_bcc, *malloced_fcc,
           *headertext, *error_mess, filename[MAXPATH+1], *p;
      long start_of_append;
+     FILE *fd1;
  
  #ifdef DEBUG
      ADDRESS *to_field; /* dbx thinks "p outgoing->to" is a syntax error */
***************
*** 505,512 ****
  
  
          /*----- write message to sent-mail file ----*/
!         if(*malloced_fcc && append_message(malloced_fcc, headertext, *textbuf,
!                        ps_global->VAR_USER_ID, &start_of_append, -1) == 0) {
              continue; /* append failed, go back to composer */
          }
  
--- 506,513 ----
  
  
          /*----- write message to sent-mail file ----*/
!         if(*malloced_fcc && (fd1=append_message(malloced_fcc, headertext, *textbuf,
!                        ps_global->VAR_USER_ID, &start_of_append, -1)) == 0) {
              continue; /* append failed, go back to composer */
          }
  
***************
*** 518,524 ****
--- 519,532 ----
              /* Back out append */
              strcpy(filename, malloced_fcc);
              expand_foldername(filename);
+ #ifdef ISC
+ 	    /*
+ 	    ACK!!!!!!!!!  Need a file descriptor!
+ 	    */
+             chsize(fd1, start_of_append);
+ #else
              truncate(filename, start_of_append);
+ #endif
              /*---- go back to composer ----*/
  	} else {
              /*--- Mail sent OK, get out of here ---*/
***************
*** 730,736 ****
--- 738,748 ----
  
      dprint(9, (debugfile, "Command: \"%s\"\n", command));
  
+ #ifdef ISC
+     if((pid = fork()) == 0){
+ #else
      if((pid = vfork()) == 0){
+ #endif
          execl("/bin/sh", "sh", "-c", command, 0);
          _exit(-1);
      }
***************
*** 743,749 ****
--- 755,765 ----
      isig = signal(SIGINT, SIG_IGN);
      qsig = signal(SIGQUIT, SIG_IGN);
      hsig = signal(SIGHUP, SIG_IGN);
+ #ifdef ISC
+     while((r =  wait(&status)) && r != -1 && r != pid);
+ #else
      while((r =  wait((union wait *)&status)) && r != -1 && r != pid);
+ #endif
      signal(SIGINT,  isig);
      signal(SIGHUP,  hsig);
      signal(SIGQUIT, qsig);
*** signals.c	Sat Jun  6 11:46:31 1992
--- new/signals.c	Thu May 28 17:31:26 1992
***************
*** 63,68 ****
--- 63,69 ----
  static SigType auger_in_signal(), winch_signal(), quit_signal();
  
  SigType hup_signal();
+ extern SigType do_int_signal();
         
  
  
***************
*** 96,101 ****
--- 97,107 ----
            signal(SIGSYS,  auger_in_signal);
            signal(SIGQUIT, quit_signal);
            /* Don't catch SIGFPE cause it's rare and we use it in a hack below*/
+ #ifdef ISC
+           /* signal(SIGINT,  do_int_signal); */
+ 	  ttopen(); /* routine from pico, seems to take care of 
+ 		       everything, *including* SIGINT */
+ #endif
        }
  
  #ifdef RESIZING
***************
*** 131,141 ****
      signal(SIGWINCH, SIG_DFL);
  #endif
      signal(SIGQUIT, SIG_DFL);
  }
  
  
- 
- 
  /*----------------------------------------------------------------------
       Handle signals caused by aborts -- SIGSEGV, SIGILL
  Call panic which cleans up tty modes and then core dumps
--- 137,149 ----
      signal(SIGWINCH, SIG_DFL);
  #endif
      signal(SIGQUIT, SIG_DFL);
+ #ifdef ISC
+     /* signal(SIGINT,  SIG_DFL);  */
+     ttclose();	/* pico routines work nicely here */
+ #endif
  }
  
  
  /*----------------------------------------------------------------------
       Handle signals caused by aborts -- SIGSEGV, SIGILL
  Call panic which cleans up tty modes and then core dumps
***************
*** 180,186 ****
  }
  
  
- 
  /*----------------------------------------------------------------------
        handle hang up signal -- SIGHUP
  
--- 188,193 ----
***************
*** 218,224 ****
  
      exit(0);
  }
- 
  
  
  
--- 225,230 ----
*** ttyin.c	Sat Jun  6 11:49:13 1992
--- new/ttyin.c	Sat May 30 19:23:35 1992
***************
*** 125,130 ****
--- 125,131 ----
    Result: returns 0 if successful and -1 if not.
    ----*/
  
+ struct termio oterm2;
  Raw(state)
  int state;
  {
***************
*** 138,143 ****
--- 139,148 ----
  #ifdef HAVE_TERMIO
          if(ioctl(STDIN_FD, TCSETAW, &_original_tty) < 0)
            return(-1);
+ #ifdef ISC
+ 	ioctl(0, TCSETA, &oterm2);	/* set old state */
+ #endif
+ 
  #else
  	if(ioctl(STDIN_FD, TIOCSETP, &_original_tty) < 0)
            return(-1);
***************
*** 151,156 ****
--- 156,172 ----
  #ifdef HAVE_TERMIO
          if(ioctl(STDIN_FD, TCGETA, &_original_tty) < 0)
            return(-1);
+ 
+ #ifdef ISC
+ /* 
+ echoe parenb eof are all getting screwed up on exit.  This fixes that problem.
+ Since termio structure contains more functionality then the sgtty struct, 
+ you cannot fully restore the orginal settings without saving them in the 
+ following manner first.
+ */
+ 	    /*  This is now already done in pico, so make it oterm2.
+ 	    ioctl(0, TCGETA, &oterm2);	/* save old state */
+ #endif
  	(void) ioctl(STDIN_FD, TCGETA, &_raw_tty);    /** again! **/
  
  	_raw_tty.c_lflag &= ~(ICANON | ECHO);	/* noecho raw mode  */
***************
*** 387,393 ****
--- 403,412 ----
              }
          } else if(ch == '[') {
              /* For dec terminals, vt200s, and some weird Sun stuff */
+ 	    /* Also IBM AT enhanced keyboards */
              ch = read_with_timeout(time_out);
+ 	    printf("ch= %d LINE:%d %s",ch,__LINE__,__FILE__);	/* DEBUG */
+ 
              if(ch == NO_OP_IDLE || ch == NO_OP_COMMAND || ch == KEY_RESIZE)
                goto done;
              ch &= 0x7f;
***************
*** 914,919 ****
--- 933,946 ----
     ^D delete
  ----------------------------------------------------------------------*/
  
+ jmp_buf jump_state;	/* 
+                            For the sole purpose of catching ^C which is
+ 			   my interrupt character.  If we don't catch it,
+ 			   it aborts.  So, I tag where we are and jump
+ 			   back to where we should be if ^C were merely
+ 			   a plain control-char.  I'm all ears for a 
+ 			   better solution.
+ 			   */
  optionally_enter(string, y_base, x_base, field_len, append_current, passwd,
                   prompt, escape_label, help, disallow_abort)
       char        *string, *prompt, *escape_label, **help;
***************
*** 1396,1398 ****
--- 1423,1448 ----
      }
      return(ch);
  }
+ 
+ #ifdef JUNK
+ do_int_signal()
+ {
+ char        *string;
+ int          x_base, return_v, real_y_base, append_current;
+ char          *saved_original;
+ 
+ 
+ return_v = 1;
+ if(saved_original != NULL)
+ 	strcpy(string, saved_original);
+ 
+ if(append_current) 
+ 	fs_give((void *)&saved_original); 
+ 
+ removing_trailing_white_space(string);
+ EndInverse();
+ MoveCursor(real_y_base, x_base); /* Move the cursor to show we're done here */
+ fflush(stdout);             
+ return(return_v);
+ }
+ #endif
*** ttyout.c	Sat Jun  6 11:51:42 1992
--- new/ttyout.c	Tue May 19 19:57:07 1992
***************
*** 1,4 ****
! static char rcsid[] = "$Id: ttyout.c,v 1.1 1992/04/27 21:29:01 andyb Exp $";
  
  #ifdef COMMENT
  $Log: ttyout.c,v $
--- 1,4 ----
! static char rcsid[] = "$Id: ttyout.c,v 1.1 1992/04/27 21:29:01 andyb Exp andyb $";
  
  #ifdef COMMENT
  $Log: ttyout.c,v $
***************
*** 44,50 ****
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 1.1 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
--- 44,50 ----
  
     Pine is in part based on The Elm Mail System:
      ***********************************************************************
!     *  The Elm Mail System  -  $Revision: 2.13 $   $State: Exp $          *
      *                                                                     *
      * 			Copyright (c) 1986, 1987 Dave Taylor              *
      * 			Copyright (c) 1988, 1989 USENET Community Trust   *
***************
*** 94,99 ****
--- 94,102 ----
  
  #ifdef HAVE_TERMIO
  #include <termio.h>
+ #ifdef ISC
+ #include <sys/sioctl.h>
+ #endif
  #else
  #include <sgtty.h>
  #endif
***************
*** 218,223 ****
--- 221,227 ----
          _columns = DEFAULT_COLUMNS_ON_TERMINAL;
      }
  
+ #ifdef RESIZING 
      get_windsize(ttyo);
  
      if(ttyo->screen_cols > MAX_SCREEN_COLS ||
***************
*** 225,230 ****
--- 229,238 ----
          ttyo->screen_cols = MAX_SCREEN_COLS;
          ttyo->screen_rows = MAX_SCREEN_ROWS;
      }
+ #else  /* need to fill it in since it's used!!! */
+         ttyo->screen_cols = DEFAULT_COLUMNS_ON_TERMINAL;
+         ttyo->screen_rows = DEFAULT_LINES_ON_TERMINAL; 
+ #endif
  
      /*---- Make sure this terminal has the capability.
          All we need is cursor address, clear line, and 
***************
*** 309,314 ****
--- 317,326 ----
      }
  #else
      /* Termcap takes care of it above */ 
+ 
+         ttyo->screen_cols = DEFAULT_COLUMNS_ON_TERMINAL;
+         ttyo->screen_rows = DEFAULT_LINES_ON_TERMINAL; 
+ 	/* Not on ISC it doesn't... */
  #endif
  }
  
