Debian Codegraph @

sys/praat_library.cpp

raw
1 /* praat_library.cpp
2 *
3 * Copyright (C) 2016,2018,2021,2024 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "praatP.h"
20
21 void praat_library_createC (bool isInHeaderFile, bool includeCreateAPI, bool includeReadAPI, bool includeSaveAPI,
22 bool includeQueryAPI, bool includeModifyAPI, bool includeToAPI,
23 bool includeRecordAPI, bool includePlayAPI,
24 bool includeDrawAPI, bool includeHelpAPI, bool includeWindowAPI,
25 bool /* includeDemoAPI */)
26 {
27 try {
28 MelderInfo_open ();
29 MelderInfo_writeLine (U"/* praatlib.h");
30 MelderInfo_writeLine (U" *");
31 MelderInfo_writeLine (U" * Copyright (C) 2016-2018 Paul Boersma and David Weenink");
32 MelderInfo_writeLine (U" *");
33 MelderInfo_writeLine (U" * This code is free software; you can redistribute it and/or modify");
34 MelderInfo_writeLine (U" * it under the terms of the GNU General Public License as published by");
35 MelderInfo_writeLine (U" * the Free Software Foundation; either version 3 of the License, or (at");
36 MelderInfo_writeLine (U" * your option) any later version.");
37 MelderInfo_writeLine (U" *");
38 MelderInfo_writeLine (U" * This code is distributed in the hope that it will be useful, but");
39 MelderInfo_writeLine (U" * WITHOUT ANY WARRANTY; without even the implied warranty of");
40 MelderInfo_writeLine (U" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
41 MelderInfo_writeLine (U" * See the GNU General Public License for more details.");
42 MelderInfo_writeLine (U" *");
43 MelderInfo_writeLine (U" * You should have received a copy of the GNU General Public License");
44 MelderInfo_writeLine (U" * along with this work. If not, see <http://www.gnu.org/licenses/>.");
45 MelderInfo_writeLine (U" */");
46
47 MelderInfo_writeLine (U"/* C API, version ", Melder_appMonthSTR(), U" ", Melder_appDay(), U", ", Melder_appYear(), U" */");
48
49 praat_menuCommands_writeC (true, includeCreateAPI, includeReadAPI,
50 includeRecordAPI, includePlayAPI, includeDrawAPI, includeHelpAPI, includeWindowAPI);
51 praat_actions_writeC (true, includeSaveAPI,
52 includeQueryAPI, includeModifyAPI, includeToAPI,
53 includePlayAPI, includeDrawAPI, includeHelpAPI, includeWindowAPI);
54 MelderInfo_close ();
55 } catch (MelderError) {
56 Melder_throw (U"C library not created.");
57 }
58 }
59
60 /* End of file praat_statistics.cpp */