Skip to content

Commit 69bdb52

Browse files
committed
watcom seems to work
1 parent 41222fa commit 69bdb52

9 files changed

Lines changed: 44 additions & 12 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ out/
88
toolchain
99
say
1010
/wip
11+
/say.exe
12+
/OUTPUT.WAV
13+
/output.wav
14+
/dtc.lib
1115

1216
# Nintendo DS
1317
.DS_Store

compile_watcom.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh -e
2+
if [ "x$1" = "x" ]; then
3+
TARGET="nt"
4+
else
5+
TARGET="$1"
6+
fi
7+
8+
if [ "$TARGET" = "dos4g" ]; then
9+
ARGS="-DNO_FILESYSTEM"
10+
else
11+
ARGS=""
12+
fi
13+
14+
OBJS=""
15+
for i in src/*.c; do
16+
OUT="`echo $i | cut -d. -f1`.o"
17+
OBJS="$OBJS +$OUT"
18+
19+
if [ -f "$OUT" ]; then
20+
continue
21+
fi
22+
owcc -Wc-fx -c -b$TARGET $ARGS -Iinclude -Isrc -D_REENTRANT -DNOMME -DLTSSIM -DTTSSIM -DANSI -DBLD_DECTALK_DLL -DENGLISH -DENGLISH_US -DACCESS32 -DTYPING_MODE -DACNA -DDISABLE_AUDIO -DSINGLE_THREADED -o $OUT $i
23+
done
24+
25+
wlib -q -b -fo -n dtc.lib $OBJS
26+
27+
owcc -b$TARGET -Iinclude -o say.exe main.c dtc.lib

include/ph_aloph1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
/* #include "phdefs.h" */
8888
/* #include "phinst.h" *//* MVP : new instance header file */
8989
#include "ph_def.h"
90+
#include "ph_prot.h"
9091

9192
/* #define DEBUG_OLDALLO 1 *//* debugiing eab */
9293
/****************************************************************************/

include/ph_drwt01.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ Later edit history of old ph_drwt0.c
127127

128128

129129
//#define NWSNOAA
130+
130131
#if (defined NWSNOAA) || (defined ENGLISH_UK)
131132

132133
/* Extend f0 contour one frame to obtain next value for period T0 */
@@ -181,8 +182,8 @@ Later edit history of old ph_drwt0.c
181182
* an interval of constant f0.Bats 349
182183
*/
183184

184-
185185
#include "ph_def.h"
186+
#include "ph_prot.h"
186187
#define ENDDROP
187188
#define TWOPI 4096 /* For getcosine() function below */
188189
#define PI 2048
@@ -273,7 +274,6 @@ static void set_tglst(PDPH_T pDph_t);
273274

274275
int oarcnt=0;
275276

276-
277277
void pht0draw(LPTTS_HANDLE_T phTTS)
278278
{
279279

main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ void usage(const char *prog) {
8686
int main(int argc, char *argv[]) {
8787
const char *output_file = NULL;
8888
const char *text = NULL;
89+
int i;
8990

9091
#ifdef _WIN32
9192
// On Windows, stdout is text mode by default which will corrupt binary WAV data.
@@ -103,7 +104,7 @@ int main(int argc, char *argv[]) {
103104
}
104105

105106
// parse args, gross
106-
for (int i = 1; i < argc; i++) {
107+
for (i = 1; i < argc; i++) {
107108
if (strcmp(argv[i], "-p") == 0) {
108109
pipeOut = true;
109110
} else if (!output_file && !pipeOut) {
@@ -144,7 +145,9 @@ int main(int argc, char *argv[]) {
144145
if (pipeIn) {
145146
int c;
146147
while ((c = getchar()) != EOF) {
147-
char arr[] = {c, 0};
148+
char arr[2];
149+
arr[0] = c;
150+
arr[1] = 0;
148151
TextToSpeechStart((char *)arr, NULL, WAVE_FORMAT_1M16);
149152
}
150153
} else {

src/charset.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
#define USE_ICONV
1010
#define REALLOC_SIZE 4096
1111

12-
/* DO NOT CHECK FOR __unix__! that is used as solution to most macros */
13-
#if !defined(_WIN32) && defined(USE_ICONV)
12+
#if defined(__unix__) && defined(USE_ICONV)
1413
/* unix */
1514
#include <langinfo.h>
1615
#include <iconv.h>

src/dtmmio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ DTKmmioOpen(
759759
if ( fd < 0 ) {
760760
switch(errno) {
761761
case ENOMEM:
762-
#ifndef _WIN32
762+
#ifdef ENOSR
763763
case ENOSR:
764764
#endif
765765
DTKmmioOpenSetError(MMIOERR_OUTOFMEMORY);
@@ -1008,7 +1008,7 @@ DTKmmioRename(
10081008
case EACCES:
10091009
case EROFS:
10101010
case ENOSPC:
1011-
#ifndef _WIN32
1011+
#ifdef EDQUOT
10121012
case EDQUOT:
10131013
#endif
10141014
case EPERM:

src/ph_drwt0.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939

4040
#include "dectalkf.h"
4141

42-
43-
4442
#if (defined(ENGLISH_US) || defined(GERMAN) || defined(SPANISH)) && defined(OLD_INTONATION_AND_TIMING)
4543
#include "ph_drwt01.c"
4644
#else

src/ph_sort.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static void get_stress_of_conson (LPTTS_HANDLE_T phTTS, short msym, short compou
215215
static void add_feature (PDPH_T pDph_t, long feaname, short location);
216216

217217
static void get_next_bound_type (LPTTS_HANDLE_T phTTS, short msym);
218-
__inline short phone_feature(PDPH_T pDph_t, int phone);
218+
short phone_feature(PDPH_T pDph_t, int phone);
219219

220220
extern const short *all_featb[];
221221
// HELPME
@@ -2102,7 +2102,7 @@ static void add_feature (PDPH_T pDph_t, long feaname, short location)
21022102
}
21032103
/* * * * * * * * * * * * * * * * end of ph_sort.c**** * * * * * * * * * * * * * * * * */
21042104

2105-
__inline short phone_feature(PDPH_T pDph_t, int phone)
2105+
short phone_feature(PDPH_T pDph_t, int phone)
21062106
{
21072107
return(all_featb[phone>>8][phone &0xFF]);
21082108
/* *****************************************************************/

0 commit comments

Comments
 (0)