dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dab74f7
)
Also allow debugging.
author
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 5 Jan 2003 13:15:35 +0000
(13:15 +0000)
committer
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 5 Jan 2003 13:15:35 +0000
(13:15 +0000)
bin/gedcom-check.c
patch
|
blob
|
history
diff --git
a/bin/gedcom-check.c
b/bin/gedcom-check.c
index f81e27f9bf99bd1319d947c2838b65d088aa2a36..ef2baf8f96946fdbad2704230e5c645b3a0b5e68 100644
(file)
--- a/
bin/gedcom-check.c
+++ b/
bin/gedcom-check.c
@@
-47,6
+47,8
@@
void show_help ()
printf("Options:\n");
printf(" -h Show this help text\n");
printf(" -c Enable compatibility mode\n");
printf("Options:\n");
printf(" -h Show this help text\n");
printf(" -c Enable compatibility mode\n");
+ printf(" -dg Debug setting: only libgedcom debug messages\n");
+ printf(" -da Debug setting: libgedcom + yacc debug messages\n");
printf("Errors, warnings, ... are sent to stdout\n");
}
printf("Errors, warnings, ... are sent to stdout\n");
}
@@
-69,13
+71,18
@@
int main(int argc, char* argv[])
{
Gedcom_err_mech mech = DEFER_FAIL;
int compat_enabled = 0;
{
Gedcom_err_mech mech = DEFER_FAIL;
int compat_enabled = 0;
+ int debug_level = 0;
char* file_name = NULL;
int result;
if (argc > 1) {
int i;
for (i=1; i<argc; i++) {
char* file_name = NULL;
int result;
if (argc > 1) {
int i;
for (i=1; i<argc; i++) {
- if (!strncmp(argv[i], "-c", 3))
+ if (!strncmp(argv[i], "-da", 4))
+ debug_level = 2;
+ else if (!strncmp(argv[i], "-dg", 4))
+ debug_level = 1;
+ else if (!strncmp(argv[i], "-c", 3))
compat_enabled = 1;
else if (!strncmp(argv[i], "-h", 3)) {
show_help();
compat_enabled = 1;
else if (!strncmp(argv[i], "-h", 3)) {
show_help();
@@
-101,6
+108,7
@@
int main(int argc, char* argv[])
gedcom_init();
setlocale(LC_ALL, "");
gedcom_init();
setlocale(LC_ALL, "");
+ gedcom_set_debug_level(debug_level, NULL);
gedcom_set_compat_handling(compat_enabled);
gedcom_set_error_handling(mech);
gedcom_set_message_handler(gedcom_message_handler);
gedcom_set_compat_handling(compat_enabled);
gedcom_set_error_handling(mech);
gedcom_set_message_handler(gedcom_message_handler);