From: Phillip Wood Date: Mon, 14 Mar 2022 10:49:08 GMT Subject: Re: [PATCH v2 1/4] terminal: use flags for save_term() Message-ID: <92a80462-c00e-acf7-7cce-095891f42226@gmail.com> In-Reply-To: On 11/03/2022 16:52, Carlo Arenas wrote: > On Wed, Mar 9, 2022 at 3:04 AM Phillip Wood wrote: >> diff --git a/compat/terminal.h b/compat/terminal.h >> index 0fb9fa147c..24c4df4c0e 100644 >> --- a/compat/terminal.h >> +++ b/compat/terminal.h >> @@ -1,14 +1,19 @@ >> #ifndef COMPAT_TERMINAL_H >> #define COMPAT_TERMINAL_H >> >> +enum save_term_flags { >> + /* Save input and output settings */ >> + SAVE_TERM_DUPLEX = 1 << 0, >> +}; >> + >> /* >> * Save the terminal attributes so they can be restored later by a >> * call to restore_term(). Note that every successful call to >> * save_term() must be matched by a call to restore_term() even if the >> * attributes have not been changed. Returns 0 on success, -1 on >> * failure. >> */ >> -int save_term(int full_duplex); >> +int save_term(unsigned flags); > > s/unsigned/enum save_term_flags/ Well spotted! Thanks Phillip > Carlo