root/doc_inner/gnu_global/S/944.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>test/unit/getcmdcode/cmd.c</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.5' />
<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/2933.html'>test</a>/<a href='../files/3389.html'>unit</a>/<a href='../files/3392.html'>getcmdcode</a>/cmd.c</h2>
<em class='comment'>/* [&lt;][&gt;]<a href='#L7'>[^]</a>[v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<hr />
<h2 class='header'>DEFINITIONS</h2>
This source file includes following definitions.
<ol>
<li><a href='#L7' title='Defined at 7.'>main</a></li>
</ol>
<hr />
<pre>
<a id='L1' name='L1'></a>   1 <em class='sharp'>#include</em> &lt;stdio.h&gt;
<a id='L2' name='L2'></a>   2 <em class='sharp'>#include</em> "<a href='2417.html'>struct.h</a>"
<a id='L3' name='L3'></a>   3 <em class='sharp'>#include</em> "<a href='2415.html'>cerr.h</a>"
<a id='L4' name='L4'></a>   4 <em class='sharp'>#include</em> "<a href='2420.html'>exec.h</a>"
<a id='L5' name='L5'></a>   5 <em class='sharp'>#include</em> "<a href='2419.html'>monitor.h</a>"
<a id='L6' name='L6'></a>   6 
<a id='L7' name='L7'></a>   7 <strong class='reserved'>int</strong> main()<em class='brace'>{</em>
<a id='L8' name='L8'></a>   8     <strong class='reserved'>int</strong> <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>;
<a id='L9' name='L9'></a>   9     <a href='../S/2425.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/70.html' title='Multiple used in 25 places.'>code</a>;
<a id='L10' name='L10'></a>  10     <strong class='reserved'>struct</strong> CMDCODELIST <em class='brace'>{</em>
<a id='L11' name='L11'></a>  11         <strong class='reserved'>char</strong> *<a href='../Y/59.html' title='Multiple used in 86 places.'>cmd</a>;
<a id='L12' name='L12'></a>  12         <a href='../S/2417.html#L99' title='Defined at 99 in include/struct.h.'>CMDTYPE</a> <a href='../Y/230.html' title='Multiple used in 26 places.'>type</a>;
<a id='L13' name='L13'></a>  13     <em class='brace'>}</em> <a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[] = <em class='brace'>{</em>
<a id='L14' name='L14'></a>  14         <em class='brace'>{</em> "LD", <a href='../S/2417.html#L98' title='Defined at 98 in include/struct.h.'>NONE</a> <em class='brace'>}</em>, <em class='brace'>{</em> "LD", 066 <em class='brace'>}</em>, <em class='brace'>{</em> "NOEX", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>,
<a id='L15' name='L15'></a>  15         <em class='brace'>{</em> "NOP", <a href='../S/2417.html#L98' title='Defined at 98 in include/struct.h.'>NONE</a> <em class='brace'>}</em>, <em class='brace'>{</em> "LD", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "ST", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L16' name='L16'></a>  16         <em class='brace'>{</em> "LAD", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "LD", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "ADDA", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L17' name='L17'></a>  17         <em class='brace'>{</em> "SUBA", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "ADDL", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "SUBL", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L18' name='L18'></a>  18         <em class='brace'>{</em> "ADDA", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "SUBA", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "ADDL", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>,
<a id='L19' name='L19'></a>  19         <em class='brace'>{</em> "SUBL", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "AND", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "OR", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L20' name='L20'></a>  20         <em class='brace'>{</em> "XOR", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "AND", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "OR", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>,
<a id='L21' name='L21'></a>  21         <em class='brace'>{</em> "XOR", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "CPA", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "CPL", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L22' name='L22'></a>  22         <em class='brace'>{</em> "CPA", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "CPL", <a href='../S/2417.html#L83' title='Defined at 83 in include/struct.h.'>R1_R2</a> <em class='brace'>}</em>, <em class='brace'>{</em> "SLA", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L23' name='L23'></a>  23         <em class='brace'>{</em> "SRA", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "SLL", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "SRL", <a href='../S/2417.html#L77' title='Defined at 77 in include/struct.h.'>R_ADR_X</a> <em class='brace'>}</em>,
<a id='L24' name='L24'></a>  24         <em class='brace'>{</em> "JMI", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "JNZ", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "JZE", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>,
<a id='L25' name='L25'></a>  25         <em class='brace'>{</em> "JUMP", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "JPL", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "JOV", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>,
<a id='L26' name='L26'></a>  26         <em class='brace'>{</em> "PUSH", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "POP", <a href='../S/2417.html#L94' title='Defined at 94 in include/struct.h.'>R_</a> <em class='brace'>}</em>, <em class='brace'>{</em> "CALL", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>,
<a id='L27' name='L27'></a>  27         <em class='brace'>{</em> "SVC", <a href='../S/2417.html#L89' title='Defined at 89 in include/struct.h.'>ADR_X</a> <em class='brace'>}</em>, <em class='brace'>{</em> "RET", <a href='../S/2417.html#L98' title='Defined at 98 in include/struct.h.'>NONE</a> <em class='brace'>}</em>
<a id='L28' name='L28'></a>  28     <em class='brace'>}</em>;
<a id='L29' name='L29'></a>  29     <a href='../S/2856.html#L113' title='Defined at 113 in src/struct.c.'>create_cmdtable</a>(<a href='../S/2417.html#L61' title='Defined at 61 in include/struct.h.'>HASH_CMDTYPE</a>);
<a id='L30' name='L30'></a>  30     <a href='../S/2845.html#L3' title='Defined at 3 in src/cerr.c.'>cerr_init</a>();
<a id='L31' name='L31'></a>  31     <strong class='reserved'>for</strong>(<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a> = 0; <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a> &lt; <strong class='reserved'>sizeof</strong>(<a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>)/<strong class='reserved'>sizeof</strong>(<a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[0]); <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>++) <em class='brace'>{</em>
<a id='L32' name='L32'></a>  32         <a href='../Y/70.html' title='Multiple used in 25 places.'>code</a> = <a href='../S/2856.html#L153' title='Defined at 153 in src/struct.c.'>getcmdcode</a>(<a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>].<a href='../Y/59.html' title='Multiple used in 86 places.'>cmd</a>, <a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>].<a href='../Y/230.html' title='Multiple used in 26 places.'>type</a>);
<a id='L33' name='L33'></a>  33         <a href='../Y/176.html' title='Multiple used in 32 places.'>printf</a>("%s:0%02o ---&gt; #%04X\n", <a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>].<a href='../Y/59.html' title='Multiple used in 86 places.'>cmd</a>, <a href='../Y/60.html' title='Multiple used in 4 places.'>cmdcodelist</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>].<a href='../Y/230.html' title='Multiple used in 26 places.'>type</a>, <a href='../Y/70.html' title='Multiple used in 25 places.'>code</a>);
<a id='L34' name='L34'></a>  34         <strong class='reserved'>if</strong>(<a href='../Y/32.html' title='Multiple used in 59 places.'>cerr</a>-&gt;<a href='../Y/157.html' title='Multiple used in 57 places.'>num</a> != 0) <em class='brace'>{</em>
<a id='L35' name='L35'></a>  35             <a href='../Y/176.html' title='Multiple used in 32 places.'>printf</a>("\terror - %d: %s", <a href='../Y/32.html' title='Multiple used in 59 places.'>cerr</a>-&gt;<a href='../Y/157.html' title='Multiple used in 57 places.'>num</a>, <a href='../Y/32.html' title='Multiple used in 59 places.'>cerr</a>-&gt;<a href='../Y/151.html' title='Multiple used in 23 places.'>msg</a>);
<a id='L36' name='L36'></a>  36         <em class='brace'>}</em>
<a id='L37' name='L37'></a>  37     <em class='brace'>}</em>
<a id='L38' name='L38'></a>  38     <a href='../S/2845.html#L72' title='Defined at 72 in src/cerr.c.'>freecerr</a>();
<a id='L39' name='L39'></a>  39     <a href='../S/2856.html#L135' title='Defined at 135 in src/struct.c.'>free_cmdtable</a>(<a href='../S/2417.html#L61' title='Defined at 61 in include/struct.h.'>HASH_CMDTYPE</a>);
<a id='L40' name='L40'></a>  40     <strong class='reserved'>return</strong> 0;
<a id='L41' name='L41'></a>  41 <em class='brace'>}</em>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [&lt;][&gt;][^]<a href='#L7'>[v]</a><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] */