File: funcsummary.awk

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (29 lines) | stat: -rwxr-xr-x 515 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/^[[:space:]]*\/\*[[:space:]]*\{\{\{[[:space:]]*proto/ { 
	split($0,proto,"proto[[:space:]]+|\\*/[[:space:]]*$");
	parse=1; 
	same=1;
	lc=0;
}
/\*\// {
	if(parse) {
		lines="";
		for(i=0;i<lc;i++) {
			lines = sprintf("%s %s ",lines,line[i]);
		}
		if(!same) {
			split($0,temp,"\\*/[[:space:]]*$");
			lines = sprintf("%s %s ",lines,temp[1]);
		}
		printf("%s --- %s\n",proto[2],lines);
		parse=0;
	}
	next;
}
{	
	if(parse && !same) { 
		split($0,temp,"\\*/[[:space:]]*$");
		line[lc++]=temp[1];
		
	} 
	same=0;
}