patch-window_c 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- screen-4.0.3.orig/window.c 2003-12-05 14:45:41.000000000 +0100
  3. +++ screen-4.0.3/window.c 2008-10-08 14:08:40.000000000 +0200
  4. @@ -643,7 +643,7 @@ struct NewWindow *newwin;
  5. if (!nwin.aka)
  6. nwin.aka = Filename(nwin.args[0]);
  7. strncpy(p->w_akabuf, nwin.aka, sizeof(p->w_akabuf) - 1);
  8. - if ((nwin.aka = rindex(p->w_akabuf, '|')) != NULL)
  9. + if ((nwin.aka = strrchr(p->w_akabuf, '|')) != NULL)
  10. {
  11. p->w_autoaka = 0;
  12. *nwin.aka++ = 0;
  13. @@ -1356,9 +1356,9 @@ char **args, *ttyn;
  14. debug2("Makewindow %d with %s\n", win->w_number, tebuf);
  15. tl = strlen(win->w_term);
  16. NewEnv[1] = tebuf;
  17. - if ((s1 = index(NewEnv[2], '|')))
  18. + if ((s1 = strchr(NewEnv[2], '|')))
  19. {
  20. - if ((s2 = index(++s1, '|')))
  21. + if ((s2 = strchr(++s1, '|')))
  22. {
  23. if (strlen(NewEnv[2]) - (s2 - s1) + tl < 1024)
  24. {
  25. @@ -1396,7 +1396,7 @@ char *prog, **args, **env;
  26. char *shargs[MAXARGS + 1];
  27. register int i, eaccess = 0;
  28. - if (rindex(prog, '/'))
  29. + if (strrchr(prog, '/'))
  30. path = "";
  31. if (!path && !(path = getenv("PATH")))
  32. path = DefaultPath;