root/doc_inner/gnu_global/S/2836.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>src/label.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/2932.html'>src</a>/label.c</h2>
<em class='comment'>/* [&lt;][&gt;]<a href='#L51'>[^]</a><a href='#L158'>[v]</a>[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='#L51' title='Defined at 51.'>label_hashkey</a></li>
<li><a href='#L60' title='Defined at 60.'>labelhash</a></li>
<li><a href='#L78' title='Defined at 78.'>compare_adr</a></li>
<li><a href='#L84' title='Defined at 84.'>addcerrlist_label</a></li>
<li><a href='#L89' title='Defined at 89.'>getlabel</a></li>
<li><a href='#L106' title='Defined at 106.'>addlabel</a></li>
<li><a href='#L135' title='Defined at 135.'>printlabel</a></li>
<li><a href='#L158' title='Defined at 158.'>freelabel</a></li>
</ol>
<hr />
<pre>
<a id='L1' name='L1'></a>   1 <em class='sharp'>#include</em> "<a href='2413.html'>assemble.h</a>"
<a id='L2' name='L2'></a>   2 
<a id='L3' name='L3'></a>   3 <em class='comment'>/**</em>
<a id='L4' name='L4'></a>   4 <em class='comment'> * ラベルのハッシュ値をセットしたキーを返す</em>
<a id='L5' name='L5'></a>   5 <em class='comment'> *</em>
<a id='L6' name='L6'></a>   6 <em class='comment'> * @return ハッシュ値をセットしたキー</em>
<a id='L7' name='L7'></a>   7 <em class='comment'> *</em>
<a id='L8' name='L8'></a>   8 <em class='comment'> * @param value 値</em>
<a id='L9' name='L9'></a>   9 <em class='comment'> */</em>
<a id='L10' name='L10'></a>  10 <a href='../S/2426.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../S/2836.html#L51' title='Defined at 51 in src/label.c.'>label_hashkey</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/233.html' title='Multiple used in 3 places.'>value</a>);
<a id='L11' name='L11'></a>  11 
<a id='L12' name='L12'></a>  12 <em class='comment'>/**</em>
<a id='L13' name='L13'></a>  13 <em class='comment'> * プログラム名とラベルに対応するハッシュ値を返す</em>
<a id='L14' name='L14'></a>  14 <em class='comment'> *</em>
<a id='L15' name='L15'></a>  15 <em class='comment'> * @return ハッシュ値</em>
<a id='L16' name='L16'></a>  16 <em class='comment'> *</em>
<a id='L17' name='L17'></a>  17 <em class='comment'> * @param prog プログラム名</em>
<a id='L18' name='L18'></a>  18 <em class='comment'> * @param label ラベル</em>
<a id='L19' name='L19'></a>  19 <em class='comment'> */</em>
<a id='L20' name='L20'></a>  20 <strong class='reserved'>unsigned</strong> <a href='../S/2836.html#L60' title='Defined at 60 in src/label.c.'>labelhash</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>);
<a id='L21' name='L21'></a>  21 
<a id='L22' name='L22'></a>  22 <em class='comment'>/**</em>
<a id='L23' name='L23'></a>  23 <em class='comment'> * ラベルを比較した結果を返す。qsort内で使われる関数</em>
<a id='L24' name='L24'></a>  24 <em class='comment'> *</em>
<a id='L25' name='L25'></a>  25 <em class='comment'> * @return ラベルが同一の場合は0、異なる場合は0以外</em>
<a id='L26' name='L26'></a>  26 <em class='comment'> *</em>
<a id='L27' name='L27'></a>  27 <em class='comment'> * @param *a ラベルa</em>
<a id='L28' name='L28'></a>  28 <em class='comment'> * @param *b ラベルb</em>
<a id='L29' name='L29'></a>  29 <em class='comment'> */</em>
<a id='L30' name='L30'></a>  30 <strong class='reserved'>int</strong> <a href='../S/2836.html#L78' title='Defined at 78 in src/label.c.'>compare_adr</a>(<strong class='reserved'>const</strong> <strong class='reserved'>void</strong> *<a href='../Y/5.html' title='Multiple used in 9 places.'>a</a>, <strong class='reserved'>const</strong> <strong class='reserved'>void</strong> *<a href='../Y/23.html' title='Multiple used in 3 places.'>b</a>);
<a id='L31' name='L31'></a>  31 
<a id='L32' name='L32'></a>  32 <em class='comment'>/**</em>
<a id='L33' name='L33'></a>  33 <em class='comment'> * @brief ラベル数</em>
<a id='L34' name='L34'></a>  34 <em class='comment'> */</em>
<a id='L35' name='L35'></a>  35 <strong class='reserved'>static</strong> <strong class='reserved'>int</strong> <a href='../Y/128.html' title='Multiple used in 3 places.'>labelcnt</a> = 0;
<a id='L36' name='L36'></a>  36 
<a id='L37' name='L37'></a>  37 <em class='comment'>/**</em>
<a id='L38' name='L38'></a>  38 <em class='comment'> * @brief ラベル表</em>
<a id='L39' name='L39'></a>  39 <em class='comment'> */</em>
<a id='L40' name='L40'></a>  40 <strong class='reserved'>static</strong> <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</a> *<a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../S/2413.html#L66' title='Defined at 66 in include/assemble.h.'>LABELTABSIZE</a>];
<a id='L41' name='L41'></a>  41 
<a id='L42' name='L42'></a>  42 <em class='comment'>/**</em>
<a id='L43' name='L43'></a>  43 <em class='comment'> * @brief ラベルのエラー</em>
<a id='L44' name='L44'></a>  44 <em class='comment'> */</em>
<a id='L45' name='L45'></a>  45 <strong class='reserved'>static</strong> <a href='../S/2415.html#L18' title='Defined at 18 in include/cerr.h.'>CERR</a> <a href='../Y/44.html' title='Multiple used in 2 places.'>cerr_label</a>[] = <em class='brace'>{</em>
<a id='L46' name='L46'></a>  46     <em class='brace'>{</em> 101, "label already defined" <em class='brace'>}</em>,
<a id='L47' name='L47'></a>  47     <em class='brace'>{</em> 102, "label table is full" <em class='brace'>}</em>,
<a id='L48' name='L48'></a>  48     <em class='brace'>{</em> 103, "label not found" <em class='brace'>}</em>,
<a id='L49' name='L49'></a>  49 <em class='brace'>}</em>;
<a id='L50' name='L50'></a>  50 
<a id='L51' name='L51'></a>  51 <a href='../S/2426.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../R/173.html' title='Multiple referred from 3 places.'>label_hashkey</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/233.html' title='Multiple used in 3 places.'>value</a>) <em class='brace'>{</em>
<a id='L52' name='L52'></a>  52     <a href='../S/2426.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../Y/122.html' title='Multiple used in 11 places.'>key</a> = <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>;
<a id='L53' name='L53'></a>  53 
<a id='L54' name='L54'></a>  54     <a href='../Y/122.html' title='Multiple used in 11 places.'>key</a> = <a href='../S/2831.html#L3' title='Defined at 3 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/2426.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a>), "label_hashkey");
<a id='L55' name='L55'></a>  55     <a href='../Y/122.html' title='Multiple used in 11 places.'>key</a>-&gt;<a href='../Y/230.html' title='Multiple used in 26 places.'>type</a> = <a href='../S/2426.html#L8' title='Defined at 8 in include/hash.h.'>CHARS</a>;
<a id='L56' name='L56'></a>  56     <a href='../Y/122.html' title='Multiple used in 11 places.'>key</a>-&gt;<a href='../Y/232.html' title='Multiple used in 27 places.'>val</a>.<a href='../Y/188.html' title='Multiple used in 74 places.'>s</a> = <a href='../S/2831.html#L25' title='Defined at 25 in src/cmem.c.'>strdup_chk</a>(<a href='../Y/233.html' title='Multiple used in 3 places.'>value</a>, "label_hashkey-&gt;value");
<a id='L57' name='L57'></a>  57     <strong class='reserved'>return</strong> <a href='../Y/122.html' title='Multiple used in 11 places.'>key</a>;
<a id='L58' name='L58'></a>  58 <em class='brace'>}</em>
<a id='L59' name='L59'></a>  59 
<a id='L60' name='L60'></a>  60 <strong class='reserved'>unsigned</strong> <a href='../R/174.html' title='Multiple referred from 3 places.'>labelhash</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>)
<a id='L61' name='L61'></a>  61 <em class='brace'>{</em>
<a id='L62' name='L62'></a>  62     <a href='../S/2426.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>[2] = <em class='brace'>{</em><a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a><em class='brace'>}</em>;
<a id='L63' name='L63'></a>  63     <strong class='reserved'>int</strong> <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a> = 0;
<a id='L64' name='L64'></a>  64     <strong class='reserved'>unsigned</strong> <a href='../Y/114.html' title='Multiple used in 19 places.'>h</a> = 0;
<a id='L65' name='L65'></a>  65 
<a id='L66' name='L66'></a>  66     <strong class='reserved'>if</strong>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>[0]) <em class='brace'>{</em>
<a id='L67' name='L67'></a>  67         <a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>++] = <a href='../S/2836.html#L51' title='Defined at 51 in src/label.c.'>label_hashkey</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>);
<a id='L68' name='L68'></a>  68     <em class='brace'>}</em>
<a id='L69' name='L69'></a>  69     <a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>] = <a href='../S/2836.html#L51' title='Defined at 51 in src/label.c.'>label_hashkey</a>(<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>);
<a id='L70' name='L70'></a>  70     <a href='../Y/114.html' title='Multiple used in 19 places.'>h</a> = <a href='../S/2830.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>(<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>+1, <a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>, <a href='../S/2413.html#L66' title='Defined at 66 in include/assemble.h.'>LABELTABSIZE</a>);
<a id='L71' name='L71'></a>  71     <strong class='reserved'>for</strong>(<strong class='reserved'>int</strong> <a href='../Y/121.html' title='Multiple used in 20 places.'>j</a> = 0; <a href='../Y/121.html' title='Multiple used in 20 places.'>j</a> &lt; <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a> + 1; <a href='../Y/121.html' title='Multiple used in 20 places.'>j</a>++) <em class='brace'>{</em>
<a id='L72' name='L72'></a>  72         <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>[<a href='../Y/121.html' title='Multiple used in 20 places.'>j</a>]-&gt;<a href='../Y/232.html' title='Multiple used in 27 places.'>val</a>.<a href='../Y/188.html' title='Multiple used in 74 places.'>s</a>);
<a id='L73' name='L73'></a>  73         <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/124.html' title='Multiple used in 41 places.'>keys</a>[<a href='../Y/121.html' title='Multiple used in 20 places.'>j</a>]);
<a id='L74' name='L74'></a>  74     <em class='brace'>}</em>
<a id='L75' name='L75'></a>  75     <strong class='reserved'>return</strong> <a href='../Y/114.html' title='Multiple used in 19 places.'>h</a>;
<a id='L76' name='L76'></a>  76 <em class='brace'>}</em>
<a id='L77' name='L77'></a>  77 
<a id='L78' name='L78'></a>  78 <strong class='reserved'>int</strong> <a href='../R/118.html' title='Multiple referred from 2 places.'>compare_adr</a>(<strong class='reserved'>const</strong> <strong class='reserved'>void</strong> *<a href='../Y/5.html' title='Multiple used in 9 places.'>a</a>, <strong class='reserved'>const</strong> <strong class='reserved'>void</strong> *<a href='../Y/23.html' title='Multiple used in 3 places.'>b</a>)
<a id='L79' name='L79'></a>  79 <em class='brace'>{</em>
<a id='L80' name='L80'></a>  80     <strong class='reserved'>return</strong> (**(<a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> **)<a href='../Y/5.html' title='Multiple used in 9 places.'>a</a>).<a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a> - (**(<a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> **)<a href='../Y/23.html' title='Multiple used in 3 places.'>b</a>).<a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a>;
<a id='L81' name='L81'></a>  81 <em class='brace'>}</em>
<a id='L82' name='L82'></a>  82 
<a id='L83' name='L83'></a>  83 <em class='comment'>/* assemble.hで定義された関数群 */</em>
<a id='L84' name='L84'></a>  84 <strong class='reserved'>void</strong> <a href='../R/90.html' title='Multiple referred from 2 places.'>addcerrlist_label</a>()
<a id='L85' name='L85'></a>  85 <em class='brace'>{</em>
<a id='L86' name='L86'></a>  86     <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/44.html' title='Multiple used in 2 places.'>cerr_label</a>), <a href='../Y/44.html' title='Multiple used in 2 places.'>cerr_label</a>);
<a id='L87' name='L87'></a>  87 <em class='brace'>}</em>
<a id='L88' name='L88'></a>  88 
<a id='L89' name='L89'></a>  89 <a href='../S/2425.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../R/156.html' title='Multiple referred from 5 places.'>getlabel</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>)
<a id='L90' name='L90'></a>  90 <em class='brace'>{</em>
<a id='L91' name='L91'></a>  91     <a href='../Y/20.html' title='Multiple used in 22 places.'>assert</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a> != <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a> &amp;&amp; <a href='../Y/127.html' title='Multiple used in 44 places.'>label</a> != <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>);
<a id='L92' name='L92'></a>  92     <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</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 id='L93' name='L93'></a>  93     <a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> *<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>;
<a id='L94' name='L94'></a>  94 
<a id='L95' name='L95'></a>  95     <strong class='reserved'>for</strong>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../S/2836.html#L60' title='Defined at 60 in src/label.c.'>labelhash</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <a href='../Y/127.html' title='Multiple used in 44 places.'>label</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>-&gt;<a href='../Y/154.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L96' name='L96'></a>  96         <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>;
<a id='L97' name='L97'></a>  97         <strong class='reserved'>if</strong>((!<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>[0] || (<a href='../Y/207.html' title='Multiple used in 5 places.'>strcmp</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>) == 0)) &amp;&amp;
<a id='L98' name='L98'></a>  98            <a href='../Y/207.html' title='Multiple used in 5 places.'>strcmp</a>(<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>, <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>) == 0)
<a id='L99' name='L99'></a>  99         <em class='brace'>{</em>
<a id='L100' name='L100'></a> 100             <strong class='reserved'>return</strong> <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a>;
<a id='L101' name='L101'></a> 101         <em class='brace'>}</em>
<a id='L102' name='L102'></a> 102     <em class='brace'>}</em>
<a id='L103' name='L103'></a> 103     <strong class='reserved'>return</strong> 0xFFFF;
<a id='L104' name='L104'></a> 104 <em class='brace'>}</em>
<a id='L105' name='L105'></a> 105 
<a id='L106' name='L106'></a> 106 <a href='../Y/25.html' title='Multiple used in 55 places.'>bool</a> <a href='../R/97.html' title='Multiple referred from 2 places.'>addlabel</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>, <a href='../S/2425.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a>)
<a id='L107' name='L107'></a> 107 <em class='brace'>{</em>
<a id='L108' name='L108'></a> 108     <a href='../Y/20.html' title='Multiple used in 22 places.'>assert</a>(<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a> != <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>);
<a id='L109' name='L109'></a> 109     <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</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 id='L110' name='L110'></a> 110     <a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> *<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>;
<a id='L111' name='L111'></a> 111     <strong class='reserved'>unsigned</strong> <a href='../Y/114.html' title='Multiple used in 19 places.'>h</a> = 0;
<a id='L112' name='L112'></a> 112 
<a id='L113' name='L113'></a> 113     <em class='comment'>/* 登録されたラベルを検索。すでに登録されている場合はエラー発生 */</em>
<a id='L114' name='L114'></a> 114     <strong class='reserved'>if</strong>(<a href='../S/2836.html#L89' title='Defined at 89 in src/label.c.'>getlabel</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>) != 0xFFFF) <em class='brace'>{</em>
<a id='L115' name='L115'></a> 115         <a href='../S/2845.html#L45' title='Defined at 45 in src/cerr.c.'>setcerr</a>(101, <a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>);    <em class='comment'>/* label already defined */</em>
<a id='L116' name='L116'></a> 116         <strong class='reserved'>return</strong> <a href='../Y/92.html' title='Multiple used in 52 places.'>false</a>;
<a id='L117' name='L117'></a> 117     <em class='brace'>}</em>
<a id='L118' name='L118'></a> 118     <em class='comment'>/* メモリを確保 */</em>
<a id='L119' name='L119'></a> 119     <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../S/2831.html#L3' title='Defined at 3 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</a>), "labels.next");
<a id='L120' name='L120'></a> 120     <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a> = <a href='../S/2831.html#L3' title='Defined at 3 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a>), "labels.label");
<a id='L121' name='L121'></a> 121     <em class='comment'>/* プログラム名を設定 */</em>
<a id='L122' name='L122'></a> 122     <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a> = <a href='../S/2831.html#L25' title='Defined at 25 in src/cmem.c.'>strdup_chk</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, "label.prog");
<a id='L123' name='L123'></a> 123     <em class='comment'>/* ラベルを設定 */</em>
<a id='L124' name='L124'></a> 124     <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a> = <a href='../S/2831.html#L25' title='Defined at 25 in src/cmem.c.'>strdup_chk</a>(<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>, "label.label");
<a id='L125' name='L125'></a> 125     <em class='comment'>/* アドレスを設定 */</em>
<a id='L126' name='L126'></a> 126     <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>-&gt;<a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a> = <a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a>;
<a id='L127' name='L127'></a> 127     <em class='comment'>/* ラベル数を設定 */</em>
<a id='L128' name='L128'></a> 128     <a href='../Y/128.html' title='Multiple used in 3 places.'>labelcnt</a>++;
<a id='L129' name='L129'></a> 129     <em class='comment'>/* ハッシュ表へ追加 */</em>
<a id='L130' name='L130'></a> 130     <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/154.html' title='Multiple used in 30 places.'>next</a> = <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../Y/114.html' title='Multiple used in 19 places.'>h</a> = <a href='../S/2836.html#L60' title='Defined at 60 in src/label.c.'>labelhash</a>(<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>, <a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>)];
<a id='L131' name='L131'></a> 131     <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../Y/114.html' title='Multiple used in 19 places.'>h</a>] = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>;
<a id='L132' name='L132'></a> 132     <strong class='reserved'>return</strong> <a href='../Y/228.html' title='Multiple used in 79 places.'>true</a>;
<a id='L133' name='L133'></a> 133 <em class='brace'>}</em>
<a id='L134' name='L134'></a> 134 
<a id='L135' name='L135'></a> 135 <strong class='reserved'>void</strong> <a href='../R/201.html' title='Multiple referred from 2 places.'>printlabel</a>()
<a id='L136' name='L136'></a> 136 <em class='brace'>{</em>
<a id='L137' name='L137'></a> 137     <strong class='reserved'>int</strong> <a href='../Y/188.html' title='Multiple used in 74 places.'>s</a> = 0;
<a id='L138' name='L138'></a> 138     <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</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 id='L139' name='L139'></a> 139     <a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> **<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <em class='brace'>{</em><a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a><em class='brace'>}</em>;
<a id='L140' name='L140'></a> 140 
<a id='L141' name='L141'></a> 141     <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a> = <a href='../S/2831.html#L14' title='Defined at 14 in src/cmem.c.'>calloc_chk</a>(<a href='../Y/128.html' title='Multiple used in 3 places.'>labelcnt</a>, <strong class='reserved'>sizeof</strong>(<a href='../S/2413.html#L52' title='Defined at 52 in include/assemble.h.'>LABELARRAY</a> **), "labels");
<a id='L142' name='L142'></a> 142     <strong class='reserved'>for</strong>(<strong class='reserved'>int</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; <a href='../S/2413.html#L66' title='Defined at 66 in include/assemble.h.'>LABELTABSIZE</a>; <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>++) <em class='brace'>{</em>
<a id='L143' name='L143'></a> 143         <strong class='reserved'>for</strong>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</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>-&gt;<a href='../Y/154.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L144' name='L144'></a> 144             <a href='../Y/20.html' title='Multiple used in 22 places.'>assert</a>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a> != <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>);
<a id='L145' name='L145'></a> 145             <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>[<a href='../Y/188.html' title='Multiple used in 74 places.'>s</a>++] = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>;
<a id='L146' name='L146'></a> 146         <em class='brace'>}</em>
<a id='L147' name='L147'></a> 147     <em class='brace'>}</em>
<a id='L148' name='L148'></a> 148     qsort(<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>, <a href='../Y/188.html' title='Multiple used in 74 places.'>s</a>, <strong class='reserved'>sizeof</strong>(*<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>), <a href='../S/2836.html#L78' title='Defined at 78 in src/label.c.'>compare_adr</a>);
<a id='L149' name='L149'></a> 149     <strong class='reserved'>for</strong>(<strong class='reserved'>int</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; <a href='../Y/188.html' title='Multiple used in 74 places.'>s</a>; <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>++) <em class='brace'>{</em>
<a id='L150' name='L150'></a> 150         <strong class='reserved'>if</strong>(<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>]-&gt;<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>[0]) <em class='brace'>{</em>
<a id='L151' name='L151'></a> 151             <a href='../Y/102.html' title='Multiple used in 115 places.'>fprintf</a>(<a href='../Y/200.html' title='Multiple used in 93 places.'>stdout</a>, "%s.", <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>]-&gt;<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>);
<a id='L152' name='L152'></a> 152         <em class='brace'>}</em>
<a id='L153' name='L153'></a> 153         <a href='../Y/102.html' title='Multiple used in 115 places.'>fprintf</a>(<a href='../Y/200.html' title='Multiple used in 93 places.'>stdout</a>, "%s ---&gt; #%04X\n", <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>]-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>, <a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>]-&gt;<a href='../Y/7.html' title='Multiple used in 68 places.'>adr</a>);
<a id='L154' name='L154'></a> 154     <em class='brace'>}</em>
<a id='L155' name='L155'></a> 155     <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/126.html' title='Multiple used in 22 places.'>l</a>);
<a id='L156' name='L156'></a> 156 <em class='brace'>}</em>
<a id='L157' name='L157'></a> 157 
<a id='L158' name='L158'></a> 158 <strong class='reserved'>void</strong> <a href='../R/143.html' title='Multiple referred from 2 places.'>freelabel</a>()
<a id='L159' name='L159'></a> 159 <em class='brace'>{</em>
<a id='L160' name='L160'></a> 160     <strong class='reserved'>int</strong> <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>;
<a id='L161' name='L161'></a> 161     <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</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 id='L162' name='L162'></a> 162     <a href='../S/2413.html#L60' title='Defined at 60 in include/assemble.h.'>LABELTAB</a> *<a href='../Y/181.html' title='Multiple used in 17 places.'>q</a> = <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>;
<a id='L163' name='L163'></a> 163 
<a id='L164' name='L164'></a> 164     <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; <a href='../S/2413.html#L66' title='Defined at 66 in include/assemble.h.'>LABELTABSIZE</a>; <a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>++) <em class='brace'>{</em>
<a id='L165' name='L165'></a> 165         <strong class='reserved'>for</strong>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</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/181.html' title='Multiple used in 17 places.'>q</a>) <em class='brace'>{</em>
<a id='L166' name='L166'></a> 166             <a href='../Y/181.html' title='Multiple used in 17 places.'>q</a> = <a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/154.html' title='Multiple used in 30 places.'>next</a>;
<a id='L167' name='L167'></a> 167             <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>-&gt;<a href='../Y/177.html' title='Multiple used in 31 places.'>prog</a>);
<a id='L168' name='L168'></a> 168             <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>);
<a id='L169' name='L169'></a> 169             <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/127.html' title='Multiple used in 44 places.'>label</a>);
<a id='L170' name='L170'></a> 170             <a href='../S/2424.html#L21' title='Defined at 21 in include/cmem.h.'>FREE</a>(<a href='../Y/171.html' title='Multiple used in 127 places.'>p</a>);
<a id='L171' name='L171'></a> 171         <em class='brace'>}</em>
<a id='L172' name='L172'></a> 172         <a href='../Y/129.html' title='Multiple used in 7 places.'>labels</a>[<a href='../Y/117.html' title='Multiple used in 233 places.'>i</a>] = <a href='../Y/3.html' title='Multiple used in 191 places.'>NULL</a>;
<a id='L173' name='L173'></a> 173     <em class='brace'>}</em>
<a id='L174' name='L174'></a> 174 <em class='brace'>}</em>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [&lt;][&gt;]<a href='#L51'>[^]</a><a href='#L158'>[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] */