root/doc_inner/gnu_global/S/447.html

/* [<][>][^][v][top][bottom][index][help] */
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>doc_inner/doxygen/latex/casl2rev_8c_source.tex</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.14' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/2920.html'>doc_inner</a>/<a href='../files/2921.html'>doxygen</a>/<a href='../files/2922.html'>latex</a>/casl2rev_8c_source.tex</h2>
<em class='comment'>/* [&lt;][&gt;][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>\doxysection{casl2rev.\+c}
<a id='L2' name='L2'></a>\label{casl2rev_8c_source}\index{src/casl2rev.c@{src/casl2rev.c}}
<a id='L3' name='L3'></a>\textbf{ Go to the documentation of this file.}
<a id='L4' name='L4'></a>\begin{DoxyCode}{0}
<a id='L5' name='L5'></a>\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#include\ "{}package.h"{}}}
<a id='L6' name='L6'></a>\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#include\ "{}disassemble.h"{}}}
<a id='L7' name='L7'></a>\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}load.h"{}}}
<a id='L8' name='L8'></a>\DoxyCodeLine{00004\ }
<a id='L9' name='L9'></a>\DoxyCodeLine{00008\ \textcolor{keyword}{static}\ \textcolor{keyword}{struct\ }option\ longopts[]\ =\ \{}
<a id='L10' name='L10'></a>\DoxyCodeLine{00009\ \ \ \ \ \{\textcolor{stringliteral}{"{}version"{}},\ no\_argument,\ NULL,\ \textcolor{charliteral}{'v'}\ \},}
<a id='L11' name='L11'></a>\DoxyCodeLine{00010\ \ \ \ \ \{\textcolor{stringliteral}{"{}help"{}},\ no\_argument,\ NULL,\ \textcolor{charliteral}{'h'}\},}
<a id='L12' name='L12'></a>\DoxyCodeLine{00011\ \ \ \ \ \{0,\ 0,\ 0,\ 0\},}
<a id='L13' name='L13'></a>\DoxyCodeLine{00012\ \};}
<a id='L14' name='L14'></a>\DoxyCodeLine{00013\ }
<a id='L15' name='L15'></a>\DoxyCodeLine{00022\ \textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{int}\ argc,\ \textcolor{keywordtype}{char}\ *argv[])}
<a id='L16' name='L16'></a>\DoxyCodeLine{00023\ \{}
<a id='L17' name='L17'></a>\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keywordtype}{int}\ opt\ =\ 0;}
<a id='L18' name='L18'></a>\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keywordtype}{int}\ stat\ =\ 0;}
<a id='L19' name='L19'></a>\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *version\ =\ PACKAGE\_VERSION;}
<a id='L20' name='L20'></a>\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdversion\ =\ \textcolor{stringliteral}{"{}disassemble\ of\ YACASL2\ version\ \%s\(\backslash\)n"{}};}
<a id='L21' name='L21'></a>\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *usage\ =\ \textcolor{stringliteral}{"{}Usage:\ \%s\ [-\/vh]\ FILE\(\backslash\)n"{}};}
<a id='L22' name='L22'></a>\DoxyCodeLine{00029\ }
<a id='L23' name='L23'></a>\DoxyCodeLine{00030\ \ \ \ \ \textcolor{comment}{/*\ エラーの定義\ */}}
<a id='L24' name='L24'></a>\DoxyCodeLine{00031\ \ \ \ \ cerr\_init();}
<a id='L25' name='L25'></a>\DoxyCodeLine{00032\ \ \ \ \ addcerrlist\_load();}
<a id='L26' name='L26'></a>\DoxyCodeLine{00033\ }
<a id='L27' name='L27'></a>\DoxyCodeLine{00034\ \ \ \ \ \textcolor{comment}{/*\ オプションの処理\ */}}
<a id='L28' name='L28'></a>\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keywordflow}{while}((opt\ =\ getopt\_long(argc,\ argv,\ \textcolor{stringliteral}{"{}vh"{}},\ longopts,\ NULL))\ !=\ -\/1)\ \{}
<a id='L29' name='L29'></a>\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{switch}(opt)\ \{}
<a id='L30' name='L30'></a>\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'v'}:}
<a id='L31' name='L31'></a>\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stdout,\ cmdversion,\ version);}
<a id='L32' name='L32'></a>\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ casl2revfin;}
<a id='L33' name='L33'></a>\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'h'}:}
<a id='L34' name='L34'></a>\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stdout,\ usage,\ argv[0]);}
<a id='L35' name='L35'></a>\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ casl2revfin;}
<a id='L36' name='L36'></a>\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'?'}:}
<a id='L37' name='L37'></a>\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ usage,\ argv[0]);}
<a id='L38' name='L38'></a>\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ setcerr(212,\ \textcolor{stringliteral}{"{}"{}});\ \ \ \ \textcolor{comment}{/*\ invalid\ option\ */}}
<a id='L39' name='L39'></a>\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ casl2revfin;}
<a id='L40' name='L40'></a>\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \}}
<a id='L41' name='L41'></a>\DoxyCodeLine{00048\ \ \ \ \ \}}
<a id='L42' name='L42'></a>\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordflow}{if}(argv[optind]\ ==\ NULL)\ \{}
<a id='L43' name='L43'></a>\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ setcerr(211,\ \textcolor{stringliteral}{"{}"{}});\ \ \ \ \textcolor{comment}{/*\ object\ file\ not\ specified\ */}}
<a id='L44' name='L44'></a>\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}disassemble\ error\ -\/\ \%d:\ \%s\(\backslash\)n"{}},\ cerr-\/&gt;num,\ cerr-\/&gt;msg);}
<a id='L45' name='L45'></a>\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ casl2revfin;}
<a id='L46' name='L46'></a>\DoxyCodeLine{00053\ \ \ \ \ \}}
<a id='L47' name='L47'></a>\DoxyCodeLine{00054\ \ \ \ \ disassemble\_file(argv[optind]);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ プログラム実行\ */}}
<a id='L48' name='L48'></a>\DoxyCodeLine{00055\ casl2revfin:}
<a id='L49' name='L49'></a>\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordflow}{if}(cerr-\/&gt;num\ &gt;\ 0)\ \{}
<a id='L50' name='L50'></a>\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ stat\ =\ 1;}
<a id='L51' name='L51'></a>\DoxyCodeLine{00058\ \ \ \ \ \}}
<a id='L52' name='L52'></a>\DoxyCodeLine{00059\ \ \ \ \ freecerr();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ エラーの解放\ */}}
<a id='L53' name='L53'></a>\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordflow}{return}\ stat;}
<a id='L54' name='L54'></a>\DoxyCodeLine{00061\ \}}
<a id='L55' name='L55'></a>
<a id='L56' name='L56'></a>\end{DoxyCode}
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [&lt;][&gt;][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
</body>
</html>

/* [<][>][^][v][top][bottom][index][help] */