PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GetLine
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax:  int GetLine( LINE LineNumber, char far *Buffer, PFILE pfFile );
 
  Returns: The number of characters in the line after any tab
           conversion.
 
  See:     CopyLine, FileLength, PutLine, Replace, Processing Text
 
     The GetLine function gets a copy of a line from the specified file.
     Use GetLine and Putline together to modify text in a file.
 
     Argument        Description
 
     <LineNumber>    Zero-based number of the line.
 
     <Buffer>        Buffer to hold the characters in the line. The
                     specified buffer must be at least BUFLEN bytes
                     long.
                     See: BUFLEN, linebuf Type
 
     <pfFile>        File handle of the file.
 
     GetLine expands tabs to spaces (as indicated by the Filetab switch)
     before copying the text. The length of the expanded line is
     returned.
 
     Since coordinates in extensions are zero-based, subtract one from
     the GetLine return value to get the index of the last character in
     the line.
                                    -♦-