lsflib/src/hexdump.c
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:02 +0100
changeset 9 c3fecc82ade6
parent 6 c3dc3eb3b541
child 77 49e0babccb23
permissions -rw-r--r--
standard tags for git projects committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 6
diff changeset
     1
/**
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 6
diff changeset
     2
 * test/demos/lsflib/src/hexdump.c
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 6
diff changeset
     3
 * Copyright (C) 2008 Markus Broeker
6
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
 */
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
#include <stdio.h>
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
void hexdump (char *s, int len)
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
{
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
    int i;
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
    for (i = 0; i < len; i++) {
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
        printf ("%02X ", s[i]);
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
        if ((i % 40) == 0)
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
            printf ("\n");
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
    }
c3dc3eb3b541 a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
}