summaryrefslogtreecommitdiff
path: root/time/gnotime/patches/patch-at
diff options
context:
space:
mode:
Diffstat (limited to 'time/gnotime/patches/patch-at')
-rw-r--r--time/gnotime/patches/patch-at57
1 files changed, 57 insertions, 0 deletions
diff --git a/time/gnotime/patches/patch-at b/time/gnotime/patches/patch-at
new file mode 100644
index 00000000000..e110944e0a2
--- /dev/null
+++ b/time/gnotime/patches/patch-at
@@ -0,0 +1,57 @@
+$NetBSD: patch-at,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- src/idle-dialog.c.orig Sat May 8 18:14:49 2004
++++ src/idle-dialog.c Wed Mar 16 10:47:21 2005
+@@ -111,12 +111,13 @@ util_escape_html_markup (const char *str
+ {
+ char * p;
+ char * ret;
++ int ampcnt = 0, len;
++ const char *start;
+
+ p = strchr (str, '&');
+ if (!p) return g_strdup (str);
+
+ /* count number of ampersands */
+- int ampcnt = 0;
+ while (p)
+ {
+ ampcnt ++;
+@@ -124,12 +125,12 @@ util_escape_html_markup (const char *str
+ }
+
+ /* make room for the escapes */
+- int len = strlen(str);
++ len = strlen(str);
+ ret = g_new0 (char, len+4*ampcnt+1);
+
+ /* replace & by & unless its already & */
+ p = strchr (str, '&');
+- const char *start = str;
++ start = str;
+ while (p)
+ {
+ strncat (ret, start, p-start);
+@@ -155,7 +156,7 @@ display_value (GttIdleDialog *dlg, time_
+ {
+ char tbuff [30];
+ char mbuff [130];
+- char * msg;
++ char *msg, *ptitle, *pdesc;
+ time_t now = time(0);
+ time_t idle_time;
+
+@@ -201,9 +202,9 @@ display_value (GttIdleDialog *dlg, time_
+ /* Update the total elapsed time part of the message */
+ idle_time = now - dlg->last_activity;
+
+- char *ptitle = util_escape_html_markup (
++ ptitle = util_escape_html_markup (
+ gtt_project_get_title(dlg->prj));
+- char *pdesc = util_escape_html_markup (
++ pdesc = util_escape_html_markup (
+ gtt_project_get_desc(dlg->prj));
+ if (3600 > idle_time)
+ {