]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
column: add doc comment explaining ansi code detection
authorJuarez Rudsatz <juarezr@gmail.com>
Mon, 5 Feb 2024 18:59:15 +0000 (15:59 -0300)
committerJuarez Rudsatz <juarezr@gmail.com>
Tue, 6 Feb 2024 17:08:32 +0000 (14:08 -0300)
text-utils/column.c

index 63c7def33c0f0311e62d3008df379a6631712152..9d11fe7ace2b95b0f38a153ca11eabfee5250401 100644 (file)
@@ -113,6 +113,13 @@ typedef enum {
        ANSI_BSL = '\\'
 } ansi_esc_states;
 
+/**
+ * Count how many characters are non-printable due to ANSI X3.41 escape codes.
+ *
+ * It detects and count only Fe Escape sequences. These sequences contains characters
+ * that normally are printable, but due to being part of a escape sequence are ignored
+ * when displayed in console terminals.
+ */
 static inline size_t ansi_esc_width(ansi_esc_states *state, size_t *found, const wchar_t *str)
 {
        switch (*state) {