From to ~min/agec
Apologies for the slow response. So, yes, when running in ape/psh, ape should be bound into /bin; if this was an rc script, it would not be bound in. I've sent a new version of the patch with the commit adding the mkfile squashed in. Quoth Amin <amin@firemail.cc>: > It doesn't work, complains about missing test/unit/mkfile. It seems > you forgot to include some diffs. Can you provide them, please? > > > +if [ $(uname) = Plan9 ]; then > > + tool=../6.agec
From Ori Bernstein to ~min/agec
* add in just enough of a hacked sruner clone to enable unit tests to run * add mkfile to run unit tests --- diff 13faf69a4efb14cae2c44c239795bb76f658780c ba473a392f59567f90a8272a643b08ebe9a21d53 --- /dev/null +++ b/plan9/check.h @@ -1,0 +1,28 @@ +#define CK_ENV 0 + +typedef unsigned long long size_t; + +#define ck_assert_uint_eq(a, b) assert(a == b)
From to ~mpu/qbe
Quoth Rosie <acquitefx@gmail.com>: > Nevermind, this snippet: > ```qbe > export function w $main() { > @start > %foo.addr =:Foo call $getFoo() > %foo.copy =:Foo copy %foo.addr > > %foo.a =w loadw %foo.copy > > call $printf(l $test, ..., w %foo.a) > ret 0 > } > ```
From Ori Bernstein to ~min/agec
--- diff 863c11267e9b1f3a63dcee5b4d29bfc539661648 c1a496112e665caa4389a878e0eeac94b012618a --- /dev/null +++ b/plan9/check.h @@ -1,0 +1,28 @@ +#define CK_ENV 0 + +typedef unsigned long long size_t; + +#define ck_assert_uint_eq(a, b) assert(a == b) +#define ck_assert_int_eq(a, b) assert(a == b) +#define ck_assert_msg(a, ...) assert(a) +#define ck_assert assert +#define ck_assert_mem_eq(a, b, n)\
From Ori Bernstein to ~min/agec
when a program falls off the end of main, it exits with a failed status; as a result, call exits() explicitly to fix --- diff 76b9b28fd0dc8d402a10662c9bbe8339c45cce4d 863c11267e9b1f3a63dcee5b4d29bfc539661648 --- a/agec-keygen.c +++ b/agec-keygen.c @@ -117,7 +117,7 @@ usage(void) { fprintf(stderr, "usage: %s [-y]\n", argv0); - exitusage(); + exitstatus("usage"); }
From Ori Bernstein to ~min/agec
* install agec and agec-keygen as subcommands for auth/, so that it sits beside tools like auth/aescbc * use the mkmany bits more effectively, with multiple TARGs and a list of OFILES; the linker is smart enough to only pull the ones that get used into the binaries. * format more like the other mkfiles --- diff e6fb7e1db780eb4a0c8e922daf9a28ea5fb89765 a869e21a6fcd486b3f7067eee8fc8943741536a9 --- a/mkfile +++ b/mkfile @@ -1,28 +1,49 @@
From Ori Bernstein to ~min/agec
* install agec and agec-keygen as subcommands for auth/, so that it sits beside tools like auth/aescbc * use the mkmany bits more effectively, with multiple TARGs and a list of OFILES; the linker is smart enough to only pull the ones that get used into the binaries. * format more like the other mkfiles --- diff e6fb7e1db780eb4a0c8e922daf9a28ea5fb89765 a17bde304156a9cec42b10d4c05e88fdaa94b76f --- a/mkfile +++ b/mkfile @@ -1,28 +1,45 @@
From Ori Bernstein to ~min/agec
--- diff a17bde304156a9cec42b10d4c05e88fdaa94b76f 9f165b8377e4e93d54a6daa3b9a2190053967a6b --- a/io.h +++ b/io.h @@ -2,11 +2,6 @@ #define IOABUFRAWSIZE 48*256 #define IOABUFSIZE B64EBUFLEN(IOABUFRAWSIZE) + B64EBUFLEN(IOABUFRAWSIZE) / 64 #define IOABUFREADSIZE 65*126 -enum { - EBADARMOR = -1, - EDECRYPT = -2, - EEMPTYCHUNK = -3 -};
From to ~mpu/qbe
Quoth Roland Paterson-Jones <rolandpj@gmail.com>:
> Patch file attached in case of email corruption.
fwiw -- the web based gmail client is at fault here.
From Ori Bernstein to ~mpu/qbe
The C ABI implicitly promotes floats to doubles when passing them to varargs. Passing them as floats will not work. Open question whether QBE should handle C vararg conversions. On June 4, 2024 9:40:20 PM EDT, Alex Ling <hkalexling@gmail.com> wrote: >I am encountering an issue while experimenting with QBE. Here's my source file: > >```test.ssa: > >data $fmtf = { b "Value %f\n", b 0 } >data $f = { s s_3.14 } > >data $fmtg = { b "Value %g\n", b 0 } >data $g = { d d_3.14 }