Re: NEW: visitors

2006-10-19 Thread Okan Demirmen
On Thu 2006.10.19 at 07:37 +0900, Mathieu Sauve-Frankel wrote:
> > Cool toy but I had segmentation faults on 3.9 i386. After correcting the 
> > booboo all is fine.
> 
> here's a revised port. without the graphviz dependency and the old patch.

i prefer the manpage over the html doc...

another question, why remove -g and strip? why not just one over the
other? i'm merely curious.

diff -u -r visitors.orig/Makefile visitors/Makefile
--- visitors.orig/Makefile  Wed Oct 18 18:31:41 2006
+++ visitors/Makefile   Thu Oct 19 10:28:02 2006
@@ -24,6 +24,7 @@
 do-install:
@strip  ${WRKSRC}/visitors
${INSTALL_PROGRAM} ${WRKSRC}/visitors   ${PREFIX}/bin/
+   ${INSTALL_MAN} ${WRKSRC}/visitors.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/visitors
${INSTALL_DATA} ${WRKSRC}/doc.html ${PREFIX}/share/doc/visitors/
 
diff -u -r visitors.orig/pkg/PLIST visitors/pkg/PLIST
--- visitors.orig/pkg/PLIST Wed Jan  4 09:43:13 2006
+++ visitors/pkg/PLIST  Thu Oct 19 10:28:28 2006
@@ -1,4 +1,5 @@
 @comment $OpenBSD$
 bin/visitors
[EMAIL PROTECTED] man/man1/visitors.1
 share/doc/visitors/
 share/doc/visitors/doc.html



Re: NEW: visitors

2006-10-19 Thread patrick ~
OK, I'm not a lawyer, but the following snippet
of code from visitors' source makes it sound
like it is re-licensing BSD code.  The part that
reads: "Originally under the BSD license."

Is this right?  Or am I misreading something? I
thought only the copyright owner may change the
terms of the license (again, I am not a lawyer).
And I'm not trying to start any sort of trouble
here.  I am actually interested in using this
software.


Reference from: http://www.hping.org/visitors/source.html#file7
Module: visitors.c 7/7
About 10 pages (depending on your window size)
from anchor.



/* Note: the following function strlcat and strlcpy are (possibly) modified
 * version of OpenBSD's functions. Original copyright notice:
 * Copyright (c) 1998 Todd C. Miller <[EMAIL PROTECTED]>
 * Originally under the BSD license. */
int vi_strlcpy(char *dst, char *src, int siz)
{
char *d = dst;
const char *s = src;
int n = siz;

/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
do {
if ((*d++ = *s++) == 0)
break;
} while (--n != 0);
}
/* Not enough room in dst, add NUL and traverse rest of src */
if (n == 0) {
if (siz != 0)
*d = '\0';  /* NUL-terminate dst */
while (*s++)
;
}
return(s - src - 1);/* count does not include NUL */
}

int vi_strlcat(char *dst, const char *src, int siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
size_t dlen;

/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
n = siz - dlen;

if (n == 0)
return(dlen + strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';

return(dlen + (s - src));   /* count does not include NUL */
}











--- Mathieu Sauve-Frankel <[EMAIL PROTECTED]> wrote:

> > Cool toy but I had segmentation faults on 3.9 i386. After correcting the
> booboo all is fine.
> 
> here's a revised port. without the graphviz dependency and the old patch.
> 
> -- 
> Mathieu Sauve-Frankel
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Re: NEW: visitors

2006-10-18 Thread Mathieu Sauve-Frankel
> Cool toy but I had segmentation faults on 3.9 i386. After correcting the 
> booboo all is fine.

here's a revised port. without the graphviz dependency and the old patch.

-- 
Mathieu Sauve-Frankel


visitors.tgz
Description: application/tar-gz


Re: NEW: visitors

2006-10-18 Thread Hans Zimmerman
On Wed, 18 Oct 2006 17:33:07 +0900
Mathieu Sauve-Frankel <[EMAIL PROTECTED]> wrote:

> 
> yeah.. here's the tarball :-D
> 
> -- 
> Mathieu Sauve-Frankel
> 

Cool toy but I had segmentation faults on 3.9 i386. After correcting the booboo 
all is fine.

/tmp $ diff -ur www/visitors/ /usr/ports/www/visitors/
diff -ur www/visitors/patches/patch-visitors_c 
/usr/ports/www/visitors/patches/patch-visitors_c
--- www/visitors/patches/patch-visitors_c   Fri Jan  6 22:15:58 2006
+++ /usr/ports/www/visitors/patches/patch-visitors_cWed Oct 18 19:28:08 2006
@@ -1,16 +1,15 @@
-$OpenBSD$
 visitors.c.origWed Oct 26 07:07:25 2005
-+++ visitors.c Fri Jan  6 16:15:45 2006
-@@ -1083,7 +1083,7 @@ int vi_process_visitors_per_day(struct v
+--- visitors.c.origWed Oct 18 19:26:57 2006
 visitors.c Wed Oct 18 19:27:36 2006
+@@ -1257,7 +1257,7 @@
agent_len = strlen(agent);
date_len = strlen(date);
  h = djb_hash((unsigned char*) agent, agent_len);
 -sprintf(buf, "%lu", h);
-+sprintf(buf, sizeof(buf), "%lu", h);
++snprintf(buf, sizeof(buf), "%lu", h);
  hash_len = strlen(buf);
if (host_len+agent_len+date_len+4 > VI_LINE_MAX)
return 0;
-@@ -2094,7 +2094,7 @@ void vi_print_hours_report(FILE *fp, str
+@@ -2349,7 +2349,7 @@
Output->print_subtitle(fp, "Percentage of hits in every hour of the 
day");
for (i = 0; i < 24; i++) {
char buf[8];
Only in www/visitors/patches: patch-visitors_c.orig



Re: NEW: visitors

2006-10-18 Thread Mathieu Sauve-Frankel

yeah.. here's the tarball :-D

-- 
Mathieu Sauve-Frankel


visitors.tgz
Description: application/tar-gz


NEW: visitors

2006-10-17 Thread Mathieu Sauve-Frankel
Visitors is a very fast web log analyzer for Linux, Windows, and other
Unix-like operating systems. It takes as input a web server log file,
and outputs statistics in form of different reports. 

I've been using this for forever on sparc64 and i386

please test and comment.

-- 
Mathieu Sauve-Frankel