Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 76909b5763edb96a2bc7bd7fb5b301b8 > files > 38

cuiterm-0.9.9-1mdv2008.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><TITLE>program</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="Background" HREF="cuiterm-background.html"><LINK REL="NEXT" TITLE="CuiWidget" HREF="cuiwidget.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="cuiterm-background.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="cuiwidget.html"><IMG SRC="right.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Next"></A></TD></TR></TABLE><H1><A NAME="CUITERM-PROGRAM"></A>program</H1><DIV CLASS="REFNAMEDIV"><A NAME="AEN1017"></A><H2>Name</H2>program&nbsp;--&nbsp;Functions to collect, handle and store data about programs.</DIV><DIV CLASS="REFSYNOPSISDIV"><A NAME="AEN1020"></A><H2>Synopsis</H2><PRE CLASS="SYNOPSIS">&#13;#include &lt;history.h&gt;


gboolean    <A HREF="cuiterm-program.html#PROGRAM-INFO-IN-CACHE">program_info_in_cache</A>           (gchar *name);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-DESCRIPTION">program_add_description</A>         (gchar *name,
                                             gchar *descr);
const gchar* <A HREF="cuiterm-program.html#PROGRAM-GET-DESCRIPTION">program_get_description</A>        (gchar *name);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-LONG-DESCRIPTION">program_add_long_description</A>    (gchar *name,
                                             gchar *longdesc);
const gchar* <A HREF="cuiterm-program.html#PROGRAM-GET-LONG-DESCRIPTION">program_get_long_description</A>   (gchar *name);
xmlNodePtr  <A HREF="cuiterm-program.html#PROGRAM-ADD-OPTION">program_add_option</A>              (gchar *name,
                                             gchar *option);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-OPTION-WITH-DESCR">program_add_option_with_descr</A>   (gchar *name,
                                             gchar *option,
                                             gchar *descr);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-LONGOPT">program_add_longopt</A>             (gchar *name,
                                             gchar *longopt);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-LONGOPT-WITH-DESCR">program_add_longopt_with_descr</A>  (gchar *name,
                                             gchar *longopt,
                                             gchar *descr);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-ADD-OPTIONS-WITH-DESCR">program_add_options_with_descr</A>  (gchar *name,
                                             gchar *option,
                                             gchar *longopt,
                                             gchar *descr);
TypingCheckResult <A HREF="cuiterm-program.html#PROGRAM-CHECK-LONGOPT-TYPING">program_check_longopt_typing</A>
                                            (const gchar *name,
                                             const gchar *longopt);
const gchar* <A HREF="cuiterm-program.html#PROGRAM-GET-ARGUMENT-CATEGORY">program_get_argument_category</A>  (const gchar *name,
                                             gint position);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-GET-ARGUMENT-ITERATE">program_get_argument_iterate</A>    (const gchar *name,
                                             gint position);
gboolean    <A HREF="cuiterm-program.html#PROGRAM-GET-ARGUMENT-OPTIONAL">program_get_argument_optional</A>   (const gchar *name,
                                             gint position);
gchar*      <A HREF="cuiterm-program.html#PROGRAM-GET-OPTION-DESCRIPTION">program_get_option_description</A>  (const gchar *name,
                                             const gchar *option);
GList*      <A HREF="cuiterm-program.html#PROGRAM-GET-OPTION-LIST">program_get_option_list</A>         (const gchar *name,
                                             const gchar *restraint);
void        <A HREF="cuiterm-program.html#PROGRAM-INCREMENT-OPTION-HISTORY-COUNTER">program_increment_option_history_counter</A>
                                            (const gchar *name,
                                             const gchar *option);
            <A HREF="cuiterm-program.html#PROGRAM-INFO">program_info</A>;
            <A HREF="cuiterm-program.html#PROGRAM-OPTION">program_option</A>;
void        <A HREF="cuiterm-program.html#PROGRAM-RESET-ALL-HISTORY-COUNTER">program_reset_all_history_counter</A>
                                            (void);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-NODE">synopsis_create_node</A>            (const gchar *name);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-NODE-WITH-LONG-OPTION">synopsis_create_node_with_long_option</A>
                                            (const gchar *option);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-NODE-WITH-LONG-OPTION-ARGUMENT">synopsis_create_node_with_long_option_argument</A>
                                            (const gchar *option,
                                             const gchar *argument,
                                             const gchar *op);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-NODE-WITH-OPTION">synopsis_create_node_with_option</A>
                                            (const gchar *option);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-NODE-WITH-OPTION-ARGUMENT">synopsis_create_node_with_option_argument</A>
                                            (const gchar *option,
                                             const gchar *argument,
                                             const gchar *op);
xmlNodePtr  <A HREF="cuiterm-program.html#SYNOPSIS-CREATE-OPERATOR-NODE">synopsis_create_operator_node</A>   (gchar operator,
                                             xmlNodePtr arg1,
                                             xmlNodePtr arg2);
void        <A HREF="cuiterm-program.html#SYNOPSIS-REMOVE-NODES-FROM-PROGRAM">synopsis_remove_nodes_from_program</A>
                                            (const gchar *name);
void        <A HREF="cuiterm-program.html#SYNOPSIS-ADD-NODE-TO-PROGRAM">synopsis_add_node_to_program</A>    (const gchar *name,
                                             xmlNodePtr node);</PRE></DIV><DIV CLASS="REFSECT1"><A NAME="AEN1127"></A><H2>Description</H2><P>These functions help to collect and store data about the programs. The 
collected data can be used to change the behaviour of the program and
to create graphical user interface for the direct manipulation of the
commands. All the collected data are stored in an XML file so we speak
about nodes and attributes specifying the functions.</P></DIV><DIV CLASS="REFSECT1"><A NAME="AEN1130"></A><H2>Details</H2><DIV CLASS="REFSECT2"><A NAME="AEN1132"></A><H3><A NAME="PROGRAM-INFO-IN-CACHE"></A>program_info_in_cache ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_info_in_cache           (gchar *name);</PRE><P>Checks if we have information in the cache about the given
program.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1143"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1148"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if we have this program in cache</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1153"></A><H3><A NAME="PROGRAM-ADD-DESCRIPTION"></A>program_add_description ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_description         (gchar *name,
                                             gchar *descr);</PRE><P>Creates a new node for the program, then stores the description for it.
This function will not change the description if the program or the 
description itself has a protection="read-write" attribute setting.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1165"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1170"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">descr</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the short description of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1175"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if the operation could be performed</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1180"></A><H3><A NAME="PROGRAM-GET-DESCRIPTION"></A>program_get_description ()</H3><PRE CLASS="PROGRAMLISTING">const gchar* program_get_description        (gchar *name);</PRE><P>Returns the description belongs to the program.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1191"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1196"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the description for the program</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1201"></A><H3><A NAME="PROGRAM-ADD-LONG-DESCRIPTION"></A>program_add_long_description ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_long_description    (gchar *name,
                                             gchar *longdesc);</PRE><P>Creates a new node for the program, then stores the long description 
for it. This function will not change the long description if the 
program or the long description itself has a protection="read-write" 
attribute setting.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1213"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1218"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">longdesc</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1223"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if the operation could be performed</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1228"></A><H3><A NAME="PROGRAM-GET-LONG-DESCRIPTION"></A>program_get_long_description ()</H3><PRE CLASS="PROGRAMLISTING">const gchar* program_get_long_description   (gchar *name);</PRE><P>Returns the long description belongs to the given program.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1239"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1244"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> name long description of the program</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1249"></A><H3><A NAME="PROGRAM-ADD-OPTION"></A>program_add_option ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  program_add_option              (gchar *name,
                                             gchar *option);</PRE><P>Adds a new option to the given program.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1261"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1266"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the option name starting with a dash</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1271"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if the opertation suceeded</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1276"></A><H3><A NAME="PROGRAM-ADD-OPTION-WITH-DESCR"></A>program_add_option_with_descr ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_option_with_descr   (gchar *name,
                                             gchar *option,
                                             gchar *descr);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1288"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1293"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1298"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">descr</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1303"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1308"></A><H3><A NAME="PROGRAM-ADD-LONGOPT"></A>program_add_longopt ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_longopt             (gchar *name,
                                             gchar *longopt);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1319"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1324"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">longopt</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1329"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1334"></A><H3><A NAME="PROGRAM-ADD-LONGOPT-WITH-DESCR"></A>program_add_longopt_with_descr ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_longopt_with_descr  (gchar *name,
                                             gchar *longopt,
                                             gchar *descr);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1346"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1351"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">longopt</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1356"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">descr</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1361"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1366"></A><H3><A NAME="PROGRAM-ADD-OPTIONS-WITH-DESCR"></A>program_add_options_with_descr ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_add_options_with_descr  (gchar *name,
                                             gchar *option,
                                             gchar *longopt,
                                             gchar *descr);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1379"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1384"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1389"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">longopt</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1394"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">descr</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1399"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1404"></A><H3><A NAME="PROGRAM-CHECK-LONGOPT-TYPING"></A>program_check_longopt_typing ()</H3><PRE CLASS="PROGRAMLISTING">TypingCheckResult program_check_longopt_typing
                                            (const gchar *name,
                                             const gchar *longopt);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1415"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1420"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">longopt</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1425"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1430"></A><H3><A NAME="PROGRAM-GET-ARGUMENT-CATEGORY"></A>program_get_argument_category ()</H3><PRE CLASS="PROGRAMLISTING">const gchar* program_get_argument_category  (const gchar *name,
                                             gint position);</PRE><P>Returns the category of the nth argument.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1442"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the argument</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1447"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">position</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> which argument to read</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1452"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the category of the given argument</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1457"></A><H3><A NAME="PROGRAM-GET-ARGUMENT-ITERATE"></A>program_get_argument_iterate ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_get_argument_iterate    (const gchar *name,
                                             gint position);</PRE><P>Returns TRUE if the given argument can be repeated.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1469"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1474"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">position</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> which argument to check</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1479"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if the argument is iterated</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1484"></A><H3><A NAME="PROGRAM-GET-ARGUMENT-OPTIONAL"></A>program_get_argument_optional ()</H3><PRE CLASS="PROGRAMLISTING">gboolean    program_get_argument_optional   (const gchar *name,
                                             gint position);</PRE><P>Returns TRUE if the argument can be omitted.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1496"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1501"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">position</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> which argument to check</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1506"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> TRUE if the given argument is optional</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1511"></A><H3><A NAME="PROGRAM-GET-OPTION-DESCRIPTION"></A>program_get_option_description ()</H3><PRE CLASS="PROGRAMLISTING">gchar*      program_get_option_description  (const gchar *name,
                                             const gchar *option);</PRE><P>Returns the one sentence description of the option in a newly allocated xml
encoded string.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1523"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the program</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1528"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the short or long option starting with a dash</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1533"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> one sentence description in a newly allocated string</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1538"></A><H3><A NAME="PROGRAM-GET-OPTION-LIST"></A>program_get_option_list ()</H3><PRE CLASS="PROGRAMLISTING">GList*      program_get_option_list         (const gchar *name,
                                             const gchar *restraint);</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="AEN1550"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1555"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">restraint</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1560"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>a list with the options (short or long option names) for the given
program with the given restraint. The list contains strings statically 
allocated, should not be tamered with.</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1565"></A><H3><A NAME="PROGRAM-INCREMENT-OPTION-HISTORY-COUNTER"></A>program_increment_option_history_counter ()</H3><PRE CLASS="PROGRAMLISTING">void        program_increment_option_history_counter
                                            (const gchar *name,
                                             const gchar *option);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1576"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1581"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1586"></A><H3><A NAME="PROGRAM-INFO"></A>program_info</H3><PRE CLASS="PROGRAMLISTING">typedef struct {
	gchar *name;		/* The name of the program. 		*/
	gchar *info;		/* One line description.		*/
	GList *longopts;
	GList *opts;
} program_info;</PRE><P></P></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1593"></A><H3><A NAME="PROGRAM-OPTION"></A>program_option</H3><PRE CLASS="PROGRAMLISTING">typedef struct {
	gchar *option;
	gchar *description;
} program_option;</PRE><P></P></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1600"></A><H3><A NAME="PROGRAM-RESET-ALL-HISTORY-COUNTER"></A>program_reset_all_history_counter ()</H3><PRE CLASS="PROGRAMLISTING">void        program_reset_all_history_counter
                                            (void);</PRE><P></P></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1608"></A><H3><A NAME="SYNOPSIS-CREATE-NODE"></A>synopsis_create_node ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_node            (const gchar *name);</PRE><P>Creates a single node which later must be added to the document.
See <A HREF="cuiterm-program.html#SYNOPSIS-ADD-NODE-TO-PROGRAM"><SPAN CLASS="TYPE">synopsis_add_node_to_program</SPAN></A> how to add a new synopsis node
to the program.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1621"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the name of the node</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1626"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> a new node</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1631"></A><H3><A NAME="SYNOPSIS-CREATE-NODE-WITH-LONG-OPTION"></A>synopsis_create_node_with_long_option ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_node_with_long_option
                                            (const gchar *option);</PRE><P>Creates a new node representing a long option.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1642"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the long option name starting with two dashes</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1647"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the new node</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1652"></A><H3><A NAME="SYNOPSIS-CREATE-NODE-WITH-LONG-OPTION-ARGUMENT"></A>synopsis_create_node_with_long_option_argument ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_node_with_long_option_argument
                                            (const gchar *option,
                                             const gchar *argument,
                                             const gchar *op);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1664"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1669"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">argument</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1674"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">op</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1679"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1684"></A><H3><A NAME="SYNOPSIS-CREATE-NODE-WITH-OPTION"></A>synopsis_create_node_with_option ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_node_with_option
                                            (const gchar *option);</PRE><P>Creates a new node representing an option.</P><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1695"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the option name starting with a dash</P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1700"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P> the new node</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1705"></A><H3><A NAME="SYNOPSIS-CREATE-NODE-WITH-OPTION-ARGUMENT"></A>synopsis_create_node_with_option_argument ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_node_with_option_argument
                                            (const gchar *option,
                                             const gchar *argument,
                                             const gchar *op);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1717"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">option</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1722"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">argument</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1727"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">op</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1732"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1737"></A><H3><A NAME="SYNOPSIS-CREATE-OPERATOR-NODE"></A>synopsis_create_operator_node ()</H3><PRE CLASS="PROGRAMLISTING">xmlNodePtr  synopsis_create_operator_node   (gchar operator,
                                             xmlNodePtr arg1,
                                             xmlNodePtr arg2);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1749"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">operator</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1754"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">arg1</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1759"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">arg2</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1764"><SPAN STYLE="white-space: nowrap"><SPAN CLASS="emphasis"><I CLASS="EMPHASIS">Returns</I></SPAN>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1769"></A><H3><A NAME="SYNOPSIS-REMOVE-NODES-FROM-PROGRAM"></A>synopsis_remove_nodes_from_program ()</H3><PRE CLASS="PROGRAMLISTING">void        synopsis_remove_nodes_from_program
                                            (const gchar *name);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1779"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</P></TD></TR></TBODY></TABLE></DIV><HR><DIV CLASS="REFSECT2"><A NAME="AEN1784"></A><H3><A NAME="SYNOPSIS-ADD-NODE-TO-PROGRAM"></A>synopsis_add_node_to_program ()</H3><PRE CLASS="PROGRAMLISTING">void        synopsis_add_node_to_program    (const gchar *name,
                                             xmlNodePtr node);</PRE><P></P><P></P><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4"><TBODY><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1795"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">name</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P></P></TD></TR><TR><TD ALIGN="LEFT" VALIGN="TOP"><A NAME="AEN1800"><SPAN STYLE="white-space: nowrap"><CODE CLASS="PARAMETER">node</CODE>&nbsp;:</SPAN></TD><TD ALIGN="LEFT" VALIGN="TOP"><P>&#13;</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="cuiterm-background.html"><B>&lt;&lt;&lt;&nbsp;Background</B></A></TD><TD ALIGN="right"><A ACCESSKEY="n" HREF="cuiwidget.html"><B>CuiWidget&nbsp;&gt;&gt;&gt;</B></A></TD></TR></TABLE></BODY></HTML>