search for: ascii_isspace

Displaying 9 results from an estimated 9 matches for "ascii_isspace".

2020 May 19
1
[PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
...insertions(+), 2 deletions(-) diff --git a/plugins/sh/call.c b/plugins/sh/call.c index b2d4a794..741022b6 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -443,7 +443,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) } if (skip && ebuf[skip]) { - if (!ascii_isspace ((unsigned char) ebuf[skip])) { + if (!ascii_isspace (ebuf[skip])) { /* Treat 'EINVALID' as EIO, not EINVAL */ err = EIO; skip = 0; @@ -451,7 +451,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) else do skip++; - while (...
2023 Jan 30
4
[PATCH libnbd v2 0/4] Pass LISTEN_FDNAMES with systemd socket activation
This is an alternative approach to https://listman.redhat.com/archives/libguestfs/2023-January/030535.html After discussing this with Dan Berrange we came to the conclusion that you really might want to set LISTEN_FDNAMES to arbitrary short strings (or not set it). Especially when talking to qemu-storage-daemon which would allow you to use these names on the command line. Rich.
2020 Jul 31
0
[RFC nbdkit PATCH 4/4] sh, eval: Add .list_exports support
...t; + } + + while ((len = getline (&line, &linelen, fp)) != -1) { + bool quoted = *line == '\''; + char *p = line, *q = p + quoted, *desc; + + /* Modify line in-place with our parse of name */ + while (q - line < len && (quoted ? *q != '\'' : !ascii_isspace (*q))) { + if (*q == '\\') { + q++; + if (*q == 'n') + *q = '\n'; + } + *p++ = *q++; + } + /* Transition from name to description */ + *p++ = '\0'; + q++; + while (ascii_isspace (*q)) + q++; + p = desc = q;...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
V4 was here (incorrectly versioned on the mailing list as v3): <http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>. See the Notes section on each patch for the v5 updates. Laszlo Ersek (2): socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough meat that I was able to test 'nbdkit eval' advertising multiple exports with descriptions paired with 'qemu-nbd --list'. Eric Blake (3): server: Add exports list functions server: Prepare to use export list from plugin sh, eval: Add .list_exports support Richard W.M. Jones (1): server: Implement
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here: <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. See the Notes section on each patch for the v4 updates. The series is nearly ready for merging: every patch has at least one R-b tag, except "socket activation: avoid manipulating the sign bit". The series builds, and passes "make check" and "make check-valgrind", at
2020 Jul 15
0
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
...rl: running header-script"); + fp = popen (cmd, "r"); + if (fp == NULL) { + nbdkit_error ("popen: %m"); + return -1; + } + while ((len = getline (&line, &linelen, fp)) != -1) { + /* Remove trailing \n and whitespace. */ + while (len > 0 && ascii_isspace (line[len-1])) + line[--len] = '\0'; + if (len == 0) + continue; + + headers_from_script = curl_slist_append (headers_from_script, line); + if (headers_from_script == NULL) { + nbdkit_error ("curl_slist_append: %m"); + pclose (fp); + return -1; +...
2020 Jul 15
2
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
Evolution of this patch series: https://www.redhat.com/archives/libguestfs/2020-July/thread.html#00073 Instead of auth-script, this implements header-script and cookie-script. It can be used for similar purposes but the implementation is somewhat saner. Rich.
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...ping.h test_byte_swapping_CPPFLAGS = -I$(srcdir) test_byte_swapping_CFLAGS = $(WARNINGS_CFLAGS) diff --git a/common/include/ascii-ctype.h b/common/include/ascii-ctype.h index 5e8bf237..a700563e 100644 --- a/common/include/ascii-ctype.h +++ b/common/include/ascii-ctype.h @@ -49,6 +49,9 @@ #define ascii_isspace(c) \ ((c) == '\t' || (c) == '\n' || (c) == '\f' || (c) == '\r' || (c) == ' ') +#define ascii_isupper(c) \ + ((c) >= 'A' && (c) <= 'Z') + #define ascii_i...