Skip to content
Snippets Groups Projects
Commit 0cb59055 authored by Johan Schön's avatar Johan Schön
Browse files

gets now works with windows style text files.

Rev: lib/modules/Stdio.pmod:1.38
parent 4c6725ce
Branches
Tags
No related merge requests found
// $Id: Stdio.pmod,v 1.37 1999/01/30 01:22:09 grubba Exp $ // $Id: Stdio.pmod,v 1.38 1999/04/21 06:55:40 js Exp $
#include <string.h> #include <string.h>
...@@ -394,6 +394,9 @@ class FILE { ...@@ -394,6 +394,9 @@ class FILE {
string s; string s;
s=b[bpos..bpos+bytes-1]; s=b[bpos..bpos+bytes-1];
bpos += bytes+skip; bpos += bytes+skip;
if(sizeof(s) && s[-1]=='\r')
return s[..sizeof(s)-2];
else
return s; return s;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment