Article View: comp.std.c
Article #3868Re: gets() and getchar
From: halasz
Date: Sat, 26 Aug 1995 21:42
Date: Sat, 26 Aug 1995 21:42
25 lines
1468 bytes
1468 bytes
>halasz@caip.rutgers.edu: > What is wrong with endouing "gets" with a limit? > .... >There alreddie are special functions with optional arguments .... In article <danpop.809051694@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes: > Not in the C standard library. There is no way to declare such a > function in C (the variadic approach doesn't work here). I forgot, that it means nothing if I see an optional argument in a particular implementation. Of cours, if the function s type is declared, the parameter-list is "()". Aside 1: The best thing to doo is to change the declaration of "gets", whatevver old code that breaks, for if the wize advise in "comp.lang.c" is followd "gets" is in no code. Aside 2: I often see it written that the form of a system header file (one included in brackets) mai be anithing that suits the implementor. It is forbidden to uze a format that declares to the compiler that both char *gets(char *); and char *gets(char *, size_t, char *nl): are in that implementation valid? (At "nl" one stores this, whether the hoal line was stord.)
Technical Details
Message-ID:
<41o4fp$1ht@caip.rutgers.edu>Path:
arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mailReferences:
<Pine.ULT.3.91.950807194041.19202A-100000@mars> <danpop.809051694@rscernix>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: 26 Aug 1995 17:42:17 -0400 Organization: Rutgers University Message-ID: <41o4fp$1ht@caip.rutgers.edu> References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <danpop.809051694@rscernix> NNTP-Posting-Host: caip.rutgers.edu