FreeBSD/sys/contrib/dev/acpica/compiler/dtio.c
/******************************************************************************
 *
 * FUNCTION:    DtDumpBuffer
 *
 * PARAMETERS:  FileID              - Where to write buffer data
 *              Buffer              - Buffer to dump
 *              Offset              - Offset in current table
 *              Length              - Buffer Length
 *
 * RETURN:      None
 *
 * DESCRIPTION: Another copy of DumpBuffer routine (unfortunately).
 *
 * TBD: merge dump buffer routines
 *
 *****************************************************************************/
DtDumpBuffer
PARAMETERS:  FileID              - Where to write buffer data
Buffer              - Buffer to dump
Offset              - Offset in current table
Length              - Buffer Length

None

Another copy of DumpBuffer routine (unfortunately).

merge dump buffer routines
DtDumpBuffer PARAMETERS : FileID - Where to write buffer data Buffer - Buffer to dump Offset - Offset in current table Length - Buffer Length None Another copy of DumpBuffer routine ( unfortunately ) . merge dump buffer routines
static void
DtDumpBuffer (
    UINT32                  FileId,
    UINT8                   *Buffer,
    UINT32                  Offset,
    UINT32                  Length)
{
    UINT32                  i;
    UINT32                  j;
    UINT8                   BufChar;
    FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3d] ",
        Offset, Offset, Length);
    i = 0;
    while (i < Length)
    {
        if (i >= 16)
        {
            FlPrintFile (FileId, "%24s", "");
        }
        for (j = 0; j < 16;)
        {
            if (i + j >= Length)
            {
                FlPrintFile (FileId, "   ");
                j++;
                continue;
            }
            FlPrintFile (FileId, "%02X ", Buffer[i+j]);
            j++;
        }
        FlPrintFile (FileId, " ");
        for (j = 0; j < 16; j++)
        {
            if (i + j >= Length)
            {
                FlPrintFile (FileId, "\n\n");
                return;
            }
            BufChar = Buffer[(ACPI_SIZE) i + j];
            if (isprint (BufChar))
            {
                FlPrintFile (FileId, "%c", BufChar);
            }
            else
            {
                FlPrintFile (FileId, ".");
            }
        }
        FlPrintFile (FileId, "\n");
        i += 16;
    }
    FlPrintFile (FileId, "\n\n");
}
static void DtDumpBuffer ( UINT32 FileId , UINT8 * Buffer , UINT32 Offset , UINT32 Length ) { UINT32 i ; UINT32 j ; UINT8 BufChar ; FlPrintFile ( FileId , " " , Offset , Offset , Length ) ; i = 0 ; while ( i < Length ) { if ( i >= 16 ) { FlPrintFile ( FileId , " " , " " ) ; } for ( j = 0 ; j < 16 ; ) { if ( i + j >= Length ) { FlPrintFile ( FileId , " " ) ; j ++ ; continue ; } FlPrintFile ( FileId , " " , Buffer [ i + j ] ) ; j ++ ; } FlPrintFile ( FileId , " " ) ; for ( j = 0 ; j < 16 ; j ++ ) { if ( i + j >= Length ) { FlPrintFile ( FileId , " \n \n " ) ; return ; } BufChar = Buffer [ ( ACPI_SIZE ) i + j ] ; if ( isprint ( BufChar ) ) { FlPrintFile ( FileId , " " , BufChar ) ; } else { FlPrintFile ( FileId , " " ) ; } } FlPrintFile ( FileId , " \n " ) ; i += 16 ; } FlPrintFile ( FileId , " \n \n " ) ; }
FUNCTION:    DtDumpBuffer
 PARAMETERS:  FileID              - Where to write buffer data
              Buffer              - Buffer to dump
              Offset              - Offset in current table
              Length              - Buffer Length
FUNCTION : DtDumpBuffer PARAMETERS : FileID - Where to write buffer data Buffer - Buffer to dump Offset - Offset in current table Length - Buffer Length
/* Print 16 hex chars */ /* Dump fill spaces */ /* Done with that line. */