<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><TITLE>Terminal</TITLE><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Cuiterm Reference Manual" HREF="index.html"><LINK REL="UP" TITLE="Cuiterm Documentation 0.5" HREF="c4.html"><LINK REL="PREVIOUS" TITLE="CuiTerminal" HREF="cuiterminal.html"><LINK REL="NEXT" TITLE="Background" HREF="cuiterm-background.html"><META NAME="GENERATOR" CONTENT="GTK-Doc V1.3 (SGML mode)"><STYLE TYPE="text/css">.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .navigation { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0.5em; margin-bottom: 0.5em; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } .navigation .title { font-size: 200%; }</STYLE></HEAD><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF"><TABLE WIDTH="100%" CLASS="navigation" SUMMARY="Navigation header" CELLPADDING="2" CELLSPACING="2"><TR VALIGN="middle"><TD><A ACCESSKEY="p" HREF="cuiterminal.html"><IMG SRC="left.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Prev"></A></TD><TD><A ACCESSKEY="u" HREF="c4.html"><IMG SRC="up.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Up"></A></TD><TD><A ACCESSKEY="h" HREF="index.html"><IMG SRC="home.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Home"></A></TD><TH WIDTH="100%" align="center">Cuiterm Reference Manual</TH><TD><A ACCESSKEY="n" HREF="cuiterm-background.html"><IMG SRC="right.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Next"></A></TD></TR></TABLE><H1><A NAME="CUITERM-TERMINAL"></A>Terminal</H1><DIV CLASS="REFNAMEDIV"><A NAME="AEN48"></A><H2>Name</H2>Terminal -- </DIV><DIV CLASS="REFSYNOPSISDIV"><A NAME="AEN51"></A><H2>Synopsis</H2><PRE CLASS="SYNOPSIS"> #include <history.h> enum <A HREF="cuiterm-terminal.html#TERMINALSTATUS">TerminalStatus</A>; <A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A>; <A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A>* <A HREF="cuiterm-terminal.html#TERMINAL-NEW">terminal_new</A> (GtkTextView *text_view); void <A HREF="cuiterm-terminal.html#TERMINAL-APPLY-TAG">terminal_apply_tag</A> (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, gchar *tag, GtkTextMark *mbegin, GtkTextMark *mend); gint <A HREF="cuiterm-terminal.html#TERMINAL-SEND-COMMAND">terminal_send_command</A> (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, gchar *command, gboolean send); gint <A HREF="cuiterm-terminal.html#TERMINAL-GET-TOKEN-MARKS">terminal_get_token_marks</A> (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *terminal, char *token, GtkTextMark **mbegin, GtkTextMark **mend); int <A HREF="cuiterm-terminal.html#TERMINAL-GET-CHAR">terminal_get_char</A> (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, char *buf, int max_size); const gchar* <A HREF="cuiterm-terminal.html#TERMINAL-GET-WORKING-DIRECTORY">terminal_get_working_directory</A> (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *terminal);</PRE></DIV><DIV CLASS="REFSECT1"><A NAME="AEN84"></A><H2>Description</H2><P></P></DIV><DIV CLASS="REFSECT1"><A NAME="AEN87"></A><H2>Details</H2><DIV CLASS="REFSECT2"><A NAME="AEN89"></A><H3><A NAME="TERMINALSTATUS"></A>enum TerminalStatus</H3><PRE CLASS="PROGRAMLISTING">typedef enum { TermUninitialized, TermReady, TermSendingCommand, TermSendingUserEnter, TermExecuting, TermLocked } TerminalStatus;</PRE><P></P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN98"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermUninitialized</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the first prompt did not came yet</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN103"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermReady</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the terminal is ready, we have a prompt</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN108"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermSendingCommand</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> sending a generated command</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN113"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermSendingUserEnter</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the user hit the Enter key</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN118"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermExecuting</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the terminal is executing a command</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN123"><SPAN STYLE="white-space: nowrap"><TT CLASS="LITERAL">TermLocked</TT></SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN128"></A><H3><A NAME="TERMINAL"></A>Terminal</H3><PRE CLASS="PROGRAMLISTING">typedef struct { GtkTextBuffer *text_buffer; GtkTextView *text_view; Background *background; CuiGenerator *command_generator; GtkTextMark *parser_cursor; GtkTextMark *lexer_cursor; GtkTextMark *command_begin_cursor; GtkTextMark *command_end_cursor; /* This is not handled yet*/ gint parsed_chars; GString *command; /* The last command we executed. */ gchar *current_command; /* The command we are editing. */ GNode *parse_tree; GString *cmd; GString *wd; GString *username; GString *hostname; GString *directory; gint prompt_length; gboolean executing; GList *pending_commands; GIOChannel *shell_stream; struct CuiWidget *last_command_window; TerminalStatus status; gint hold_shift; gboolean overwrite; } Terminal;</PRE><P></P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN137"><SPAN STYLE="white-space: nowrap">GtkTextBuffer *<CODE CLASS="STRUCTFIELD">text_buffer</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the <SPAN CLASS="TYPE">GtkTextBuffer</SPAN> holding the text</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN145"><SPAN STYLE="white-space: nowrap">GtkTextView *<CODE CLASS="STRUCTFIELD">text_view</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the <SPAN CLASS="TYPE">GtkTextView</SPAN> holding the terminal text</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN153"><SPAN STYLE="white-space: nowrap"><A HREF="cuiterm-background.html#BACKGROUND">Background</A> *<CODE CLASS="STRUCTFIELD">background</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the background for this terminal</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN159"><SPAN STYLE="white-space: nowrap"><A HREF="cuigenerator.html">CuiGenerator</A> *<CODE CLASS="STRUCTFIELD">command_generator</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the generator for this terminal</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN165"><SPAN STYLE="white-space: nowrap">GtkTextMark *<CODE CLASS="STRUCTFIELD">parser_cursor</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> FIXME</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN171"><SPAN STYLE="white-space: nowrap">GtkTextMark *<CODE CLASS="STRUCTFIELD">lexer_cursor</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the point where the lexer reads the terminal</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN177"><SPAN STYLE="white-space: nowrap">GtkTextMark *<CODE CLASS="STRUCTFIELD">command_begin_cursor</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN183"><SPAN STYLE="white-space: nowrap">GtkTextMark *<CODE CLASS="STRUCTFIELD">command_end_cursor</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN189"><SPAN STYLE="white-space: nowrap">gint <CODE CLASS="STRUCTFIELD">parsed_chars</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> how many characters has been parsed</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN195"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">command</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the command the user editing </P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN201"><SPAN STYLE="white-space: nowrap">gchar *<CODE CLASS="STRUCTFIELD">current_command</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN207"><SPAN STYLE="white-space: nowrap">GNode *<CODE CLASS="STRUCTFIELD">parse_tree</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the parse tree for the last BASH command</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN213"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">cmd</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> FIXME</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN219"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">wd</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the working directory</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN225"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">username</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> data from the prompt</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN231"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">hostname</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the hostname part of the prompt</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN237"><SPAN STYLE="white-space: nowrap">GString *<CODE CLASS="STRUCTFIELD">directory</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the directory part of the prompt</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN243"><SPAN STYLE="white-space: nowrap">gint <CODE CLASS="STRUCTFIELD">prompt_length</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the length of the actual prompt in characters</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN249"><SPAN STYLE="white-space: nowrap">gboolean <CODE CLASS="STRUCTFIELD">executing</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE while the terminal is executing a command</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN255"><SPAN STYLE="white-space: nowrap">GList *<CODE CLASS="STRUCTFIELD">pending_commands</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> more commands to execute if ready</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN261"><SPAN STYLE="white-space: nowrap">GIOChannel *<CODE CLASS="STRUCTFIELD">shell_stream</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the stream we use to communicate with the shell</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN267"><SPAN STYLE="white-space: nowrap">struct <A HREF="cuiwidget.html">CuiWidget</A> *<CODE CLASS="STRUCTFIELD">last_command_window</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the last embedded window</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN273"><SPAN STYLE="white-space: nowrap"><A HREF="cuiterm-terminal.html#TERMINALSTATUS">TerminalStatus</A> <CODE CLASS="STRUCTFIELD">status</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN279"><SPAN STYLE="white-space: nowrap">gint <CODE CLASS="STRUCTFIELD">hold_shift</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> are user press the shift key (in keyboard)</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN285"><SPAN STYLE="white-space: nowrap">gboolean <CODE CLASS="STRUCTFIELD">overwrite</CODE>;</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN291"></A><H3><A NAME="TERMINAL-NEW"></A>terminal_new ()</H3><PRE CLASS="PROGRAMLISTING"><A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A>* terminal_new (GtkTextView *text_view);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN301"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">text_view</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN306"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> </P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN311"></A><H3><A NAME="TERMINAL-APPLY-TAG"></A>terminal_apply_tag ()</H3><PRE CLASS="PROGRAMLISTING">void terminal_apply_tag (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, gchar *tag, GtkTextMark *mbegin, GtkTextMark *mend);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN324"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">t</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN329"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">tag</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN334"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">mbegin</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN339"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">mend</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> </P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN344"></A><H3><A NAME="TERMINAL-SEND-COMMAND"></A>terminal_send_command ()</H3><PRE CLASS="PROGRAMLISTING">gint terminal_send_command (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, gchar *command, gboolean send);</PRE><P>Emits a command to the terminal.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN357"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">t</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN362"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">command</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN367"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">send</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN372"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> </P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN377"></A><H3><A NAME="TERMINAL-GET-TOKEN-MARKS"></A>terminal_get_token_marks ()</H3><PRE CLASS="PROGRAMLISTING">gint terminal_get_token_marks (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *terminal, char *token, GtkTextMark **mbegin, GtkTextMark **mend);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN390"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">terminal</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN395"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">token</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN400"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">mbegin</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN405"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">mend</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN410"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> </P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN415"></A><H3><A NAME="TERMINAL-GET-CHAR"></A>terminal_get_char ()</H3><PRE CLASS="PROGRAMLISTING">int terminal_get_char (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *t, char *buf, int max_size);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN427"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">t</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN432"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">buf</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN437"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">max_size</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN442"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> </P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN447"></A><H3><A NAME="TERMINAL-GET-WORKING-DIRECTORY"></A>terminal_get_working_directory ()</H3><PRE CLASS="PROGRAMLISTING">const gchar* terminal_get_working_directory (<A HREF="cuiterm-terminal.html#TERMINAL">Terminal</A> *terminal);</PRE><P>Returns the name of the current working directory from the BASH prompt. The memory area returned should not be tampered.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN458"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">terminal</CODE> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> a <A HREF="cuiterm-terminal.html#TERMINAL"><SPAN CLASS="TYPE">Terminal</SPAN></A></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN465"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN> :</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the current working directory</P></TD></TR></TBODY></TABLE></DIV></DIV><TABLE CLASS="navigation" WIDTH="100%" SUMMARY="Navigation footer" CELLPADDING="2" CELLSPACING="2"><TR VALIGN="middle"><TD ALIGN="left"><A ACCESSKEY="p" HREF="cuiterminal.html"><B><<< CuiTerminal</B></A></TD><TD ALIGN="right"><A ACCESSKEY="n" HREF="cuiterm-background.html"><B>Background >>></B></A></TD></TR></TABLE></BODY></HTML>