🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3771

Re: gets() and getchar

#3771
From: halasz
Date: Fri, 18 Aug 1995 06:53
8 lines
766 bytes
What is wrong with endouing "gets" with a limit?
(I admit that that which I am about to suggest is strange ....)

	char *gets(char *s, size_t l, char *k);
Up to  l - 1  characters are stord at "s".  If newline
follows the last input character stord at "s", "*k" is made
newline (which too is taken from the input), otherwize 0.
It is EOF onlie if "gets" returns NULL and "*k" is made 0.
Technical Details
Message-ID: <411dcn$h4u@caip.rutgers.edu>
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail
References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <40s0eo$k8c@goanna.cs.rmit.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail
From: halasz@caip.rutgers.edu
Newsgroups: comp.std.c
Subject: Re: gets() and getchar
Date: 18 Aug 1995 02:53:11 -0400
Organization: Rutgers University
Message-ID: <411dcn$h4u@caip.rutgers.edu>
References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <40s0eo$k8c@goanna.cs.rmit.edu.au>
NNTP-Posting-Host: caip.rutgers.edu