mirror of
https://github.com/osnr/TabFS.git
synced 2024-06-18 05:35:04 +02:00
delete vestigial test-native.c, improve md
This commit is contained in:
parent
08c280118e
commit
8bff4e0857
|
@ -1,30 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
FILE *log = fopen("log.txt", "w");
|
||||
fprintf(log, "hello\n"); fflush(log);
|
||||
|
||||
for (;;) {
|
||||
char *outMsg = "{\"text\":\"This is a response message\"}";
|
||||
unsigned int outLen = strlen(outMsg);
|
||||
char *bOutLen = (char *)&outLen;
|
||||
write(1, bOutLen, 4); // 1 is stdout
|
||||
write(1, outMsg, outLen);
|
||||
fflush(stdout);
|
||||
fprintf(log, "wrote msg\n"); fflush(log);
|
||||
|
||||
char bInLen[4];
|
||||
read(0, bInLen, 4); // 0 is stdin
|
||||
unsigned int inLen = *(unsigned int *)bInLen;
|
||||
char *inMsg = (char *)malloc(inLen);
|
||||
read(0, inMsg, inLen);
|
||||
inMsg[inLen] = '\0';
|
||||
fprintf(log, "msg: [%s]\n", inMsg); fflush(log);
|
||||
free(inMsg);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
7
tabfs.md
7
tabfs.md
|
@ -15,6 +15,7 @@ body { font-family: Verdana, sans-serif; background: #eee; }
|
|||
h1 { font-family: Helvetica; }
|
||||
#TableOfContents > ul > li:first-child { display: none; }
|
||||
#TableOfContents a[rel=footnote] { display: none; }
|
||||
pre { white-space: pre-wrap; }
|
||||
</style>
|
||||
|
||||
[TabFS](https://github.com/osnr/TabFS) is a browser extension that
|
||||
|
@ -271,6 +272,12 @@ extension is to create a gigantic new surface area of communication
|
|||
between stuff inside your browser and software on the rest of your
|
||||
computer.
|
||||
|
||||
Before doing anything, clone [this repository](https://github.com/osnr/TabFS):
|
||||
|
||||
```
|
||||
$ git clone https://github.com/osnr/TabFS.git
|
||||
```
|
||||
|
||||
First, install the browser extension.
|
||||
|
||||
Then, install the C filesystem.
|
||||
|
|
Loading…
Reference in a new issue