\hypertarget{class_qore_1_1_term_i_o_s}{}\section{Qore\+::Term\+I\+OS Class Reference}
\label{class_qore_1_1_term_i_o_s}\index{Qore::TermIOS@{Qore::TermIOS}}


This class allows Qore scripts to get or set terminal settings on U\+N\+IX platforms.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}{constructor}} ()
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object with random contents. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}{copy}} ()
\begin{DoxyCompactList}\small\item\em Returns a copy of the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}{get\+CC}} (softint cc)
\begin{DoxyCompactList}\small\item\em Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}{get\+C\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}{get\+I\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}{get\+L\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}{get\+O\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}{is\+Equal}} (Termios termios)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}{set\+CC}} (softint offset, softint value)
\begin{DoxyCompactList}\small\item\em Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}{set\+C\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}{set\+I\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}{set\+L\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}{set\+O\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}{get\+Window\+Size}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class allows Qore scripts to get or set terminal settings on U\+N\+IX platforms. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
On platforms without \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} support (such as Windows), none of the methods in this class are available; to write a portable program, check the Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS constant at runtime before using this functionality.

This class contains the data structure used to read and set terminal attributes on terminal I/O constants (\mbox{\hyperlink{group__io__constants_ga0cfa7aea34f3c921036623600e42b21f}{stdin}}, \mbox{\hyperlink{group__io__constants_ga44ab38fe66ed7aa87731a2de976017c6}{stdout}}, \mbox{\hyperlink{group__io__constants_ga697e4968984d273562f14bfed155b4a8}{stderr}}).

This class is used with \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}}, \mbox{\hyperlink{class_qore_1_1_file_aa1d7a62aa8f383cad5b8bdee78c350dd}{File\+::set\+Terminal\+Attributes()}}, and the terminal I/O constants to manipulate terminal attributes.

For example, here is some code to set terminal attributes, read in a character from standard input with a timeout, and reset the terminal attributes\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS t();}
\DoxyCodeLine{stdin.getTerminalAttributes(t);}
\DoxyCodeLine{TermIOS orig = t.copy();}
\DoxyCodeLine{on\_exit}
\DoxyCodeLine{    stdin.setTerminalAttributes(TCSADRAIN, orig);}
\DoxyCodeLine{}
\DoxyCodeLine{int lflag = t.getLFlag();}
\DoxyCodeLine{lflag \&= ~ICANON;}
\DoxyCodeLine{lflag \&= ~ECHO;}
\DoxyCodeLine{lflag \&= ~ISIG;}
\DoxyCodeLine{t.setLFlag(lflag);}
\DoxyCodeLine{t.setCC(VMIN, 1);}
\DoxyCodeLine{t.setCC(VTIME, 0);}
\DoxyCodeLine{stdin.setTerminalAttributes(TCSADRAIN, t);}
\DoxyCodeLine{}
\DoxyCodeLine{stdout.printf(\textcolor{stringliteral}{"Press any key: "});}
\DoxyCodeLine{\textcolor{keywordflow}{while} (!stdin.isDataAvailable(20ms)) \{}
\DoxyCodeLine{    stdout.printf(\textcolor{stringliteral}{"."});}
\DoxyCodeLine{    stdout.sync();}
\DoxyCodeLine{    \mbox{\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep}}(1ms);}
\DoxyCodeLine{\}}
\DoxyCodeLine{string c = stdin.read(1);}
\DoxyCodeLine{stdout.printf(\textcolor{stringliteral}{" GOT ASCII 0x\%02x (\%d) '\%s'\(\backslash\)n"}, \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord}}(c), \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord}}(c), c);}
\end{DoxyCode}


For more information on terminal attributes, see your system\textquotesingle{}s manual pages for \char`\"{}termios\char`\"{}.

\begin{DoxyNote}{Note}
This class is not available with the \mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}} parse option. 
\end{DoxyNote}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}\label{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}} 
\index{Qore::TermIOS@{Qore::TermIOS}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Term\+I\+O\+S\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object with random contents. 

Use \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}} with a terminal I/O constant to initialize the object with terminal settings

\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS termios();}
\DoxyCodeLine{stdin.getTerminalAttributes(termios);}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}\label{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}} 
\index{Qore::TermIOS@{Qore::TermIOS}!copy@{copy}}
\index{copy@{copy}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Term\+I\+O\+S\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a copy of the object. 

\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS t2 = t.copy();}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}\label{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getCC@{getCC}}
\index{getCC@{getCC}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getCC()}{getCC()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+CC (\begin{DoxyParamCaption}\item[{softint}]{cc }\end{DoxyParamCaption})}



Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. 


\begin{DoxyParams}{Parameters}
{\em cc} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}} for the character to retrieve\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# get minimum characters to return on a read}}
\DoxyCodeLine{int vmin = t.getCC(VMIN);}
\DoxyCodeLine{\textcolor{comment}{\# get character input timer in 0.1 second increments}}
\DoxyCodeLine{int vtime = t.getCC(VTIME);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em T\+E\+R\+M\+I\+O\+S-\/\+C\+C-\/\+E\+R\+R\+OR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}\label{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getCFlag@{getCFlag}}
\index{getCFlag@{getCFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getCFlag()}{getCFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+C\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getCFlag();}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}\label{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getIFlag@{getIFlag}}
\index{getIFlag@{getIFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getIFlag()}{getIFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+I\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getIFlag();}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}\label{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getLFlag@{getLFlag}}
\index{getLFlag@{getLFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getLFlag()}{getLFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+L\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getLFlag();}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}\label{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getOFlag@{getOFlag}}
\index{getOFlag@{getOFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getOFlag()}{getOFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+O\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getOFlag();}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}\label{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getWindowSize@{getWindowSize}}
\index{getWindowSize@{getWindowSize}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{getWindowSize()}{getWindowSize()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} Qore\+::\+Term\+I\+O\+S\+::get\+Window\+Size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. 

\begin{DoxyReturn}{Returns}
a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}
hash wh = termios.\+get\+Window\+Size(); 
\begin{DoxyCode}{0}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}\label{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}} 
\index{Qore::TermIOS@{Qore::TermIOS}!isEqual@{isEqual}}
\index{isEqual@{isEqual}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{isEqual()}{isEqual()}}
{\footnotesize\ttfamily bool Qore\+::\+Term\+I\+O\+S\+::is\+Equal (\begin{DoxyParamCaption}\item[{Termios}]{termios }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = termios.isEqual(termios2);}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}\label{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setCC@{setCC}}
\index{setCC@{setCC}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{setCC()}{setCC()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+CC (\begin{DoxyParamCaption}\item[{softint}]{offset,  }\item[{softint}]{value }\end{DoxyParamCaption})}



Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. 


\begin{DoxyParams}{Parameters}
{\em offset} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} to set \\
\hline
{\em value} & the value to set for the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# set minimum characters to return on a read}}
\DoxyCodeLine{t.setCC(VMIN, 1);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# set character input timer in 0.1 second increments (= no timer)}}
\DoxyCodeLine{t.setCC(VTIME, 0);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em T\+E\+R\+M\+I\+O\+S-\/\+C\+C-\/\+E\+R\+R\+OR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}\label{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setCFlag@{setCFlag}}
\index{setCFlag@{setCFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{setCFlag()}{setCFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+C\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the control mode (see \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int cflag = termios.getCFlag();}
\DoxyCodeLine{cflag = (cflag \& ~CSIZE) | CS8 | CSTOPB;}
\DoxyCodeLine{cflag = (cflag | CLOCAL | CREAD) \& ~CRTSCTS;}
\DoxyCodeLine{termios.setCFlag(cflag);}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}\label{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setIFlag@{setIFlag}}
\index{setIFlag@{setIFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{setIFlag()}{setIFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+I\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int iflag = termios.getIFlag();}
\DoxyCodeLine{\textcolor{comment}{\# ring bell on input queue full}}
\DoxyCodeLine{iflag |= IMAXBEL;}
\DoxyCodeLine{termios.setIFlag(iflag);}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}\label{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setLFlag@{setLFlag}}
\index{setLFlag@{setLFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{setLFlag()}{setLFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+L\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the local mode (see \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int lflag = termios.getLFlag();}
\DoxyCodeLine{\textcolor{comment}{\# disable canonical input mode (= turn on "raw" mode)}}
\DoxyCodeLine{lflag \&= ~ICANON;}
\DoxyCodeLine{\textcolor{comment}{\# turn off echo mode}}
\DoxyCodeLine{lflag \&= ~ECHO;}
\DoxyCodeLine{\textcolor{comment}{\# do not check for special input characters (INTR, QUIT, and SUSP)}}
\DoxyCodeLine{lflag \&= ~ISIG;}
\DoxyCodeLine{termios.setLFlag(lflag);}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}\label{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setOFlag@{setOFlag}}
\index{setOFlag@{setOFlag}!Qore::TermIOS@{Qore::TermIOS}}
\subsubsection{\texorpdfstring{setOFlag()}{setOFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+O\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the output mode (see \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int oflag = termios.getOFlag();}
\DoxyCodeLine{\textcolor{comment}{\# translate linefeeds to crlf}}
\DoxyCodeLine{oflag |= ONLCR;}
\DoxyCodeLine{termios.setOFlag(oflag);}
\end{DoxyCode}
 
\end{DoxyParagraph}
