diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-25 12:58:30 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-25 13:12:21 +0300 |
commit | 55bb0a274095c4871e333e80d78873609bc39d3a (patch) | |
tree | 19f121cd14af828d6c2f144e99d6cc13db796c90 | |
parent | d59a014f169e2394711cecd566a95cbfdceda6d3 (diff) | |
download | tagr-55bb0a274095c4871e333e80d78873609bc39d3a.tar.gz tagr-55bb0a274095c4871e333e80d78873609bc39d3a.tar.bz2 |
Bugfixes
* AUTHORS: Update emails.
* NEWS: Update.
* gnulib.modules: Add version-etc
* src/main.c: Implement --version.
* src/output.c, src/tagr.h, src/html.gram.y: Add missing
protos and includes.
* configure.ac, Makefile.am: Add etc
* etc/Makefile.am: New file.
-rw-r--r-- | AUTHORS | 4 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | etc/Makefile.am | 1 | ||||
-rw-r--r-- | gnulib.modules | 1 | ||||
-rw-r--r-- | src/html.gram.y | 1 | ||||
-rw-r--r-- | src/main.c | 18 | ||||
-rw-r--r-- | src/output.c | 2 | ||||
-rw-r--r-- | src/tagr.h | 19 |
9 files changed, 45 insertions, 9 deletions
@@ -1,2 +1,2 @@ -Max Bouglakoff <vesemir@farlep.net> -Sergey Poznyakoff <gray@mirddin.farlep.net>
\ No newline at end of file +Max Bouglakoff <vesemir@gnu.org.ua> +Sergey Poznyakoff <gray@gnu.org.ua>
\ No newline at end of file @@ -3,8 +3,11 @@ Copyright (C) 2000, 2005, 2009 Max Bouglacoff, Sergey Poznyakoff See the end for copying conditions. Please send tagr bug reports to <gray@gnu.org.ua> + +Version 1.0.95 (Git) + ^L -version 1.0 +Version 1.0 Initial release. See `README' for details. diff --git a/configure.ac b/configure.ac index 813951d..1d4673b 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,7 @@ AC_CONFIG_FILES([Makefile gnu/Makefile grecs/Makefile grecs/src/Makefile - src/Makefile]) + src/Makefile + etc/Makefile]) AC_OUTPUT diff --git a/etc/Makefile.am b/etc/Makefile.am new file mode 100644 index 0000000..e9e5fcc --- /dev/null +++ b/etc/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = tagr.css tagr.tmpl upgrade.awk diff --git a/gnulib.modules b/gnulib.modules index d36012b..f7631e3 100644 --- a/gnulib.modules +++ b/gnulib.modules @@ -12,5 +12,6 @@ strtol strtoul sysexits realloc +version-etc xalloc xalloc-die diff --git a/src/html.gram.y b/src/html.gram.y index 574b1aa..45d1f7f 100644 --- a/src/html.gram.y +++ b/src/html.gram.y @@ -25,6 +25,7 @@ #include <string.h> #include <errno.h> #include <math.h> +#include <ctype.h> #include <tagr.h> static pp_tab_t *ident_tab; @@ -39,6 +39,7 @@ #include <syslog.h> #include <tagr.h> #include <report.h> +#include <version-etc.h> #ifndef RETSIGTYPE # define RETSIGTYPE void @@ -657,7 +658,7 @@ assign_string_n (char **pstr, const char *s, size_t length) } char * -mkfilename (char *dir, char *name, char *suffix) +mkfilename (const char *dir, const char *name, const char *suffix) { int ret; char *buf; @@ -731,6 +732,20 @@ tagr_restart (char **argv) } \ while (0) +const char version_etc_copyright[] = + /* Do *not* mark this string for translation. %s is a copyright + symbol suitable for this locale, and %d is the copyright + year. */ + "Copyright %s 2000-%d Sergey Poznyakoff"; + +static void +tagr_version (FILE *stream, struct argp_state *state) +{ + version_etc (stream, "tagr", PACKAGE_NAME, PACKAGE_VERSION, + "Max Bouglacoff", "Sergey Poznyakoff", NULL); +} + + int main (int argc, char **argv) { @@ -739,6 +754,7 @@ main (int argc, char **argv) char **save_argv = argv; argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; + argp_program_version_hook = tagr_version; init_syslog (argv[0]); if (argp_parse (&argp, argc, argv, 0, &index, NULL)) diff --git a/src/output.c b/src/output.c index 5afd51a..f47e808 100644 --- a/src/output.c +++ b/src/output.c @@ -20,6 +20,8 @@ #include <stdio.h> #include <unistd.h> +#include <string.h> +#include <errno.h> #include <sys/stat.h> #include <tagr.h> @@ -79,10 +79,13 @@ void assign_string (char **pstr, const char *s); void assign_string_n (char **pstr, const char *s, size_t length); int readconfig (void); +void config_help (void); +void define_symbol (char *s); void decode_buffer (); struct monitor *find_monitor (const char *name); struct monitor *find_monitor_id (const char *id); +/* html.gram.y */ void begin_eval (); void end_eval (); int html_open (char *file); @@ -109,6 +112,8 @@ typedef struct pp_value_list pp_value_t value; } pp_tab_t; +int read_symtab (pp_tab_t **tab, const char *name); +int write_symtab (pp_tab_t *tab, const char *name); void add_numeric_value (pp_tab_t ** ptab, const char *name, double number); void add_string_value (pp_tab_t ** ptab, const char *name, const char *string); int find_value (char *name, pp_value_t * val); @@ -191,17 +196,21 @@ struct traffic_record }; - +/* report.c */ void open_db (); void close_db (); void read_db (struct monitor *mon, struct traffic_record **tr); void write_db (struct monitor *mon, struct traffic_record *tr); +void list_db (void); +void rebuild (int force); +void tr_init (struct traffic_record *tr); + +/* stat.c */ void update_stats (struct monitor *mon, struct traffic_sample *sample, struct traffic_record *tr); - -void rebuild (int force); void import (const char *dir); +/* queue.c */ void queue_clear (queue_t *q); int queue_count (queue_t *q); struct traffic_history *queue_get_ptr (queue_t *q, int index); @@ -209,7 +218,7 @@ struct traffic_history *queue_get_tail (queue_t *q); void queue_put (queue_t *q, struct traffic_history *elt); int queue_xchg (queue_t *q, struct traffic_history *elt); -char *mkfilename (char *dir, char *name, char *suffix); +char *mkfilename (const char *dir, const char *name, const char *suffix); /* output.c */ @@ -244,3 +253,5 @@ int draw_graph (FILE *fp, int xstep, unsigned long xmax, int growright, struct grid_class *xgrid, struct grid_class *ygrid); + + |