root/doc_inner/gnu_global/S/199.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/cmem_8c.tex</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/2927.html'>doc_inner</a>/<a href='../files/2928.html'>doxygen</a>/<a href='../files/2929.html'>latex</a>/cmem_8c.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{src/cmem.c File Reference}
<a id='L2' name='L2'></a>\label{cmem_8c}\index{src/cmem.c@{src/cmem.c}}
<a id='L3' name='L3'></a>{\ttfamily \#include \char`\"{}cmem.\+h\char`\"{}}\newline
<a id='L4' name='L4'></a>Include dependency graph for cmem.\+c\+:
<a id='L5' name='L5'></a>\nopagebreak
<a id='L6' name='L6'></a>\begin{figure}[H]
<a id='L7' name='L7'></a>\begin{center}
<a id='L8' name='L8'></a>\leavevmode
<a id='L9' name='L9'></a>\includegraphics[width=350pt]{cmem_8c__incl}
<a id='L10' name='L10'></a>\end{center}
<a id='L11' name='L11'></a>\end{figure}
<a id='L12' name='L12'></a>\doxysubsection*{Functions}
<a id='L13' name='L13'></a>\begin{DoxyCompactItemize}
<a id='L14' name='L14'></a>\item 
<a id='L15' name='L15'></a>void $\ast$ \textbf{ malloc\+\_\+chk} (size\+\_\+t size, const char $\ast$tag)
<a id='L16' name='L16'></a>\begin{DoxyCompactList}\small\item\em mallocを実行し、0で初期化する \end{DoxyCompactList}\item 
<a id='L17' name='L17'></a>void $\ast$ \textbf{ calloc\+\_\+chk} (size\+\_\+t nmemb, size\+\_\+t size, const char $\ast$tag)
<a id='L18' name='L18'></a>\begin{DoxyCompactList}\small\item\em 領域の数とサイズを指定してメモリーを確保するcallocを実行する \end{DoxyCompactList}\item 
<a id='L19' name='L19'></a>char $\ast$ \textbf{ strdup\+\_\+chk} (const char $\ast$s, const char $\ast$tag)
<a id='L20' name='L20'></a>\begin{DoxyCompactList}\small\item\em malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列を返す \end{DoxyCompactList}\item 
<a id='L21' name='L21'></a>char $\ast$ \textbf{ strndup\+\_\+chk} (const char $\ast$s, size\+\_\+t len, const char $\ast$tag)
<a id='L22' name='L22'></a>\begin{DoxyCompactList}\small\item\em malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列の指定した長さの部分を返す \end{DoxyCompactList}\item 
<a id='L23' name='L23'></a>void \textbf{ strip\+\_\+end} (char $\ast$s)
<a id='L24' name='L24'></a>\begin{DoxyCompactList}\small\item\em 文字列の末尾から、改行と空白とタブを削除する \end{DoxyCompactList}\item 
<a id='L25' name='L25'></a>void \textbf{ strip\+\_\+casl2\+\_\+comment} (char $\ast$s)
<a id='L26' name='L26'></a>\begin{DoxyCompactList}\small\item\em 文字列から「\textquotesingle{}」以降の文字列を\+CASL IIのコメントとして削除する。「\textquotesingle{}\textquotesingle{}」の場合は除く \end{DoxyCompactList}\item 
<a id='L27' name='L27'></a>char $\ast$ \textbf{ strrev} (const char $\ast$s)
<a id='L28' name='L28'></a>\begin{DoxyCompactList}\small\item\em 逆にした文字列を返す \end{DoxyCompactList}\end{DoxyCompactItemize}
<a id='L29' name='L29'></a>
<a id='L30' name='L30'></a>
<a id='L31' name='L31'></a>\doxysubsection{Function Documentation}
<a id='L32' name='L32'></a>\mbox{\label{cmem_8c_a813e5efb91f0a88da833734ab014cd79}} 
<a id='L33' name='L33'></a>\index{cmem.c@{cmem.c}!calloc\_chk@{calloc\_chk}}
<a id='L34' name='L34'></a>\index{calloc\_chk@{calloc\_chk}!cmem.c@{cmem.c}}
<a id='L35' name='L35'></a>\doxysubsubsection{calloc\_chk()}
<a id='L36' name='L36'></a>{\footnotesize\ttfamily void$\ast$ calloc\+\_\+chk (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{nmemb,  }\item[{size\+\_\+t}]{size,  }\item[{const char $\ast$}]{tag }\end{DoxyParamCaption})}
<a id='L37' name='L37'></a>
<a id='L38' name='L38'></a>
<a id='L39' name='L39'></a>
<a id='L40' name='L40'></a>領域の数とサイズを指定してメモリーを確保するcallocを実行する 
<a id='L41' name='L41'></a>
<a id='L42' name='L42'></a>メモリを確保できない場合はエラーを出力して終了
<a id='L43' name='L43'></a>
<a id='L44' name='L44'></a>\begin{DoxyReturn}{Returns}
<a id='L45' name='L45'></a>なし
<a id='L46' name='L46'></a>\end{DoxyReturn}
<a id='L47' name='L47'></a>
<a id='L48' name='L48'></a>\begin{DoxyParams}{Parameters}
<a id='L49' name='L49'></a>{\em nmemb} &amp; 領域の数 \\
<a id='L50' name='L50'></a>\hline
<a id='L51' name='L51'></a>{\em size} &amp; 領域1個あたりのメモリーサイズ \\
<a id='L52' name='L52'></a>\hline
<a id='L53' name='L53'></a>{\em tag} &amp; エラーメッセージなどで表示されるタグ \\
<a id='L54' name='L54'></a>\hline
<a id='L55' name='L55'></a>\end{DoxyParams}
<a id='L56' name='L56'></a>
<a id='L57' name='L57'></a>
<a id='L58' name='L58'></a>Definition at line 14 of file cmem.\+c.
<a id='L59' name='L59'></a>
<a id='L60' name='L60'></a>Here is the caller graph for this function\+:
<a id='L61' name='L61'></a>\nopagebreak
<a id='L62' name='L62'></a>\begin{figure}[H]
<a id='L63' name='L63'></a>\begin{center}
<a id='L64' name='L64'></a>\leavevmode
<a id='L65' name='L65'></a>\includegraphics[width=350pt]{cmem_8c_a813e5efb91f0a88da833734ab014cd79_icgraph}
<a id='L66' name='L66'></a>\end{center}
<a id='L67' name='L67'></a>\end{figure}
<a id='L68' name='L68'></a>\mbox{\label{cmem_8c_ac4bb1c10fec6837713f1f3c9fabfccb5}} 
<a id='L69' name='L69'></a>\index{cmem.c@{cmem.c}!malloc\_chk@{malloc\_chk}}
<a id='L70' name='L70'></a>\index{malloc\_chk@{malloc\_chk}!cmem.c@{cmem.c}}
<a id='L71' name='L71'></a>\doxysubsubsection{malloc\_chk()}
<a id='L72' name='L72'></a>{\footnotesize\ttfamily void$\ast$ malloc\+\_\+chk (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{size,  }\item[{const char $\ast$}]{tag }\end{DoxyParamCaption})}
<a id='L73' name='L73'></a>
<a id='L74' name='L74'></a>
<a id='L75' name='L75'></a>
<a id='L76' name='L76'></a>mallocを実行し、0で初期化する 
<a id='L77' name='L77'></a>
<a id='L78' name='L78'></a>メモリを確保できない場合はエラーを出力して終了
<a id='L79' name='L79'></a>
<a id='L80' name='L80'></a>\begin{DoxyReturn}{Returns}
<a id='L81' name='L81'></a>なし
<a id='L82' name='L82'></a>\end{DoxyReturn}
<a id='L83' name='L83'></a>
<a id='L84' name='L84'></a>\begin{DoxyParams}{Parameters}
<a id='L85' name='L85'></a>{\em size} &amp; メモリーのサイズ \\
<a id='L86' name='L86'></a>\hline
<a id='L87' name='L87'></a>{\em tag} &amp; エラーメッセージなどで表示されるタグ \\
<a id='L88' name='L88'></a>\hline
<a id='L89' name='L89'></a>\end{DoxyParams}
<a id='L90' name='L90'></a>
<a id='L91' name='L91'></a>
<a id='L92' name='L92'></a>Definition at line 3 of file cmem.\+c.
<a id='L93' name='L93'></a>
<a id='L94' name='L94'></a>Here is the caller graph for this function\+:
<a id='L95' name='L95'></a>\nopagebreak
<a id='L96' name='L96'></a>\begin{figure}[H]
<a id='L97' name='L97'></a>\begin{center}
<a id='L98' name='L98'></a>\leavevmode
<a id='L99' name='L99'></a>\includegraphics[width=350pt]{cmem_8c_ac4bb1c10fec6837713f1f3c9fabfccb5_icgraph}
<a id='L100' name='L100'></a>\end{center}
<a id='L101' name='L101'></a>\end{figure}
<a id='L102' name='L102'></a>\mbox{\label{cmem_8c_a6eee1bd49d57eafb3ed883038caff8e1}} 
<a id='L103' name='L103'></a>\index{cmem.c@{cmem.c}!strdup\_chk@{strdup\_chk}}
<a id='L104' name='L104'></a>\index{strdup\_chk@{strdup\_chk}!cmem.c@{cmem.c}}
<a id='L105' name='L105'></a>\doxysubsubsection{strdup\_chk()}
<a id='L106' name='L106'></a>{\footnotesize\ttfamily char$\ast$ strdup\+\_\+chk (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s,  }\item[{const char $\ast$}]{tag }\end{DoxyParamCaption})}
<a id='L107' name='L107'></a>
<a id='L108' name='L108'></a>
<a id='L109' name='L109'></a>
<a id='L110' name='L110'></a>malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列を返す 
<a id='L111' name='L111'></a>
<a id='L112' name='L112'></a>\begin{DoxyReturn}{Returns}
<a id='L113' name='L113'></a>コピーした文字列
<a id='L114' name='L114'></a>\end{DoxyReturn}
<a id='L115' name='L115'></a>
<a id='L116' name='L116'></a>\begin{DoxyParams}{Parameters}
<a id='L117' name='L117'></a>{\em s} &amp; 文字列 \\
<a id='L118' name='L118'></a>\hline
<a id='L119' name='L119'></a>{\em tag} &amp; エラーメッセージなどで表示されるタグ \\
<a id='L120' name='L120'></a>\hline
<a id='L121' name='L121'></a>\end{DoxyParams}
<a id='L122' name='L122'></a>
<a id='L123' name='L123'></a>
<a id='L124' name='L124'></a>Definition at line 25 of file cmem.\+c.
<a id='L125' name='L125'></a>
<a id='L126' name='L126'></a>Here is the call graph for this function\+:
<a id='L127' name='L127'></a>\nopagebreak
<a id='L128' name='L128'></a>\begin{figure}[H]
<a id='L129' name='L129'></a>\begin{center}
<a id='L130' name='L130'></a>\leavevmode
<a id='L131' name='L131'></a>\includegraphics[width=212pt]{cmem_8c_a6eee1bd49d57eafb3ed883038caff8e1_cgraph}
<a id='L132' name='L132'></a>\end{center}
<a id='L133' name='L133'></a>\end{figure}
<a id='L134' name='L134'></a>Here is the caller graph for this function\+:
<a id='L135' name='L135'></a>\nopagebreak
<a id='L136' name='L136'></a>\begin{figure}[H]
<a id='L137' name='L137'></a>\begin{center}
<a id='L138' name='L138'></a>\leavevmode
<a id='L139' name='L139'></a>\includegraphics[width=350pt]{cmem_8c_a6eee1bd49d57eafb3ed883038caff8e1_icgraph}
<a id='L140' name='L140'></a>\end{center}
<a id='L141' name='L141'></a>\end{figure}
<a id='L142' name='L142'></a>\mbox{\label{cmem_8c_aab7f4dbb7c0a7e7acbd4a7e035c9263c}} 
<a id='L143' name='L143'></a>\index{cmem.c@{cmem.c}!strip\_casl2\_comment@{strip\_casl2\_comment}}
<a id='L144' name='L144'></a>\index{strip\_casl2\_comment@{strip\_casl2\_comment}!cmem.c@{cmem.c}}
<a id='L145' name='L145'></a>\doxysubsubsection{strip\_casl2\_comment()}
<a id='L146' name='L146'></a>{\footnotesize\ttfamily void strip\+\_\+casl2\+\_\+comment (\begin{DoxyParamCaption}\item[{char $\ast$}]{s }\end{DoxyParamCaption})}
<a id='L147' name='L147'></a>
<a id='L148' name='L148'></a>
<a id='L149' name='L149'></a>
<a id='L150' name='L150'></a>文字列から「\textquotesingle{}」以降の文字列を\+CASL IIのコメントとして削除する。「\textquotesingle{}\textquotesingle{}」の場合は除く 
<a id='L151' name='L151'></a>
<a id='L152' name='L152'></a>\begin{DoxyReturn}{Returns}
<a id='L153' name='L153'></a>なし
<a id='L154' name='L154'></a>\end{DoxyReturn}
<a id='L155' name='L155'></a>
<a id='L156' name='L156'></a>\begin{DoxyParams}{Parameters}
<a id='L157' name='L157'></a>{\em s} &amp; 文字列 \\
<a id='L158' name='L158'></a>\hline
<a id='L159' name='L159'></a>\end{DoxyParams}
<a id='L160' name='L160'></a>
<a id='L161' name='L161'></a>
<a id='L162' name='L162'></a>Definition at line 55 of file cmem.\+c.
<a id='L163' name='L163'></a>
<a id='L164' name='L164'></a>Here is the caller graph for this function\+:
<a id='L165' name='L165'></a>\nopagebreak
<a id='L166' name='L166'></a>\begin{figure}[H]
<a id='L167' name='L167'></a>\begin{center}
<a id='L168' name='L168'></a>\leavevmode
<a id='L169' name='L169'></a>\includegraphics[width=350pt]{cmem_8c_aab7f4dbb7c0a7e7acbd4a7e035c9263c_icgraph}
<a id='L170' name='L170'></a>\end{center}
<a id='L171' name='L171'></a>\end{figure}
<a id='L172' name='L172'></a>\mbox{\label{cmem_8c_a20f2e2b05241b8d97e218e4184b97bac}} 
<a id='L173' name='L173'></a>\index{cmem.c@{cmem.c}!strip\_end@{strip\_end}}
<a id='L174' name='L174'></a>\index{strip\_end@{strip\_end}!cmem.c@{cmem.c}}
<a id='L175' name='L175'></a>\doxysubsubsection{strip\_end()}
<a id='L176' name='L176'></a>{\footnotesize\ttfamily void strip\+\_\+end (\begin{DoxyParamCaption}\item[{char $\ast$}]{s }\end{DoxyParamCaption})}
<a id='L177' name='L177'></a>
<a id='L178' name='L178'></a>
<a id='L179' name='L179'></a>
<a id='L180' name='L180'></a>文字列の末尾から、改行と空白とタブを削除する 
<a id='L181' name='L181'></a>
<a id='L182' name='L182'></a>\begin{DoxyReturn}{Returns}
<a id='L183' name='L183'></a>なし
<a id='L184' name='L184'></a>\end{DoxyReturn}
<a id='L185' name='L185'></a>
<a id='L186' name='L186'></a>\begin{DoxyParams}{Parameters}
<a id='L187' name='L187'></a>{\em s} &amp; 文字列 \\
<a id='L188' name='L188'></a>\hline
<a id='L189' name='L189'></a>\end{DoxyParams}
<a id='L190' name='L190'></a>
<a id='L191' name='L191'></a>
<a id='L192' name='L192'></a>Definition at line 48 of file cmem.\+c.
<a id='L193' name='L193'></a>
<a id='L194' name='L194'></a>Here is the caller graph for this function\+:
<a id='L195' name='L195'></a>\nopagebreak
<a id='L196' name='L196'></a>\begin{figure}[H]
<a id='L197' name='L197'></a>\begin{center}
<a id='L198' name='L198'></a>\leavevmode
<a id='L199' name='L199'></a>\includegraphics[width=350pt]{cmem_8c_a20f2e2b05241b8d97e218e4184b97bac_icgraph}
<a id='L200' name='L200'></a>\end{center}
<a id='L201' name='L201'></a>\end{figure}
<a id='L202' name='L202'></a>\mbox{\label{cmem_8c_a0c1f4db31db96ea105fb5d5e2f840334}} 
<a id='L203' name='L203'></a>\index{cmem.c@{cmem.c}!strndup\_chk@{strndup\_chk}}
<a id='L204' name='L204'></a>\index{strndup\_chk@{strndup\_chk}!cmem.c@{cmem.c}}
<a id='L205' name='L205'></a>\doxysubsubsection{strndup\_chk()}
<a id='L206' name='L206'></a>{\footnotesize\ttfamily char$\ast$ strndup\+\_\+chk (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s,  }\item[{size\+\_\+t}]{len,  }\item[{const char $\ast$}]{tag }\end{DoxyParamCaption})}
<a id='L207' name='L207'></a>
<a id='L208' name='L208'></a>
<a id='L209' name='L209'></a>
<a id='L210' name='L210'></a>malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列の指定した長さの部分を返す 
<a id='L211' name='L211'></a>
<a id='L212' name='L212'></a>\begin{DoxyReturn}{Returns}
<a id='L213' name='L213'></a>コピーした文字列
<a id='L214' name='L214'></a>\end{DoxyReturn}
<a id='L215' name='L215'></a>
<a id='L216' name='L216'></a>\begin{DoxyParams}{Parameters}
<a id='L217' name='L217'></a>{\em s} &amp; 文字列 \\
<a id='L218' name='L218'></a>\hline
<a id='L219' name='L219'></a>{\em len} &amp; 文字列の長さ \\
<a id='L220' name='L220'></a>\hline
<a id='L221' name='L221'></a>{\em tag} &amp; エラーメッセージなどで表示されるタグ \\
<a id='L222' name='L222'></a>\hline
<a id='L223' name='L223'></a>\end{DoxyParams}
<a id='L224' name='L224'></a>
<a id='L225' name='L225'></a>
<a id='L226' name='L226'></a>Definition at line 33 of file cmem.\+c.
<a id='L227' name='L227'></a>
<a id='L228' name='L228'></a>Here is the call graph for this function\+:
<a id='L229' name='L229'></a>\nopagebreak
<a id='L230' name='L230'></a>\begin{figure}[H]
<a id='L231' name='L231'></a>\begin{center}
<a id='L232' name='L232'></a>\leavevmode
<a id='L233' name='L233'></a>\includegraphics[width=319pt]{cmem_8c_a0c1f4db31db96ea105fb5d5e2f840334_cgraph}
<a id='L234' name='L234'></a>\end{center}
<a id='L235' name='L235'></a>\end{figure}
<a id='L236' name='L236'></a>Here is the caller graph for this function\+:
<a id='L237' name='L237'></a>\nopagebreak
<a id='L238' name='L238'></a>\begin{figure}[H]
<a id='L239' name='L239'></a>\begin{center}
<a id='L240' name='L240'></a>\leavevmode
<a id='L241' name='L241'></a>\includegraphics[width=350pt]{cmem_8c_a0c1f4db31db96ea105fb5d5e2f840334_icgraph}
<a id='L242' name='L242'></a>\end{center}
<a id='L243' name='L243'></a>\end{figure}
<a id='L244' name='L244'></a>\mbox{\label{cmem_8c_a489097ef8a0c813afcf5605524ce9ce8}} 
<a id='L245' name='L245'></a>\index{cmem.c@{cmem.c}!strrev@{strrev}}
<a id='L246' name='L246'></a>\index{strrev@{strrev}!cmem.c@{cmem.c}}
<a id='L247' name='L247'></a>\doxysubsubsection{strrev()}
<a id='L248' name='L248'></a>{\footnotesize\ttfamily char$\ast$ strrev (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s }\end{DoxyParamCaption})}
<a id='L249' name='L249'></a>
<a id='L250' name='L250'></a>
<a id='L251' name='L251'></a>
<a id='L252' name='L252'></a>逆にした文字列を返す 
<a id='L253' name='L253'></a>
<a id='L254' name='L254'></a>\begin{DoxyReturn}{Returns}
<a id='L255' name='L255'></a>逆にしたした文字列
<a id='L256' name='L256'></a>\end{DoxyReturn}
<a id='L257' name='L257'></a>
<a id='L258' name='L258'></a>\begin{DoxyParams}{Parameters}
<a id='L259' name='L259'></a>{\em s} &amp; 文字列 \\
<a id='L260' name='L260'></a>\hline
<a id='L261' name='L261'></a>\end{DoxyParams}
<a id='L262' name='L262'></a>
<a id='L263' name='L263'></a>
<a id='L264' name='L264'></a>Definition at line 71 of file cmem.\+c.
<a id='L265' name='L265'></a>
<a id='L266' name='L266'></a>Here is the call graph for this function\+:
<a id='L267' name='L267'></a>\nopagebreak
<a id='L268' name='L268'></a>\begin{figure}[H]
<a id='L269' name='L269'></a>\begin{center}
<a id='L270' name='L270'></a>\leavevmode
<a id='L271' name='L271'></a>\includegraphics[width=290pt]{cmem_8c_a489097ef8a0c813afcf5605524ce9ce8_cgraph}
<a id='L272' name='L272'></a>\end{center}
<a id='L273' name='L273'></a>\end{figure}
<a id='L274' name='L274'></a>Here is the caller graph for this function\+:
<a id='L275' name='L275'></a>\nopagebreak
<a id='L276' name='L276'></a>\begin{figure}[H]
<a id='L277' name='L277'></a>\begin{center}
<a id='L278' name='L278'></a>\leavevmode
<a id='L279' name='L279'></a>\includegraphics[width=350pt]{cmem_8c_a489097ef8a0c813afcf5605524ce9ce8_icgraph}
<a id='L280' name='L280'></a>\end{center}
<a id='L281' name='L281'></a>\end{figure}
</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] */