Autotest.mkのバグを修正
[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 "cmem.h"
12 #include "cerr.h"
13
14 /* wordのエラー定義 */
15 bool addcerrlist_word();
16
17 /* WORD - 16ビットデータ型 */
18 typedef unsigned short WORD;
19
20 /* 10進数の文字列をWORD値に変換 */
21 WORD n2word(const char *str);
22
23 /* 16進数の文字列をWORD値に変換 */
24 WORD h2word(const char *str);
25
26 /* 10進数または16進数の文字列をWORD値に変換 */
27 WORD nh2word(const char *str);
28
29 /* WORD値を10進数の文字列に変換 */
30 char *word2n(WORD word);
31
32 /* WORD値を2進数の文字列に変換 */
33 char *word2bit(const WORD word);
34
35 /* WORD値を解析して表示 */
36 void print_dumpword(WORD word, bool logicalmode);
37
38 #endif