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  
    77
    88
    99#include <stdio.h>
     10#include <string.h>
    1011
    1112#include "jgraph.h"
    1213
    1314#define MAX(a,b) ((a > b) ? a : b)
    1415#define MIN(a,b) ((a < b) ? a : b)
    1516
    16 edit_label(l)
    17 Label l;
     17static void edit_label(Label l)
    1818{
    1919  char *txt, inp_str[80];
    2020  float f;
    Label l; 
    7272  }
    7373}
    7474
    75 copy_curve(c1, c2) /* Copies curve c2 to c1 */
    76 Curve c1, c2;
     75static void copy_curve(Curve c1, Curve c2) /* Copies curve c2 to c1 */
    7776{
    7877  Flist f, newf;
    7978  Point p, newp;
    Curve c1, c2; 
    138137  c1->bezier = c2->bezier;
    139138}
    140139
    141 copy_label(l1, l2) /* Copies label l2 to l1 */
    142 Label l1, l2;
     140void copy_label(Label l1, Label l2) /* Copies label l2 to l1 */
    143141{
    144142  l1->label = l2->label;
    145143  l1->x = l2->x;
    Label l1, l2; 
    156154  l1->linesep = l2->linesep;
    157155}
    158156
    159 copy_axis(a1, a2) /* Copies axis a2 to a1 */
    160 Axis a1, a2;
     157static void copy_axis(Axis a1, Axis a2) /* Copies axis a2 to a1 */
    161158{
    162159  copy_label(a1->label, a2->label);
    163160  copy_label(a1->hl, a2->hl);
    Axis a1, a2; 
    201198  a1->is_x = a2->is_x;
    202199}
    203200
    204 Curve do_copy_curve(g, gs, all_gs)
    205 Graph g;
    206 Graphs gs;
    207 Graphs all_gs;
     201static Curve do_copy_curve(Graph g, Graphs gs, Graphs all_gs)
    208202{
    209203  Curve lastc, newc;
    210204  Graph oldg;
    Graphs all_gs; 
    254248  return newc; /* To shut lint up */
    255249}
    256250
    257 Label do_copy_string(g, gs, all_gs)
    258 Graph g;
    259 Graphs gs;
    260 Graphs all_gs;
     251static Label do_copy_string(Graph g, Graphs gs, Graphs all_gs)
    261252{
    262253  String lastl, newl;
    263254  Graph oldg;
    Graphs all_gs; 
    307298  }
    308299}
    309300
    310 Graph last_graph(g, gs, all_gs)
    311 Graph g;
    312 Graphs gs;
    313 Graphs all_gs;
     301static Graph last_graph(Graph g, Graphs gs, Graphs all_gs)
    314302{
    315303  Graph lastg;
    316304
    Graphs all_gs; 
    329317  return lastg;
    330318}
    331319
    332 copy_legend(l1, l2)
    333 Legend l1, l2;
     320static void copy_legend(Legend l1, Legend l2)
    334321{
    335322  l1->linelength = l2->linelength;
    336323  l1->linebreak = l2->linebreak;
    Legend l1, l2; 
    339326  copy_label(l1->l, l2->l);
    340327}
    341328
    342 inherit_axes(g, lastg)
    343 Graph g;
    344 Graph lastg;
     329static void inherit_axes(Graph g, Graph lastg)
    345330{
    346331  char *s;
    347332  copy_axis(g->x_axis, lastg->x_axis);
    Graph lastg; 
    356341  g->title->label = s;
    357342}
    358343
    359 getpattern(inp_str, key, p, a)
    360 char *inp_str, *key, *p;
    361 float *a;
     344static void getpattern(char *inp_str, char *key, char *p, float *a)
    362345{
    363346  int i;
    364347  float f;
    float *a; 
    385368  return;
    386369}
    387370
    388 edit_curve(c, g)
    389 Curve c;
    390 Graph g;
     371static void edit_curve(Curve c, Graph g)
    391372{
    392373  char inp_str[256], *txt;
    393374  float x, y, f, e1, e2;
    Graph g; 
    680661  }
    681662}
    682663
    683 edit_hash_label(a)
    684 Axis a;
     664static void edit_hash_label(Axis a)
    685665{
    686666  float at, f;
    687667  char *s;
    Axis a; 
    731711  }
    732712}
    733713
    734 edit_axis(a)
    735 Axis a;
     714static void edit_axis(Axis a)
    736715{
    737716  char inp_str[256];
    738717  float f;
    Axis a; 
    907886  }
    908887}
    909888
    910 edit_legend(l)
    911 Legend l;
     889static void edit_legend(Legend l)
    912890{
    913891  char inp_str[256];
    914892  float f;
    Legend l; 
    974952  }
    975953}
    976954
    977 edit_graph(g, gs, all_gs)
    978 Graph g;
    979 Graphs gs;
    980 Graphs all_gs;
     955static void edit_graph(Graph g, Graphs gs, Graphs all_gs)
    981956{
    982957  char inp_str[80];
    983958  int num;
    Graphs all_gs; 
    10491024  }
    10501025}
    10511026
    1052 edit_graphs(gs)
    1053 Graphs gs;
     1027void edit_graphs(Graphs gs)
    10541028{
    10551029  Graphs the_g;
    10561030  Graph g, tmp_g;