Skip to content

Commit

Permalink
Make identical function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
niclas committed Aug 27, 2018
1 parent 7342158 commit ed1530c
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 25 deletions.
87 changes: 66 additions & 21 deletions xdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ parse_file(filename)
* bust up a path string and link it into the tree
*/
void
parse_entry(char *name, long long size)
parse_entry(name, size)
char *name;
long long size;
{
char *path[MAXDEPTH]; /* break up path into this list */
char buf[MAXNAME]; /* temp space for path element
Expand Down Expand Up @@ -815,7 +817,9 @@ strdup(s)
/**************** External Entry Points ****************/

void
press(int x, int y)
press(x, y)
int x,
y;
{
struct node *np;

Expand Down Expand Up @@ -843,7 +847,9 @@ press(int x, int y)
}

void
printpath(int x, int y)
printpath(x, y)
int x,
y;
{
struct node *np;
char *path;
Expand Down Expand Up @@ -874,7 +880,9 @@ reset(void)
}

void
repaint(int width, int height)
repaint(width, height)
int width,
height;
{
struct rect rect;

Expand All @@ -895,7 +903,8 @@ repaint(int width, int height)


void
setorder(char *op)
setorder(op)
char *op;
{
if (strcmp(op, "size") == 0) {
order = ORD_SIZE;
Expand Down Expand Up @@ -936,7 +945,8 @@ setorder(char *op)
}

void
reorder(char *op)
reorder(op)
char *op;
{ /* order name */
setorder(op);
sorttree(topp, order);
Expand Down Expand Up @@ -980,7 +990,8 @@ XDU Version %s - Keyboard Commands\n\
}

void
fprintpsstart(FILE * fp)
fprintpsstart(fp)
FILE *fp;
{
fprintf(fp,
"%%!\n" "%%%%BoundingBox: 26 693 85 808\n"
Expand All @@ -997,15 +1008,21 @@ fprintpsstart(FILE * fp)
}

void
fprintpsend(FILE * fp)
fprintpsend(fp)
FILE *fp;
{
fprintf(fp,
"grestore\n" "xdusavedpage restore\n" "end\n" "showpage\n" "\n"
"%%%%Trailer\n" "%%%%DocumentFonts: fixed\n" "%%%%EOF\n");
}

void
fprintpsbox(FILE * fp, int x1, int y1, int x2, int y2)
fprintpsbox(fp, x1, y1, x2, y2)
FILE *fp;
int x1,
y1,
x2,
y2;
{
fprintf(fp,
"%%BOX\n" "0 setgray\n" "gsave\n" " 10 setmiterlimit\n"
Expand All @@ -1016,7 +1033,11 @@ fprintpsbox(FILE * fp, int x1, int y1, int x2, int y2)
}

void
fprintpstext(FILE * fp, int x, int y, char *s)
fprintpstext(fp, x, y, s)
FILE *fp;
int x,
y;
char *s;
{
fprintf(fp,
"%%TEXT\n" "0 setgray\n"
Expand All @@ -1026,8 +1047,11 @@ fprintpstext(FILE * fp, int x, int y, char *s)
}

void
savepschildren(FILE * fp, struct node *nodep, struct rect rect,
int showsize)
savepschildren(fp, nodep, rect, showsize)
FILE *fp;
struct node *nodep;
struct rect rect;
int showsize;
{
long long totalsize;
int totalheight,
Expand Down Expand Up @@ -1102,7 +1126,11 @@ savepschildren(FILE * fp, struct node *nodep, struct rect rect,
}

void
savepsnode(FILE * fp, struct node *nodep, struct rect rect, int showsize)
savepsnode(fp, nodep, rect, showsize)
FILE *fp;
struct node *nodep;
struct rect rect;
int showsize;
{
struct rect subrect;
char label[1024],
Expand Down Expand Up @@ -1147,7 +1175,9 @@ savepsnode(FILE * fp, struct node *nodep, struct rect rect, int showsize)


void
savetops(char *fname, int showsize)
savetops(fname, showsize)
char *fname;
int showsize;
{
FILE *fp;
struct rect rect;
Expand All @@ -1169,28 +1199,37 @@ savetops(char *fname, int showsize)
}

void
fprintsvgstart(FILE * fp)
fprintsvgstart(fp)
FILE *fp;
{
fprintf(fp, "<svg xmlns=\"http://www.w3.org/2000/svg\">\n");
}

void
fprintsvgend(FILE * fp)
fprintsvgend(fp)
FILE *fp;
{
fprintf(fp, "</svg>");
}

void
fprintsvgnode(FILE * fp, struct rect rect)
fprintsvgnode(fp, rect)
FILE *fp;
struct rect rect;
{
fprintf(fp,
" <rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" stroke=\"black\" stroke-width=\"1px\" fill=\"white\"/>\n",
rect.left, rect.top, rect.width, rect.height);
}

void
fprintsvgnodetext(FILE * fp, int x, int y, long long size, char *name,
int showsize)
fprintsvgnodetext(fp, x, y, size, name, showsize)
FILE *fp;
int x,
y;
long long size;
char *name;
int showsize;
{
char buffer[1024],
*text;
Expand Down Expand Up @@ -1225,7 +1264,11 @@ fprintsvgnodetext(FILE * fp, int x, int y, long long size, char *name,
}

void
savesvgnode(FILE * fp, struct node *nodep, int showsize, int depth)
savesvgnode(fp, nodep, showsize, depth)
FILE *fp;
struct node *nodep;
int showsize,
depth;
{
struct node *np;

Expand All @@ -1245,7 +1288,9 @@ savesvgnode(FILE * fp, struct node *nodep, int showsize, int depth)
}

void
savetosvg(char *fname, int showsize)
savetosvg(fname, showsize)
char *fname;
int showsize;
{
FILE *fp;

Expand Down
24 changes: 20 additions & 4 deletions xwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ a_size(w, event, params, num_params)
}

static void
a_saveps(Widget w, XEvent * e, String * params, Cardinal * num_params)
a_saveps(w, e, params, num_params)
Widget w;
XEvent *e;
String *params;
Cardinal *num_params;
{
UNUSED(w, e, params, num_params);
fprintf(stderr, "saving as postscript to file: %s ..", res.psfilename);
Expand All @@ -301,7 +305,11 @@ a_saveps(Widget w, XEvent * e, String * params, Cardinal * num_params)
}

static void
a_savesvg(Widget w, XEvent * e, String * params, Cardinal * num_params)
a_savesvg(w, e, params, num_params)
Widget w;
XEvent *e;
String *params;
Cardinal *num_params;
{
char *extension = ".svg";
int len =
Expand Down Expand Up @@ -332,14 +340,22 @@ a_savesvg(Widget w, XEvent * e, String * params, Cardinal * num_params)
}

static void
a_up(Widget w, XEvent * e, String * params, Cardinal * num_params)
a_up(w, e, params, num_params)
Widget w;
XEvent *e;
String *params;
Cardinal *num_params;
{
UNUSED(w, e, params, num_params);
uponechild();
}

static void
a_down(Widget w, XEvent * e, String * params, Cardinal * num_params)
a_down(w, e, params, num_params)
Widget w;
XEvent *e;
String *params;
Cardinal *num_params;
{
UNUSED(w, e, params, num_params);
downonechild();
Expand Down

0 comments on commit ed1530c

Please sign in to comment.