Learn handwriting-how to find the type definition of function parameters in the man manual
Origin:
Follow the development board to learn Linux, using functions such as chmod, but the experiments in the video are explained in detail. However, if there is no other material to support, just look at the description of man, who knows what these custom types are primitive types?
To take a simple example, chmod:
This mode_t type is obviously redefined. What is its original type?
Step by step:
1) start with the header file sys/stat.h. The path: / usr/include/sys/stat.h is opened as shown below:
2) look inside bits/types.h. The path: / usr/include/bits/types.h is opened as shown below:
3) find _ _ MODE_T_TYPE
I found a piece of code and comments like this.
4) go to the path: / usr/include/bits/typesizes.h
U32_TYPE already seems obvious, unsigned 32-bit type, look further down.
5) return to the path: / usr/include/bits/types.h
Unsigned int unsigned integer, this is the original type of mode_t.