| 1 | #ifndef _melder_console_h_ |
| 2 | #define _melder_console_h_ |
| 3 | |
| 4 | /* melder_console.h |
| 5 | * |
| 6 | * Copyright (C) 1992-2018,2024 Paul Boersma |
| 7 | * |
| 8 | * This code is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or (at |
| 11 | * your option) any later version. |
| 12 | * |
| 13 | * This code is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | * See the GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | |
| 22 | namespace MelderConsole { |
| 23 | enum class Encoding { |
| 24 | UTF8 = 0, |
| 25 | UTF16 = 1, |
| 26 | ANSI = 2 |
| 27 | }; |
| 28 | extern void write (conststring32 message, bool useStderr); |
| 29 | extern void setEncoding (Encoding encoding); |
| 30 | } |
| 31 | |
| 32 | extern FILE *Melder_stdout, *Melder_stderr; // initialized by MelderConsole_init () |
| 33 | |
| 34 | void MelderConsole_init (); // call at start-up, after attaching to the console |
| 35 | |
| 36 | /* End of file melder_console.h */ |
| 37 | #endif |