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

View: New views
2 Messages — Rating Filter:   Alert me  

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

by Hideki IWAMOTO :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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  h-iwamoto@...


_______________________________________________
Bug-global mailing list
Bug-global@...
http://lists.gnu.org/mailman/listinfo/bug-global

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

by Shigio YAMAGUCHI-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

As it is your pointing out, I had forgotten to write 'exit(0)'.
I will fix it. Thank you.
--
Shigio YAMAGUCHI <shigio@...>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


_______________________________________________
Bug-global mailing list
Bug-global@...
http://lists.gnu.org/mailman/listinfo/bug-global