From: Stuart Morrow <morrow.stuart@gmail.com>
To: 9front@9front.org
Subject: [9front] ls and ascii: fix names
Date: Tue, 7 Sep 2021 23:16:53 +0000 [thread overview]
Message-ID: <CABB-WO8mt98Vzf+9jjaoyg8Uxn5C=+oABnaP=4p2KsShi3LhMg@mail.gmail.com> (raw)
yeah
diff 87a823332f9eaa4ff1e72f8524f6e59d1cc4f407 uncommitted
--- a/sys/src/cmd/ascii.c
+++ b/sys/src/cmd/ascii.c
@@ -57,7 +57,7 @@
int ncol;
int text=1;
int strip=0;
-Biobuf bin;
+Biobuf bout;
void
main(int argc, char **argv)
@@ -64,7 +64,7 @@
{
int i;
- Binit(&bin, 1, OWRITE);
+ Binit(&bout, 1, OWRITE);
ARGBEGIN{
case '8':
nchars=256; break;
@@ -95,7 +95,7 @@
for(i=0;i<nchars;i++){
put(i);
if((i&7)==7)
- Bprint(&bin, "|\n");
+ Bprint(&bout, "|\n");
}
}else{
if(text==1)
@@ -106,7 +106,7 @@
else
putnum(*argv++);
}
- Bputc(&bin, '\n');
+ Bputc(&bout, '\n');
exits(0);
}
void
@@ -118,9 +118,9 @@
void
put(int i)
{
- Bputc(&bin, '|');
+ Bputc(&bout, '|');
putn(i, ncol);
- Bprint(&bin, " %s", str[i]);
+ Bprint(&bout, " %s", str[i]);
}
char dig[]="0123456789abcdefghijklmnopqrstuvwxyz";
void
@@ -129,7 +129,7 @@
if(ndig==0)
return;
putn(n/base, ndig-1);
- Bputc(&bin, dig[n%base]);
+ Bputc(&bout, dig[n%base]);
}
void
puttext(char *s)
@@ -137,9 +137,9 @@
int n;
n=btoi(s)&0377;
if(strip)
- Bputc(&bin, n);
+ Bputc(&bout, n);
else
- Bprint(&bin, "%s\n", str[n]);
+ Bprint(&bout, "%s\n", str[n]);
}
void
putnum(char *s)
@@ -146,7 +146,7 @@
{
while(*s){
putn(*s++&0377, ncol);
- Bputc(&bin, '\n');
+ Bputc(&bout, '\n');
}
}
int
--- a/sys/src/cmd/ls.c
+++ b/sys/src/cmd/ls.c
@@ -45,7 +45,7 @@
int mwidth; /* max width of muid */
int lwidth; /* max width of length */
int gwidth; /* max width of groupid */
-Biobuf bin;
+Biobuf bout;
void
main(int argc, char *argv[])
@@ -52,7 +52,7 @@
{
int i;
- Binit(&bin, 1, OWRITE);
+ Binit(&bout, 1, OWRITE);
ARGBEGIN{
case 'F': Fflag++; break;
case 'd': dflag++; break;
@@ -153,7 +153,7 @@
format(dirbuf[i].d, dirbuf[i].d->name);
}
ndir = 0;
- Bflush(&bin);
+ Bflush(&bout);
}
void
@@ -211,23 +211,23 @@
int i;
if(sflag)
- Bprint(&bin, "%*llud ",
+ Bprint(&bout, "%*llud ",
swidth, (db->length+1023)/1024);
if(mflag){
- Bprint(&bin, "[%q] ", db->muid);
+ Bprint(&bout, "[%q] ", db->muid);
for(i=2+strlen(db->muid); i<mwidth; i++)
- Bprint(&bin, " ");
+ Bprint(&bout, " ");
}
if(qflag)
- Bprint(&bin, "(%.16llux %*lud %.2ux) ",
+ Bprint(&bout, "(%.16llux %*lud %.2ux) ",
db->qid.path,
qwidth, db->qid.vers,
db->qid.type);
if(Tflag)
- Bprint(&bin, "%c ", (db->mode&DMTMP)? 't': '-');
+ Bprint(&bout, "%c ", (db->mode&DMTMP)? 't': '-');
if(lflag)
- Bprint(&bin, "%M %C %*ud %*q %*q %*llud %s ",
+ Bprint(&bout, "%M %C %*ud %*q %*q %*llud %s ",
db->mode, db->type,
vwidth, db->dev,
-uwidth, db->uid,
@@ -234,7 +234,7 @@
-gwidth, db->gid,
lwidth, db->length,
asciitime(uflag? db->atime: db->mtime));
- Bprint(&bin, Qflag? "%s%s\n": "%q%s\n", name, fileflag(db));
+ Bprint(&bout, Qflag? "%s%s\n": "%q%s\n", name, fileflag(db));
}
void
reply other threads:[~2021-09-07 23:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABB-WO8mt98Vzf+9jjaoyg8Uxn5C=+oABnaP=4p2KsShi3LhMg@mail.gmail.com' \
--to=morrow.stuart@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).