View | Details | Raw Unified | Return to bug 68633
Collapse All | Expand All

(-)misc/gregexp/Makefile (-6 / +4 lines)
Lines 9-15 Link Here
9
PORTNAME=	gregexp
9
PORTNAME=	gregexp
10
PORTVERSION=	0.3
10
PORTVERSION=	0.3
11
CATEGORIES=	misc
11
CATEGORIES=	misc
12
MASTER_SITES=	http://dentrassi.de/download/gregexp/${PORTVERSION}/
12
MASTER_SITES=	http://dentrassi.de/download/gregexp/%SUBDIR%/
13
MASTER_SITE_SUBDIR=	${PORTVERSION}
13
14
14
MAINTAINER=	ports@FreeBSD.org
15
MAINTAINER=	ports@FreeBSD.org
15
COMMENT=	A graphical regular expression explorer
16
COMMENT=	A graphical regular expression explorer
Lines 17-28 Link Here
17
LIB_DEPENDS=	pcre.0:${PORTSDIR}/devel/pcre
18
LIB_DEPENDS=	pcre.0:${PORTSDIR}/devel/pcre
18
19
19
USE_X_PREFIX=	yes
20
USE_X_PREFIX=	yes
20
USE_ICONV=	yes
21
USE_GNOME=	gnomeprefix libgnomeui
21
USE_GETTEXT=	yes
22
USE_GNOME=	gtk20 gnomeprefix libgnomeui
23
USE_GCC=	3.3
24
GNU_CONFIGURE=	yes
22
GNU_CONFIGURE=	yes
25
CONFIGURE_ENV=	CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" \
23
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
26
		LDFLAGS="-L${LOCALBASE}/lib"
24
		LDFLAGS="-L${LOCALBASE}/lib"
27
25
28
.include <bsd.port.mk>
26
.include <bsd.port.mk>
(-)misc/gregexp/files/patch-src::main.c (+120 lines)
Line 0 Link Here
1
--- src/main.c.orig	Wed Mar 10 17:35:40 2004
2
+++ src/main.c	Thu Jul  1 21:03:44 2004
3
@@ -107,16 +107,20 @@
4
 
5
 void set_escaped ( gchar * expression, unsigned int levels )
6
 {
7
+  unsigned int num;
8
+  gchar * escaped;
9
+  unsigned int x; // temp var
10
+  unsigned int i, j;
11
+
12
   if ( !expression )
13
     return;
14
 
15
-  unsigned int num = (1<<levels)-1;
16
-  gchar * escaped = g_malloc ( (strlen ( expression ) * (num+1) )+1 ); // worst case if each character would be escaped
17
+  num = (1<<levels)-1;
18
+  escaped = g_malloc ( (strlen ( expression ) * (num+1) )+1 ); // worst case if each character would be escaped
19
   escaped[0] = 0;
20
 
21
-  unsigned int x; // temp var
22
-  unsigned int i = 0;
23
-  unsigned int j = 0;
24
+  i = 0;
25
+  j = 0;
26
   while ( expression[i] )
27
     {
28
       switch ( expression[i] )
29
@@ -144,10 +148,12 @@
30
 
31
 void clear_result ()
32
 {
33
+  ResultItem * result;
34
+
35
   if ( !lastResult )
36
     return;
37
 
38
-  ResultItem * result = lastResult;
39
+  result = lastResult;
40
   while ( result->position >= 0 )
41
     {
42
       if ( result->value )
43
@@ -202,14 +208,16 @@
44
 ResultItem * transform ( int * ovector, unsigned int matches, const gchar * data )
45
 {
46
   ResultItem * resultItems;
47
+  int parent;
48
+  GTrashStack * stack;
49
+  unsigned int o;
50
 
51
   resultItems = g_malloc ( sizeof(ResultItem)*(matches+1) );
52
 
53
-  int parent = 0;
54
+  parent = 0;
55
 
56
-  GTrashStack * stack = NULL;
57
+  stack = NULL;
58
 
59
-  unsigned int o;
60
   for ( o = 0; o<matches; o++ )
61
     {
62
       int offset = ovector[o*2];
63
@@ -268,17 +276,18 @@
64
 {
65
   GtkTextIter iter;
66
   GtkTextBuffer * buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(resultEntry) );
67
+  gchar * result;
68
+  int o, j, i, x;
69
 
70
   gtk_text_buffer_set_text ( buffer, "", -1 );
71
 
72
   gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
73
 
74
-  gchar * result = g_malloc ( (strlen ( data ) + 128 ) * 2 );
75
+  result = g_malloc ( (strlen ( data ) + 128 ) * 2 );
76
 
77
-  int o;
78
-  int j = 0;
79
-  int i = 0;
80
-  int x = 0;
81
+  j = 0;
82
+  i = 0;
83
+  x = 0;
84
   while ( data[i] )
85
     {
86
       for ( o = 0; o<matches; o++ )
87
@@ -362,6 +371,8 @@
88
 
89
   int flags = PCRE_UTF8;
90
 
91
+  ResultItem * resultItems;
92
+
93
   if ( opt_multiline() )
94
     flags |= PCRE_MULTILINE;
95
 
96
@@ -403,7 +414,6 @@
97
 
98
   // Fill result tree
99
 
100
-  ResultItem * resultItems;
101
   resultItems = transform ( ovector, rc, data );
102
   update_model ( resultItems, resultTree );
103
 
104
@@ -441,14 +451,14 @@
105
   GtkTreeSelection * sel;
106
   GtkTreeModel * model;
107
   GtkTreeIter iter;
108
+  gint position;
109
+
110
   sel = gtk_tree_view_get_selection ( GTK_TREE_VIEW(resultTree) );
111
 
112
   if ( !gtk_tree_selection_get_selected ( sel, &model, &iter ) )
113
     {
114
       return;
115
     }
116
-
117
-  gint position;
118
 
119
   gtk_tree_model_get ( model, &iter, POSITION_COLUMN, &position, -1 );
120

Return to bug 68633