Page MenuHome GnuPG

Introduce FD_DBG to handle the cases for displaying the value
Testing, NormalPublic

Description

There are multiple use cases for FD2INT now; One is to display the value as (32-bit signed) integer by formatting string %d assuming it's smaller.

Even when the value will be > 32-bit on 64-bit machine in future, it will be still OK to truncate the value for displaying purpose (mainly for debugging).
It won't give the full information, but still give some.

Let us distinguish this particular use case of FD2INT by introducing a new macro FD_DBG.

In future, if/when it will be found that it's better to provide full information, we will be able to switch new implementation of FD_DBG macro together with the change of formatting string. Locating the places by new macro now, it will be easier.