⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jlog.c

📁 julius version 4.12.about sound recognition.
💻 C
字号:
/** * @file   jlog.c *  * <JA> * @brief  メッセ〖ジテキスト叫蜗とエラ〖姜位 * * メッセ〖ジ叫蜗脱の绕脱簇眶の年盗ですˉ * 千急冯蔡の眉琐叫蜗やネットワ〖クへの叫蜗といった· * Julius の肩妥な叫蜗はここの簇眶を蝗って乖われますˉ * また·叫蜗矢机コ〖ドの恃垂もここで乖いますˉ * </JA> *  * <EN> * @brief  Message text output and error exit functions * * These are generic functions for text message output. * Most of text messages such as recognition results, status, informations * in Julius/Julian will be output to TTY or via network using these functions. * The character set conversion will also be performed here. * </EN> *  * @author Akinobu LEE * @date   Thu Feb 17 16:02:41 2005 * * $Revision: 1.2 $ *  *//* * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology * All rights reserved */#include <sent/stddefs.h>#include <sent/tcpip.h>#include <stdarg.h>static FILE *outdev;static boolean initialized = FALSE;#define MAX_PRINTF_LEN 4096	///< Maximum string length at one printf call/**  * Set file pointer to output the log.  Set to NULL to totally disable * the log outputs. *  * @param fp [in] file pointer or NULL to disable *  */voidjlog_set_output(FILE *fp){  outdev = fp;  initialized = TRUE;}/**  * Return the current file pointer to output log. *  * @return the file pointer. *  */FILE *jlog_get_fp(){  if (initialized == FALSE) return stdout;  return outdev;}/**  * @brief  Output a normal message to log * *  * @param fmt [in] format string, like printf. * @param ... [in] variable length argument like printf. *  */voidjlog(char *fmt, ...){  va_list ap;  if (initialized == FALSE) {    outdev = stdout;  } else if (outdev == NULL) return;    va_start(ap,fmt);  vfprintf(outdev, fmt, ap);  va_end(ap);  return;}/**  * @brief  Flush text message * * The output device can be changed by set_print_func(). *  * @return the same as fflush, i.e. 0 on success, other if failed. */intjlog_flush(){  if (initialized == FALSE) {    outdev = stdout;  } else if (outdev == NULL) return 0;  return(fflush(outdev));}

⌨️ 快捷键说明

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