commit cf0624adb8c37549bf38584a113ab09fdbe28482
parent dfd928c15a15bb7a655cbb23a3ce2bbaff7ac2a3
Author: rpa <rpa@grass>
Date: Tue, 21 Nov 2023 10:01:29 +0000
src: add missing files
Diffstat:
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/src/json/main.c b/src/json/main.c
@@ -0,0 +1,16 @@
+#include <u.h>
+#include <libc.h>
+#include <json.h>
+
+char *jjjj = " { \"x\" : \"heh\" }";
+
+void
+main(void)
+{
+ JSONfmtinstall();
+
+ JSON *j = jsonparse(jjjj);
+
+ if (j == nil) print("err! %r\n");
+ else print("%J\n", j);
+}
diff --git a/src/knob/volume b/src/knob/volume
@@ -0,0 +1,8 @@
+#!/bin/rc
+
+{
+ echo Volume 0 100 75 | knob &
+ receive -p widget | sed -u 's/([0-9]+).*/master \1/' > /dev/volume
+}
+
+
diff --git a/src/util/test.c b/src/util/test.c
@@ -0,0 +1,18 @@
+#include <u.h>
+#include <libc.h>
+#include "util.h"
+
+Type TestType = {sizeof(char *)};
+
+void
+main(void)
+{
+ Slice *buf = allocslice(&TestType, 0, 0);
+ char *str[] = { "hello", " ", "world", "\n" };
+ sliceappendp(buf, 4, str);
+ int i;
+ for (i = 0; i < buf->len; i++) {
+ int *p = slicegetp(buf, i);
+ print("%s", *p);
+ }
+}