From: Paul Lalonde <plalonde@telus.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] Acme fix
Date: Sun, 10 Apr 2005 08:35:57 -0700 [thread overview]
Message-ID: <4fc1ef2c1a6c6dcc71be9f056b905580@telus.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
I have a small patch that fixes acme's disposition to trim addresses
from explicitly swept filename selections on a 2-1 chord, and which I
believe breaks nothing else.
Anyone care to let me know if this breaks any of their usage?
I've attached the cvs diff.
Paul
[-- Attachment #2: foo --]
[-- Type: application/octet-stream, Size: 1360 bytes --]
Index: exec.c
===================================================================
RCS file: /cvs/plan9/src/cmd/acme/exec.c,v
retrieving revision 1.20
diff -r1.20 exec.c
270c270
< if(expand(argt, argt->q0, argt->q1, &e)){
---
> if(expand(argt, argt->q0, argt->q1, &e, FALSE)){
Index: fns.h
===================================================================
RCS file: /cvs/plan9/src/cmd/acme/fns.h,v
retrieving revision 1.11
diff -r1.11 fns.h
89c89
< int expand(Text*, uint, uint, Expand*);
---
> int expand(Text*, uint, uint, Expand*, int);
Index: look.c
===================================================================
RCS file: /cvs/plan9/src/cmd/acme/look.c,v
retrieving revision 1.13
diff -r1.13 look.c
68c68
< expanded = expand(t, q0, q1, &e);
---
> expanded = expand(t, q0, q1, &e, TRUE);
612a613,617
>
> // PAL: Two kinds of expansion, hence the testfilename flag:
> // one is true expansion when q0==q1; the other is q0!=q1, which degenerates
> // into a check for a filename without any expansion. Button3 uses
> // this to check if the selected string is a filename.
614c619
< expand(Text *t, uint q0, uint q1, Expand *e)
---
> expand(Text *t, uint q0, uint q1, Expand *e, int testfilename)
627c632
< if(expandfile(t, q0, q1, e))
---
> if((testfilename || q0 == q1) && expandfile(t, q0, q1, e))
reply other threads:[~2005-04-10 15:35 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=4fc1ef2c1a6c6dcc71be9f056b905580@telus.net \
--to=plalonde@telus.net \
--cc=9fans@cse.psu.edu \
/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).