Ticket #36397: patch-edit.c.diff
File patch-edit.c.diff, 3.3 KB (added by stevecheckoway (Stephen Checkoway), 12 years ago) |
---|
-
edit.c
old new 7 7 8 8 9 9 #include <stdio.h> 10 #include <string.h> 10 11 11 12 #include "jgraph.h" 12 13 13 14 #define MAX(a,b) ((a > b) ? a : b) 14 15 #define MIN(a,b) ((a < b) ? a : b) 15 16 16 edit_label(l) 17 Label l; 17 static void edit_label(Label l) 18 18 { 19 19 char *txt, inp_str[80]; 20 20 float f; … … Label l; 72 72 } 73 73 } 74 74 75 copy_curve(c1, c2) /* Copies curve c2 to c1 */ 76 Curve c1, c2; 75 static void copy_curve(Curve c1, Curve c2) /* Copies curve c2 to c1 */ 77 76 { 78 77 Flist f, newf; 79 78 Point p, newp; … … Curve c1, c2; 138 137 c1->bezier = c2->bezier; 139 138 } 140 139 141 copy_label(l1, l2) /* Copies label l2 to l1 */ 142 Label l1, l2; 140 void copy_label(Label l1, Label l2) /* Copies label l2 to l1 */ 143 141 { 144 142 l1->label = l2->label; 145 143 l1->x = l2->x; … … Label l1, l2; 156 154 l1->linesep = l2->linesep; 157 155 } 158 156 159 copy_axis(a1, a2) /* Copies axis a2 to a1 */ 160 Axis a1, a2; 157 static void copy_axis(Axis a1, Axis a2) /* Copies axis a2 to a1 */ 161 158 { 162 159 copy_label(a1->label, a2->label); 163 160 copy_label(a1->hl, a2->hl); … … Axis a1, a2; 201 198 a1->is_x = a2->is_x; 202 199 } 203 200 204 Curve do_copy_curve(g, gs, all_gs) 205 Graph g; 206 Graphs gs; 207 Graphs all_gs; 201 static Curve do_copy_curve(Graph g, Graphs gs, Graphs all_gs) 208 202 { 209 203 Curve lastc, newc; 210 204 Graph oldg; … … Graphs all_gs; 254 248 return newc; /* To shut lint up */ 255 249 } 256 250 257 Label do_copy_string(g, gs, all_gs) 258 Graph g; 259 Graphs gs; 260 Graphs all_gs; 251 static Label do_copy_string(Graph g, Graphs gs, Graphs all_gs) 261 252 { 262 253 String lastl, newl; 263 254 Graph oldg; … … Graphs all_gs; 307 298 } 308 299 } 309 300 310 Graph last_graph(g, gs, all_gs) 311 Graph g; 312 Graphs gs; 313 Graphs all_gs; 301 static Graph last_graph(Graph g, Graphs gs, Graphs all_gs) 314 302 { 315 303 Graph lastg; 316 304 … … Graphs all_gs; 329 317 return lastg; 330 318 } 331 319 332 copy_legend(l1, l2) 333 Legend l1, l2; 320 static void copy_legend(Legend l1, Legend l2) 334 321 { 335 322 l1->linelength = l2->linelength; 336 323 l1->linebreak = l2->linebreak; … … Legend l1, l2; 339 326 copy_label(l1->l, l2->l); 340 327 } 341 328 342 inherit_axes(g, lastg) 343 Graph g; 344 Graph lastg; 329 static void inherit_axes(Graph g, Graph lastg) 345 330 { 346 331 char *s; 347 332 copy_axis(g->x_axis, lastg->x_axis); … … Graph lastg; 356 341 g->title->label = s; 357 342 } 358 343 359 getpattern(inp_str, key, p, a) 360 char *inp_str, *key, *p; 361 float *a; 344 static void getpattern(char *inp_str, char *key, char *p, float *a) 362 345 { 363 346 int i; 364 347 float f; … … float *a; 385 368 return; 386 369 } 387 370 388 edit_curve(c, g) 389 Curve c; 390 Graph g; 371 static void edit_curve(Curve c, Graph g) 391 372 { 392 373 char inp_str[256], *txt; 393 374 float x, y, f, e1, e2; … … Graph g; 680 661 } 681 662 } 682 663 683 edit_hash_label(a) 684 Axis a; 664 static void edit_hash_label(Axis a) 685 665 { 686 666 float at, f; 687 667 char *s; … … Axis a; 731 711 } 732 712 } 733 713 734 edit_axis(a) 735 Axis a; 714 static void edit_axis(Axis a) 736 715 { 737 716 char inp_str[256]; 738 717 float f; … … Axis a; 907 886 } 908 887 } 909 888 910 edit_legend(l) 911 Legend l; 889 static void edit_legend(Legend l) 912 890 { 913 891 char inp_str[256]; 914 892 float f; … … Legend l; 974 952 } 975 953 } 976 954 977 edit_graph(g, gs, all_gs) 978 Graph g; 979 Graphs gs; 980 Graphs all_gs; 955 static void edit_graph(Graph g, Graphs gs, Graphs all_gs) 981 956 { 982 957 char inp_str[80]; 983 958 int num; … … Graphs all_gs; 1049 1024 } 1050 1025 } 1051 1026 1052 edit_graphs(gs) 1053 Graphs gs; 1027 void edit_graphs(Graphs gs) 1054 1028 { 1055 1029 Graphs the_g; 1056 1030 Graph g, tmp_g;