[comp.mail.elm] elm 2.1PL1 - aborts when no standout

cudcv@warwick.ac.uk (Rob McMahon) (12/21/88)

Elm aborts on terminals with no standout mode, on machines where you cannot
dereference a null pointer.  This has been mentioned before, but I've seen no
fix, so:
-- 
RCS file: /usr/local/src/elm/src/curses.c,v
retrieving revision 2.1.1.1
retrieving revision 2.1.1.2
diff -c -r2.1.1.1 -r2.1.1.2
*** /tmp/,RCSt1a03726	Tue Dec 20 17:32:15 1988
--- /tmp/,RCSt2a03726	Tue Dec 20 17:32:17 1988
***************
*** 219,227 ****
  	  return(NULL);
  
  	if (termcap_label[0] == 's' && termcap_label[1] == 'o')
! 	  strcpy(escape_sequence, _setinverse);
  	else if (termcap_label[0] == 's' && termcap_label[1] == 'e')
! 	  strcpy(escape_sequence, _clearinverse);
  	else if ((myptr = tgetstr(termcap_label, &ptr)) == NULL)
  	  return( (char *) NULL );
  	else
--- 222,236 ----
  	  return(NULL);
  
  	if (termcap_label[0] == 's' && termcap_label[1] == 'o')
! 	  if (_setinverse)
! 	    strcpy(escape_sequence, _setinverse);
! 	  else
! 	    return ( (char *) NULL );
  	else if (termcap_label[0] == 's' && termcap_label[1] == 'e')
! 	  if (_clearinverse)
! 	    strcpy(escape_sequence, _clearinverse);
! 	  else
! 	    return ( (char *) NULL );
  	else if ((myptr = tgetstr(termcap_label, &ptr)) == NULL)
  	  return( (char *) NULL );
  	else
-- 
Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             ARPA:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England