mark.c

来自「4.8k/s速率FS1016标准语音压缩源码」· C语言 代码 · 共 59 行

C
59
字号
#include <stdio.h>#include "main.h"#include "mark.h"/**************************************************************************** ROUTINE*               mark** FUNCTION*                *               display prompts to indicate processing*		(output to standard error)** SYNOPSIS*               subroutine mark (type)**   formal **                       data    I/O*       name            type    type    function*       -------------------------------------------------------------------*       type		int	i	0 - display a 'pump' (rotating bar)*					1 - display a frame counter****************************************************************************** DESCRIPTION**	This routine creates either a rotating bar or a row of dots, *	depending on what is specified, while code is executing.****************************************************************************** CALLED BY**	main***************************************************************************/void mark(int 	type,int	frame){  static int i;  static char chr[5] = "/-\\|";  if (type)  {    fprintf(stderr,"%d\r",frame);  }  else  {    fprintf(stderr,"%c\b",chr[i++]);    if (i > 3) i = 0;  }  fflush(stderr);}

⌨️ 快捷键说明

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