| 1 | #ifndef _melder_casual_h_ |
| 2 | #define _melder_casual_h_ |
| 3 | /* melder_casual.h |
| 4 | * |
| 5 | * Copyright (C) 1992-2018,2020,2025 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | Function: |
| 23 | Sends a message without user interference. |
| 24 | Behaviour: |
| 25 | Writes to stderr on Unix, otherwise to a special window. |
| 26 | */ |
| 27 | |
| 28 | extern std::mutex theMelder_casual_mutex; |
| 29 | |
| 30 | template <typename... Arg> |
| 31 | void Melder_casual (const Arg... arg) { |
| 32 | std::lock_guard lock (theMelder_casual_mutex); |
| 33 | ( MelderConsole::write (MelderArg { arg }. _arg, true), ... ); // fold the comma over the parameter pack |
| 34 | MelderConsole::write (U"\n", true); |
| 35 | } |
| 36 | |
| 37 | void MelderCasual_memoryUse (integer message = 0); |
| 38 | |
| 39 | /* End of file melder_casual.h */ |
| 40 | #endif |