/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
extern void RUBOUT();
int ln;
int copy;
int
char **argv;
{
return (1);
}
if (argc == 3) {
copy = 1;
}
return (1);
}
if (copy) {
return (3);
}
}
return (4);
}
ln = -2;
for (;;) {
count++;
errno = 0;
else
buf_size *= 2;
"Can't allocate memory for tcopy\n");
return (4);
}
perror("Read record size");
return (6);
}
errno = 0;
}
if (n > 0) {
if (copy) {
if (nw != n) {
" read (%d)\n", nw, n);
"Aborted\n");
return (5);
}
}
size += n;
if (n != ln) {
if (ln > 0)
(void) printf("file %d: records"
" %ld to %ld: size %d\n",
else
(void) printf("file %d: record"
" %ld: size %d\n",
ln = n;
}
} else {
(void) printf("eot\n");
break;
}
if (ln > 0)
(void) printf("file %d: records %ld to"
" %ld: size " "%d\n",
else
(void) printf("file %d: record %ld:"
(void) printf("file %d: eof after %ld records:"
if (copy) {
perror("Write EOF");
return (6);
}
}
filen++;
count = 0;
lcount = 0;
size = 0;
break;
ln = n;
}
}
if (copy)
return (0);
}
void
RUBOUT()
{
--count;
if (count)
(void) printf("file %d: records %ld to %ld: size"
else
(void) printf("file %d: record %ld: size %d\n",
exit(1);
}