rdterm.c

来自「about sound recognition.i want to downlo」· C语言 代码 · 共 40 行

C
40
字号
/* * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology * All rights reserved */#include <sent/stddefs.h>#include <sent/vocabulary.h>#include <sent/dfa.h>#include <sent/speech.h>#include "common.h"voidinit_term(char *filename, char **termname){  FILE *fd;  int n;  static char buf[512];    j_printerr("Reading in term file (optional)...");    if ((fd = fopen_readfile(filename)) == NULL) {    termname[0] = NULL;    j_printerr("not found\n");    return;  }  while (getl(buf, sizeof(buf), fd) != NULL) {    n = atoi(first_token(buf));    termname[n] = strdup(next_token());  }  if (fclose_readfile(fd) == -1) {    j_printerr("close error\n");    exit(1);  }  j_printerr("done\n");}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?