comments.c

来自「speech signal process tools」· C语言 代码 · 共 42 行

C
42
字号
#include <stdio.h>#include <util/chars.h>/*******************************************************************//*   check the character pointer to see if it points to the        *//*   comment character                                             *//*******************************************************************/is_comment(str)char *str;{   if ((*str == COMMENT_CHAR) && (*(str+1) != COMMENT_CHAR)){      fprintf(stderr,"Warning: The comment designation is now %c%c, the line below\n",                     COMMENT_CHAR,COMMENT_CHAR);      fprintf(stderr,"         has only one comment character, this may");     fprintf(stderr," be an error\n         %s\n",str);   }   if ((*str == COMMENT_CHAR) && (*(str+1) == COMMENT_CHAR))       return(TRUE);   else       return(FALSE);}/*******************************************************************//*   check the character pointer to see if it points to the        *//*   comment_info character                                        *//*******************************************************************/is_comment_info(str)char *str;{   if ((*str == COMMENT_INFO_CHAR) && (*(str+1) != COMMENT_INFO_CHAR)){      fprintf(stderr,"Warning: The comment designation is now %c%c, the line below\n",                     COMMENT_INFO_CHAR,COMMENT_INFO_CHAR);      fprintf(stderr,"         has only one comment info character, this may");     fprintf(stderr," be an error\n         %s\n",str);   }   if ((*str == COMMENT_INFO_CHAR) && (*(str+1) == COMMENT_INFO_CHAR))       return(TRUE);   else       return(FALSE);}

⌨️ 快捷键说明

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