auparse_set_escape_mode(3)

auparse_set_escape_mode3

Choose escape method

Usage

#include <auparse.h>

void auparse_set_escape_mode(auparse_state_t *au,auparse_esc_t"mode);"

Overview

auparse_set_escape_mode is used to set the escaping method that will be used to output interpreted text. The choices for the mode variable are:

AUPARSE_ESC_RAW

No escaping of any kind is done.

AUPARSE_ESC_TTY

Escape TTY control characters so that they are harmless to display on a terminal. When any control character is found, they are displayed as octal numbers. This is the default mode that the auparse library is initialized with.

AUPARSE_ESC_SHELL

Besides escaping control characters, this will escape some characters that can cause problems when used with shell scripting. Any escaped control characters are displayed as octal numbers. Other escaped characters are proceeded with a backslash. The additional characters it escapes are: " ' ` $ \

AUPARSE_ESC_SHELL_QUOTE

Similar to AUPARSE_ESC_SHELL but expands the character set to include shell operators. Any escaped control characters are displayed as octal numbers. Other escaped characters are proceeded with a backslash. The additional characters it escapes include: ; ' " ` # $ & * ? [ ] < > { } \

Return value

None

Releases

6 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9–11
  2. 12–13
  3. Arch

Author

Steve Grubb

From audit 4.2.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.