hexdump.c (99112) | hexdump.c (102944) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)hexdump.c 8.1 (Berkeley) 6/6/93"; 43#endif 44#endif /* not lint */ 45#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)hexdump.c 8.1 (Berkeley) 6/6/93"; 43#endif 44#endif /* not lint */ 45#include <sys/cdefs.h> |
46__FBSDID("$FreeBSD: head/usr.bin/hexdump/hexdump.c 99112 2002-06-30 05:25:07Z obrien $"); | 46__FBSDID("$FreeBSD: head/usr.bin/hexdump/hexdump.c 102944 2002-09-04 23:29:10Z dwmalone $"); |
47 48#include <sys/types.h> 49#include <locale.h> 50#include <stdlib.h> 51#include <stdio.h> 52#include <string.h> 53#include "hexdump.h" 54 55FS *fshead; /* head of format strings */ 56int blocksize; /* data block size */ 57int exitval; /* final exit value */ 58int length = -1; /* max bytes to read */ 59 60int | 47 48#include <sys/types.h> 49#include <locale.h> 50#include <stdlib.h> 51#include <stdio.h> 52#include <string.h> 53#include "hexdump.h" 54 55FS *fshead; /* head of format strings */ 56int blocksize; /* data block size */ 57int exitval; /* final exit value */ 58int length = -1; /* max bytes to read */ 59 60int |
61main(argc, argv) 62 int argc; 63 char *argv[]; | 61main(int argc, char *argv[]) |
64{ | 62{ |
65 register FS *tfs; | 63 FS *tfs; |
66 char *p; 67 68 (void)setlocale(LC_ALL, ""); 69 70 if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od")) 71 newsyntax(argc, &argv); 72 else 73 oldsyntax(argc, &argv); --- 15 unchanged lines hidden --- | 64 char *p; 65 66 (void)setlocale(LC_ALL, ""); 67 68 if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od")) 69 newsyntax(argc, &argv); 70 else 71 oldsyntax(argc, &argv); --- 15 unchanged lines hidden --- |