MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / verifyCinPeek

Method verifyCinPeek

other_src/astyle/src/astyle_main.cpp:456–464  ·  view source on GitHub ↗

* Verify that tellg() works with cin. * This will fail if cin is piped to AStyle "cat txt.cpp | ./astyled". * But is OK for redirection "./astyled < txt.cpp". */

Source from the content-addressed store, hash-verified

454 * But is OK for redirection "./astyled < txt.cpp".
455 */
456void ASConsole::verifyCinPeek() const
457{
458 int currPos = static_cast<int>(cin.tellg());
459 if (currPos == -1)
460 {
461 (*_err) << _("Cannot process the input stream") << endl;
462 error();
463 }
464}
465
466/**
467 * Open input file, format it, and close the output.

Callers

nothing calls this directly

Calls 1

errorFunction · 0.50

Tested by

no test coverage detected