summaryrefslogtreecommitdiffstats
path: root/deskutils/gnotime/files/patch-src::idle-dialog.c
blob: 0e271a9f67e6047950a3fe36305ed6e894debd03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- src/idle-dialog.c.orig  Thu Jul  8 00:17:13 2004
+++ src/idle-dialog.c   Thu Jul  8 00:18:46 2004
@@ -111,12 +111,14 @@
 {
    char * p;
    char * ret;
+   int ampcnt = 0;
+   int 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 +126,12 @@
    }
    
    /* 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);
@@ -158,6 +160,8 @@
    char * msg;
    time_t now = time(0);
    time_t idle_time;
+   char *ptitle;
+   char *pdesc;
    
    /* Set a value for the thingy under the slider */
    if (3600 > credit)
@@ -201,9 +205,9 @@
    /* 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)
    {