/*
 * string_hexdump - dump a string as a hex characters
 *
 * Copyright (C) 2004 Michael Davies <michael@msdavies.net>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 */
int main (int argc, char *argv[]) {

  int str_len, i;

  if (argc != 2) {
    printf ("%s:  Incorrect usage. '%s <string>'\n", argv[0], argv[0]);
  }

  str_len = strlen(argv[1]);

  printf("String = '%s', String length = %d (%X)\n", 
    argv[1], str_len, str_len); 

  for (i=0; i<str_len; i++) {
    printf(" %c", argv[1][i]); 
  }

  printf("\n");

    for (i=0; i<str_len; i++) {
    printf("%X", argv[1][i]);
  }

  printf("\n");

  return 0;

}

/* This file has been zigned!  See http://michaeldavies.org/zign-tools */
/* zign-version: 0.9.4 */
/* zign-hashes: MD5, SHA-1 */
/* -----BEGIN PGP SIGNED MESSAGE----- */
/* Hash: SHA1 */
/*  */
/* 313440f1967bd615a79369ae2fc154b823ead301c39c0eadfcf9e7c4746fb137147bc495 */
/* -----BEGIN PGP SIGNATURE----- */
/* Version: GnuPG v1.4.7 (Darwin) */
/*  */
/* iD8DBQFHmzks7kkvCQqp1vwRAoLfAJ94Fhf/MbToBhEsSaWlfG4Gu5ymHACeL3me */
/* jqETeijNCBNWxQ0nxQW4JVM= */
/* =k8T6 */
/* -----END PGP SIGNATURE----- */
/* zign: Protecting you since 2007 :-) */
/*  */
