reading arbitrarily long strings from stdin

Sundar R. Iyengar sundar at cwruecmp.UUCP
Sat Dec 28 09:52:13 AEST 1985


>From: davidson at sdcsvax.UUCP (J. Greg Davidson)
>Subject: Re: Routine to read arbitrary lenght lines from a stdio file desc.

Since you are recursively calling the "rdln" routine for each
character, the length of a string you can read depends on the
recursion depth.  So the string cannot be "arbitrarily" long.
On our VAX11/780 running 4.2BSD, the length must be <= 13036
characters.  It runs out of stack space after these many calls.

sri



More information about the Comp.sources.unix mailing list