From vasallia@ukr.net  Sat Jun 19 09:59:58 2004
Return-Path: <vasallia@ukr.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AC7B916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 2004 09:59:58 +0000 (GMT)
Received: from mail-kv.alkar.net (mail-kv.alkar.net [195.248.176.165])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6930043D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 2004 09:59:58 +0000 (GMT)
	(envelope-from vasallia@ukr.net)
Received: from [212.86.241.204] (helo=santinel.home.ua)
	by mail-kv.alkar.net with esmtp (Exim 4.34 (FreeBSD))
	id 1BbcdT-00014Y-BQ
	for FreeBSD-gnats-submit@freebsd.org; Sat, 19 Jun 2004 12:59:45 +0300
Received: from anray by santinel.home.ua with local (Exim 4.34; FreeBSD)
	id 1Bbccy-000A5G-SR
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 2004 12:59:12 +0300
Message-Id: <E1Bbccy-000A5G-SR@santinel.home.ua>
Date: Sat, 19 Jun 2004 12:59:12 +0300
From: Andrey Slusar <vasallia@ukr.net>
Reply-To: Andrey Slusar <vasallia@ukr.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [MAINTAINER] comms/bforce-kst: add to nlookup supporting option -m
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68107
>Category:       ports
>Synopsis:       [MAINTAINER] comms/bforce-kst: add to nlookup supporting option -m
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 19 10:00:44 GMT 2004
>Closed-Date:    Sun Jun 20 07:19:50 GMT 2004
>Last-Modified:  Sun Jun 20 07:19:50 GMT 2004
>Originator:     Andrey Slusar
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Jun 18 00:59:25 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
	New patch files/patch-nlookup.c - supporting un-realized in original sources
	option -m - show sysop mail address
>How-To-Repeat:
	
>Fix:
	Update PORTREVISION to 2

--- bforce-kst.diff begins here ---
diff -ruN /usr/ports/comms/bforce-kst/files/patch-nlookup.c ./bforce-kst/files/patch-nlookup.c
--- /usr/ports/comms/bforce-kst/files/patch-nlookup.c	Thu Jan  1 03:00:00 1970
+++ ./bforce-kst/files/patch-nlookup.c	Sat Jun 19 07:07:51 2004
@@ -0,0 +1,48 @@
+--- bfutil/nlookup.c.orig	Thu Aug 30 16:33:51 2001
++++ bfutil/nlookup.c	Sat Jun 19 07:05:34 2004
+@@ -28,15 +28,34 @@
+ static void usage(void)
+ {
+ 	printf_usage("nodelist lookup utility",
+-		"usage: nlookup [-rh] <address>\n"
++		"usage: nlookup [-rmh] <address>\n"
+ 		"\n"
+ 		"options:\n"
+ 		"  -r                show nodelist string\n"
++		"  -m                show email address\n"
+ 		"  -h                show this help message\n"
+ 		"\n"
+ 	);
+ }
+ 
++void print_nodemail(const s_node *node)
++{
++	char abuf[BF_MAXADDRSTR+1];
++
++	if( node->sysop && *node->sysop && strcmp(node->sysop, "<none>") )
++	{
++		char username[BNI_MAXSYSOP+1];
++		
++		strnxcpy(username, node->sysop, sizeof(node->sysop));
++		string_replchar(username, ' ', '_');
++
++		printf("%s@%s.fidonet.org\n", username,
++			    ftn_addrstr_inet(abuf, node->addr));
++	}
++	
++	fflush(stdout);
++}
++
+ void print_nodeinfo(const s_node *node)
+ {
+ 	char abuf[BF_MAXADDRSTR+1];
+@@ -124,6 +143,9 @@
+ 	}
+ 	else if( nodelist_lookup(&node, addr) == 0 )
+ 	{
++	    if( emailaddr )
++		print_nodemail(&node);
++	    else
+ 		print_nodeinfo(&node);
+ 	}
+ 	
--- bforce-kst.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: krion 
State-Changed-When: Sun Jun 20 07:19:43 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68107 
>Unformatted:
