From c536593177bca6baca8acf3baeac86f9d34cb506 Mon Sep 17 00:00:00 2001 From: Rob van Son Date: Thu, 19 Nov 2015 09:34:17 +0100 Subject: [PATCH] Adapted patches --- praat_module/adaptPraat.patch | 22 +++++++++++----------- praat_module/main_Praat.patch | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/praat_module/adaptPraat.patch b/praat_module/adaptPraat.patch index 86576db..628e68c 100644 --- a/praat_module/adaptPraat.patch +++ b/praat_module/adaptPraat.patch @@ -46,7 +46,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr --- praat_sources/sys/praat.cpp 2014-04-22 11:09:57.000000000 +0200 +++ demo_praat_sources/sys/praat.cpp 2014-04-22 11:53:58.000000000 +0200 # When running thePraatStandAloneScriptText, block the Melder_batch flag -@@ -1203,7 +1203,9 @@ void praat_init (const char32 *title, un +@@ -1202,7 +1202,9 @@ void praat_init (const char32 *title, un } //Melder_casual (U"Script file name <<", theCurrentPraatApplication -> batchName.string, U">>"); @@ -57,7 +57,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr /* * Running the Praat shell from the command line: # Change the name of the Unix preference dir -@@ -1255,7 +1257,7 @@ void praat_init (const char *title, unsi +@@ -1254,7 +1256,7 @@ void praat_init (const char *title, unsi */ char32 name [256]; #if defined (UNIX) @@ -67,7 +67,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr Melder_sprint (name,256, praatP.title, U" Prefs"); // for example MyProg Prefs #elif defined (_WIN32) # Something in Linux (GTK)? Do not know what? -@@ -1339,6 +1341,12 @@ void praat_init (const char *title, unsi +@@ -1338,6 +1340,12 @@ void praat_init (const char *title, unsi GuiWindow raam = nullptr; if (Melder_batch) { @@ -81,7 +81,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr for (unsigned int i = praatP.argumentNumber - 1; i < argc; i ++) { if (i >= praatP.argumentNumber) MelderString_append (& theCurrentPraatApplication -> batchName, U" "); # Supress opening the object window -@@ -1382,9 +1390,11 @@ void praat_init (const char *title, unsi +@@ -1381,9 +1389,11 @@ void praat_init (const char *title, unsi #if motif GuiApp_setApplicationShell (theCurrentPraatApplication -> topShell -> d_xmShell); #endif @@ -94,7 +94,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr Thing_recognizeClassesByName (classCollection, classStrings, classManPages, classSortedSetOfString, nullptr); if (Melder_batch) { # Seems to speed startup, but not sure whether it is necessary -@@ -1394,6 +1404,9 @@ void praat_init (const char *title, unsi +@@ -1393,6 +1403,9 @@ void praat_init (const char *title, unsi trace (U"adding fixed buttons without GUI"); praat_addFixedButtons (nullptr); } else { @@ -105,7 +105,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr #ifdef macintosh #if ! useCarbon # Supress opening the object window -@@ -1421,7 +1434,9 @@ void praat_init (const char *title, unsi +@@ -1420,7 +1433,9 @@ void praat_init (const char *title, unsi trace (U"creating the dynamic menu in the Objects window"); praat_actions_createDynamicMenu (raam); trace (U"showing the Objects window"); @@ -116,7 +116,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr #if defined (UNIX) && ! defined (NO_GRAPHICS) try { # Initialize a picture window, but close it immediately -@@ -1452,7 +1467,12 @@ void praat_init (const char *title, unsi +@@ -1451,7 +1466,12 @@ void praat_init (const char *title, unsi trace (U"creating the Picture window"); trace (U"before picture window shows: locale is ", Melder_peek8to32 (setlocale (LC_ALL, nullptr))); @@ -131,7 +131,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr if (unknownCommandLineOption) { # No idea why this is needed? -@@ -1608,11 +1628,11 @@ void praat_run (void) { +@@ -1607,11 +1627,11 @@ void praat_run (void) { if (! str32equ (Melder_integer (dummy), U"1000000000000")) Melder_fatal (U"The number 1000000000000 is mistaken written on this machine as ", dummy, U"."); } @@ -149,7 +149,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_pr Melder_assert ((uint32) dummy == 3000000000); } # Next chunk is needed to start the Demo window under Windows (motif) -@@ -1723,10 +1743,20 @@ void praat_run () { +@@ -1722,10 +1742,20 @@ void praat_run () { #elif cocoa [NSApp run]; #elif motif @@ -261,7 +261,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/Ui.cpp demo_praat --- praat_sources/sys/Ui.cpp 2014-01-27 09:02:44.000000000 +0100 +++ demo_praat_sources/sys/Ui.cpp 2014-03-27 12:22:58.000000000 +0100 # Increase size of Pause Forms -@@ -723,12 +723,16 @@ void UiForm_finish (I) { +@@ -725,12 +725,16 @@ void UiForm_finish (I) { void UiForm_finish (UiForm me) { if (! my d_dialogParent && ! my isPauseForm) return; @@ -409,7 +409,7 @@ diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/stat/praat_Stat.cpp d --- praat_sources/stat/praat_Stat.cpp 2011-10-01 13:32:45.000000000 +0200 +++ demo_praat_sources/stat/praat_Stat.cpp 2011-11-18 08:55:32.000000000 +0100 # Allow to view tables when in a Demo app -@@ -421,7 +421,9 @@ DO +@@ -420,7 +420,9 @@ DO END2 } DIRECT2 (Table_edit) { diff --git a/praat_module/main_Praat.patch b/praat_module/main_Praat.patch index e51eb50..e7df906 100644 --- a/praat_module/main_Praat.patch +++ b/praat_module/main_Praat.patch @@ -8,7 +8,7 @@ int main (int argc, char *argv []) { try { praat_setLogo (130.0, 80.0, logo); -- praat_init (U"Praat", (unsigned int) argc, argv); +- praat_init (U"Praat", argc, argv); + praat_setStandAloneScriptText (myDemoScript); + praat_init (U"SpeakGoodChinese2", (unsigned int) argc, argv); INCLUDE_LIBRARY (praat_uvafon_init) -- 2.11.4.GIT