Article View: comp.bugs.misc
Article #57filename expansion bugs in uuxqt (Honey Danber) w/patch
From: Mike Wescott
Date: Fri, 09 Jan 1987 04:59
Date: Fri, 09 Jan 1987 04:59
176 lines
3915 bytes
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
Technical Details
Message-ID:
<800@sauron.Columbia.NCR.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcnc!ece-csc!ncrcae!sauron!wescottShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcnc!ece-csc!ncrcae!sauron!wescott From: wescott@sauron.Columbia.NCR.COM (Mike Wescott) Newsgroups: comp.bugs.misc Subject: filename expansion bugs in uuxqt (Honey Danber) w/patch Message-ID: <800@sauron.Columbia.NCR.COM> Date: Thu, 8-Jan-87 23:59:49 EST Article-I.D.: sauron.800 Posted: Thu Jan 8 23:59:49 1987 Date-Received: Fri, 9-Jan-87 06:09:39 EST Sender: news@sauron.Columbia.NCR.COM Reply-To: wescott@sauron.UUCP (Mike Wescott) Distribution: world Organization: Advanced Systems Development, NCR Corp., Columbia, SC Lines: 176