Output line count to stdout. Complies to POSIX.2.
Reviewed by: joerg
This commit is contained in:
parent
99ea1af0a6
commit
de64b714f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15877
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: io.c,v 1.3 1994/09/24 02:55:27 davidg Exp $
|
||||
* $Id: io.c,v 1.4 1995/03/19 13:28:32 joerg Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -58,7 +58,7 @@ read_file(fn, n)
|
||||
sprintf(errmsg, "cannot close input file");
|
||||
return ERR;
|
||||
}
|
||||
fprintf(stderr, !scripted ? "%lu\n" : "", size);
|
||||
fprintf(stdout, !scripted ? "%lu\n" : "", size);
|
||||
return current_addr - n;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ write_file(fn, mode, n, m)
|
||||
sprintf(errmsg, "cannot close output file");
|
||||
return ERR;
|
||||
}
|
||||
fprintf(stderr, !scripted ? "%lu\n" : "", size);
|
||||
fprintf(stdout, !scripted ? "%lu\n" : "", size);
|
||||
return n ? m - n + 1 : 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user