binprint.c:

Reformattted source.  No substantive change.
This commit is contained in:
gdr-ftp 1999-01-15 15:54:40 +00:00
parent 8cea45f4f0
commit fc1083b2b0

View File

@ -26,17 +26,17 @@ unsigned int doline(char *dest, char *source,
unsigned char *buffer2; unsigned char *buffer2;
main(argc,argv) main(argc,argv)
int argc; int argc;
char **argv; char **argv;
{ {
int duh; int duh;
int a; int a;
int c,errflg = 0,columns = 16; int c,errflg = 0,columns = 16;
size_t pos = 0; size_t pos = 0;
unsigned char *buffer; unsigned char *buffer;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern int getopt(int,char **,char*); extern int getopt(int,char **,char*);
while ((c = getopt(argc,argv, "Vc:")) != EOF) while ((c = getopt(argc,argv, "Vc:")) != EOF)
switch (c) { switch (c) {
@ -69,7 +69,8 @@ extern int getopt(int,char **,char*);
exit(1); exit(1);
} }
printf("\n%s\n",*argv); printf("\n%s\n",*argv);
action: while ((a = (int)read(duh, buffer, action:
while ((a = (int)read(duh, buffer,
(size_t)(columns * sizeof(unsigned char)))) != 0) { (size_t)(columns * sizeof(unsigned char)))) != 0) {
printGood(pos,buffer,a,columns); printGood(pos,buffer,a,columns);
pos += a; pos += a;
@ -82,17 +83,17 @@ action: while ((a = (int)read(duh, buffer,
} }
printGood(off,buf,real,form) printGood(off,buf,real,form)
long off; long off;
unsigned char *buf; unsigned char *buf;
int real; int real;
int form; int form;
{ {
if (!real) return; if (!real) return;
/* #if 0
printf("%8lX: ",off); printf("%8lX: ",off);
*/ #endif
/* The following is a hack required because of buffering by the stdio /* The following is a hack required because of buffering by the stdio
libraries. I wish it was not necesary... */ libraries. I wish it was not necesary... */
{ {