9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Acme fix
@ 2005-04-10 15:35 Paul Lalonde
  0 siblings, 0 replies; only message in thread
From: Paul Lalonde @ 2005-04-10 15:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- 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)) 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-10 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-10 15:35 [9fans] Acme fix Paul Lalonde

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).