Remove vestigal code. - sam - An updated version of the sam text editor.
(HTM) git clone git://vernunftzentrum.de/sam.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 865ad2eb92b1e50b67648a99d7800a3d28ba8efc
(DIR) parent ce79fc47ddd96ac43d9ab40078a80fe28a93ec12
(HTM) Author: Rob King <jking@deadpixi.com>
Date: Fri, 27 Jan 2017 10:14:54 -0600
Remove vestigal code.
Diffstat:
sam/error.c | 2 +-
sam/io.c | 43 ------------------------------
2 files changed, 1 insertion(+), 44 deletions(-)
---
(DIR) diff --git a/sam/error.c b/sam/error.c
@@ -58,7 +58,7 @@ static char *wmsg[]={
/* warn_S */
"files might be aliased",
/* warn */
- "null characters elided",
+ "null characters elided; file will be different upon write",
"can't run pwd",
"last char not newline",
"exit status not 0",
(DIR) diff --git a/sam/io.c b/sam/io.c
@@ -206,49 +206,6 @@ readio(File *f, bool *nulls, bool setdate)
return nt;
}
-/* Posn
-readio(File *f, bool *nulls, bool setdate)
-{
- size_t n = 0;
- size_t nt = 0;
- Posn p = addr.r.p2;
- uint64_t dev, qid;
- int64_t mtime;
- char buf[BLOCKSIZE+1] = {0};
- const char *bp = buf;
- wchar_t wbuf[BLOCKSIZE * MB_LEN_MAX + 1] = {0};
- mbstate_t ps = {0};
-
- *nulls = false;
-
- n = read(io, buf, BLOCKSIZE);
- while (n > 0){
- size_t w = mbsrtowcs(wbuf, &bp, BLOCKSIZE, &ps);
- if ((ssize_t)w < 0){
- *nulls = true;
- warn(Wnottext);
- return nt;
- }
- Finsert(f, tmprstr(wbuf, w), p);
-
- memset(buf, 0, sizeof(buf));
- nt += n;
- n = read(io, buf, BLOCKSIZE);
- bp = buf;
- }
-
- if (setdate){
- if (statfd(io, &dev, &qid, &mtime, 0, 0) > 0){
- f->dev = dev;
- f->qid = qid;
- f->date = mtime;
- checkqid(f);
- }
- }
-
- return nt;
-} */
-
Posn
writeio(File *f)
{