/*
 * File:
 *   rdln.h
 * Author:
 *   Samuel A. Rebelsky
 * Version:
 *   1.0 of March 2003
 * Summary:
 *   Declarations of procedures provided by rdln.c
 */

#ifndef _RDLN_H_
#define _RDLN_H_

#include <stdio.h>

/*
 * Procedure:
 *   rdln
 * Parameters:
 *   file, a pointer to a FILE
 * Purpose:
 *   Read one line from file.
 * Produces:
 *   str, a string.
 * Preconditions:
 *   file is open for reading.
 *   The cursor in file is positioned before a digit.
 *   The current line is of the form 0\n or [0-9]*[^0-9].*\n
 *     where the digits at the start of the line give the number
 *     of remaining characters on the line.
 *   file represents an ASCII file.
 * Postconditions:
 *   The cursor is now positioned at the start of a new line.
 *   str is a newly-allocated string of the specified length.
 *   str contains the characters after the initial digits.
 *   str is terminated by 0.
 */
extern char *rdln(FILE *file);

#endif /* _RDLN_H_ */
