FreeBSD/sys/contrib/dev/acpica/components/utilities/utascii.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiUtCheckAndRepairAscii
 *
 * PARAMETERS:  Name                - Ascii string
 *              Count               - Number of characters to check
 *
 * RETURN:      None
 *
 * DESCRIPTION: Ensure that the requested number of characters are printable
 *              Ascii characters. Sets non-printable and null chars to <space>.
 *
 ******************************************************************************/
AcpiUtCheckAndRepairAscii
PARAMETERS:  Name                - Ascii string
Count               - Number of characters to check

None

Ensure that the requested number of characters are printable
Ascii characters. Sets non-printable and null chars to .
AcpiUtCheckAndRepairAscii PARAMETERS : Name - Ascii string Count - Number of characters to check None Ensure that the requested number of characters are printable Ascii characters . Sets non - printable and null chars to .
void
AcpiUtCheckAndRepairAscii (
    UINT8                   *Name,
    char                    *RepairedName,
    UINT32                  Count)
{
    UINT32                  i;
    for (i = 0; i < Count; i++)
    {
        RepairedName[i] = (char) Name[i];
        if (!Name[i])
        {
            return;
        }
        if (!isprint (Name[i]))
        {
            RepairedName[i] = ' ';
        }
    }
}
void AcpiUtCheckAndRepairAscii ( UINT8 * Name , char * RepairedName , UINT32 Count ) { UINT32 i ; for ( i = 0 ; i < Count ; i ++ ) { RepairedName [ i ] = ( char ) Name [ i ] ; if ( ! Name [ i ] ) { return ; } if ( ! isprint ( Name [ i ] ) ) { RepairedName [ i ] = ' ' ; } } }
FUNCTION:    AcpiUtCheckAndRepairAscii
 PARAMETERS:  Name                - Ascii string
              Count               - Number of characters to check
FUNCTION : AcpiUtCheckAndRepairAscii PARAMETERS : Name - Ascii string Count - Number of characters to check