bug-global
[Top][All Lists]
Advanced

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

Re: [Global-commit] global/gtags gtags.c manual.in


From: Hideki IWAMOTO
Subject: Re: [Global-commit] global/gtags gtags.c manual.in
Date: Sat, 12 Sep 2009 11:43:03 +0900

Hi.

On Fri, 11 Sep 2009 05:49:04 +0000, Shigio YAMAGUCHI wrote...
> CVSROOT:      /sources/global
> Module name:  global
> Changes by:   Shigio YAMAGUCHI <shigio>       09/09/11 05:49:04
> 
> Modified files:
>       gtags          : gtags.c manual.in 
> 
> Log message:
>       New option -d (--dump) for gtags(1).


Is it your intention that updates tag files after dumping?
Did you forget to write "exit(0);"?


@@ -290,6 +295,20 @@ main(int argc, char **argv)
                convert_close(cv);
                strbuf_close(ib);
                exit(0);
+       } else if (dump_target) {
+               /*
+                * Dump a tag file.
+                */
+               DBOP *dbop = NULL;
+               const char *dat = 0;
+
+               if (!test("f", dump_target))
+                       die("file '%s' not found.", dump_target);
+               if ((dbop = dbop_open(dump_target, 0, 0, 0)) == NULL)
+                       die("file '%s' is not a tag file.", dump_target);
+               for (dat = dbop_first(dbop, NULL, NULL, 0); dat != NULL; dat = 
dbop_next(dbop))
+                       printf("%s\t%s\n", dbop->lastkey, dat);
+               dbop_close(dbop);
        } else if (Iflag) {
                if (!usable("mkid"))
                        die("mkid not found.");


----
Hideki IWAMOTO  address@hidden




reply via email to

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