diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-27 20:22:09 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-27 20:22:09 +0300 |
commit | db4ab01eb1d39593351b3ac15a92286a50868814 (patch) | |
tree | 7431377c532f50d7f0832fcb7f8536d70bd2d2c7 | |
parent | 4d22b4e8668cc717440d66120b8607be9a273c97 (diff) | |
download | tagr-db4ab01eb1d39593351b3ac15a92286a50868814.tar.gz tagr-db4ab01eb1d39593351b3ac15a92286a50868814.tar.bz2 |
Minor changes
-rw-r--r-- | src/graph.c | 14 | ||||
-rw-r--r-- | src/html.gram.y | 4 | ||||
-rw-r--r-- | src/main.c | 27 |
3 files changed, 9 insertions, 36 deletions
diff --git a/src/graph.c b/src/graph.c index 1464e8b..8088773 100644 --- a/src/graph.c +++ b/src/graph.c @@ -155,3 +155,3 @@ draw_graph (FILE *fp, gdImageLine (graph, xtr (x), ytr (th.inrate), - xtr (x+1), ytr (tnext.inrate), i_in); + xtr (x + xstep), ytr (tnext.inrate), i_in); } @@ -168,3 +168,3 @@ draw_graph (FILE *fp, gdImageLine (graph, xtr (x), ytr (th.outrate), - xtr (x+1), ytr (tnext.outrate), gdBrushed); + xtr (x + xstep), ytr (tnext.outrate), gdBrushed); } @@ -198,4 +198,4 @@ draw_graph (FILE *fp, gdImageLine (graph, - xtr (-2), y, - xtr (1), y, + xtr (0) - 2, y, + xtr (0) + 1, y, i_grid); @@ -203,4 +203,4 @@ draw_graph (FILE *fp, gdImageLine (graph, - xtr (xmax - 1), y, - xtr (xmax + 1), y, + xtr (xmax) - 1, y, + xtr (xmax) + 1, y, i_grid); @@ -232,3 +232,3 @@ draw_graph (FILE *fp, gdImageLine (graph, - x, ytr (-2), x, ytr (1), + x, ytr (0) - 2, x, ytr (0) + 1, i_grid); diff --git a/src/html.gram.y b/src/html.gram.y index e488494..32e464e 100644 --- a/src/html.gram.y +++ b/src/html.gram.y @@ -62,4 +62,4 @@ static void deduce_format (pp_value_t *res, -input: list - ; +input : list + ; @@ -638,29 +638,2 @@ sig_child (int sig) -void -assign_string (char **pstr, const char *s) -{ - free (*pstr); - if (s) - { - *pstr = xmalloc (strlen (s) + 1); - strcpy (*pstr, s); - } - else - *pstr = NULL; -} - -void -assign_string_n (char **pstr, const char *s, size_t length) -{ - free (*pstr); - if (s) - { - *pstr = xmalloc (length + 1); - memcpy (*pstr, s, length); - (*pstr)[length] = 0; - } - else - *pstr = NULL; -} - char * |