Changed name of executable
[sgc2.git] / praat_module / adaptPraat.patch
blob04596d60206a7d935491a0fecf8f33f7d3319368
1 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/fon/praat_TextGrid_init.c demo_praat_sources/fon/praat_TextGrid_init.c
2 --- praat_sources/fon/praat_TextGrid_init.c 2010-08-10 09:18:22.145443134 +0200
3 +++ demo_praat_sources/fon/praat_TextGrid_init.c 2010-11-23 13:41:36.291182479 +0100
4 @@ -682,7 +682,7 @@ static void cb_TextGridEditor_publish (A
7 DIRECT (TextGrid_edit)
8 - if (theCurrentPraatApplication -> batch) {
9 + if (theCurrentPraatApplication -> batch == 1) {
10 return Melder_error1 (L"Cannot edit a TextGrid from batch.");
11 } else {
12 WHERE (SELECTED && CLASS == classTextGrid) {
13 @@ -695,7 +695,7 @@ DIRECT (TextGrid_edit)
14 END
16 DIRECT (TextGrid_LongSound_edit)
17 - if (theCurrentPraatApplication -> batch) {
18 + if (theCurrentPraatApplication -> batch == 1) {
19 return Melder_error1 (L"Cannot edit a TextGrid from batch.");
20 } else {
21 LongSound longSound = NULL;
22 @@ -710,7 +710,7 @@ DIRECT (TextGrid_LongSound_edit)
23 END
25 DIRECT (TextGrid_SpellingChecker_edit)
26 - if (theCurrentPraatApplication -> batch) {
27 + if (theCurrentPraatApplication -> batch == 1) {
28 return Melder_error1 (L"Cannot edit a TextGrid from batch.");
29 } else {
30 SpellingChecker spellingChecker = NULL;
31 @@ -725,7 +725,7 @@ DIRECT (TextGrid_SpellingChecker_edit)
32 END
34 DIRECT (TextGrid_LongSound_SpellingChecker_edit)
35 - if (theCurrentPraatApplication -> batch) {
36 + if (theCurrentPraatApplication -> batch == 1) {
37 return Melder_error1 (L"Cannot edit a TextGrid from batch.");
38 } else {
39 LongSound longSound = NULL;
40 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.c demo_praat_sources/sys/praat.c
41 --- praat_sources/sys/praat.c 2010-11-02 09:30:25.285982433 +0100
42 +++ demo_praat_sources/sys/praat.c 2010-11-23 13:42:53.000000000 +0100
43 @@ -1085,9 +1085,9 @@ void praat_init (const char *title, unsi
44 * Make sure that the program's private directory exists.
46 #if defined (UNIX)
47 - swprintf (name, 256, L".%s-dir", programName); /* For example .myProg-dir */
48 + swprintf (name, 256, L".%s", praatP.title); /* For example .myProg-dir */
49 #elif defined (macintosh)
50 - swprintf (name, 256, L"%s Prefs", praatP.title); /* For example MyProg Prefs */
51 + swprintf (name, 256, L"%s", "SpeakGoodChinese2"); /* For example MyProg Prefs */
52 #elif defined (_WIN32)
53 swprintf (name, 256, L"%s", praatP.title); /* For example MyProg */
54 #endif
55 @@ -1368,6 +1368,7 @@ void praat_run (void) {
57 if (Melder_batch) {
58 if (thePraatStandAloneScriptText != NULL) {
59 + theCurrentPraatApplication -> batch = 2;
60 praat_executeScriptFromText (thePraatStandAloneScriptText);
61 praat_exit (0);
62 } else if (doingCommandLineInterface) {