Get the App
SLTechnology News&Howtos  ›  Servers  › 

Learn handwriting-how to find the type definition of function parameters in the man manual

Shulou Source: shulou.com Published: 2022-06-03 09:31:55 09月28日 Update

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.

Tags: Types paths primitive symbols functions obvious ab initio code examples but that is tutorials files comments origin videos materials experiments development support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple Linux Xiaomi OPPO Reno