/* hexdump.c - hexdump function */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
void
{
int pos;
while (len > 0)
{
int cnt, i;
cnt = 16;
for (i = 0; i < cnt; i++)
{
"%02x ", (unsigned char) buf[i]);
if ((i & 7) == 7)
}
for (; i < 16; i++)
{
if ((i & 7) == 7)
}
for (i = 0; i < cnt; i++)
/* Print only first and last line if more than 3 lines are identical. */
{
grub_printf ("*\n");
do
{
bse += 16;
buf += 16;
len -= 16;
}
}
bse += 16;
buf += 16;
}
}