1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-26 05:59:43 +02:00

eeshow/main.c (verbose): move to new file diag.c

In preparation of a more flexible diagnostics system.
This commit is contained in:
Werner Almesberger 2016-08-11 16:36:24 -03:00
parent 1a7c311c87
commit 5581a34444
8 changed files with 46 additions and 20 deletions

View File

@ -14,7 +14,7 @@ NAME = eeshow
OBJS = main.o sch-parse.o sch-render.o lib-parse.o lib-render.o \ OBJS = main.o sch-parse.o sch-render.o lib-parse.o lib-render.o \
gui.o gui-over.o gui-style.o gui-aoi.o fmt-pango.o \ gui.o gui-over.o gui-style.o gui-aoi.o fmt-pango.o \
file.o git-util.o git-file.o git-hist.o delta.o \ file.o git-util.o git-file.o git-hist.o delta.o \
style.o fig.o record.o cro.o diff.o gfx.o dwg.o text.o misc.o style.o fig.o record.o cro.o diff.o gfx.o dwg.o text.o misc.o diag.o
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \ CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \
-Wmissing-prototypes -Wmissing-declarations \ -Wmissing-prototypes -Wmissing-declarations \

16
eeshow/diag.c Normal file
View File

@ -0,0 +1,16 @@
/*
* diag.h - Diagnostics
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include "diag.h"
int verbose = 0;

25
eeshow/diag.h Normal file
View File

@ -0,0 +1,25 @@
/*
* diag.h - Diagnostics
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef DIAG_H
#define DIAG_H
/*
* 0: no progress indications
* 1: reasonable progress indications
* 2: verbose output
* > 2: go wild !
*/
extern int verbose;
#endif /* !DIAG_H */

View File

@ -17,7 +17,7 @@
#include <string.h> #include <string.h>
#include "util.h" #include "util.h"
#include "main.h" #include "diag.h"
#include "git-file.h" #include "git-file.h"
#include "file.h" #include "file.h"

View File

@ -21,7 +21,7 @@
#include <git2.h> #include <git2.h>
#include "util.h" #include "util.h"
#include "main.h" #include "diag.h"
#include "file.h" #include "file.h"
#include "git-util.h" #include "git-util.h"
#include "git-file.h" #include "git-file.h"

View File

@ -17,7 +17,7 @@
#include <alloca.h> #include <alloca.h>
#include "util.h" #include "util.h"
#include "main.h" #include "diag.h"
#include "fmt-pango.h" /* for vcs_long_for_pango */ #include "fmt-pango.h" /* for vcs_long_for_pango */
#include "git-util.h" #include "git-util.h"
#include "git-file.h" #include "git-file.h"

View File

@ -20,6 +20,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "util.h" #include "util.h"
#include "diag.h"
#include "fig.h" #include "fig.h"
#include "cro.h" #include "cro.h"
#include "diff.h" #include "diff.h"
@ -33,9 +34,6 @@
#include "main.h" #include "main.h"
int verbose = 0;
static struct gfx_ops const *ops_list[] = { static struct gfx_ops const *ops_list[] = {
&fig_ops, &fig_ops,
&cro_png_ops, &cro_png_ops,

View File

@ -13,19 +13,6 @@
#ifndef MAIN_H #ifndef MAIN_H
#define MAIN_H #define MAIN_H
#include <stdbool.h>
/*
* 0: no progress indications
* 1: reasonable progress indications
* 2: verbose output
* > 2: go wild !
*/
extern int verbose;
void usage(const char *name); void usage(const char *name);
#endif /* !MAIN_H */ #endif /* !MAIN_H */