这个功能实现了
--------
附代码;
#include <stdio.h>
#include<string.h>
#define MAXNUM 128
int main(int argc, char* argv[])
{
FILE *fp_src;
char buffer[MAXNUM];
char *buf=buffer;
int bufferCount = 0;
int i=0;
if((fp_src=fopen("tags","r")) == NULL){
printf("fopen file error\n");
}
while((fgets(buffer,MAXNUM,fp_src)) != NULL ){
if(buffer[0] == '!')
continue;
bufferCount = strlen(buffer);
if( buffer[bufferCount - 2] == 'v' ){
continue;
}
printf("%s",buf);
if(fclose(fp_src) != 0)
printf("close error \n");
return 0;
}