def filter_macrofy(value: str) ->str:
    """
    Filter to transform an input into a valid C preprocessor identifier token.


    .. invisible-code-block: python

        from nunavut.lang.c import filter_macrofy


    .. code-block:: python

        # Given
        template = '#ifndef {{ "my full name" | macrofy }}'

        # then
        rendered = '#ifndef MY_FULL_NAME'


    .. invisible-code-block: python

        jinja_filter_tester(filter_macrofy, template, rendered, 'c')


    :param str value: The value to transform.

    :returns: A valid C preprocessor identifier token.
    """
    return value.replace(' ', '_').replace('.', '_').upper()
