🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mike Wescott Fri, 09 Jan 1987 04:59
filename expansion bugs in uuxqt (Honey Danber) w/patch
#57
Author: Mike Wescott
Date: Fri, 09 Jan 1987 04:59
176 lines
3915 bytes
In Honey Danber uuxqt (BNU 2.0 ??) filename expansion is not performed.
Is there a reason for this?? Feature or Bug?  Specifically ~user and
~/ don't get expanded.

The following patch to uuxqt.c corrects this problem.

	-Mike Wescott
	ncrcae!wescott


*** uuxqt.c.orig	Thu Jan  8 01:39:49 1987
--- uuxqt.c	Thu Jan  8 03:09:54 1987
***************
*** 463,469
  chkpart(ptr)
  char *ptr;
  {
! 	char	prm[BUFSIZ], xcmd[BUFSIZ];
  	char	savechar[2]; /* one character string with NULL */
  	int	ret, strx;
  

--- 463,469 -----
  chkpart(ptr)
  char *ptr;
  {
! 	char	prm[BUFSIZ], xcmd[BUFSIZ], xfile[BUFSIZ];
  	char	savechar[2]; /* one character string with NULL */
  	int	ret, strx;
  
***************
*** 525,531
  		continue;
  	    }
  
! 	    if (chkFile(prm))
  		return(BAD_FILE);
  	    else
  		APPCMD(prm);

--- 525,531 -----
  		continue;
  	    }
  
! 	    if (chkFile(prm,xfile))
  		return(BAD_FILE);
  	    else
  		APPCMD(xfile);
***************
*** 528,534
  	    if (chkFile(prm))
  		return(BAD_FILE);
  	    else
! 		APPCMD(prm);
     	}
  	return(0);	/* all ok */
  }

--- 528,534 -----
  	    if (chkFile(prm,xfile))
  		return(BAD_FILE);
  	    else
! 		APPCMD(xfile);
     	}
  	return(0);	/* all ok */
  }
***************
*** 546,552
  
  static
  int
! chkFile(prm)
  char *prm;
  {
  	char	*p, buf[BUFSIZ];

--- 546,552 -----
  
  static
  int
! chkFile(prm, buf)
  char *prm;
  char *buf;
  {
***************
*** 548,553
  int
  chkFile(prm)
  char *prm;
  {
  	char	*p, buf[BUFSIZ];
  

--- 548,554 -----
  int
  chkFile(prm, buf)
  char *prm;
+ char *buf;
  {
  	char	*p;
  
***************
*** 549,555
  chkFile(prm)
  char *prm;
  {
! 	char	*p, buf[BUFSIZ];
  
  	(void) strcpy(buf, prm);
  	switch(*prm) {

--- 550,556 -----
  char *prm;
  char *buf;
  {
! 	char	*p;
  
  	(void) strcpy(buf, prm);
  	switch(*prm) {
***************
*** 562,568
  	    /*NOTREACHED*/
  
  	case '!':
! 	    return(chkFile(buf+1));
  	    /*NOTREACHED*/
  
  	default:

--- 563,569 -----
  	    /*NOTREACHED*/
  
  	case '!':
! 	    return(chkFile(prm+1,buf));
  	    /*NOTREACHED*/
  
  	default:
***************
*** 573,579
  	    if ( (p = strchr(buf, '/')) == NULL) {  /* ok */
  		return(0);
  	    }
! 	    if (doFileChk(p)) 
  		return(BAD_FILE);
  	    else
  	        return(0);

--- 574,580 -----
  	    if ( (p = strchr(buf, '/')) == NULL) {  /* ok */
  		return(0);
  	    }
! 	    if (doFileChk(p))
  		return(BAD_FILE);
  	    else
  	        return(0);
***************
*** 581,587
  
  	/* there is at least one '!' - see if it refers to my system */
  	if (PREFIX(Myname, buf))  /*  my system so far, check further */
! 	    return(chkFile(p+1));  /* recurse with thing after '!' */
  	else		/* not my system - not my worry */
  	    return(0);
  }

--- 582,588 -----
  
  	/* there is at least one '!' - see if it refers to my system */
  	if (PREFIX(Myname, buf))  /*  my system so far, check further */
! 	    return(chkFile(p+1,buf));  /* recurse with thing after '!' */
  	else		/* not my system - not my worry */
  	    return(0);
  }
-- 
	-Mike Wescott
	 ncrcae!wescott
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