[comp.bugs.misc] filename expansion bugs in uuxqt

wescott@sauron.Columbia.NCR.COM (Mike Wescott) (01/09/87)

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