Re: [9fans] Alternative to fine-grained mouse usage?

2021-07-02 Thread umbraticus
nothing's tying you to sam syntax:

,|awk '{print NR "\t" $0}'

then undo.

umbraticus

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T716c5aa0e2aa8a27-Mc258d9e136ffe16b7aeb04fa
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] document for i219?

2021-07-02 Thread kokamoto
In ether82563.c, there are some definitions like:
Tdbal   = 0x3800,   /* Tdesc Base Address Low */
Tdbah   = 0x3804,   /* Tdesc Base Address High */
Tdlen   = 0x3808,   /* Descriptor Length */
Tdh = 0x3810,   /* Descriptor Head */
Tdt = 0x3818,   /* Descriptor Tail */
.

I searched its document around, but failed.
I can fine a document which describes parts of it.

If you know it, please teach me where is it.

Kenji

PS: I searched i219 drivers, and found only 9front has workable it.
However, it uses pcienable() etc.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T2272e8285bf8d48b-Mb38131c95091df99743a4883
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Alternative to fine-grained mouse usage?

2021-07-02 Thread Silas McCroskey
> In any case, Plan 9's ed has a nice "browse" command which sam can't match. I 
> used to issue "0bn", then just "b" once per page. Or, if you don't want line 
> numbers, leave out the "n".

"+,+20p" does it. Doesn't work near the end of the file, though; not
sure if that can be improved within the same expression or you just
have to know to "+,$p" instead.

I agree with the camp that considers using line numbers (other than 0)
in sam (and ed, for that matter) to be something of an anti-pattern,
so I stopped letting the lack of 'n' bother me a long time ago. I'm
sure that's not much help for someone who's admitted to giving up on
regex though; you've got me curious how difficult it'd be to add it.

- sam-d

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T716c5aa0e2aa8a27-Mceaed1e19b5399da7fe7634c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Alternative to fine-grained mouse usage?

2021-07-02 Thread Ethan Gardener
On Fri, Jul 2, 2021, at 4:03 PM, silas poulson wrote:
>> On 1 Jul 2021, at 18:48, Ethan Gardener  wrote:
>> sam -d can't display line numbers
> 
> You can sort of display them via
> 
> ,x {
> p
> }
> 
> Though it’s ugly and annoyingly can’t apply sam’s regex to remove the 
> character locations.

My mail client swallowed the line with the equals sign until I tried to reply. 
If that's happening to anyone else, it's on a line on its own between the 
opening brace and the p.

It does work, but yeah, it's a bit on the ugly side. I can get line & char 
numbers onto the same lines as the text, but only on the ends of the lines 
which is even uglier. It's this:

,x/.*/ {
p
}

The regexp selects whole lines without the newlines. Reversing the order of = 
and p has no effect.

(This reminds me why I switched to Forth: I can program my editor properly 
instead of being constrained by a domain-specific language. But part of the 
problem was I couldn't get my head around Sam's C code. It probably didn't help 
that I started with terminal-editor communication; that was likely the deep end 
of the pool.)

In any case, Plan 9's ed has a nice "browse" command which sam can't match. I 
used to issue "0bn", then just "b" once per page. Or, if you don't want line 
numbers, leave out the "n".
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T716c5aa0e2aa8a27-M93aa1a889014993c1e185d24
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Alternative to fine-grained mouse usage?

2021-07-02 Thread silas poulson
On 1 Jul 2021, at 18:48, Ethan Gardener 
mailto:eeke...@fastmail.fm>> wrote:
sam -d can't display line numbers

You can sort of display them via

,x {
p
}

Though it’s ugly and annoyingly can’t apply sam’s regex to remove the character 
locations.

Silas

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T716c5aa0e2aa8a27-M379705a7f19743c3d79dfbb2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription