File: fullmultiple.c

package info (click to toggle)
rhyme 0.9-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 3,704 kB
  • ctags: 225
  • sloc: ansic: 2,394; makefile: 99; python: 31
file content (27 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "longline.h"
#include "dict.h"

/*An application for finding all the multiple pronunciations in the
  CMU pronouncing dictionary.
  Copyright (C) 2000,2001,2002 Brian Langenberger
  Released under the terms of the GNU Public License.
  See the file "COPYING" for full details.*/

int main(int argc, char *argv[]) {
  char *string;
  struct WordEntry *entry;
  struct WordEntryStack *stack = NULL;

  for (string = readLongLine(stdin); string != NULL;
       string = readLongLine(stdin)) {
    entry = stringToWordEntry(string);
    if (isMultiplePronunciation(entry)) {
      addMultiplePronunciation(stack, entry, 0);
    }
    pushWordEntry(&stack, entry);
  }

  printMultiples(stdout, stack);

  return 0;
}