~cdv

Massachusetts, USA

https://chris.vittal.dev

I write free software.

https://hail.is during the day. Everything else at night.

~cdv/public-inbox

Last active 6 months ago
View more

Recent activity

Re: [PATCH sr.ht-docs] fixes ~sircmpwn/man.sr.ht#40: fix link to api-convention 25 days ago

From Chris Vittal to ~sircmpwn/public-inbox

On Wed May 6, 2020 at 4:44 PM PST, René Wagner wrote:
> -conventions](../api-conventions.md).
> +conventions](https://man.sr.ht/api-conventions.md).
>  

Applying this as is would cause every deployment of man.sr.ht to link to
the sourcehut's main documentation rather than the documentation for
that instance.

Wouldn't it be better, since the api-conventions html is at the root to
just link it as (/api-conventions.md)?

Thanks,
Chris

[PATCH] tests: make echo tests robust to build directory 7 months ago

From Chris Vittal to ~sircmpwn/ctools

---
 test/echo | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/echo b/test/echo
index 3004665..61f5fbf 100644
--- a/test/echo
+++ b/test/echo
@@ -3,22 +3,22 @@ tool="echo"
. "$HARNESS"

should_handle_one_string() (
	ct="$(../build/echo "this is a test string")"
	ct="$(./echo "this is a test string")"
[message trimmed]

[PATCH] env: fix potential NULL pointer dereference 7 months ago

From Chris Vittal to ~sircmpwn/ctools

The two points where the elements of environ are accessed need to be
guarded with a NULL check. env can segfault otherwise.

---
Edited from Stefan Tatschner's original env patch.

 src/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/env.c b/src/env.c
index db86b97..f1a4520 100644
--- a/src/env.c
+++ b/src/env.c
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
[message trimmed]

[PATCH sr.ht-docs] Make example not broken up by Table of Contents 7 months ago

From Chris Vittal to ~sircmpwn/sr.ht-dev

When this page was rendered, the table of contents sat between the
example JSON and it's description at the end of the first paragraph.
---
Note, I have not tested this

 builds.sr.ht/triggers.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builds.sr.ht/triggers.md b/builds.sr.ht/triggers.md
index dc0ffea..eb3ee09 100644
--- a/builds.sr.ht/triggers.md
@@ -3,7 +3,9 @@ title: Build triggers reference
---
[message trimmed]

[PATCH v2] Implement nohup 7 months ago

From Chris Vittal to ~sircmpwn/ctools

---
v1 -> v2:
	lines are 80 characters
	update STATUS

 STATUS           |   2 +-
 doc/meson.build  |   1 +
 doc/nohup.1.scd  |  37 +++++++++++++
 meson.build      |   1 +
 src/nohup.c      | 135 +++++++++++++++++++++++++++++++++++++++++++++++
 test/meson.build |   1 +
 test/nohup       |  38 +++++++++++++
 7 files changed, 214 insertions(+), 1 deletion(-)
 create mode 100644 doc/nohup.1.scd
[message trimmed]

[PATCH] Implement nohup 7 months ago

From Chris Vittal to ~sircmpwn/ctools

---
 doc/meson.build  |   1 +
 doc/nohup.1.scd  |  37 +++++++++++++
 meson.build      |   1 +
 src/nohup.c      | 134 +++++++++++++++++++++++++++++++++++++++++++++++
 test/meson.build |   1 +
 test/nohup       |  38 ++++++++++++++
 6 files changed, 212 insertions(+)
 create mode 100644 doc/nohup.1.scd
 create mode 100644 src/nohup.c
 create mode 100755 test/nohup

diff --git a/doc/meson.build b/doc/meson.build
index befc6df..e348e9c 100644
[message trimmed]

[PATCH v3] Implement env 8 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
v2 -> v3:
    Changed test to get around potential environment consequences in the
    uname utility. Now we just use head instead.

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 58 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
 8 files changed, 186 insertions(+), 1 deletion(-)
[message trimmed]

[PATCH] Make test scripts POSIX compliant 8 months ago

From Christopher Vittal to ~sircmpwn/ctools

"." with argument is not POSIX compliant, so it must be removed.
Instead, set tool directly in the test scripts.
---
This was the checkbashims output:

possible bashism in test/cat line 2 (sourced script with arguments):
. "$HARNESS" cat

 test/basename   | 3 ++-
 test/cat        | 3 ++-
 test/chgrp      | 3 ++-
 test/chmod      | 3 ++-
 test/chown      | 3 ++-
 test/cksum      | 3 ++-
[message trimmed]

[PATCH v2] Implement env 8 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
v1 -> v2:
    Removed GNU-ism

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 57 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
 8 files changed, 185 insertions(+), 1 deletion(-)
 create mode 100644 doc/env.1.scd
[message trimmed]

[PATCH] Implement env 8 months ago

From Christopher Vittal to ~sircmpwn/ctools

---
This is my implementation of the env command. There is still currently
one GNU-ism 'getopt(argc, argv, "+i")'. I couldn't figure out how to
process the args in the way I needed without using the '+' to tell glibc
to process the args in a POSIX compliant way.

 STATUS           |  2 +-
 doc/ctools.7.scd |  2 ++
 doc/env.1.scd    | 44 +++++++++++++++++++++++++++
 doc/meson.build  |  1 +
 meson.build      |  1 +
 src/env.c        | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/env         | 58 +++++++++++++++++++++++++++++++++++
 test/meson.build |  1 +
[message trimmed]