home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Extra Super CD 1998 January
/
PCPLUS131.iso
/
DJGPP
/
V2
/
DJLSR201.ZIP
/
src
/
libc
/
dos
/
io
/
crlf2nl.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-12-26
|
306 b
|
21 lines
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <libc/stubs.h>
#include <io.h>
ssize_t
crlf2nl(char *buf, ssize_t len)
{
char *bp = buf;
int i=0;
while (len--)
{
if (*bp != 13)
{
*buf++ = *bp;
i++;
}
bp++;
}
return i;
}