View | Details | Raw Unified | Return to bug 170158 | Differences between
and this patch

Collapse All | Expand All

(-)misc/pinfo/Makefile (-16 / +31 lines)
Lines 1-34 Link Here
1
# New ports collection makefile for:	pinfo
1
# Created by: Thomas Gellekum <tg@FreeBSD.org>
2
# Date created:		19 May 1999
3
# Whom:			Thomas Gellekum <tg@FreeBSD.org>
4
#
5
# $FreeBSD: ports/misc/pinfo/Makefile,v 1.40 2011/09/23 22:24:10 amdmi3 Exp $
2
# $FreeBSD: ports/misc/pinfo/Makefile,v 1.40 2011/09/23 22:24:10 amdmi3 Exp $
6
#
7
3
8
PORTNAME=	pinfo
4
PORTNAME=	pinfo
9
PORTVERSION=	0.6.9
5
PORTVERSION=	0.6.10
10
PORTREVISION=	4
11
CATEGORIES=	misc
6
CATEGORIES=	misc
12
MASTER_SITES=	http://alioth.debian.org/frs/download.php/1502/
7
MASTER_SITES=	http://alioth.debian.org/frs/download.php/3351/
13
8
14
MAINTAINER=	ports@FreeBSD.org
9
MAINTAINER=	ports@FreeBSD.org
15
COMMENT=	Ncurses based, lynx style info documentation browser
10
COMMENT=	Ncurses based, lynx style info documentation browser
16
11
17
GNU_CONFIGURE=	yes
12
LICENSE=	GPLv2
13
14
OPTIONS_DEFINE=	READLINE
15
OPTIONS_DEFAULT=READLINE
16
READLINE_DESC=	Enable readline support
17
18
USE_BZIP2=	yes
19
USE_NCURSES=	yes
20
USE_GETTEXT=	yes
21
USE_AUTOTOOLS=	libtoolize aclocal autoheader automake autoconf
22
LIBTOOLIZE_ARGS=--force
23
ACLOCAL_ARGS=	-I macros
24
AUTOMAKE_ARGS=	--add-missing --force-missing
25
CONFIGURE_ARGS=	--with-localedir=${PREFIX}/share/locale
26
MAKE_JOBS_SAFE=	yes
27
18
CPPFLAGS+=	-I${LOCALBASE}/include
28
CPPFLAGS+=	-I${LOCALBASE}/include
19
LDFLAGS+=	-L${LOCALBASE}/lib
29
LDFLAGS+=	-L${LOCALBASE}/lib
20
CONFIGURE_ARGS=	--with-readline \
21
		--with-localedir=${PREFIX}/share/locale
22
30
23
MAN1=		pinfo.1
31
MAN1=		pinfo.1
24
INFO=		pinfo
32
INFO=		pinfo
33
PLIST_FILES=	bin/pinfo etc/pinforc
34
.for lang in cs de eu ja nl pl pt_BR ro ru sv vi
35
PLIST_FILES+=	share/locale/${lang}/LC_MESSAGES/pinfo.mo
36
.endfor
25
37
26
.if defined(WITHOUT_NLS)
38
.include <bsd.port.options.mk>
27
CONFIGURE_ARGS+=	--disable-nls
39
28
PLIST_SUB+=	NLS="@comment "
40
.if ${PORT_OPTIONS:MREADLINE}
41
USE_READLINE=	yes
29
.else
42
.else
30
USE_GETTEXT=	yes
43
CONFIGURE_ARGS+=--without-readline
31
PLIST_SUB+=	NLS=""
32
.endif
44
.endif
33
45
46
pre-configure:
47
	@(cd ${WRKSRC} && ${LOCALBASE}/bin/autopoint)
48
34
.include <bsd.port.mk>
49
.include <bsd.port.mk>
(-)misc/pinfo/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (pinfo-0.6.9.tar.gz) = c25f08e115a5e796f40838a28d0e9816c755f4cb9e7bcc77f6d4c9ddaf0a1651
1
SHA256 (pinfo-0.6.10.tar.bz2) = 122180a0c23d11bc9eb569a4de3ff97d3052af96e32466fa62f2daf46ff61c5d
2
SIZE (pinfo-0.6.9.tar.gz) = 554213
2
SIZE (pinfo-0.6.10.tar.bz2) = 133059
(-)misc/pinfo/files/patch-src__filehandling_functions.c (-34 lines)
Lines 1-34 Link Here
1
--- src/filehandling_functions.c.orig	Fri Mar 17 00:15:02 2006
2
+++ src/filehandling_functions.c	Fri Mar 17 15:57:06 2006
3
@@ -139,14 +139,13 @@
4
 	char name[256];
5
 	char file[256];
6
 	int i;
7
+	char *nameend, *filestart, *fileend, *dot;
8
 	
9
 	id = opendirfile(0);
10
 	if (!id)
11
 		return 0;
12
 	
13
 	read_item(id, type, message, lines);
14
-
15
-	char *nameend, *filestart, *fileend, *dot;
16
 	
17
 	/* search for node-links in every line */
18
 	for (i = 1; i < Lines; i++)
19
@@ -163,6 +162,7 @@
20
 
21
 			/* skip this hit if it is not a perfect match and 
22
 			 * we have already found a previous partial match */
23
+			char *tmp = name;
24
 			if ( ! ( (nameend - Message[i]) - 2 == filenamelen ) 
25
 					&&	goodHit )
26
 			{
27
@@ -170,7 +170,6 @@
28
 			}
29
 
30
 			/* find the name of the node link */
31
-			char *tmp = name;
32
 			strncpy(file, filestart + 1, fileend - filestart - 1);
33
 			file[fileend - filestart - 1] = 0;
34
 			strncpy(name, fileend + 1, dot - fileend - 1);
(-)misc/pinfo/files/patch-src__manual.c (-20 lines)
Lines 1-20 Link Here
1
--- src/manual.c.orig	Thu Mar 16 23:14:30 2006
2
+++ src/manual.c	Fri Mar 17 16:00:02 2006
3
@@ -797,7 +797,7 @@
4
 				if ((!strchr(p_t1, '(')) &&(!is_in_manlinks(manlinks, p_t1)))
5
 				{
6
 					char tempchar;
7
-					int breakpos;
8
+					int breakpos, cols_before_link;
9
 					i = mylink - tmp - 1;
10
 					if (i < 0)
11
 						i++;
12
@@ -830,7 +830,7 @@
13
 					 */
14
 
15
 					/* calculate the number of columns in front of the link */
16
-					int cols_before_link = width_of_string(tmp, i-1);
17
+					cols_before_link = width_of_string(tmp, i-1);
18
 
19
 					/* a small check */
20
 					if (!((use_apropos) &&(manualhistorylength == 0)))
(-)misc/pinfo/files/patch-src__utils.c (-76 lines)
Lines 1-76 Link Here
1
--- src/utils.c.orig	Thu Mar 16 23:14:30 2006
2
+++ src/utils.c	Fri Mar 17 16:04:57 2006
3
@@ -553,6 +553,10 @@
4
 int
5
 check_node_name( const char * const node_name, const char * const node_header)
6
 {
7
+	size_t header_len;
8
+	char *header, *str_start, *c;
9
+	int res;
10
+
11
 	/* if either one of node_name or node_header is NULL or a zero 
12
 	 * sized string, we have nothing to check, so return success */
13
 	if ( (node_name==NULL) || (node_header==NULL) 
14
@@ -561,15 +565,15 @@
15
 		return 1;
16
 	}
17
 
18
-	size_t header_len = strlen(node_header);
19
+	header_len = strlen(node_header);
20
 	
21
 	/* copy node_header to a local string which can be mutilated */
22
 	/* don't use strdup here, as xmalloc handles all errors */
23
-	char *header = xmalloc( header_len + 1 );
24
+	header = xmalloc( header_len + 1 );
25
 	strcpy(header, node_header);
26
 
27
 	/* search for "Node: foobar," in node_header */
28
-	char *str_start = strstr(header, "Node: ");
29
+	str_start = strstr(header, "Node: ");
30
 	if (str_start==NULL) /* no match */
31
 	{
32
 		return 0;
33
@@ -577,14 +581,14 @@
34
 	/* advance str_start to the start of the node name */
35
 	str_start += strlen("Node: ");
36
 	/* and search for the next comma, tab, or newline */
37
-	char *c = str_start;
38
+	c = str_start;
39
 	while ( (*c!=',') && (*c!='\t') && (*c!='\n') && (*c!='\0') ) c++;
40
 	*c = '\0';
41
 	
42
 	/* so, now str_start point to a \0-terminated string containing the 
43
 	 * node name from the header.
44
 	 * Let's compare it with the node_name we're looking for */
45
-	int res = strcmp(str_start, node_name);
46
+	res = strcmp(str_start, node_name);
47
 
48
 	/* we're done, so free alloc'ed vars */
49
 	xfree(header);
50
@@ -637,20 +641,22 @@
51
 int
52
 width_of_string( const char * const mbs, const int len)
53
 {
54
+	int width;
55
+	char *str;
56
+	wchar_t *wstr;
57
+
58
 	if (len<0) return -1;
59
 	if (len==0) return 0;
60
 
61
-	int width;
62
-
63
 	/* copy the string to a local buffer, because we only want to 
64
 	 * compare the first len bytes */
65
-	char *str = xmalloc(len+1);
66
+	str = xmalloc(len+1);
67
 	memcpy(str, mbs, len);
68
 	
69
 #ifdef USE_WCHAR
70
 
71
 	/* allocate a widestring */
72
-	wchar_t *wstr = xmalloc( (len+1)*sizeof(wchar_t) );
73
+	wstr = xmalloc( (len+1)*sizeof(wchar_t) );
74
 	
75
 	mbstowcs(wstr, str, len);
76
 	width = wcswidth(wstr, len);
(-)misc/pinfo/files/patch-src__video.c (-58 lines)
Lines 1-58 Link Here
1
--- src/video.c.orig	Thu Mar 16 06:54:56 2006
2
+++ src/video.c	Fri Mar 17 16:08:37 2006
3
@@ -88,9 +88,11 @@
4
 	attrset(normal);
5
 	for (i = pos;(i < lines) &&(i < pos + maxy - 2); i++)
6
 	{
7
+		int tmp;
8
+
9
 		if (!message[i]) continue;
10
 
11
-		int tmp = strlen(message[i]) - 1;
12
+		tmp = strlen(message[i]) - 1;
13
 		message[i][tmp] = 0;
14
 		if (tmp>column)
15
 			mvaddstr(i + 1 - pos, 0, message[i]+column);
16
@@ -263,12 +265,14 @@
17
 	{
18
 		regmatch_t pmatch[1];
19
 		long maxpos = pos +(maxy - 2);
20
+		int maxregexp;
21
+
22
 		if (maxpos > lines)
23
 		{
24
 			maxpos = lines;
25
 		}
26
 
27
-		int maxregexp = aftersearch ? h_regexp_num + 1 : h_regexp_num;
28
+		maxregexp = aftersearch ? h_regexp_num + 1 : h_regexp_num;
29
 		/*
30
 		 * if it is after search, then we have user defined regexps+
31
 		 * a searched regexp to highlight
32
@@ -285,19 +289,22 @@
33
 				/* check if this regexp is present on this line */
34
 				while (!regexec(&h_regexp[j], str, 1, pmatch, 0))
35
 				{
36
+					int n, x, y;
37
+					char tmp;
38
+
39
 					/* yes, found something, so highlight it */
40
-					int n = pmatch[0].rm_eo - pmatch[0].rm_so;
41
+					n = pmatch[0].rm_eo - pmatch[0].rm_so;
42
 
43
 					/* point str at start of match */
44
 					str += pmatch[0].rm_so;
45
 
46
 					/* calculate position on screen */
47
-					int x = calculate_len(message[i], str);
48
-					int y = i - pos + 1;
49
+					x = calculate_len(message[i], str);
50
+					y = i - pos + 1;
51
 
52
 					/* save the char after the end of the match, 
53
 					 * and replace it by \0 */
54
-					char tmp = str[n];
55
+					tmp = str[n];
56
 					str[n] = 0;
57
 					
58
 					/* write out the highlighted match to screen */
(-)misc/pinfo/pkg-plist (-13 lines)
Lines 1-13 Link Here
1
bin/pinfo
2
etc/pinforc
3
%%NLS%%share/locale/cs/LC_MESSAGES/pinfo.mo
4
%%NLS%%share/locale/de/LC_MESSAGES/pinfo.mo
5
%%NLS%%share/locale/eu/LC_MESSAGES/pinfo.mo
6
%%NLS%%share/locale/ja/LC_MESSAGES/pinfo.mo
7
%%NLS%%share/locale/nl/LC_MESSAGES/pinfo.mo
8
%%NLS%%share/locale/pl/LC_MESSAGES/pinfo.mo
9
%%NLS%%share/locale/pt_BR/LC_MESSAGES/pinfo.mo
10
%%NLS%%share/locale/ro/LC_MESSAGES/pinfo.mo
11
%%NLS%%share/locale/ru/LC_MESSAGES/pinfo.mo
12
%%NLS%%share/locale/sv/LC_MESSAGES/pinfo.mo
13
%%NLS%%share/locale/vi/LC_MESSAGES/pinfo.mo

Return to bug 170158