5

C program for printing function details of a C file [closed]

view full story
linux-howto

http://stackoverflow.com – This is the program for printing the details of the function,i.e the function name and the no of lines of the function for a given c file. I've given my code below. #include <stdio.h> #include <string.h> #define SIZE 1024 struct fundetails { int nooflines; char funcname[SIZE]; }s[SIZE]; char *ffname(char *line,char *name) { int i=1,j=0; char *dt; //char name[SIZE]; strtok(line,"("); dt = strchr(line,' '); if(dt[i] == '*') i++; while(dt[i] != '\0') { name[j]=dt[i]; i++; j++; } name[j] ='\0'; ret (HowTos)