summaryrefslogtreecommitdiff
path: root/sys/src/cmd/unix/drawterm/kern/devlfd.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2013-11-23 01:05:33 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2013-11-23 01:05:33 +0100
commit2f9ae0f8ac8610e13ced184847b57b87fe5db580 (patch)
treef9ad2223d518585a2cfe9ea1c73e1e37d07bf637 /sys/src/cmd/unix/drawterm/kern/devlfd.c
parentea5797c0731203c09ec5fb7172e77eab2750f1a9 (diff)
removing (outdated) drawterm
drawterm is much better maintained by russ cox, so removing this outdated copy. for a more recent version, go to: http://swtch.com/drawterm/
Diffstat (limited to 'sys/src/cmd/unix/drawterm/kern/devlfd.c')
-rw-r--r--sys/src/cmd/unix/drawterm/kern/devlfd.c126
1 files changed, 0 insertions, 126 deletions
diff --git a/sys/src/cmd/unix/drawterm/kern/devlfd.c b/sys/src/cmd/unix/drawterm/kern/devlfd.c
deleted file mode 100644
index 7c61e0c1e..000000000
--- a/sys/src/cmd/unix/drawterm/kern/devlfd.c
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "u.h"
-#include <errno.h>
-#include "lib.h"
-#include "dat.h"
-#include "fns.h"
-#include "error.h"
-
-#undef pread
-#undef pwrite
-
-Chan*
-lfdchan(int fd)
-{
- Chan *c;
-
- c = newchan();
- c->type = devno('L', 0);
- c->aux = (void*)(uintptr)fd;
- c->name = newcname("fd");
- c->mode = ORDWR;
- c->qid.type = 0;
- c->qid.path = 0;
- c->qid.vers = 0;
- c->dev = 0;
- c->offset = 0;
- return c;
-}
-
-int
-lfdfd(int fd)
-{
- return newfd(lfdchan(fd));
-}
-
-static Chan*
-lfdattach(char *x)
-{
- USED(x);
-
- error(Egreg);
- return nil;
-}
-
-static Walkqid*
-lfdwalk(Chan *c, Chan *nc, char **name, int nname)
-{
- USED(c);
- USED(nc);
- USED(name);
- USED(nname);
-
- error(Egreg);
- return nil;
-}
-
-static int
-lfdstat(Chan *c, uchar *dp, int n)
-{
- USED(c);
- USED(dp);
- USED(n);
- error(Egreg);
- return -1;
-}
-
-static Chan*
-lfdopen(Chan *c, int omode)
-{
- USED(c);
- USED(omode);
-
- error(Egreg);
- return nil;
-}
-
-static void
-lfdclose(Chan *c)
-{
- close((int)(uintptr)c->aux);
-}
-
-static long
-lfdread(Chan *c, void *buf, long n, vlong off)
-{
- USED(off); /* can't pread on pipes */
- n = read((int)(uintptr)c->aux, buf, n);
- if(n < 0){
- iprint("error %d\n", errno);
- oserror();
- }
- return n;
-}
-
-static long
-lfdwrite(Chan *c, void *buf, long n, vlong off)
-{
- USED(off); /* can't pread on pipes */
-
- n = write((int)(uintptr)c->aux, buf, n);
- if(n < 0){
- iprint("error %d\n", errno);
- oserror();
- }
- return n;
-}
-
-Dev lfddevtab = {
- 'L',
- "lfd",
-
- devreset,
- devinit,
- devshutdown,
- lfdattach,
- lfdwalk,
- lfdstat,
- lfdopen,
- devcreate,
- lfdclose,
- lfdread,
- devbread,
- lfdwrite,
- devbwrite,
- devremove,
- devwstat,
-};