<!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/addcerrlist/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/3390.html'>addcerrlist</a>/cmd.c</h2> <em class='comment'>/* [<][>]<a href='#L58'>[^]</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='#L58' title='Defined at 58.'>main</a></li> </ol> <hr /> <pre> <a id='L1' name='L1'></a> 1 <em class='sharp'>#include</em> <stdio.h> <a id='L2' name='L2'></a> 2 <em class='sharp'>#include</em> "<a href='2415.html'>cerr.h</a>" <a id='L3' name='L3'></a> 3 <a id='L4' name='L4'></a> 4 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/33.html' title='Multiple used in 2 places.'>cerr_0</a>[] = <em class='brace'>{</em> <a id='L5' name='L5'></a> 5 <em class='brace'>{</em> 126, "source file is not specified" <em class='brace'>}</em>, <a id='L6' name='L6'></a> 6 <em class='brace'>}</em>; <a id='L7' name='L7'></a> 7 <a id='L8' name='L8'></a> 8 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/34.html' title='Multiple used in 2 places.'>cerr_1</a>[] = <em class='brace'>{</em> <a id='L9' name='L9'></a> 9 <em class='brace'>{</em> 101, "label already defined" <em class='brace'>}</em>, <a id='L10' name='L10'></a> 10 <em class='brace'>{</em> 102, "label table is full" <em class='brace'>}</em>, <a id='L11' name='L11'></a> 11 <em class='brace'>{</em> 103, "label not found" <em class='brace'>}</em>, <a id='L12' name='L12'></a> 12 <em class='brace'>{</em> 104, "label length is too long" <em class='brace'>}</em>, <a id='L13' name='L13'></a> 13 <em class='brace'>{</em> 105, "no command in the line" <em class='brace'>}</em>, <a id='L14' name='L14'></a> 14 <em class='brace'>{</em> 106, "operand mismatch in assemble command" <em class='brace'>}</em>, <a id='L15' name='L15'></a> 15 <em class='brace'>{</em> 107, "no label in START" <em class='brace'>}</em>, <a id='L16' name='L16'></a> 16 <em class='brace'>{</em> 108, "not command of operand \"r\"" <em class='brace'>}</em>, <a id='L17' name='L17'></a> 17 <em class='brace'>{</em> 109, "not command of operand \"r1,r2\"" <em class='brace'>}</em>, <a id='L18' name='L18'></a> 18 <em class='brace'>{</em> 110, "not command of operand \"r,adr[,x]\"" <em class='brace'>}</em>, <a id='L19' name='L19'></a> 19 <em class='brace'>{</em> 111, "not command of operand \"adr[,x]\"" <em class='brace'>}</em>, <a id='L20' name='L20'></a> 20 <em class='brace'>{</em> 112, "not command of no operand" <em class='brace'>}</em>, <a id='L21' name='L21'></a> 21 <em class='brace'>{</em> 113, "operand too many in COMET II command" <em class='brace'>}</em>, <a id='L22' name='L22'></a> 22 <em class='brace'>{</em> 117, "operand too many in DC" <em class='brace'>}</em>, <a id='L23' name='L23'></a> 23 <em class='brace'>{</em> 118, "operand length too long" <em class='brace'>}</em>, <a id='L24' name='L24'></a> 24 <em class='brace'>{</em> 119, "out of COMET II memory" <em class='brace'>}</em>, <a id='L25' name='L25'></a> 25 <em class='brace'>{</em> 120, "GR0 in operand x" <em class='brace'>}</em>, <a id='L26' name='L26'></a> 26 <em class='brace'>{</em> 121, "cannot get operand token" <em class='brace'>}</em>, <a id='L27' name='L27'></a> 27 <em class='brace'>{</em> 122, "cannot create hash table" <em class='brace'>}</em>, <a id='L28' name='L28'></a> 28 <em class='brace'>{</em> 123, "unclosed quote" <em class='brace'>}</em>, <a id='L29' name='L29'></a> 29 <em class='brace'>{</em> 124, "more than one character in literal" <em class='brace'>}</em>, <a id='L30' name='L30'></a> 30 <em class='brace'>{</em> 125, "not GR in operand x" <em class='brace'>}</em>, <a id='L31' name='L31'></a> 31 <em class='brace'>}</em>; <a id='L32' name='L32'></a> 32 <a id='L33' name='L33'></a> 33 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/35.html' title='Multiple used in 2 places.'>cerr_2</a>[] = <em class='brace'>{</em> <a id='L34' name='L34'></a> 34 <em class='brace'>{</em> 114, "not integer" <em class='brace'>}</em>, <a id='L35' name='L35'></a> 35 <em class='brace'>{</em> 115, "not hex" <em class='brace'>}</em>, <a id='L36' name='L36'></a> 36 <em class='brace'>{</em> 116, "out of hex range" <em class='brace'>}</em>, <a id='L37' name='L37'></a> 37 <em class='brace'>}</em>; <a id='L38' name='L38'></a> 38 <a id='L39' name='L39'></a> 39 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/36.html' title='Multiple used in 2 places.'>cerr_3</a>[] = <em class='brace'>{</em> <a id='L40' name='L40'></a> 40 <em class='brace'>{</em> 114, "not integer" <em class='brace'>}</em>, <a id='L41' name='L41'></a> 41 <em class='brace'>{</em> 115, "not hex" <em class='brace'>}</em>, <a id='L42' name='L42'></a> 42 <em class='brace'>{</em> 116, "out of hex range" <em class='brace'>}</em>, <a id='L43' name='L43'></a> 43 <em class='brace'>}</em>; <a id='L44' name='L44'></a> 44 <a id='L45' name='L45'></a> 45 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/37.html' title='Multiple used in 2 places.'>cerr_4</a>[] = <em class='brace'>{</em> <a id='L46' name='L46'></a> 46 <em class='brace'>{</em> 201, "Load object file - full of COMET II memory" <em class='brace'>}</em>, <a id='L47' name='L47'></a> 47 <em class='brace'>}</em>; <a id='L48' name='L48'></a> 48 <a id='L49' name='L49'></a> 49 <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/38.html' title='Multiple used in 2 places.'>cerr_5</a>[] = <em class='brace'>{</em> <a id='L50' name='L50'></a> 50 <em class='brace'>{</em> 202, "SVC input - out of Input memory" <em class='brace'>}</em>, <a id='L51' name='L51'></a> 51 <em class='brace'>{</em> 203, "SVC output - out of COMET II memory" <em class='brace'>}</em>, <a id='L52' name='L52'></a> 52 <em class='brace'>{</em> 204, "Program Register (PR) - out of COMET II memory" <em class='brace'>}</em>, <a id='L53' name='L53'></a> 53 <em class='brace'>{</em> 205, "Stack Pointer (SP) - cannot allocate stack buffer" <em class='brace'>}</em>, <a id='L54' name='L54'></a> 54 <em class='brace'>{</em> 206, "Address - out of COMET II memory" <em class='brace'>}</em>, <a id='L55' name='L55'></a> 55 <em class='brace'>{</em> 207, "Stack Pointer (SP) - out of COMET II memory" <em class='brace'>}</em>, <a id='L56' name='L56'></a> 56 <em class='brace'>}</em>; <a id='L57' name='L57'></a> 57 <a id='L58' name='L58'></a> 58 <strong class='reserved'>int</strong> main()<em class='brace'>{</em> <a id='L59' name='L59'></a> 59 <a href='../S/2415.html#L31' title='Defined at 31 in include/cerr.h.'>CERRLIST</a> *<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>; <a id='L60' name='L60'></a> 60 <em class='comment'>/* エラーの追加 */</em> <a id='L61' name='L61'></a> 61 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/33.html' title='Multiple used in 2 places.'>cerr_0</a>), <a href='../Y/33.html' title='Multiple used in 2 places.'>cerr_0</a>); <a id='L62' name='L62'></a> 62 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/34.html' title='Multiple used in 2 places.'>cerr_1</a>), <a href='../Y/34.html' title='Multiple used in 2 places.'>cerr_1</a>); <a id='L63' name='L63'></a> 63 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/35.html' title='Multiple used in 2 places.'>cerr_2</a>), <a href='../Y/35.html' title='Multiple used in 2 places.'>cerr_2</a>); <a id='L64' name='L64'></a> 64 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/36.html' title='Multiple used in 2 places.'>cerr_3</a>), <a href='../Y/36.html' title='Multiple used in 2 places.'>cerr_3</a>); <a id='L65' name='L65'></a> 65 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/37.html' title='Multiple used in 2 places.'>cerr_4</a>), <a href='../Y/37.html' title='Multiple used in 2 places.'>cerr_4</a>); <a id='L66' name='L66'></a> 66 <a href='../S/2845.html#L13' title='Defined at 13 in src/cerr.c.'>addcerrlist</a>(<a href='../S/2424.html#L14' title='Defined at 14 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/38.html' title='Multiple used in 2 places.'>cerr_5</a>), <a href='../Y/38.html' title='Multiple used in 2 places.'>cerr_5</a>); <a id='L67' name='L67'></a> 67 <strong class='reserved'>for</strong>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/51.html' title='Multiple used in 9 places.'>cerrlist</a>; <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> != <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>; <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-><a href='../Y/154.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em> <a id='L68' name='L68'></a> 68 <a href='../Y/176.html' title='Multiple used in 32 places.'>printf</a>("%d: %s\n", <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-><a href='../Y/32.html' title='Multiple used in 59 places.'>cerr</a>-><a href='../Y/157.html' title='Multiple used in 57 places.'>num</a>, <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-><a href='../Y/32.html' title='Multiple used in 59 places.'>cerr</a>-><a href='../Y/151.html' title='Multiple used in 23 places.'>msg</a>); <a id='L69' name='L69'></a> 69 <em class='brace'>}</em> <a id='L70' name='L70'></a> 70 <strong class='reserved'>return</strong> 0; <a id='L71' name='L71'></a> 71 <em class='brace'>}</em> </pre> <hr /> <a id='BOTTOM' name='BOTTOM'></a> <em class='comment'>/* [<][>][^]<a href='#L58'>[v]</a><a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em> </body> </html>