* 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". */
| 454 | * But is OK for redirection "./astyled < txt.cpp". |
| 455 | */ |
| 456 | void 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. |