Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1667

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csutil/getopt.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>csutil/getopt.h</h1><a href="getopt_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Declarations for getopt.</span>
<a name="l00002"></a>00002 <span class="comment">   Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.</span>
<a name="l00003"></a>00003 <span class="comment">   This file is part of the GNU C Library.</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">   The GNU C Library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">   modify it under the terms of the GNU Library General Public License as</span>
<a name="l00007"></a>00007 <span class="comment">   published by the Free Software Foundation; either version 2 of the</span>
<a name="l00008"></a>00008 <span class="comment">   License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">   The GNU C Library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">   Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">   You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment">   License along with the GNU C Library; see the file COPYING.LIB.  If not,</span>
<a name="l00017"></a>00017 <span class="comment">   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</span>
<a name="l00018"></a>00018 <span class="comment">   Boston, MA 02111-1307, USA.  */</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_GETOPT_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_GETOPT_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef __STDC__</span>
<a name="l00024"></a><a class="code" href="getopt_8h.html#8bdd19cad331a646ae8375be00e34cb3">00024</a> <span class="preprocessor"></span><span class="preprocessor">#  define __STDC__ 1</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "csextern.h"</span>
<a name="l00028"></a>00028 
<a name="l00033"></a>00033 <span class="preprocessor">#if defined(CS_PLATFORM_MACOSX)</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="comment">// MacOS/X already has a valid getopt; avoid link errors.</span>
<a name="l00035"></a>00035 <span class="preprocessor">#define getopt __getopt</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define optarg __optarg</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define opterr __opterr</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define optind __optind</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define optopt __optopt</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">char</span> *<a class="code" href="getopt_8h.html#db50a0eab9fed92fc3bfc7dfa4f2c410" title="For communication from `getopt&amp;#39; to the caller.">optarg</a>;
<a name="l00049"></a>00049 
<a name="l00062"></a>00062 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> <a class="code" href="getopt_8h.html#d5e1c16213bbee2d5e8cc363309f418c" title="Index in ARGV of the next element to be scanned.">optind</a>;
<a name="l00063"></a>00063 
<a name="l00067"></a>00067 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> <a class="code" href="getopt_8h.html#e30f05ee1e2e5652f174a35c7875d25e" title="Callers store zero here to inhibit the error message `getopt&amp;#39; prints for unrecognized...">opterr</a>;
<a name="l00068"></a>00068 
<a name="l00071"></a>00071 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> <a class="code" href="getopt_8h.html#475b8db98445da73e5f62a1ef6324b95" title="Set to an option character which was unrecognized.">optopt</a>;
<a name="l00072"></a>00072 
<a name="l00096"></a><a class="code" href="structgetopt__option.html">00096</a> <span class="keyword">struct </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="structgetopt__option.html" title="Describe the long-named options requested by the application.">getopt_option</a>
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 <span class="preprocessor">#if defined (__STDC__) &amp;&amp; __STDC__</span>
<a name="l00099"></a><a class="code" href="structgetopt__option.html#21232852018133c79b7987b4f5a89bcf">00099</a> <span class="preprocessor"></span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *name;
<a name="l00100"></a>00100 <span class="preprocessor">#else</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span>  <span class="keywordtype">char</span> *name;
<a name="l00102"></a>00102 <span class="preprocessor">#endif</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>  <span class="comment">/* has_arg can't be an enum because some compilers complain about</span>
<a name="l00104"></a>00104 <span class="comment">     type mismatches in all the code that assumes it is an int.  */</span>
<a name="l00105"></a><a class="code" href="structgetopt__option.html#9bebd1453e53654a803e2fb46a2970e0">00105</a>   <span class="keywordtype">int</span> has_arg;
<a name="l00106"></a><a class="code" href="structgetopt__option.html#ae7c182735ea02add1c66d554fcf01d2">00106</a>   <span class="keywordtype">int</span> *flag;
<a name="l00107"></a><a class="code" href="structgetopt__option.html#0315120b2afc2c36980c6df4659571e2">00107</a>   <span class="keywordtype">int</span> val;
<a name="l00108"></a>00108 };
<a name="l00113"></a><a class="code" href="getopt_8h.html#df33c342f1f93d3574188740b6d00a59">00113</a> <span class="preprocessor">#define option getopt_option</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 <span class="comment">/* Names for the values of the `has_arg' field of `struct option'.  */</span>
<a name="l00116"></a>00116 
<a name="l00117"></a><a class="code" href="getopt_8h.html#3bc1d5f667b5b4ca4b4abb685dc874ce">00117</a> <span class="preprocessor">#define no_argument             0</span>
<a name="l00118"></a><a class="code" href="getopt_8h.html#6ece8d8dfa8378778f7290fdaba5b8bc">00118</a> <span class="preprocessor"></span><span class="preprocessor">#define required_argument       1</span>
<a name="l00119"></a><a class="code" href="getopt_8h.html#cca06c0a947656bd8b395bf1084ffb72">00119</a> <span class="preprocessor"></span><span class="preprocessor">#define optional_argument       2</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00121"></a>00121 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> getopt (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *<span class="keyword">const</span> *argv,
<a name="l00122"></a>00122         <span class="keyword">const</span> <span class="keywordtype">char</span> *shortopts);
<a name="l00123"></a>00123 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> getopt_long (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *<span class="keyword">const</span> *argv,
<a name="l00124"></a>00124         <span class="keyword">const</span> <span class="keywordtype">char</span> *shortopts, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structgetopt__option.html" title="Describe the long-named options requested by the application.">getopt_option</a> *longopts,
<a name="l00125"></a>00125         <span class="keywordtype">int</span> *longind);
<a name="l00126"></a>00126 <span class="keyword">extern</span> CS_CRYSTALSPACE_EXPORT <span class="keywordtype">int</span> getopt_long_only (<span class="keywordtype">int</span> argc,
<a name="l00127"></a>00127         <span class="keywordtype">char</span> *<span class="keyword">const</span> *argv, <span class="keyword">const</span> <span class="keywordtype">char</span> *shortopts,
<a name="l00128"></a>00128         <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structgetopt__option.html" title="Describe the long-named options requested by the application.">getopt_option</a> *longopts, <span class="keywordtype">int</span> *longind);
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <span class="comment">/* Internal only.  Users should not call this directly.  */</span>
<a name="l00131"></a>00131 <span class="keyword">extern</span> <span class="keywordtype">int</span> _getopt_internal (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *<span class="keyword">const</span> *argv,
<a name="l00132"></a>00132         <span class="keyword">const</span> <span class="keywordtype">char</span> *shortopts,
<a name="l00133"></a>00133         <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structgetopt__option.html" title="Describe the long-named options requested by the application.">getopt_option</a> *longopts, <span class="keywordtype">int</span> *longind,
<a name="l00134"></a>00134         <span class="keywordtype">int</span> long_only);
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="preprocessor">#endif // __CS_GETOPT_H__</span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>