Source file: /~heha/basteln/Haus/Telefon/sprech.zip/src/s1.cpp

/* Konvertiert Text in Aussprache (englisch-only freilich) */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>	// toupper()
#include <fcntl.h>	// _O_BINARY
#include <io.h>		// _setmode()
#include "reciter.h"

void __cdecl mainCRTStartup() {
// _setmode(_fileno(stdin),_O_BINARY);
// _setmode(_fileno(stdout),_O_BINARY);
 char s[256];
 while (fgets(s,128,stdin)) {
  memset(s+128,0,128);
  for (char*p=s;*p;p++) *p=toupper(*p);
  while (p>s && *--p<33) *p=0;		// rechts trimmen (\n entfernen)
  if (!TextToPhonemes(s)) continue;
  fprintf(stdout,"%s\n",s);
 }
//  TextToPhonemes("Can you hear me now?");	// "KAEN YUW /HIY5R MIY NAW4?"
 exit(0);
}
Detected encoding: ASCII (7 bit)2