bug-global
[Top][All Lists]
Advanced

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

Re: [Feature request] global -Po


From: Shigio Yamaguchi
Subject: Re: [Feature request] global -Po
Date: Sun, 21 Dec 2003 19:34:02 +0900

Hello,
> I hope that the path which is not a source file is searched by "global -Po."

It's proper. I have made a patch for it.

By the way, I cannot commit this at once because cvs server is not recovered.
Thank you for your suggestion.

*** global.c.orig       Sun Dec 21 19:32:32 2003
--- global.c    Sun Dec 21 19:32:32 2003
***************
*** 460,465 ****
--- 460,466 ----
         * locate the path including the pattern in a source tree.
         */
        if (Pflag) {
+               chdir(root);
                pathlist(dbpath, av);
                exit(0);
        }
***************
*** 855,861 ****
        if (!(op = openfilter()))
                die("cannot open output filter.");
        count = 0;
!       for (gfind_open(dbpath, localprefix); (path = gfind_read()) != NULL; ) {
                /*
                 * skip localprefix because end-user doesn't see it.
                 */
--- 856,863 ----
        if (!(op = openfilter()))
                die("cannot open output filter.");
        count = 0;
!       for (vfind_open(localprefix, oflag); (p = vfind_read()) != NULL; ) {
!               path = (*p == ' ') ? ++p : p;
                /*
                 * skip localprefix because end-user doesn't see it.
                 */
***************
*** 872,878 ****
                }
                count++;
        }
!       gfind_close();
        closefilter(op);
        if (av)
                regfree(&preg);
--- 874,880 ----
                }
                count++;
        }
!       vfind_close();
        closefilter(op);
        if (av)
                regfree(&preg);
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

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