inc.h マニュアル

(The documentation of inc.h)

Last Update: 2022/10/28


inc.hは他のヘッダファイル一式をインクルードするためのヘッダファイルである。 プログラムの冒頭に
#include <inc.h>
と書くだけで、 必要なC言語組み込みヘッダファイル(stdio.h, math.h等)や ymaeda_opentools内の全てのヘッダファイルが 読み込まれるようになっている。
The file inc.h is a header file to include all the other header files. By writing
#include <inc.h>
at the head of a program, built-in header files in C language needed (e.g., stdio.h, math.h) and all the header files in ymaeda_opentools are included.

inc.hからインクルードされるヘッダファイルの一覧を以下に示す。 実際にインクルードされる順番で示している。
The list below shows the header files included from inc.h according to the order of inclusion.

この順番は定義間の依存関係を考えて決めたものである。 例えば構造体を先に定義しておかないと その構造体を用いた関数のプロトタイプはエラーになる。 また関数のプロトタイプを先に書いておかないと その関数が別の関数から呼ばれるところでエラーになる。
This order was determined based on dependencies of the definitions. For example, a structure must be defined before giving the prototype of a function which uses the structure. The prototype of a function must be given before calling it from another function.

ヘッダファイルパッケージが類似の役目のものをまとめただけであって 相互に独立というわけではない点にも留意を要する。 例えばヘッダファイルパッケージ内で定義された構造体や関数が ヘッダファイルパッケージの外で用いられているケースがある。 そのためヘッダファイルパッケージ内の構造体定義や関数プロトタイプ等も 早い段階でインクルードする必要がある。
Note that header file packages are only the groups of similar roles, without keeping independence to each other. For example, structures and functions defined in a header file package may be used outside of the package. Therefore definitions of structures and prototypes of functions in the header file packages need to be included at early stages.

1. C言語組み込みヘッダファイル (Built-in header files in C language)


2. 特殊なヘッダファイル (Special header files)

マクロの定義 (Definitions of macros)

グローバル変数の定義 (Definitions of grobal variables)

構造体の定義 (Definitions of structures)

関数のプロトタイプ (Prototypes of functions)

3. 通常のヘッダファイル (Normal header files)


4. ヘッダファイルパッケージ (Header file packages)