From f9222ab92ff15cddbbfafe0a29adc7feafe93cd4 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sun, 11 Oct 2026 12:16:21 +0100 Subject: [PATCH] The report: Sys.workDir returns the directory (2026-10.8) At the owner's word, several results in place of var parameters where they fit: workDir's buffer was its result. --- diff --git a/doc/raz.md b/doc/raz.md index e273a43..80a1b1b 100644 --- a/doc/raz.md +++ b/doc/raz.md @@ -9,7 +9,7 @@ This report defines the language. It is short on purpose. Whatever it doesn't allow, raz doesn't have. -This is version 2026-10.7 of the report; section 12 says what each +This is version 2026-10.8 of the report; section 12 says what each version changed. ## 1. A first look @@ -976,7 +976,7 @@ proc ready*(fd: I64; ms: I64): BOOL; (* something to read within ms, or ever if ms < 0 *) proc env*(name: []U8): []U8; (* the environment variable's value; "" if unset *) -proc workDir*(var buf: [4096]U8): I64; (* the working directory into buf: its length *) +proc workDir*: ([]U8, I64); (* the working directory, good until the next call *) proc connect*(path: []U8): I64; (* a stream socket, connected to the Unix socket at path: its fd *) proc send*(fd: I64; s: []U8): I64; (* write, to a socket: -32 (EPIPE), not a signal, if it is closed *) @@ -1083,3 +1083,5 @@ and whether it is a symbolic link (section 11). - **2026-10.7.** `Sys.send` writes to a socket without SIGPIPE (section 11). +- **2026-10.8.** `Sys.workDir` returns the directory, with no `var` + parameter (section 11).