From: Lennart Poettering Date: Thu, 31 Oct 2024 08:51:32 +0000 (+0100) Subject: string-util: it's called OSC sequence, not CSO sequence X-Git-Tag: v257-rc1~61^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e65b0904a082e0be64f267527741285dbabcb31b;p=thirdparty%2Fsystemd.git string-util: it's called OSC sequence, not CSO sequence --- diff --git a/src/basic/string-util.c b/src/basic/string-util.c index 1715d62a398..9526443e50a 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -698,7 +698,7 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { STATE_OTHER, STATE_ESCAPE, STATE_CSI, - STATE_CSO, + STATE_OSC, } state = STATE_OTHER; _cleanup_(memstream_done) MemStream m = {}; size_t isz, shift[2] = {}, n_carriage_returns = 0; @@ -711,7 +711,7 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { * * 1. Replaces TABs by 8 spaces * 2. Strips ANSI color sequences (a subset of CSI), i.e. ESC '[' … 'm' sequences - * 3. Strips ANSI operating system sequences (CSO), i.e. ESC ']' … BEL sequences + * 3. Strips ANSI operating system sequences (OSC), i.e. ESC ']' … BEL sequences * 4. Strip trailing \r characters (since they would "move the cursor", but have no * other effect). * @@ -719,7 +719,7 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { * are any other special characters. Truncated ANSI sequences are left-as is too. This call is * supposed to suppress the most basic formatting noise, but nothing else. * - * Why care for CSO sequences? Well, to undo what terminal_urlify() and friends generate. */ + * Why care for OSC sequences? Well, to undo what terminal_urlify() and friends generate. */ isz = _isz ? *_isz : strlen(*ibuf); @@ -766,8 +766,8 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { } else if (*i == '[') { /* ANSI CSI */ state = STATE_CSI; begin = i + 1; - } else if (*i == ']') { /* ANSI CSO */ - state = STATE_CSO; + } else if (*i == ']') { /* ANSI OSC */ + state = STATE_OSC; begin = i + 1; } else { fputc('\x1B', f); @@ -793,7 +793,7 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { break; - case STATE_CSO: + case STATE_OSC: assert(n_carriage_returns == 0); if (i >= *ibuf + isz || /* EOT … */