Skip to content

Commit

Permalink
move melder
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBoersma committed Aug 11, 2018
1 parent 1fa661b commit 1a328c5
Show file tree
Hide file tree
Showing 59 changed files with 422 additions and 230 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File: Makefile

# Makefile for Praat.
# Paul Boersma, 22 October 2016
# Paul Boersma, 11 August 2018

# System-dependent definitions of CC, LIBS, ICON and MAIN_ICON should be in
# makefile.defs, which has to be copied and renamed
Expand All @@ -20,7 +20,7 @@ all:
$(MAKE) -C external/portaudio
$(MAKE) -C external/espeak
$(MAKE) -C kar
$(MAKE) -C num
$(MAKE) -C melder
$(MAKE) -C sys
$(MAKE) -C dwsys
$(MAKE) -C stat
Expand All @@ -38,7 +38,7 @@ all:
FFNet/libFFNet.a gram/libgram.a EEG/libEEG.a \
LPC/libLPC.a dwtools/libdwtools.a \
fon/libfon.a stat/libstat.a dwsys/libdwsys.a \
sys/libsys.a num/libnum.a kar/libkar.a \
sys/libsys.a melder/libmelder.a sys/libsys.a kar/libkar.a \
external/espeak/libespeak.a \
external/portaudio/libportaudio.a \
external/flac/libflac.a external/mp3/libmp3.a \
Expand All @@ -53,7 +53,7 @@ clean:
$(MAKE) -C external/portaudio clean
$(MAKE) -C external/espeak clean
$(MAKE) -C kar clean
$(MAKE) -C num clean
$(MAKE) -C melder clean
$(MAKE) -C sys clean
$(MAKE) -C dwsys clean
$(MAKE) -C stat clean
Expand Down
2 changes: 1 addition & 1 deletion dwsys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OBJECTS = Collection_extensions.o Command.o \
NUMf2c.o NUMcblas.o NUMclapack.o NUMcomplex.o NUMfft_d.o NUMsort2.o \
NUMmathlib.o NUMstring.o \
Permutation.o Permutation_and_Index.o \
regularExp.o SimpleVector.o \
SimpleVector.o \
SVD.o

.PHONY: all clean
Expand Down
1 change: 0 additions & 1 deletion dwsys/NUM2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
#include "gsl_sf_trig.h"
#include "gsl_poly.h"
#include "gsl_cdf.h"
#include "tensor.h"

#undef MAX
#undef MIN
Expand Down
3 changes: 1 addition & 2 deletions dwsys/NUM2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*/

#include <limits.h>
#include "melder.h"
#include "regularExp.h"
#include "../melder/melder.h"

/* machine precision */
#define NUMeps 2.2e-16
Expand Down
1 change: 0 additions & 1 deletion dwtools/DataModeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "Strings_extensions.h"
#include "Sound_and_LPC_robust.h"
#include "Table_extensions.h"
#include "tensor.h"

#include "oo_DESTROY.h"
#include "DataModeler_def.h"
Expand Down
2 changes: 1 addition & 1 deletion dwtools/praat_David_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,7 @@ DO

/**************** Ltas *******************************************/

#include "UnicodeData.h"
#include "../kar/UnicodeData.h"
FORM (INFO_Ltas_reportSpectralTilt, U"Ltas: Report spectral tilt", nullptr) {
POSITIVE (fromFrequency, U"left Frequency range (Hz)", U"100.0")
POSITIVE (toFrequency, U"right Frequency range (Hz)", U"5000.0")
Expand Down
2 changes: 1 addition & 1 deletion external/mp3/mp3.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this work. If not, see <http://www.gnu.org/licenses/>.
*/

#include "melder.h" // for integer
#include "../../melder/melder.h" // for integer

/* The following function is used to identify MP3 files */
int mp3_recognize (int nread, const char *data);
Expand Down
1 change: 0 additions & 1 deletion fon/Sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "Sound.h"
#include "Sound_extensions.h"
#include "NUM2.h"
#include "tensor.h"

#include "enums_getText.h"
#include "Sound_enums.h"
Expand Down
2 changes: 1 addition & 1 deletion fon/SpellingChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "oo_DESCRIPTION.h"
#include "SpellingChecker_def.h"

#include "longchar.h"
#include "../kar/longchar.h"

Thing_implement (SpellingChecker, Daata, 0);

Expand Down
2 changes: 1 addition & 1 deletion fon/TextGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include "TextGrid.h"
#include "longchar.h"
#include "../kar/longchar.h"

#include "oo_DESTROY.h"
#include "TextGrid_def.h"
Expand Down
2 changes: 1 addition & 1 deletion fon/TimeSoundEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "NUM2.h"
#include "TimeSoundEditor.h"
#include "EditorM.h"
#include "UnicodeData.h"
#include "../kar/UnicodeData.h"

#include "enums_getText.h"
#include "TimeSoundEditor_enums.h"
Expand Down
2 changes: 1 addition & 1 deletion fon/WordList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include "WordList.h"
#include "longchar.h"
#include "../kar/longchar.h"

#include "oo_DESTROY.h"
#include "WordList_def.h"
Expand Down
2 changes: 1 addition & 1 deletion fon/manual_Picture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include "ManPagesM.h"
#include "UnicodeData.h"
#include "../kar/UnicodeData.h"

static void drawOneIpaSymbol (Graphics g, double x, double y, conststring32 symbol) {
char32 buffer [30], *p = & buffer [0];
Expand Down
2 changes: 1 addition & 1 deletion fon/manual_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ManPagesM.h"

#include "Sound.h"
#include "UnicodeData.h"
#include "../kar/UnicodeData.h"

static void draw_SoundDeepen_filter (Graphics g) {
try {
Expand Down
2 changes: 1 addition & 1 deletion kar/longchar.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with this work. If not, see <http://www.gnu.org/licenses/>.
*/

#include "melder.h"
#include "../melder/melder.h"

/********** NON-ASCII CHARACTERS **********/

Expand Down
8 changes: 4 additions & 4 deletions melder/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Makefile of the library "melder"
# Paul Boersma, 10 August 2018
# Paul Boersma, 11 August 2018

include ../makefile.defs

CPPFLAGS = -I ../external/gsl -I ../external/glpk -I ../kar -I ../sys -I ../dwsys
CPPFLAGS = -I ../melder

OBJECTS = melder.o complex.o melder_alloc.o \
melder_ftoa.o melder_console.o melder_textencoding.o melder_atof.o melder_files.o \
melder_vector.o melder_sort.o melder_debug.o melder_strings.o melder_token.o \
melder_info.o melder_error.o melder_time.o \
melder_audio.o melder_audiofiles.o melder_quantity.o melder_readtext.o melder_writetext.o \
abcio.o MelderGui.o melder_sysenv.o \
abcio.o MelderGui.o melder_sysenv.o regularExp.o \
tensor.o \
NUMmath.o \
NUMspecfunc.o NUMear.o NUMinterpol.o NUMmetrics.o NUMrandom.o NUMfilter.o NUMlinprog.o \
Expand All @@ -30,4 +30,4 @@ libmelder.a: $(OBJECTS)
$(AR) cq libmelder.a $(OBJECTS)
$(RANLIB) libmelder.a

$(OBJECTS): ../external/gsl/*.h ../external/glpk/*.h ../kar/*.h ../sys/*.h ../dwsys/*.h
$(OBJECTS): ../kar/*.h ../sys/*.h ../dwsys/*.h
6 changes: 3 additions & 3 deletions melder/MelderGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
//#include <ctype.h>

#include <assert.h>
#include "melder.h"
#ifdef _WIN32
#include <windows.h>
#endif

#include "Graphics.h"
#include "Gui.h"
#include "melder.h"
#include "../sys/Graphics.h"
#include "../sys/Gui.h"

/********** Exported variable. **********/

Expand Down
2 changes: 1 addition & 1 deletion melder/NUMinterpol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

#include "melder.h"
#include "NUM2.h"
#include "../dwsys/NUM2.h"
#define SIGN(x,s) ((s) < 0 ? -fabs (x) : fabs(x))

#define NUM_interpolate_simple_cases \
Expand Down
2 changes: 1 addition & 1 deletion melder/NUMmath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

double NUMpow (double base, double exponent) { return base <= 0.0 ? 0.0 : pow (base, exponent); }

#include "gsl_errno.h"
#include "../external/gsl/gsl_errno.h"

void NUMshift (double *x, double xfrom, double xto) {
if (*x == xfrom) *x = xto; else *x += xto - xfrom;
Expand Down
10 changes: 5 additions & 5 deletions melder/NUMspecfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
*/

#include "melder.h"
#include "NUM2.h" // NUMridders
#include "../dwsys/NUM2.h" // NUMridders

#include "gsl_errno.h"
#include "gsl_sf_bessel.h"
#include "gsl_sf_gamma.h"
#include "gsl_sf_erf.h"
#include "../external/gsl/gsl_errno.h"
#include "../external/gsl/gsl_sf_bessel.h"
#include "../external/gsl/gsl_sf_gamma.h"
#include "../external/gsl/gsl_sf_erf.h"

double NUMlnGamma (double x) {
gsl_sf_result result;
Expand Down
1 change: 0 additions & 1 deletion melder/abcio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#ifdef macintosh
#include <TargetConditionals.h>
#endif
#include "abcio.h"

/********** text I/O **********/

Expand Down
5 changes: 0 additions & 5 deletions melder/abcio.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
* along with this work. If not, see <http://www.gnu.org/licenses/>.
*/

#include "complex.h"
#include "melder.h"

#include "abcio_enums.h"

/* Numeric text input and output. */

int texgeti8 (MelderReadText text);
Expand Down
9 changes: 4 additions & 5 deletions melder/melder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "macport_off.h"
#endif

#include "MelderThread.h"
#include "../sys/MelderThread.h"

#include "enums_getText.h"
#include "melder_enums.h"
Expand All @@ -36,10 +36,9 @@

/********** Exported variables. **********/

//bool Melder_batch; // don't we have a GUI?- Set once at application start-up
//bool Melder_backgrounding; // are we running a script?- Set and unset dynamically
//bool Melder_asynchronous;
//int32 Melder_systemVersion;
bool Melder_batch; // don't we have a GUI?- Set once at application start-up
bool Melder_backgrounding; // are we running a script?- Set and unset dynamically
int32 Melder_systemVersion;

static void defaultHelp (conststring32 query) {
Melder_flushError (U"Don't know how to find help on \"", query, U"\".");
Expand Down
Loading

0 comments on commit 1a328c5

Please sign in to comment.