\doxysection{src/cmem.c File Reference}
\label{cmem_8c}\index{src/cmem.c@{src/cmem.c}}
{\ttfamily \#include "{}cmem.\+h"{}}\newline
Include dependency graph for cmem.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
void $\ast$ \textbf{ malloc\+\_\+chk} (size\+\_\+t size, const char $\ast$tag)
\begin{DoxyCompactList}\small\item\em mallocを実行し、0で初期化する \end{DoxyCompactList}\item
void $\ast$ \textbf{ calloc\+\_\+chk} (size\+\_\+t nmemb, size\+\_\+t size, const char $\ast$tag)
\begin{DoxyCompactList}\small\item\em 領域の数とサイズを指定してメモリーを確保するcallocを実行する \end{DoxyCompactList}\item
char $\ast$ \textbf{ strdup\+\_\+chk} (const char $\ast$s, const char $\ast$tag)
\begin{DoxyCompactList}\small\item\em malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列を返す \end{DoxyCompactList}\item
char $\ast$ \textbf{ strndup\+\_\+chk} (const char $\ast$s, size\+\_\+t len, const char $\ast$tag)
\begin{DoxyCompactList}\small\item\em malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列の指定した長さの部分を返す \end{DoxyCompactList}\item
void \textbf{ strip\+\_\+end} (char $\ast$s)
\begin{DoxyCompactList}\small\item\em 文字列の末尾から、改行と空白とタブを削除する \end{DoxyCompactList}\item
void \textbf{ strip\+\_\+casl2\+\_\+comment} (char $\ast$s)
\begin{DoxyCompactList}\small\item\em 文字列から「\textquotesingle{}」以降の文字列を\+CASL IIのコメントとして削除する。「\textquotesingle{}\textquotesingle{}」の場合は除く \end{DoxyCompactList}\item
char $\ast$ \textbf{ strrev} (const char $\ast$s)
\begin{DoxyCompactList}\small\item\em 逆にした文字列を返す \end{DoxyCompactList}\end{DoxyCompactItemize}
\label{doc-func-members}
\doxysubsection{Function Documentation}
\index{cmem.c@{cmem.c}!calloc\_chk@{calloc\_chk}}
\index{calloc\_chk@{calloc\_chk}!cmem.c@{cmem.c}}
\doxysubsubsection{calloc\_chk()}
{\footnotesize\ttfamily \label{cmem_8c_a9e98c611994594e2db3a17ab0159ec5e}
void $\ast$ calloc\+\_\+chk (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{nmemb}{, }\item[{size\+\_\+t}]{size}{, }\item[{const char $\ast$}]{tag}{}\end{DoxyParamCaption})}
領域の数とサイズを指定してメモリーを確保するcallocを実行する
メモリを確保できない場合はエラーを出力して終了
\begin{DoxyParams}{Parameters}
{\em nmemb} & 領域の数 \\
\hline
{\em size} & 領域1個あたりのメモリーサイズ \\
\hline
{\em tag} & エラーメッセージなどで表示されるタグ \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 14} of file \textbf{ cmem.\+c}.
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_a9e98c611994594e2db3a17ab0159ec5e_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!malloc\_chk@{malloc\_chk}}
\index{malloc\_chk@{malloc\_chk}!cmem.c@{cmem.c}}
\doxysubsubsection{malloc\_chk()}
{\footnotesize\ttfamily \label{cmem_8c_ab59996fd09e57355900e5d0f6a772297}
void $\ast$ malloc\+\_\+chk (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{size}{, }\item[{const char $\ast$}]{tag}{}\end{DoxyParamCaption})}
mallocを実行し、0で初期化する
メモリを確保できない場合はエラーを出力して終了
\begin{DoxyParams}{Parameters}
{\em size} & メモリーのサイズ \\
\hline
{\em tag} & エラーメッセージなどで表示されるタグ \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 3} of file \textbf{ cmem.\+c}.
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_ab59996fd09e57355900e5d0f6a772297_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!strdup\_chk@{strdup\_chk}}
\index{strdup\_chk@{strdup\_chk}!cmem.c@{cmem.c}}
\doxysubsubsection{strdup\_chk()}
{\footnotesize\ttfamily \label{cmem_8c_aff54004f8d4f59b7ad933d53ae4e1f53}
char $\ast$ strdup\+\_\+chk (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s}{, }\item[{const char $\ast$}]{tag}{}\end{DoxyParamCaption})}
malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列を返す
\begin{DoxyReturn}{Returns}
コピーした文字列
\end{DoxyReturn}
\begin{DoxyParams}{Parameters}
{\em s} & 文字列 \\
\hline
{\em tag} & エラーメッセージなどで表示されるタグ \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 25} of file \textbf{ cmem.\+c}.
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{cmem_8c_aff54004f8d4f59b7ad933d53ae4e1f53_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_aff54004f8d4f59b7ad933d53ae4e1f53_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!strip\_casl2\_comment@{strip\_casl2\_comment}}
\index{strip\_casl2\_comment@{strip\_casl2\_comment}!cmem.c@{cmem.c}}
\doxysubsubsection{strip\_casl2\_comment()}
{\footnotesize\ttfamily \label{cmem_8c_aab7f4dbb7c0a7e7acbd4a7e035c9263c}
void strip\+\_\+casl2\+\_\+comment (\begin{DoxyParamCaption}\item[{char $\ast$}]{s}{}\end{DoxyParamCaption})}
文字列から「\textquotesingle{}」以降の文字列を\+CASL IIのコメントとして削除する。「\textquotesingle{}\textquotesingle{}」の場合は除く
\begin{DoxyParams}{Parameters}
{\em s} & 文字列 \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 55} of file \textbf{ cmem.\+c}.
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_aab7f4dbb7c0a7e7acbd4a7e035c9263c_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!strip\_end@{strip\_end}}
\index{strip\_end@{strip\_end}!cmem.c@{cmem.c}}
\doxysubsubsection{strip\_end()}
{\footnotesize\ttfamily \label{cmem_8c_a20f2e2b05241b8d97e218e4184b97bac}
void strip\+\_\+end (\begin{DoxyParamCaption}\item[{char $\ast$}]{s}{}\end{DoxyParamCaption})}
文字列の末尾から、改行と空白とタブを削除する
\begin{DoxyParams}{Parameters}
{\em s} & 文字列 \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 48} of file \textbf{ cmem.\+c}.
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_a20f2e2b05241b8d97e218e4184b97bac_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!strndup\_chk@{strndup\_chk}}
\index{strndup\_chk@{strndup\_chk}!cmem.c@{cmem.c}}
\doxysubsubsection{strndup\_chk()}
{\footnotesize\ttfamily \label{cmem_8c_a610ed65c2f1179bd3c5da29d36f3f5d8}
char $\ast$ strndup\+\_\+chk (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s}{, }\item[{size\+\_\+t}]{len}{, }\item[{const char $\ast$}]{tag}{}\end{DoxyParamCaption})}
malloc\+\_\+chkを実行してメモリを確保し、コピーした文字列の指定した長さの部分を返す
\begin{DoxyReturn}{Returns}
コピーした文字列
\end{DoxyReturn}
\begin{DoxyParams}{Parameters}
{\em s} & 文字列 \\
\hline
{\em len} & 文字列の長さ \\
\hline
{\em tag} & エラーメッセージなどで表示されるタグ \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 33} of file \textbf{ cmem.\+c}.
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=315pt]{cmem_8c_a610ed65c2f1179bd3c5da29d36f3f5d8_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_a610ed65c2f1179bd3c5da29d36f3f5d8_icgraph}
\end{center}
\end{figure}
\index{cmem.c@{cmem.c}!strrev@{strrev}}
\index{strrev@{strrev}!cmem.c@{cmem.c}}
\doxysubsubsection{strrev()}
{\footnotesize\ttfamily \label{cmem_8c_aacc41f8750d08c22b925ea32612209fb}
char $\ast$ strrev (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s}{}\end{DoxyParamCaption})}
逆にした文字列を返す
\begin{DoxyReturn}{Returns}
逆にしたした文字列
\end{DoxyReturn}
\begin{DoxyParams}{Parameters}
{\em s} & 文字列 \\
\hline
\end{DoxyParams}
Definition at line \textbf{ 71} of file \textbf{ cmem.\+c}.
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=286pt]{cmem_8c_aacc41f8750d08c22b925ea32612209fb_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmem_8c_aacc41f8750d08c22b925ea32612209fb_icgraph}
\end{center}
\end{figure}