Re: Problem with scanf()/gets()



In article <fljsa6$7e1$1@xxxxxxxxxxxxxxxxxxxxxxx>,
Richard Tobin <richard@xxxxxxxxxxxxxxx> wrote:
In article <flj9n6$j4n$1@xxxxxxxxxxxxxxxxxxxxxxx>,
Walter Roberson <roberson@xxxxxxxxxxxxxxxxxx> wrote:

Do you mean input from a terminal? That may be limited by your
operating system.

As stdin is a stream and there is no exemption for stdin in the
above, an implementation that does not support lines of at least
254 characters on stdin is non-conformant.


The implementation must support 254 character lines on stdin, but you
may not be able to test that with a terminal. The ability of a
particular input device to supply long lines to a program is not
something the C standard can reasonably require.

Suppose a bar-code reader produces data in the form of a short
sequence of digits followed by a linefeed. Surely attaching this to
my computer in such a way that it can be used as standard input
doesn't render my C compiler non-conformant?

However, in such cases, it would not be the *operating system* that
limited the input size below the mandated 254, it would be the
input device's inability to produce additional characters.


It has been many a year since I last encountered a *terminal* that
limited input size -- not since the mid 80's, using CICS
(or a relative thereof) with IBM terminals that were FEP
(front end processor) programmed with input "fields" of fixed length.

--
"I was very young in those days, but I was also rather dim."
-- Christopher Priest
.



Relevant Pages

  • Re: Reg multilanguage support by gnuplot
    ... So far as I know, Matsuda's postscript example used EUC encoding, not utf8. ... Your original query was about an EUC font. ... Unicode is an assignment of "all" characters to unique ... # Test of UTF-8 support by gnuplot terminals. ...
    (comp.graphics.apps.gnuplot)
  • Re: remote [ssh] Backspace] key gives me "^?"
    ... I tend to guess you're using a terminal emulator from within X when ... unicode characters). ... It's because the TERM'inal emulation / keyboard layout's not ... I had this on BSDi terminals for ages and had something in my ...
    (freebsd-questions)
  • Re: Delete Key?
    ... I would say that the effect of ASCII control characters on a terminal ... The meaning and use of various codes evolved from the ASR terminals through ... DEC applications embraced this default. ... use of BS and ESC as standard input keys. ...
    (comp.os.vms)
  • Re: Reg multilanguage support by gnuplot
    ... support for png and pdf terminals. ... PostScript cannot handle utf8. ... way to import general unicode/utf8 characters into PostScript, ... set terminal postscript enhanced color font "kochi-mincho, ...
    (comp.graphics.apps.gnuplot)
  • Re: Is it time to stop research in Computer Architecture ?
    ... installed cp67 at univ. where i was undergraduate. ... to do a clone controller project ... ... number) for terminals that operated at different baud rates. ... with initiation of things at the operating system ... ...
    (comp.arch)