9fans archive / 2001 / 02 / 429 / prev next
From: rog@vit...
Subject: Re: [9fans] a small change to acme
Date: Fri, 23 Feb 2001 14:59:47 0000
no wrap/inst involved - i just updated the file concerned (in my
private copy of acme). if you make the change in /sys/src/cmd/acme,
you should be aware that subsequent installs will detect that it's
changed, will warn you, and won't update the file.
i guess it should probably be a proper update, but i haven't got the
time now.
basically, edit /sys/src/cmd/acme/ecmd.c. change the printposn
function to look like this:
printposn(Text *t, int charsonly)
{
long l1, l2;
if (t != nil && t->file != nil && t->file->name != nil)
warning(nil, "%.*S:", t->file->nname, t->file->name);
if(!charsonly){
l1 = 1+nlcount(t, 0, addr.r.q0);
l2 = l1+nlcount(t, addr.r.q0, addr.r.q1);
/* check if addr ends with '\n' */
if(addr.r.q1>0 && addr.r.q1>addr.r.q0 && textreadc(t, addr.r.q1-1)=='\n')
--l2;
warning(nil, "%lud", l1);
if(l2 != l1)
warning(nil, ",%lud", l2);
warning(nil, "\n");
return;
}
warning(nil, "#%d", addr.r.q0);
if(addr.r.q1 != addr.r.q0)
warning(nil, ",#%d", addr.r.q1);
warning(nil, "\n");
}
this change makes the acme Edit = commands print fully qualified acme
addresses, which seems to make more sense... (it also means that you
can use them to mark a current position in the file, etc)
cheers,
rog.