ソースファイルが指定されない場合のエラーメッセージを変更
[YACASL2.git] / include / word.h
1 #ifndef YACASL2_WORD_H_INCLUDED
2 #define YACASL2_WORD_H_INCLUDED
3
4 #include <stdio.h>
5 #include <string.h>
6 #include <assert.h>
7 #include <stdlib.h>
8 #include <ctype.h>
9 #include <stdbool.h>
10
11 #include "cerr.h"
12
13 /* wordのエラー定義 */
14 bool addcerrlist_word();
15
16 /* WORD - 16ビットデータ型 */
17 typedef unsigned short WORD;
18
19 /* 10進数の文字列をWORD値に変換 */
20 WORD n2word(const char *str);
21
22 /* 16進数の文字列をWORD値に変換 */
23 WORD h2word(const char *str);
24
25 /* 10進数または16進数の文字列をWORD値に変換 */
26 WORD nh2word(const char *str);
27
28 /* WORD値を10進数の文字列に変換 */
29 char *word2n(WORD word);
30
31 /* WORD値を2進数の文字列に変換 */
32 char *word2bit(const WORD word);
33
34 /* WORD値を解析して表示 */
35 void print_dumpword(WORD word, bool logicalmode);
36
37 #endif