diff options
author | marck <marck@FreeBSD.org> | 2013-10-04 04:46:28 +0800 |
---|---|---|
committer | marck <marck@FreeBSD.org> | 2013-10-04 04:46:28 +0800 |
commit | a323c392db4d4bbf4299991dc50d9ab29c26388b (patch) | |
tree | 4ffe1093f8bc4bfce15d36f766a16c89ab88da4d /net-mgmt | |
parent | 8809f2d89ae7c989c86b36caad4808f17b97dd72 (diff) | |
download | freebsd-ports-gnome-a323c392db4d4bbf4299991dc50d9ab29c26388b.tar.gz freebsd-ports-gnome-a323c392db4d4bbf4299991dc50d9ab29c26388b.tar.zst freebsd-ports-gnome-a323c392db4d4bbf4299991dc50d9ab29c26388b.zip |
Chase last void functions used as int.
Enable STAGE support.
Tested @: ff, ref10-{i386,amd64}
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/ehnt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__display.c | 49 |
2 files changed, 38 insertions, 12 deletions
diff --git a/net-mgmt/ehnt/Makefile b/net-mgmt/ehnt/Makefile index e44c2cf43835..b71c06e2e1c5 100644 --- a/net-mgmt/ehnt/Makefile +++ b/net-mgmt/ehnt/Makefile @@ -19,7 +19,6 @@ PORTDOCS= README MAN1= ehnt.1 MAN8= ehntserv.8 -NO_STAGE= yes post-extract: ${TOUCH} ${WRKSRC}/asnc.txt diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c index fbe0d7b8a0ca..589de9de1828 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__display.c +++ b/net-mgmt/ehnt/files/patch-ehnt__display.c @@ -3,7 +3,7 @@ $FreeBSD$ --- ehnt_display.c.orig +++ ehnt_display.c -@@ -22,10 +22,10 @@ +@@ -22,15 +22,16 @@ #include "config.h" #include "ehnt.h" @@ -16,9 +16,18 @@ $FreeBSD$ +void ShowTopUdpPort (double a[],char t[], int, double); +void ShowTopTcpPort (double a[],char t[], int, double); double GetTop (double a[], char t[]); - int ShowValue(char *, int, double, int, double); - int ShowReport(struct ehnt_stats *, struct ehnt_struct *); -@@ -110,7 +110,9 @@ +-int ShowValue(char *, int, double, int, double); +-int ShowReport(struct ehnt_stats *, struct ehnt_struct *); ++void ShowValue(char *, int, double, int, double); ++void ShowReport(struct ehnt_stats *, struct ehnt_struct *); ++void ShowReportTimeHeader(struct ehnt_stats *); + +-int ShowReport(struct ehnt_stats * stats, struct ehnt_struct * my_ehnt_struct) { ++void ShowReport(struct ehnt_stats * stats, struct ehnt_struct * my_ehnt_struct) { + struct ehnt_config * e_cfg=my_ehnt_struct->cfg; + struct ehnt_filter * e_flt=my_ehnt_struct->flt; + int report_inout=0; +@@ -110,7 +111,9 @@ ShowReportTimeHeader(stats); if ( ! report_inout ) { @@ -29,7 +38,7 @@ $FreeBSD$ if ( e_cfg->topmode != ETM_PROTO ) { printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); } -@@ -151,8 +153,9 @@ +@@ -151,8 +154,9 @@ printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); } printf("%s",header); @@ -41,7 +50,7 @@ $FreeBSD$ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2 + 1; i++) { printf("%2d:",i); -@@ -183,8 +186,9 @@ +@@ -183,8 +187,9 @@ } printf("\n"); } @@ -53,7 +62,7 @@ $FreeBSD$ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2; i++) { printf("%2d:",i); switch (e_cfg->topmode) { -@@ -246,7 +250,7 @@ +@@ -246,7 +251,7 @@ static char str[100]; @@ -62,7 +71,7 @@ $FreeBSD$ if (bytes < 1024) sprintf(str,"%4d", bytes); else if (bytes < (1024*1024)) sprintf(str,"%4dK",(bytes/1024)); -@@ -258,7 +262,7 @@ +@@ -258,7 +263,7 @@ return str; } @@ -71,7 +80,7 @@ $FreeBSD$ int i=-1,maxi=0; struct protoent *p; -@@ -269,7 +273,7 @@ +@@ -269,7 +274,7 @@ ShowValue(ASN_Lookup(maxi),maxi,a[maxi],interval,total); } @@ -80,7 +89,7 @@ $FreeBSD$ int i=-1,maxi=0; struct protoent *p; -@@ -285,7 +289,7 @@ +@@ -285,7 +290,7 @@ } } @@ -89,7 +98,7 @@ $FreeBSD$ int i=-1,maxi=0; struct servent *s; -@@ -301,7 +305,7 @@ +@@ -301,7 +306,7 @@ } } @@ -98,3 +107,21 @@ $FreeBSD$ int i=-1,maxi=0; struct servent *s; +@@ -336,7 +341,7 @@ + return maxi; + } + +-int ShowValue(char * name,int maxi, double val, int interval, double total) { ++void ShowValue(char * name,int maxi, double val, int interval, double total) { + float percent; + + if (maxi >= 0) percent=((val/total)*100); +@@ -351,7 +356,7 @@ + } + } + +-int ShowReportTimeHeader(struct ehnt_stats * stats) { ++void ShowReportTimeHeader(struct ehnt_stats * stats) { + struct tm *tmp_tm; + int in,h,m,s; + char * timestr; |