Commit e65409d3 authored by Rob Latham's avatar Rob Latham
Browse files

Assorted cleanups for mandlebrot demo

like rest of MPE, update to use ANSI, not K&R prototypes.  A few unused
variables and missing header files.
parent bd1a465f
......@@ -4,9 +4,7 @@
*/
#include <stdio.h>
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "args.h"
#include "lists.h"
#include <string.h>
......@@ -106,7 +104,7 @@ char **argv, *switchName, **val;
IsArgPresent( argc, argv, switchName )
int IsArgPresent( argc, argv, switchName )
int *argc;
char **argv, *switchName;
{
......
......@@ -30,5 +30,7 @@ int GetStringListArg( );
#endif
int IsArgPresent( int *argc, char **argv, char *switchName );
#endif
/* _ARGS_H_ */
......@@ -5,9 +5,7 @@
/* general routines for calculating fractals */
#include <stdio.h>
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <math.h>
#include "pmandel.h"
#include "fract_gen.h"
......@@ -332,7 +330,7 @@ int *mainArray, *subArray, mainWidth, mainHeight, subWidth, subHeight,
If the copy goes outside the bounds of the mainArray, none of the copy is performed
*/
{
int i, j, *ptr, *fromPtr, *toPtr;
int i, j, *fromPtr, *toPtr;
if (mainWidth<subWidth+xpos || mainHeight<subHeight+ypos) { /* make sure we don't overrun */
return;
......
......@@ -4,9 +4,7 @@
*/
#include <stdio.h>
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "lists.h"
xpand_list_Strings *Strings_CreateList(initialLen)
......
......@@ -4,10 +4,10 @@
*/
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "mpi.h"
#include "mpe.h"
#include "pmandel.h"
......@@ -39,7 +39,6 @@ FreeMPITypes()
void
DefineMPITypes()
{
Winspecs winspecs;
Flags flags;
rect rectangle;
MPI_Aint a, b;
......
......@@ -26,6 +26,8 @@ typedef int Fract_FN(NUM,NUM);
typedef int Fract_FN();
#endif
void PrintHelp(char *progName);
#endif
/* _PM_GENPROC_H_ */
......@@ -4,9 +4,8 @@
*/
#include <stdio.h>
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <unistd.h>
#include <sys/time.h>
#include "pmandel.h"
#include "pm_genproc.h"
......@@ -350,7 +349,7 @@ Flags *flags;
MPE_Point *pointData;
int block_type;
rect r, rectBuf[2];
rect r;
/* r - the rectangle being calculated */
MPI_Status mesgStatus;
......
......@@ -9,6 +9,8 @@
#include <stdio.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include "mpi.h"
#include "mpe.h"
#include "pmandel.h"
......@@ -292,8 +294,8 @@ Winspecs *winspecs;
Flags *oldFlags;
{
Flags newFlags;
char line[1025], *copy, *tok, **argv;
int doOneMore, ndrawn, myid, argc;
char line[1025], *tok, **argv;
int doOneMore, myid, argc;
xpand_list_Strings *argList;
FILE *inf;
int x1,y1,pressed,button;
......@@ -324,8 +326,6 @@ Flags *oldFlags;
fprintf( stderr, "%d opened input file\n", myid );
#endif
ndrawn = 0;
while( oldFlags->loop || fgets( line, 1024, inf )) {
if (oldFlags->loop && !fgets( line, 1024, inf )) {
rewind( inf );
......@@ -401,7 +401,7 @@ MPE_XGraph graph;
Winspecs *winspecs;
Flags *flags;
{
int myid, i, drawAnother;
int myid, drawAnother;
MPI_Comm_rank( MPI_COMM_WORLD, &myid );
......@@ -479,7 +479,7 @@ int DragZoom( graph, flags )
MPE_XGraph graph;
Flags *flags;
{
int x1, y1, x2, y2, i, myid, button;
int x1, y1, x2, y2, i, myid;
NUM zx1, zy1, zx2, zy2;
int okay = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment