Commit Graph

21 Commits

Author SHA1 Message Date
Virgil Dupras
b745f49186 Rename blockdev's API routines to GetB/PutB
The goal is to avoid mixing those routines with "character devices"
(acia, vpd, kbd) which aren't block devices and have routines that
have different expectations.

This is a first step to fixing #64.
2019-10-30 16:59:35 -04:00
Virgil Dupras
8db1bdb245 ed: add '.' and '$' support 2019-10-04 13:49:33 -04:00
Virgil Dupras
c96c8e7df0 ed: update curline after a, i and d 2019-07-25 21:24:36 -04:00
Virgil Dupras
0fd16a0bb6 ed: fix boken 'a' and 'd' cmds 2019-07-21 19:32:24 -04:00
Virgil Dupras
421d881fae ed: allow inserting in empty file 2019-07-21 15:06:03 -04:00
Virgil Dupras
01031a780a ed: Add 'w' command 2019-07-21 11:40:26 -04:00
Virgil Dupras
1a5a1b9861 ed: make scratchpad memory only
The dual scraptchpad thing doesn't work. Things become very
complicated when it's time to write that back to the file. We
overwrite our contents and end up with garbage.
2019-07-21 10:45:58 -04:00
Virgil Dupras
942d2a952d ed: take filename as an argument
This hard-binds ed to the filesystem (I liked the idea of working
only with blockdevs though...), but this is necessary for the
upcoming `w` command. We need some kind of way to tell the
destination to write to truncate itself.

This only has a meaning in the filesystem, but it's necessary to
let the file know that its registered file size has possibly
shrunk.

I thought of alternatives that would have allowed me to keep ed
blkdev-centered, but they were all too hackish to my own taste.

Hence, this new hard-bind on files.
2019-07-20 19:43:07 -04:00
Virgil Dupras
eefadc3917 ed: add support for 'a' and 'i' 2019-07-14 17:35:21 -04:00
Virgil Dupras
5669884508 ed: read initial contents in bufInit 2019-07-14 12:19:37 -04:00
Virgil Dupras
3b0029335a ed: add README 2019-07-14 11:31:14 -04:00
Virgil Dupras
8af1cf468c ed: add 'd' cmd 2019-07-14 10:32:28 -04:00
Virgil Dupras
50d0dc982c ed: check addr bounds 2019-07-14 09:04:51 -04:00
Virgil Dupras
c811d5330c apps/ed: add support for addr ranges 2019-07-13 22:09:17 -04:00
Virgil Dupras
2d9f74c2af apps/ed: refactoring 2019-07-13 21:08:16 -04:00
Virgil Dupras
8cf68dc7ad apps/ed: handle +[n] and -[n] addresses 2019-07-13 16:30:30 -04:00
Virgil Dupras
951dd2206d apps/ed: add the concept of "current line" 2019-07-13 15:28:44 -04:00
Virgil Dupras
e0f2a71dfc apps/ed: print specified line 2019-07-13 14:01:20 -04:00
Virgil Dupras
6dbbfa837d apps/ed: add (dummy) line number processing
Starting to feel interactive...
2019-07-13 11:53:30 -04:00
Virgil Dupras
3491c26132 apps/ed: start implementing I/O 2019-07-13 11:29:06 -04:00
Virgil Dupras
3d474c9121 apps/ed: first steps 2019-07-13 09:57:37 -04:00