Ticket #36397: patch-show.c.diff
File patch-show.c.diff, 2.3 KB (added by stevecheckoway (Stephen Checkoway), 12 years ago) |
---|
-
show.c
old new 9 9 #include <math.h> 10 10 #include "jgraph.h" 11 11 12 static spaces(nsp) 13 int nsp; 12 static void spaces(int nsp) 14 13 { 15 14 while(nsp-- > 0) putchar(' '); 16 15 } 17 16 18 float ptoin(p) 19 float p; 17 static float ptoin(float p) 20 18 { 21 19 return p / FCPI; 22 20 } 23 21 24 float ptoc(p, a) 25 float p; 26 Axis a; 22 static float ptoc(float p, Axis a) 27 23 { 28 24 if (a->is_lg) { 29 25 return (float) exp((p / a->factor + a->logmin) * a->logfactor); … … Axis a; 32 28 } 33 29 } 34 30 35 float ptodist(p, a) 36 float p; 37 Axis a; 31 static float ptodist(float p, Axis a) 38 32 { 39 33 if (a->is_lg) { 40 34 return p / FCPI; … … Axis a; 43 37 } 44 38 } 45 39 46 static show_mltiline(s) 47 char *s; 40 static void show_mltiline(const char *s) 48 41 { 49 42 int i; 50 43 … … char *s; 57 50 putchar('\n'); 58 51 } 59 52 60 show_string(s) 61 char *s; 53 static void show_string(const char *s) 62 54 { 63 55 int i; 64 56 … … char *s; 74 66 } 75 67 76 68 77 show_label(l, nsp, g) 78 Label l; 79 int nsp; 80 Graph g; 69 static void show_label(Label l, int nsp, Graph g) 81 70 { 82 71 spaces(nsp); 83 72 show_string(l->label); … … Graph g; 98 87 return; 99 88 } 100 89 101 show_lmark(l, nsp, g) 102 Label l; 103 int nsp; 104 Graph g; 90 static void show_lmark(Label l, int nsp, Graph g) 105 91 { 106 92 spaces(nsp); show_string(l->label); 107 93 spaces(nsp); printf("x %f ", ptodist(l->x, g->x_axis)); … … Graph g; 110 96 printf("rotate %f\n", l->rotate); 111 97 spaces(nsp); printf("font %s ", l->font); 112 98 printf("fontsize %f\n", l->fontsize); 113 return;114 99 } 115 100 116 show_curve(c, nsp, g) 117 Curve c; 118 int nsp; 119 Graph g; 101 static void show_curve(Curve c, int nsp, Graph g) 120 102 { 121 103 Point p; 122 104 Point px; … … Graph g; 251 233 ptodist(c->asize[1], g->y_axis) * 2.0); 252 234 } 253 235 254 show_axis(a, nsp, g) 255 Axis a; 256 int nsp; 257 Graph g; 236 static void show_axis(Axis a, int nsp, Graph g) 258 237 { 259 238 Axis other; 260 239 Hash h; … … Graph g; 342 321 } 343 322 } 344 323 345 show_legend(l, nsp, g) 346 Legend l; 347 int nsp; 348 Graph g; 324 static void show_legend(Legend l, int nsp, Graph g) 349 325 { 350 326 if (l->type == 'c') { 351 327 spaces(nsp); printf("custom\n"); … … Graph g; 362 338 } 363 339 } 364 340 365 show_graph(g, nsp) 366 Graph g; 367 int nsp; 341 static void show_graph(Graph g, int nsp) 368 342 { 369 343 370 344 Curve c; … … int nsp; 394 368 } 395 369 } 396 370 397 show_graphs(gs) 398 Graphs gs; 371 void show_graphs(Graphs gs) 399 372 { 400 373 Graphs the_g; 401 374 Graph g;