aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-05-14 13:25:34 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2013-05-14 13:25:34 +0000
commit045ec749566683e9a4471a81901b7a3f37066376 (patch)
tree8109a733e90282f03ec1d5ed02f6ebaf3e0100e8
parentc3df0bf5f64241cb7ea00c1894da7f81e055a2aa (diff)
downloadgdbm-045ec749566683e9a4471a81901b7a3f37066376.tar.gz
gdbm-045ec749566683e9a4471a81901b7a3f37066376.tar.bz2
Fix distcheck.
-rw-r--r--po/POTFILES.in5
-rw-r--r--src/Makefile.am2
-rw-r--r--src/gdbmtool.c40
3 files changed, 27 insertions, 20 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ce3d71d..d259891 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -24,5 +24,8 @@ src/gdbmfetch.c
24src/gdbmseq.c 24src/gdbmseq.c
25src/gdbmstore.c 25src/gdbmstore.c
26src/parseopt.c 26src/parseopt.c
27src/testgdbm.c 27src/gdbmtool.c
28src/update.c 28src/update.c
29src/gram.y
30src/lex.l
31src/datconv.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 832fd55..bf2f21e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -87,6 +87,8 @@ gdbmtool_SOURCES = \
87 gdbmtool.c\ 87 gdbmtool.c\
88 var.c 88 var.c
89 89
90EXTRA_DIST = gram.h
91
90AM_YFLAGS = -dtv 92AM_YFLAGS = -dtv
91#AM_LFLAGS = -d 93#AM_LFLAGS = -d
92 94
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index 20c60d8..a561bfc 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -399,6 +399,7 @@ struct handler_param
399}; 399};
400 400
401 401
402/* Open database */
402void 403void
403open_handler (struct handler_param *param) 404open_handler (struct handler_param *param)
404{ 405{
@@ -409,6 +410,7 @@ open_handler (struct handler_param *param)
409 } 410 }
410} 411}
411 412
413/* Close database */
412void 414void
413close_handler (struct handler_param *param) 415close_handler (struct handler_param *param)
414{ 416{
@@ -419,7 +421,7 @@ close_handler (struct handler_param *param)
419} 421}
420 422
421 423
422/* c - count */ 424/* count - count items in the database */
423void 425void
424count_handler (struct handler_param *param) 426count_handler (struct handler_param *param)
425{ 427{
@@ -429,7 +431,7 @@ count_handler (struct handler_param *param)
429 count); 431 count);
430} 432}
431 433
432/* d key - delete */ 434/* delete KEY - delete a key*/
433void 435void
434delete_handler (struct handler_param *param) 436delete_handler (struct handler_param *param)
435{ 437{
@@ -442,7 +444,7 @@ delete_handler (struct handler_param *param)
442 } 444 }
443} 445}
444 446
445/* f key - fetch */ 447/* fetch KEY - fetch a record by its key */
446void 448void
447fetch_handler (struct handler_param *param) 449fetch_handler (struct handler_param *param)
448{ 450{
@@ -457,7 +459,7 @@ fetch_handler (struct handler_param *param)
457 fprintf (stderr, _("No such item found.\n")); 459 fprintf (stderr, _("No such item found.\n"));
458} 460}
459 461
460/* s key data - store */ 462/* store KEY DATA - store data */
461void 463void
462store_handler (struct handler_param *param) 464store_handler (struct handler_param *param)
463{ 465{
@@ -467,7 +469,7 @@ store_handler (struct handler_param *param)
467 fprintf (stderr, _("Item not inserted.\n")); 469 fprintf (stderr, _("Item not inserted.\n"));
468} 470}
469 471
470/* 1 - begin iteration */ 472/* first - begin iteration */
471 473
472void 474void
473firstkey_handler (struct handler_param *param) 475firstkey_handler (struct handler_param *param)
@@ -490,7 +492,7 @@ firstkey_handler (struct handler_param *param)
490 fprintf (param->fp, _("No such item found.\n")); 492 fprintf (param->fp, _("No such item found.\n"));
491} 493}
492 494
493/* n [key] - next key */ 495/* next [KEY] - next key */
494void 496void
495nextkey_handler (struct handler_param *param) 497nextkey_handler (struct handler_param *param)
496{ 498{
@@ -523,7 +525,7 @@ nextkey_handler (struct handler_param *param)
523 } 525 }
524} 526}
525 527
526/* r - reorganize */ 528/* reorganize */
527void 529void
528reorganize_handler (struct handler_param *param ARG_UNUSED) 530reorganize_handler (struct handler_param *param ARG_UNUSED)
529{ 531{
@@ -533,7 +535,7 @@ reorganize_handler (struct handler_param *param ARG_UNUSED)
533 fprintf (stderr, _("Reorganization succeeded.\n")); 535 fprintf (stderr, _("Reorganization succeeded.\n"));
534} 536}
535 537
536/* A - print available list */ 538/* avail - print available list */
537int 539int
538avail_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) 540avail_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count)
539{ 541{
@@ -596,7 +598,7 @@ getnum (int *pnum, char *arg, char **endp)
596 return 0; 598 return 0;
597} 599}
598 600
599/* B num - print a bucket and set is a current one. 601/* bucket NUM - print a bucket and set it as a current one.
600 Uses print_current_bucket_handler */ 602 Uses print_current_bucket_handler */
601int 603int
602print_bucket_begin (struct handler_param *param, size_t *exp_count) 604print_bucket_begin (struct handler_param *param, size_t *exp_count)
@@ -621,7 +623,7 @@ print_bucket_begin (struct handler_param *param, size_t *exp_count)
621} 623}
622 624
623 625
624/* D - print hash directory */ 626/* dir - print hash directory */
625int 627int
626print_dir_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) 628print_dir_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count)
627{ 629{
@@ -646,7 +648,7 @@ print_dir_handler (struct handler_param *param)
646 i, (unsigned long) gdbm_file->dir[i]); 648 i, (unsigned long) gdbm_file->dir[i]);
647} 649}
648 650
649/* F - print file handler */ 651/* header - print file handler */
650int 652int
651print_header_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) 653print_header_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count)
652{ 654{
@@ -679,7 +681,7 @@ print_header_handler (struct handler_param *param)
679 (unsigned long) gdbm_file->header->avail.next_block); 681 (unsigned long) gdbm_file->header->avail.next_block);
680} 682}
681 683
682/* H key - hash the key */ 684/* hash KEY - hash the key */
683void 685void
684hash_handler (struct handler_param *param) 686hash_handler (struct handler_param *param)
685{ 687{
@@ -687,7 +689,7 @@ hash_handler (struct handler_param *param)
687 _gdbm_hash (param->argv[0]->v.dat)); 689 _gdbm_hash (param->argv[0]->v.dat));
688} 690}
689 691
690/* K - print the bucket cache */ 692/* cache - print the bucket cache */
691int 693int
692print_cache_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) 694print_cache_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count)
693{ 695{
@@ -704,14 +706,14 @@ print_cache_handler (struct handler_param *param)
704 _gdbm_print_bucket_cache (param->fp, gdbm_file); 706 _gdbm_print_bucket_cache (param->fp, gdbm_file);
705} 707}
706 708
707/* V - print GDBM version */ 709/* version - print GDBM version */
708void 710void
709print_version_handler (struct handler_param *param) 711print_version_handler (struct handler_param *param)
710{ 712{
711 fprintf (param->fp, "%s\n", gdbm_version); 713 fprintf (param->fp, "%s\n", gdbm_version);
712} 714}
713 715
714/* l - List all entries */ 716/* list - List all entries */
715int 717int
716list_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) 718list_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count)
717{ 719{
@@ -749,7 +751,7 @@ list_handler (struct handler_param *param)
749 } 751 }
750} 752}
751 753
752/* q - quit the program */ 754/* quit - quit the program */
753void 755void
754quit_handler (struct handler_param *param ARG_UNUSED) 756quit_handler (struct handler_param *param ARG_UNUSED)
755{ 757{
@@ -759,7 +761,7 @@ quit_handler (struct handler_param *param ARG_UNUSED)
759 exit (EXIT_OK); 761 exit (EXIT_OK);
760} 762}
761 763
762/* e file [truncate] - export to a flat file format */ 764/* export FILE [truncate] - export to a flat file format */
763void 765void
764export_handler (struct handler_param *param) 766export_handler (struct handler_param *param)
765{ 767{
@@ -789,7 +791,7 @@ export_handler (struct handler_param *param)
789 } 791 }
790} 792}
791 793
792/* i file [replace] - import from a flat file */ 794/* import FILE [replace] [nometa] - import from a flat file */
793void 795void
794import_handler (struct handler_param *param) 796import_handler (struct handler_param *param)
795{ 797{
@@ -857,7 +859,7 @@ import_handler (struct handler_param *param)