🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dana Jacobsen Fri, 02 Oct 1992 19:39
(none)
#995
Author: Dana Jacobsen
Date: Fri, 02 Oct 1992 19:39
39 lines
1490 bytes
  When paste, from textutils-1.3, is given a null delimiter, it core
dumps on our system (Sun Sparcstation, gcc 2.2.2 -O).  This came about
because a user of our system wanted to do "paste -d\\0 f1 f2", but 
hadn't read the man pages fully, so tried "paste -d '' f1 f2" which
core dumps.  When ucb paste is given a null delimiter, it responds
with "paste: no delimiters", but the following patch makes it run as
if it were told to use a null delimiter (that makes more sense to me).



*** paste.c.orig	Thu Jan 16 22:53:10 1992
--- paste.c	Fri Oct  2 12:33:46 1992
***************
*** 104,111 ****
  	{
  	case 'd':
  	  /* Delimiter character(s). */
! 	  if (optarg[0] == '\0')
! 	    optarg = "\\0";
  	  delims = optarg;
  	  break;
  
--- 104,113 ----
  	{
  	case 'd':
  	  /* Delimiter character(s). */
! 	  if (strlen(optarg) == 0) {
! 	    optarg = (char *) xmalloc(2);
! 	    optarg[0] = EMPTY_DELIM;
! 	  }
  	  delims = optarg;
  	  break;
  


--
Dana Jacobsen
jacobsd@solar.cor2.epa.gov
jacobsd@cs.orst.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads