static const MessagesMap_t *message_map_entry(MessageMapType type,
        MessageType msg_id,
        MessageMapDirection dir)
{
    const MessagesMap_t *m = MessagesMap;

    if (map_size > msg_id && m[msg_id].msg_id == msg_id &&
        m[msg_id].type == type && m[msg_id].dir == dir)
    {
        return &m[msg_id];
    }

    return NULL;
}
static const MessagesMap_t *message_map_entry(MessageMapType type,
        MessageType msg_id,
        MessageMapDirection dir)
{
    const MessagesMap_t *m = MessagesMap;

    if (map_size > msg_id && m[msg_id].msg_id == msg_id &&
        m[msg_id].type == type && m[msg_id].dir == dir)
    {
        return &m[msg_id];
    }

    return NULL;
}