Lines 81-86
Link Here
|
81 |
void top_agents_table(); /* top n u-agents "" */ |
81 |
void top_agents_table(); /* top n u-agents "" */ |
82 |
void top_ctry_table(); /* top n countries "" */ |
82 |
void top_ctry_table(); /* top n countries "" */ |
83 |
void top_search_table(); /* top n search strs */ |
83 |
void top_search_table(); /* top n search strs */ |
|
|
84 |
void top_searchsite_table(); /* top n search strs */ |
85 |
void top_searchboth_table(); /* top n search strs */ |
84 |
void top_users_table(); /* top n ident table */ |
86 |
void top_users_table(); /* top n ident table */ |
85 |
u_long load_url_array( UNODEPTR *); /* load URL array */ |
87 |
u_long load_url_array( UNODEPTR *); /* load URL array */ |
86 |
u_long load_site_array( HNODEPTR *); /* load Site array */ |
88 |
u_long load_site_array( HNODEPTR *); /* load Site array */ |
Lines 105-110
Link Here
|
105 |
int all_refs_page(u_long, u_long); /* output refs page */ |
107 |
int all_refs_page(u_long, u_long); /* output refs page */ |
106 |
int all_agents_page(u_long, u_long); /* output agents page */ |
108 |
int all_agents_page(u_long, u_long); /* output agents page */ |
107 |
int all_search_page(u_long, u_long); /* output search page */ |
109 |
int all_search_page(u_long, u_long); /* output search page */ |
|
|
110 |
int all_searchsite_page(u_long, u_long); /* output search page */ |
111 |
int all_searchboth_page(u_long, u_long); /* output search page */ |
108 |
int all_users_page(u_long, u_long); /* output ident page */ |
112 |
int all_users_page(u_long, u_long); /* output ident page */ |
109 |
void dump_all_sites(); /* dump sites tab file */ |
113 |
void dump_all_sites(); /* dump sites tab file */ |
110 |
void dump_all_urls(); /* dump urls tab file */ |
114 |
void dump_all_urls(); /* dump urls tab file */ |
Lines 417-426
Link Here
|
417 |
if ( (s_array=malloc(sizeof(SNODEPTR)*(a_ctr))) != NULL) |
421 |
if ( (s_array=malloc(sizeof(SNODEPTR)*(a_ctr))) != NULL) |
418 |
{ |
422 |
{ |
419 |
a_ctr=load_srch_array(s_array); |
423 |
a_ctr=load_srch_array(s_array); |
420 |
if (ntop_search || dump_search) |
424 |
if (ntop_search || ntop_searchsite || ntop_searchboth || dump_search) |
421 |
{ |
425 |
{ |
422 |
qsort(s_array,a_ctr,sizeof(SNODEPTR),qs_srch_cmph); |
426 |
qsort(s_array,a_ctr,sizeof(SNODEPTR),qs_srch_cmph); |
423 |
if (ntop_search) top_search_table(); /* top search strings table */ |
427 |
if (ntop_search) top_search_table(); /* top search strings table */ |
|
|
428 |
if (ntop_searchsite) top_searchsite_table(); /* top search strings table */ |
429 |
if (ntop_searchboth) top_searchboth_table(); /* top search strings table */ |
424 |
if (dump_search) dump_all_search(); /* dump search string tab file */ |
430 |
if (dump_search) dump_all_search(); /* dump search string tab file */ |
425 |
} |
431 |
} |
426 |
free(s_array); |
432 |
free(s_array); |
Lines 492-497
Link Here
|
492 |
fprintf(out_fp,"<A HREF=\"#TOPREFS\">[%s]</A>\n",msg_hlnk_r); |
498 |
fprintf(out_fp,"<A HREF=\"#TOPREFS\">[%s]</A>\n",msg_hlnk_r); |
493 |
if (ntop_search && t_ref) |
499 |
if (ntop_search && t_ref) |
494 |
fprintf(out_fp,"<A HREF=\"#TOPSEARCH\">[%s]</A>\n",msg_hlnk_sr); |
500 |
fprintf(out_fp,"<A HREF=\"#TOPSEARCH\">[%s]</A>\n",msg_hlnk_sr); |
|
|
501 |
if (ntop_searchsite && t_ref) |
502 |
fprintf(out_fp,"<A HREF=\"#TOPSEARCHSITE\">[%s]</A>\n",msg_hlnk_srs); |
503 |
if (ntop_searchboth && t_ref) |
504 |
fprintf(out_fp,"<A HREF=\"#TOPSEARCHBOTH\">[%s]</A>\n",msg_hlnk_srb); |
495 |
if (ntop_users && t_user) |
505 |
if (ntop_users && t_user) |
496 |
fprintf(out_fp,"<A HREF=\"#TOPUSERS\">[%s]</A>\n",msg_hlnk_i); |
506 |
fprintf(out_fp,"<A HREF=\"#TOPUSERS\">[%s]</A>\n",msg_hlnk_i); |
497 |
if (ntop_agents && t_agent) |
507 |
if (ntop_agents && t_agent) |
Lines 1628-1640
Link Here
|
1628 |
|
1638 |
|
1629 |
if ( (t_ref==0)||(a_ctr==0)) return; /* don't bother if none to do */ |
1639 |
if ( (t_ref==0)||(a_ctr==0)) return; /* don't bother if none to do */ |
1630 |
|
1640 |
|
1631 |
cnt=tot_num=a_ctr; pointer=s_array; |
1641 |
cnt=a_ctr; pointer=s_array; |
|
|
1642 |
tot_num=0; |
1632 |
while(cnt--) |
1643 |
while(cnt--) |
1633 |
{ |
1644 |
{ |
|
|
1645 |
if(strlen((char *)((SNODEPTR)(*pointer)->site))) |
1646 |
{ |
1647 |
pointer++; continue; |
1648 |
} |
1634 |
t_val+=(u_long)((SNODEPTR)(*pointer)->count); |
1649 |
t_val+=(u_long)((SNODEPTR)(*pointer)->count); |
|
|
1650 |
tot_num++; |
1635 |
pointer++; |
1651 |
pointer++; |
1636 |
} |
1652 |
} |
1637 |
|
1653 |
|
|
|
1654 |
cnt=tot_num; |
1638 |
if ( tot_num > ntop_search) tot_num=ntop_search; |
1655 |
if ( tot_num > ntop_search) tot_num=ntop_search; |
1639 |
|
1656 |
|
1640 |
fprintf(out_fp,"<A NAME=\"TOPSEARCH\"></A>\n"); |
1657 |
fprintf(out_fp,"<A NAME=\"TOPSEARCH\"></A>\n"); |
Lines 1642-1648
Link Here
|
1642 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1659 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1643 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=CENTER COLSPAN=4>" \ |
1660 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=CENTER COLSPAN=4>" \ |
1644 |
"%s %lu %s %lu %s</TH></TR>\n", |
1661 |
"%s %lu %s %lu %s</TH></TR>\n", |
1645 |
GREY, msg_top_top, tot_num, msg_top_of, a_ctr, msg_top_sr); |
1662 |
GREY, msg_top_top, tot_num, msg_top_of, cnt, msg_top_sr); |
1646 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1663 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1647 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1664 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1648 |
"<FONT SIZE=\"-1\">#</FONT></TH>\n", |
1665 |
"<FONT SIZE=\"-1\">#</FONT></TH>\n", |
Lines 1659-1664
Link Here
|
1659 |
while(tot_num) |
1676 |
while(tot_num) |
1660 |
{ |
1677 |
{ |
1661 |
sptr=*pointer++; |
1678 |
sptr=*pointer++; |
|
|
1679 |
if(strlen(sptr->site)) continue; |
1662 |
fprintf(out_fp, |
1680 |
fprintf(out_fp, |
1663 |
"<TR>\n" \ |
1681 |
"<TR>\n" \ |
1664 |
"<TD ALIGN=center><FONT SIZE=\"-1\"><B>%d</B></FONT></TD>\n" \ |
1682 |
"<TD ALIGN=center><FONT SIZE=\"-1\"><B>%d</B></FONT></TD>\n" \ |
Lines 1674-1680
Link Here
|
1674 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1692 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1675 |
if ( (all_search) && (a_ctr>ntop_search) ) |
1693 |
if ( (all_search) && (a_ctr>ntop_search) ) |
1676 |
{ |
1694 |
{ |
1677 |
if (all_search_page(a_ctr, t_val)) |
1695 |
if (all_search_page(cnt, t_val)) |
1678 |
{ |
1696 |
{ |
1679 |
fprintf(out_fp,"<TR BGCOLOR=\"%s\">",GRPCOLOR); |
1697 |
fprintf(out_fp,"<TR BGCOLOR=\"%s\">",GRPCOLOR); |
1680 |
fprintf(out_fp,"<TD COLSPAN=4 ALIGN=\"center\">\n"); |
1698 |
fprintf(out_fp,"<TD COLSPAN=4 ALIGN=\"center\">\n"); |
Lines 1687-1692
Link Here
|
1687 |
fprintf(out_fp,"</TABLE>\n<P>\n"); |
1705 |
fprintf(out_fp,"</TABLE>\n<P>\n"); |
1688 |
} |
1706 |
} |
1689 |
|
1707 |
|
|
|
1708 |
/***********************************************/ |
1709 |
/* TOP_SEARCHSITE_TABLE - generate top n table */ |
1710 |
/***********************************************/ |
1711 |
|
1712 |
void top_searchsite_table() |
1713 |
{ |
1714 |
u_long cnt,t_val=0, tot_num; |
1715 |
int i; |
1716 |
SNODEPTR sptr, *pointer; |
1717 |
|
1718 |
if ( (t_ref==0)||(a_ctr==0)) return; /* don't bother if none to do */ |
1719 |
|
1720 |
cnt=a_ctr; pointer=s_array; |
1721 |
tot_num=0; |
1722 |
while(cnt--) |
1723 |
{ |
1724 |
if(strlen((char *)((SNODEPTR)(*pointer)->string))) |
1725 |
{ |
1726 |
pointer++; continue; |
1727 |
} |
1728 |
t_val+=(u_long)((SNODEPTR)(*pointer)->count); |
1729 |
tot_num++; |
1730 |
pointer++; |
1731 |
} |
1732 |
|
1733 |
cnt=tot_num; |
1734 |
if ( tot_num > ntop_searchsite) tot_num=ntop_searchsite; |
1735 |
|
1736 |
fprintf(out_fp,"<A NAME=\"TOPSEARCHSITE\"></A>\n"); |
1737 |
fprintf(out_fp,"<TABLE WIDTH=510 BORDER=2 CELLSPACING=1 CELLPADDING=1>\n"); |
1738 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1739 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=CENTER COLSPAN=4>" \ |
1740 |
"%s %lu %s %lu %s</TH></TR>\n", |
1741 |
GREY, msg_top_top, tot_num, msg_top_of, cnt, msg_top_srs); |
1742 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1743 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1744 |
"<FONT SIZE=\"-1\">#</FONT></TH>\n", |
1745 |
GREY); |
1746 |
fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=center COLSPAN=2>" \ |
1747 |
"<FONT SIZE=\"-1\">%s</FONT></TH>\n", |
1748 |
DKGREEN,msg_h_hits); |
1749 |
fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1750 |
"<FONT SIZE=\"-1\">%s</FONT></TH></TR>\n", |
1751 |
CYAN,msg_h_seasit); |
1752 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1753 |
|
1754 |
pointer=s_array; i=0; |
1755 |
while(tot_num) |
1756 |
{ |
1757 |
sptr=*pointer++; |
1758 |
if(strlen(sptr->string)) continue; |
1759 |
fprintf(out_fp, |
1760 |
"<TR>\n" \ |
1761 |
"<TD ALIGN=center><FONT SIZE=\"-1\"><B>%d</B></FONT></TD>\n" \ |
1762 |
"<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ |
1763 |
"<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ |
1764 |
"<TD ALIGN=left NOWRAP><FONT SIZE=\"-1\">", |
1765 |
i+1,sptr->count, |
1766 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0); |
1767 |
fprintf(out_fp,"%s</FONT></TD></TR>\n",sptr->site); |
1768 |
tot_num--; |
1769 |
i++; |
1770 |
} |
1771 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1772 |
if ( (all_searchsites) && (cnt>ntop_searchsite) ) |
1773 |
{ |
1774 |
if (all_searchsite_page(a_ctr, t_val)) |
1775 |
{ |
1776 |
fprintf(out_fp,"<TR BGCOLOR=\"%s\">",GRPCOLOR); |
1777 |
fprintf(out_fp,"<TD COLSPAN=4 ALIGN=\"center\">\n"); |
1778 |
fprintf(out_fp,"<FONT SIZE=\"-1\">"); |
1779 |
fprintf(out_fp,"<A HREF=\"./searchsite_%04d%02d.%s\">", |
1780 |
cur_year,cur_month,html_ext); |
1781 |
fprintf(out_fp,"%s</A></TD></TR>\n",msg_v_seasit); |
1782 |
} |
1783 |
} |
1784 |
fprintf(out_fp,"</TABLE>\n<P>\n"); |
1785 |
} |
1786 |
|
1787 |
/***********************************************/ |
1788 |
/* TOP_SEARCHBOTH_TABLE - generate top n table */ |
1789 |
/***********************************************/ |
1790 |
|
1791 |
void top_searchboth_table() |
1792 |
{ |
1793 |
u_long cnt,t_val=0, tot_num; |
1794 |
int i; |
1795 |
SNODEPTR sptr, *pointer; |
1796 |
|
1797 |
if ( (t_ref==0)||(a_ctr==0)) return; /* don't bother if none to do */ |
1798 |
|
1799 |
cnt=a_ctr; pointer=s_array; |
1800 |
tot_num=0; |
1801 |
while(cnt--) |
1802 |
{ |
1803 |
if(!strlen((char *)((SNODEPTR)(*pointer)->string))||!strlen((char *)((SNODEPTR)(*pointer)->site))) |
1804 |
{ |
1805 |
pointer++; continue; |
1806 |
} |
1807 |
t_val+=(u_long)((SNODEPTR)(*pointer)->count); |
1808 |
tot_num++; |
1809 |
pointer++; |
1810 |
} |
1811 |
|
1812 |
cnt=tot_num; |
1813 |
if ( tot_num > ntop_searchboth) tot_num=ntop_searchboth; |
1814 |
|
1815 |
fprintf(out_fp,"<A NAME=\"TOPSEARCHBOTH\"></A>\n"); |
1816 |
fprintf(out_fp,"<TABLE WIDTH=510 BORDER=2 CELLSPACING=1 CELLPADDING=1>\n"); |
1817 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1818 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=CENTER COLSPAN=4>" \ |
1819 |
"%s %lu %s %lu %s</TH></TR>\n", |
1820 |
GREY, msg_top_top, tot_num, msg_top_of, cnt, msg_top_srb); |
1821 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1822 |
fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1823 |
"<FONT SIZE=\"-1\">#</FONT></TH>\n", |
1824 |
GREY); |
1825 |
fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=center COLSPAN=2>" \ |
1826 |
"<FONT SIZE=\"-1\">%s</FONT></TH>\n", |
1827 |
DKGREEN,msg_h_hits); |
1828 |
fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=center>" \ |
1829 |
"<FONT SIZE=\"-1\">%s</FONT></TH></TR>\n", |
1830 |
CYAN,msg_h_seabot); |
1831 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1832 |
|
1833 |
pointer=s_array; i=0; |
1834 |
while(tot_num) |
1835 |
{ |
1836 |
sptr=*pointer++; |
1837 |
if(!strlen(sptr->string) || !strlen(sptr->site)) continue; |
1838 |
fprintf(out_fp, |
1839 |
"<TR>\n" \ |
1840 |
"<TD ALIGN=center><FONT SIZE=\"-1\"><B>%d</B></FONT></TD>\n" \ |
1841 |
"<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ |
1842 |
"<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ |
1843 |
"<TD ALIGN=left NOWRAP><FONT SIZE=\"-1\">", |
1844 |
i+1,sptr->count, |
1845 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0); |
1846 |
fprintf(out_fp,"%s -> %s</FONT></TD></TR>\n",sptr->site,sptr->string); |
1847 |
tot_num--; |
1848 |
i++; |
1849 |
} |
1850 |
fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); |
1851 |
if ( (all_searchboth) && (cnt>ntop_searchboth) ) |
1852 |
{ |
1853 |
if (all_searchboth_page(a_ctr, t_val)) |
1854 |
{ |
1855 |
fprintf(out_fp,"<TR BGCOLOR=\"%s\">",GRPCOLOR); |
1856 |
fprintf(out_fp,"<TD COLSPAN=4 ALIGN=\"center\">\n"); |
1857 |
fprintf(out_fp,"<FONT SIZE=\"-1\">"); |
1858 |
fprintf(out_fp,"<A HREF=\"./searchboth_%04d%02d.%s\">", |
1859 |
cur_year,cur_month,html_ext); |
1860 |
fprintf(out_fp,"%s</A></TD></TR>\n",msg_v_seabot); |
1861 |
} |
1862 |
} |
1863 |
fprintf(out_fp,"</TABLE>\n<P>\n"); |
1864 |
} |
1865 |
|
1690 |
/*********************************************/ |
1866 |
/*********************************************/ |
1691 |
/* ALL_SEARCH_PAGE - HTML for search strings */ |
1867 |
/* ALL_SEARCH_PAGE - HTML for search strings */ |
1692 |
/*********************************************/ |
1868 |
/*********************************************/ |
Lines 1717-1722
Link Here
|
1717 |
while(tot_num) |
1893 |
while(tot_num) |
1718 |
{ |
1894 |
{ |
1719 |
sptr=*pointer++; |
1895 |
sptr=*pointer++; |
|
|
1896 |
if(strlen(sptr->site)) continue; |
1897 |
fprintf(out_fp,"%-8lu %6.02f%% %s\n", |
1898 |
sptr->count, |
1899 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0, |
1900 |
sptr->string); |
1901 |
tot_num--; |
1902 |
} |
1903 |
fprintf(out_fp,"</PRE></FONT>\n"); |
1904 |
write_html_tail(out_fp); |
1905 |
fclose(out_fp); |
1906 |
return 1; |
1907 |
} |
1908 |
|
1909 |
/*************************************************/ |
1910 |
/* ALL_SEARCHSITE_PAGE - HTML for search strings */ |
1911 |
/*************************************************/ |
1912 |
|
1913 |
int all_searchsite_page(u_long tot_num, u_long t_val) |
1914 |
{ |
1915 |
SNODEPTR sptr, *pointer; |
1916 |
char search_fname[256], buffer[256]; |
1917 |
FILE *out_fp; |
1918 |
|
1919 |
if (!tot_num) return 0; |
1920 |
|
1921 |
/* generate file name */ |
1922 |
sprintf(search_fname,"searchsite_%04d%02d.%s",cur_year,cur_month,html_ext); |
1923 |
|
1924 |
/* open file */ |
1925 |
if ( (out_fp=open_out_file(search_fname))==NULL ) return 0; |
1926 |
|
1927 |
sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_seasit); |
1928 |
write_html_head(buffer, out_fp); |
1929 |
|
1930 |
fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n"); |
1931 |
|
1932 |
fprintf(out_fp," %12s %s\n",msg_h_hits,msg_h_seasit); |
1933 |
fprintf(out_fp,"---------------- ----------------------\n\n"); |
1934 |
|
1935 |
pointer=s_array; |
1936 |
while(tot_num) |
1937 |
{ |
1938 |
sptr=*pointer++; |
1939 |
if(strlen(sptr->string)) continue; |
1940 |
fprintf(out_fp,"%-8lu %6.02f%% %s\n", |
1941 |
sptr->count, |
1942 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0, |
1943 |
sptr->string); |
1944 |
tot_num--; |
1945 |
} |
1946 |
fprintf(out_fp,"</PRE></FONT>\n"); |
1947 |
write_html_tail(out_fp); |
1948 |
fclose(out_fp); |
1949 |
return 1; |
1950 |
} |
1951 |
|
1952 |
|
1953 |
/*************************************************/ |
1954 |
/* ALL_SEARCHSITE_PAGE - HTML for search strings */ |
1955 |
/*************************************************/ |
1956 |
|
1957 |
int all_searchboth_page(u_long tot_num, u_long t_val) |
1958 |
{ |
1959 |
SNODEPTR sptr, *pointer; |
1960 |
char search_fname[256], buffer[256]; |
1961 |
FILE *out_fp; |
1962 |
|
1963 |
if (!tot_num) return 0; |
1964 |
|
1965 |
/* generate file name */ |
1966 |
sprintf(search_fname,"searchsite_%04d%02d.%s",cur_year,cur_month,html_ext); |
1967 |
|
1968 |
/* open file */ |
1969 |
if ( (out_fp=open_out_file(search_fname))==NULL ) return 0; |
1970 |
|
1971 |
sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_seabot); |
1972 |
write_html_head(buffer, out_fp); |
1973 |
|
1974 |
fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n"); |
1975 |
|
1976 |
fprintf(out_fp," %12s %s\n",msg_h_hits,msg_h_seabot); |
1977 |
fprintf(out_fp,"---------------- ----------------------\n\n"); |
1978 |
|
1979 |
pointer=s_array; |
1980 |
while(tot_num) |
1981 |
{ |
1982 |
sptr=*pointer++; |
1983 |
if(!strlen(sptr->string) || !strlen(sptr->site)) continue; |
1720 |
fprintf(out_fp,"%-8lu %6.02f%% %s\n", |
1984 |
fprintf(out_fp,"%-8lu %6.02f%% %s\n", |
1721 |
sptr->count, |
1985 |
sptr->count, |
1722 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0, |
1986 |
(t_val==0)?0:((float)sptr->count/t_val)*100.0, |
Lines 2284-2290
Link Here
|
2284 |
while(cnt) |
2548 |
while(cnt) |
2285 |
{ |
2549 |
{ |
2286 |
sptr=*pointer++; |
2550 |
sptr=*pointer++; |
2287 |
fprintf(out_fp,"%lu\t%s\n",sptr->count,sptr->string); |
2551 |
if(!strlen(sptr->site) || !strlen(sptr->string)) continue; |
|
|
2552 |
fprintf(out_fp,"%lu\t%s\t%s\n",sptr->count,sptr->string,sptr->site); |
2288 |
cnt--; |
2553 |
cnt--; |
2289 |
} |
2554 |
} |
2290 |
fclose(out_fp); |
2555 |
fclose(out_fp); |