all repos — kuro @ 5040da40fc3dfc7f26527ba52a866e960eb5f83a

multiwindow text editor thing for plan9 with simple client VM and 9p interface

kuro.c (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "dat.h"
#include "fns.h"

static char* mtpt;

int threadmaybackground(void) {
  return 1;
}

void threadmain(int argc, char **argv)
{
    mtpt = getenv("KURO_MTPT");
    if (mtpt == nil) {
      sysfatal("KURO_MTPT not set");
    }

    kuro9p_set_mtpt(mtpt);
    print("KURO_MTPT=%s\n", mtpt);
    
    ARGBEGIN{

    }ARGEND
    
    threadcreate(start_9p, nil, 4096);
    supervise_node(create_node(argc > 1 ? argv[0] : nil));
    threadexitsall(0);
}