ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] new fdump structure may affect scripts


From: Bernhard R. Link
Subject: Re: [RP] new fdump structure may affect scripts
Date: Sun, 5 Dec 2004 13:52:47 +0100
User-agent: Mutt/1.3.28i

* jesus c. meyendriesch <address@hidden> [041202 22:06]:
> there is a problem in the frestore function. The cause seems to be
> strtok. strtok_r is probably better. Therefore is here a small patch for
> it:

This fixes also my problems with :undo. Without it only the first frame
is restored. Could this please be applied?

Hochachtungsvoll,
        Bernhard R. Link

for reference, the patch from jesus:
> 
> Index: actions.c
> ===================================================================
> RCS file: /cvsroot/ratpoison/ratpoison/src/actions.c,v
> retrieving revision 1.216
> diff -u -r1.216 actions.c
> --- actions.c 2 Dec 2004 00:22:39 -0000       1.216
> +++ actions.c 2 Dec 2004 20:34:40 -0000
> @@ -3771,6 +3771,7 @@
>    rp_window *win;
>    struct list_head fset;
>    int max = -1;
> +  char *nexttok;
>  
>    if (data == NULL)
>      {
> @@ -3781,7 +3782,7 @@
>    INIT_LIST_HEAD (&fset);
>  
>    dup = xstrdup (data);
> -  token = strtok (dup, ",");
> +  token = strtok_r (dup, ",", &nexttok);
>    if (token == NULL)
>      {
>        message (" frestore: invalid frame format ");
> @@ -3800,7 +3801,7 @@
>         return NULL;
>       }
>        list_add_tail (&new->node, &fset);
> -      token = strtok (NULL, ",");
> +      token = strtok_r (NULL, ",", &nexttok);
>      } 
>  
>    free (dup);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]