X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fword.h;h=8e70f2e3a80bcea14e24cfd34887033846dcb7e1;hp=c1efb67ebe3d294ad8353efc39543f8bcf9114ab;hb=HEAD;hpb=406fd6490ad76b4573b6ce9f8d322d92f13d27d8 diff --git a/include/word.h b/include/word.h index c1efb67..8e70f2e 100644 --- a/include/word.h +++ b/include/word.h @@ -1,37 +1,55 @@ #ifndef YACASL2_WORD_H_INCLUDED #define YACASL2_WORD_H_INCLUDED -#include -#include -#include -#include -#include #include -#include "cerr.h" - -/* wordのエラー定義 */ -bool addcerrlist_word(); - -/* WORD - 16ビットデータ型 */ +/** + * @brief 16ビットの数値を表すデータ型 + */ typedef unsigned short WORD; -/* 10進数の文字列をWORD値に変換 */ -WORD n2word(const char *str); - -/* 16進数の文字列をWORD値に変換 */ -WORD h2word(const char *str); - -/* 10進数または16進数の文字列をWORD値に変換 */ +/** + * @brief wordデータ型についてのエラーをエラーリストに追加する + * + * @return なし + */ +void addcerrlist_word(); + +/** + * @brief 10進数または16進数の文字列をWORD値に変換する + * + * @return WORD値 + * + * @param *str 10進数または16進数の文字列 + */ WORD nh2word(const char *str); -/* WORD値を10進数の文字列に変換 */ +/** + * @brief WORD値を10進数値を表す文字列に変換する + * + * @return 10進数値を表す文字列 + * + * @param *word WORD値 + */ char *word2n(WORD word); -/* WORD値を2進数の文字列に変換 */ +/** + * @brief WORD値を2進数の文字列に変換する + * + * @return 2進数値を表す文字列 + * + * @param word WORD値 + */ char *word2bit(const WORD word); -/* WORD値を解析して表示 */ +/** + * @brief WORD値を解析して表示する + * + * @return なし + * + * @param word WORD値 + * @param logicalmode 論理演算の場合はtrue、算術演算の場合はfalse + */ void print_dumpword(WORD word, bool logicalmode); #endif