/*
**++
**  MODULE DESCRIPTION:
**
**      This is the weather forecasting module and all of the related functions
**
**  AUTHORS:
**
**      Phil Baughn (BASIC version)
**	Rod Falanga (C version)
**
**  CREATION DATE:  13 October 1990
**
**  DESIGN ISSUES:
**
**      I have found Phil Baughn's BASIC code to be too convoluted to follow,
**  therefore I have decided that the best way to get this to work, is to
**  copy his program structure exactly, but put the forecast (and each of the
**  other weather related routines) into their own separate source code files.
**  That way I can still provide some structure to the program by using C's
**  scoping to restrict subordinate functions from being "seen" by the rest
**  of the program.
**
**  MODIFICATION HISTORY:
**
**      18-OCT-1990 rjf	I believe that I now understand better what Phil
**			was trying to do.  His code wasn't so convoluted as
**			I had at first thought.  It appears as though he
**			was working with a BASIC which does not provide a
**			IF ... THEN ... ELSE IF ... structure, so he used a
**			lot of GOTOs to simulate the same thing.  I didn't
**			realize this until rather late in the coding of
**			this module and it's attendent functions, so I
**			didn't take advantage as much as I could the
**			IF ... THEN ... ELSE IF ... programming structure
**			inherent in C.
**	[@tbs@]...
**--
*/


/*
**
**  INCLUDE FILES
**
*/

#ifdef VMS
#include string
#endif

/*
**
**  MACRO DEFINITIONS
**
*/

#define DUMMY_LEN	50

static struct wind {
    char        *direct;
} valid_wind [ ] = { "N", 
		     "NE", 
		     "E", 
		     "SE", 
		     "S", 
		     "SW", 
		     "W", 
		     "NW", 
		     "" };  /* Indicate the end of the list with a null. */

#ifndef VMS
char *strcmp();
#endif

static char wind_direct [DUMMY_LEN],  
            baro_pressure [DUMMY_LEN], 
            again [DUMMY_LEN];
static double cur_baro_pressure;

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This is the function which handles the weather forecasting.
**
**  DESIGN:
**
**      A. There is one gigantic do loop, which this function will remain in
**	   so long as the variable again has either a 'Y' or a 'y' in the
**	   first position.  The rest of this documentation describes what is
**	   within that loop.
**	B. Clear the screen, and place the cursor so that the main function's
**	   title can be displayed.
**	C. Display the system's current date and time.
**	D. Get the current barometric pressure, in inches.
**	E. Get the current wind direction.
**	F. Go to some functions to perform the rest of the calculation.  One
**	   of the functions which is eventually called will ask the User if they
**	   what to do another forecast calculation.  If they do, then this
**	   loop will loop back and do it.
**
**--
*/
#ifdef VMS
void forecast (void)
#else
void forecast ()
#endif
{
#ifdef VMS
    void position (int , int), 
         print ( char *), 
         get_date_time (char *, char *);
#else
    void position (), 
         print (), 
         get_date_time ();
#endif
    char date [DUMMY_LEN], 
         time [DUMMY_LEN], 
#ifdef VMS
         *uppercase (char *);
    double get_double (void);
    extern int validate_wind_direct (char *);
    extern void get_wind_direct (const char *),  
                get_previous_wind_direct (void), 
                target21 (void), 
                target20 (void);
#else
         *uppercase ();
    double get_double ();
    extern int validate_wind_direct ();
    extern void get_wind_direct (),  
                get_previous_wind_direct (), 
                target21 (), 
                target20 ();
#endif

    /*	 
    **  This is one gigantic do loop.
    */	 
    do
    {
	Erase();
	position (2, 25);
	print ("WEATHER FORECAST PROGRAM");

	/*	 
	**  Get the current date and time and display it.
	*/	 
	get_date_time (date, time);
	position (4, 32);
	print (date);
	position (5, 33);
	print (time);

	/*
	**  Now, get the current barometric pressure, in inches.
	*/
	cur_baro_pressure = 0.;
	while (cur_baro_pressure < 25. && cur_baro_pressure > 35.)
	{
	    position (17, 1);
	    print ("             In inches, between 25.0 & 35.0.  Example:  29.95");
	    position (7, 12);
	    print ("ENTER CURRENT BAROMETRIC PRESSURE                  ");
	    cur_baro_pressure = get_double();
	}

	/*	 
	**  Now, enter the current wind direction.
	*/	 
	do
	{
	    get_wind_direct ("WIND DIRECTION IS CURRENTLY FROM THE               ");
	    uppercase (wind_direct);
	} while (! validate_wind_direct (wind_direct));

	/*	 
	**  Now, go to some subordinate routines which will handle the rest of
	**	the weather forecasting functions.
	*/	 
	if (! strcmp (wind_direct, "SW"))
	{
	    get_previous_wind_direct ();
	    target21 ();
	}
	else
	    target20 ();

    } while (again[0] == 'Y' || again[0] == 'y');
}   /* end of forecast() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      The purpose of this function is to validate the wind direction entered
**  as compared to the list of valid wind directions in the structure which
**  has the valid wind directions in it.
**
**  FORMAL PARAMETERS:
**
**      wind:
**          a pointer of type char which has the string which of the wind
**	    direction.
**
**  RETURN VALUE:
**
**      1 iff the wind entered is a valid wind direction, 0 otherwise
**
**--
*/
#ifdef VMS
static int validate_wind_direct (char *wind)
#else
static int validate_wind_direct (wind)
char *wind;
#endif
{
    register int i;
    int ret;

    for (ret = 0, i = 0;  valid_wind[i].direct[0] != '\0' ;  i++)
        if (! strcmp (valid_wind[i].direct, wind))
        {
            ret = 1;
            break;
        }
    return ret;
}   /* end of validate_wind_direct() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function gets the wind's direction (either current or some
**  previous value.)
**
**  FORMAL PARAMETERS:
**
**      query_string:
**          a pointer of type char which contains the string which will be
**	    outputted to ask the User which wind direction to get.
**
**  SIDE EFFECTS:
**
**      This assigns a value to the global variable wind_direct.
**
**--
*/
#ifdef VMS
static void get_wind_direct (const char *query_string)
#else
static void get_wind_direct (query_string)
const char *query_string;
#endif
{
#ifdef VMS
    void position (int, int), 
         print (char *), 
         get_string (char *);
#else
    void position (), 
         print (), 
         get_string ();
#endif

    position (17, 1);
    print ("                                                                            ");
    position (17, 1);
    print ("              Allowable entries are:  N NE E SE S SW W NW");
    position (8, 12);
    print (query_string);
    get_string (wind_direct);
}   /* end of get_wind_direct() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This is the function which is called when the previous wind's
**  direction is desired to be known.
**
**--
*/
#ifdef VMS
static void get_previous_wind_direct (void)
#else
static void get_previous_wind_direct ()
#endif
{
#ifdef VMS
    extern void get_wind_direct (const char *);
    extern int validate_wind_direct (char *);
    char *uppercase (char *);
#else
    extern void get_wind_direct ();
    extern int validate_wind_direct ();
    char *uppercase ();
#endif

    /*	 
    **  Now get the previous wind's direction.
    */	 
    do
    {
        get_wind_direct ("PREVIOUS WIND DIRECTION WAS FROM THE               ");
        uppercase (wind_direct);
    } while (! validate_wind_direct (wind_direct));
}   /* end of get_previous_wind_direct() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      All I can say about this routine is that it makes a decision.
**
**--
*/
#ifdef VMS
static void target20 (void)
#else
static void target20 ()
#endif
{
#ifdef VMS
    extern void get_previous_wind_direct (void), 
		target24 (void), 
		target23 (void);
#else
    extern void get_previous_wind_direct (), 
		target24 (), 
		target23 ();
#endif

    if (! strcmp (wind_direct, "SE"))
    {
        get_previous_wind_direct();
	target24();
    }
    else
        target23();
}   /* end of target20() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      More mysterious functions.
**
**--
*/
#ifdef VMS
static void target23 (void)
#else
static void target23 ()
#endif
{
#ifdef VMS
    extern void target25(void), target26(void);
#else
    extern void target25(), target26();
#endif

    if (! strcmp (wind_direct, "S"))
        target25();
    else
        target26();
}   /* end of target23() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      Another mystery.
**
**--
*/
#ifdef VMS
static void target26 (void)
#else
static void target26 ()
#endif
{
#ifdef VMS
    extern void target25 (void), target27(void);
#else
    extern void target25 (), target27();
#endif

    if (! strcmp (wind_direct, "N"))
        target25 ();
    else
        target27();
}   /* end of target26() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      another mystery
**
**--
*/
#ifdef VMS
static void target27 (void)
#else
static void target27 ()
#endif
{
#ifdef VMS
    extern void target25(void), target28(void);
#else
    extern void target25(), target28();
#endif

    if (! strcmp (wind_direct, "NW"))
        target25();
    else
        target28();
}   /* end of target27() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      another mystery
**
**--
*/
#ifdef VMS
static void target28 (void)
#else
static void target28 ()
#endif
{
#ifdef VMS
    extern void target25(void), target29(void);
#else
    extern void target25(), target29();
#endif

    if (! strcmp (wind_direct, "NE"))
        target25();
    else
        target29();
}   /* end of target28() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function sends some information to the User.
**
**--
*/
#ifdef VMS
static void target25 (void)
#else
static void target25 ()
#endif
{
#ifdef VMS
    extern void position (int, int), print (char *);
    extern void target30(void);
#else
    extern void position (), print ();
    extern void target30();
#endif

    position(17, 1);
    print("                                                                            ");
    position(18, 23);
    print("NO IMMEDIATE CHANGE IS FORECAST");
    target30();
}   /* end of target25() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      another mystery
**
**--
*/
#ifdef VMS
static void target21 (void)
#else
static void target21 ()
#endif
{
#ifdef VMS
    extern void target31(void), target32(void);
#else
    extern void target31(), target32();
#endif

    if (! strcmp (wind_direct, "S"))
    {
        target31();
    }
    else
    {
        target32();
    }
}   /* end of target21() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      another mystery
**
**--
*/
#ifdef VMS
static void target32 (void)
#else
static void target32 ()
#endif
{
#ifdef VMS
    extern void target33(void), target34(void);
#else
    extern void target33(), target34();
#endif

    if (! strcmp (wind_direct, "NW"))
    {
        target33();
    }
    else
    {
        target34();
    }
}   /* end of target32() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into the global variable wind_direct and
**  then goes off to another function.
**
**--
*/
#ifdef VMS
static void target31 (void)
#else
static void target31 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "M");
    target35();
}   /* end of target31() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into the global variable wind_direct and
**  then goes off to another function.
**
**--
*/
#ifdef VMS
static void target33 (void)
#else
static void target33 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "N");
    target35();
}   /* end of target33() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into the global variable wind_direct and
**  then goes off to another function.
**
**--
*/
#ifdef VMS
static void target34 (void)
#else
static void target34 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "O");
    target35();
}   /* end of target34() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      another mystery
**
**--
*/
#ifdef VMS
static void target24 (void)
#else
static void target24 ()
#endif
{
#ifdef VMS
    extern void target36(void), target37(void);
#else
    extern void target36(), target37();
#endif

    if (! strcmp (wind_direct, "NE"))
    {
        target36();
    }
    else
    {
        target37();
    }
}   /* end of target24() */

#ifdef VMS
static void target37 (void)
#else
static void target37 ()
#endif
{
#ifdef VMS
    extern void target38(void), target39(void);
#else
    extern void target38(), target39();
#endif

    if (! strcmp (wind_direct, "S"))
    {
        target38();
    }
    else
    {
        target39();
    }
}   /* end of target37() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into wind_direct and then calls target35().
**
**--
*/
#ifdef VMS
static void target36 (void)
#else
static void target36 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "P");
    target35();
}   /* end of target36() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into wind_direct and then calls target35().
**
**--
*/
#ifdef VMS
static void target38 (void)
#else
static void target38 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "Q");
    target35();
}   /* end of target38() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function forces a value into wind_direct and then calls target35().
**
**--
*/
#ifdef VMS
static void target39 (void)
#else
static void target39 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "R");
    target35();
}   /* end of target39() */

#ifdef VMS
static void target29 (void)
#else
static void target29 ()
#endif
{
#ifdef VMS
    extern void target40(void), target41(void);
#else
    extern void target40(), target41();
#endif

    if (! strcmp (wind_direct, "E"))
    {
        target40();
    }
    else
    {
        target41();
    }
}   /* end of target29() */

#ifdef VMS
static void target41 (void)
#else
static void target41 ()
#endif
{
#ifdef VMS
    extern void target42(void), target35(void);
#else
    extern void target42(), target35();
#endif

    if (! strcmp (wind_direct, "W"))
    {
        target42();
	target35();
    }
}   /* end of target41() */

#ifdef VMS
static void target40 (void)
#else
static void target40 ()
#endif
{
#ifdef VMS
    extern void target35(void);
#else
    extern void target35();
#endif

    strcpy (wind_direct, "S");
    target35();
}   /* end of target40() */

#ifdef VMS
static void target42 (void)
#else
static void target42 ()
#endif
{
    strcpy (wind_direct, "T");
}   /* end of target42() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function informs the User of weather forecast.
**
**--
*/
#ifdef VMS
static void target35 (void)
#else
static void target35 ()
#endif
{
#ifdef VMS
    extern void position (int, int), 
                print (char *), 
		target43(void), 
		target44(void);
#else
    extern void position (), 
                print (), 
		target43(), 
		target44();
#endif

    position(17, 1);
    print("                                                                            ");
    position(13, 12);
    print("WIND CONDITION CODE IS ");
    print(wind_direct);
    if (cur_baro_pressure > 30.01)
    {
        target43();
    }
    else
    {
        target44();
    }
}   /* end of target35() */

#ifdef VMS
static void target44 (void)
#else
static void target44 ()
#endif
{
#ifdef VMS
    extern void target45(void), target46(void);
#else
    extern void target45(), target46();
#endif

    if (cur_baro_pressure < 29.81)
    {
        target45();
    }
    else
    {
        target46();
    }
}   /* end of target44() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This routine will ask about the barametric pressure and then make a
**  choice depending upon the answer given by the User.
**
**--
*/
#ifdef VMS
static void target46 (void)
#else
static void target46 ()
#endif
{
#ifdef VMS
    extern void query_baro_pressure (const char *), 
		target47(void), 
		target52(void),
		target53(void);
    char *uppercase(char *);
#else
    extern void query_baro_pressure (), 
		target47(), 
		target52(),
		target53();
    char *uppercase();
#endif

    /*	 
    **  Get the barometric pressure.
    */	 
    do
    {
        query_baro_pressure ("IS PRESSURE RISING (R), FALLING (F), OR STEADY (S) ");
	uppercase(baro_pressure);
    } while (baro_pressure[0] != 'F' && baro_pressure[0] != 'R' && baro_pressure[0] != 'S');

    /*	 
    **  Now, do the appropriate action.
    */	 
    if (baro_pressure[0] == 'F')
    {
        target47();
    }
    else if (baro_pressure[0] == 'R')
    {
        target52();
    }
    else
    {
        target53();
    }
}   /* end of target46() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function performs the printing out to the User a question
**  concerning the barometric pressure and the retrieving from the User the
**  answer.
**
**  FORMAL PARAMETERS:
**
**      query_string:
**          a pointer of type char
**
**--
*/
#ifdef VMS
static void query_baro_pressure (const char *query_string)
#else
static void query_baro_pressure (query_string)
const char *query_string;
#endif
{
#ifdef VMS
    extern void position(int, int), 
		print(char *), 
		get_string(char *);
#else
    extern void position(), 
		print(), 
		get_string();
#endif

    position(17, 1);
    print ("                                                                            ");
    position(10, 12);
    print (query_string);
    get_string(baro_pressure);
}   /* end of query_baro_pressure() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      More code on getting the barometric pressure.
**
**--
*/
#ifdef VMS
static void target47 (void)
#else
static void target47 ()
#endif
{
#ifdef VMS
    extern void query_baro_pressure (const char *), 
		target49(void), 
		target50(void);
    char *uppercase(char *);
#else
    extern void query_baro_pressure (), 
		target49(), 
		target50();
    char *uppercase();
#endif

    /*	 
    **  Get some more information on the barometric pressure.
    */	 
    do
    {
        query_baro_pressure("IS IT FALLING RAPIDLY (R) OR SLOWLY (S)            ");
	uppercase(baro_pressure);
    } while (baro_pressure[0] != 'R' && baro_pressure[0] != 'S');

    if (baro_pressure[0] == 'R')
    {
        target49();
    }
    else
    {
        target50();
    }
}   /* end of target47() */

#ifdef VMS
static void target49 (void)
#else
static void target49 ()
#endif
{
#ifdef VMS
    void target51(void);
#else
    void target51();
#endif

    strcpy (baro_pressure, "C6");
    target51();
}   /* end of target49() */

#ifdef VMS
static void target50 (void)
#else
static void target50 ()
#endif
{
#ifdef VMS
    void target51(void);
#else
    void target51();
#endif

    strcpy (baro_pressure, "C5");
    target51();
}   /* end of target50() */

#ifdef VMS
static void target52 (void)
#else
static void target52 ()
#endif
{
#ifdef VMS
    void target51(void);
#else
    void target51();
#endif

    strcpy (baro_pressure, "C7");
    target51();
}   /* end of target52() */

#ifdef VMS
static void target53 (void)
#else
static void target53 ()
#endif
{
#ifdef VMS
    void target51(void);
#else
    void target51();
#endif

    strcpy (baro_pressure, "C0");
    target51();
}   /* end of target53() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This function gets some information from the User
**
**--
*/
#ifdef VMS
static void target43 (void)
#else
static void target43 ()
#endif
{
#ifdef VMS
    extern void query_baro_pressure (const char *), 
		target54(void), 
		target51(void);
    extern char *uppercase(char *);
#else
    extern void query_baro_pressure (), 
		target54(), 
		target51();
    extern char *uppercase();
#endif

    /*	 
    **  Get some more barometric information.
    */	 
    do
    {
        query_baro_pressure("IS PRESSURE RISING (R), FALLING (F), OR STEADY (S) ");
	uppercase(baro_pressure);
    } while (baro_pressure[0] != 'F' && baro_pressure[0] != 'R' && baro_pressure[0] != 'S');

    /*	 
    **  Now, go do something more.
    */	 
    if (baro_pressure[0] == 'F')
    {
        target54();
    }
    else if (baro_pressure[0] == 'S')
    {
        strcpy (baro_pressure, "C1");
    }
    else
    {
        strcpy (baro_pressure, "C2");
    }

    target51();
}   /* end of target43() */

#ifdef VMS
static void target54 (void)
#else
static void target54 ()
#endif
{
#ifdef VMS
    extern void query_baro_pressure (const char *),
		target51(void);
    extern char *uppercase(char *);
#else
    extern void query_baro_pressure (),
		target51();
    extern char *uppercase();
#endif

    do
    {
        query_baro_pressure("IS IT FALLING RAPIDLY (R) OR SLOWLY (S)            ");
	uppercase(baro_pressure);
    } while (baro_pressure[0] != 'R' && baro_pressure[0] != 'S');

    if (baro_pressure[0] == 'R')
    {
        strcpy (baro_pressure, "C4");
    }
    else
    {
        strcpy (baro_pressure, "C3");
    }

    target51();
}   /* end of target54() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This is another function which gets some barometric pressure
**  information from the User.
**
**--
*/
#ifdef VMS
static void target45 (void)
#else
static void target45 ()
#endif
{
#ifdef VMS
    extern void query_baro_pressure (const char *), 
		target51(void);
    extern char *uppercase(char *);
#else
    extern void query_baro_pressure (), 
		target51();
    extern char *uppercase();
#endif

    do
    {
        query_baro_pressure("IS THE PRESSURE RISING (R) OR FALLING (F)          ");
	uppercase(baro_pressure);
    } while (baro_pressure[0] != 'R' && baro_pressure[0] != 'F');

    if (baro_pressure[0] == 'R')
    {
        strcpy (baro_pressure, "C8");
    }
    else
    {
        strcpy (baro_pressure, "C9");
    }

    target51();
}   /* end of target45() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**      This is a rather lengthy and important function for the barometric
**  pressure.
**
**--
*/
#ifdef VMS
static void target51 (void)
#else
static void target51 ()
#endif
{
#ifdef VMS
    extern void position (int, int), 
                print (char *), 
		target62(void), 
		target63(void),
		target64(void),
		target65(void),
		target66(void),
		target67(void),
		target68(void),
		target69(void),
		target70(void),
		target71(void),
		target72(void),
		target73(void),
		target74(void),
		target75(void),
		target76(void),
		target30(void);
#else
    extern void position (), 
                print (), 
		target62(), 
		target63(),
		target64(),
		target65(),
		target66(),
		target67(),
		target68(),
		target69(),
		target70(),
		target71(),
		target72(),
		target73(),
		target74(),
		target75(),
		target76(),
		target30();
#endif
    int x;

    position(17, 1);
    print("                                                                            ");
    position(14, 12);
    print("BAROMETRIC CODE IS ");
    print(baro_pressure);
    if (! strcmp (wind_direct, "O"))
    {
        target25();
    }
    else if (! strcmp (wind_direct, "R"))
    {
        target25();
    }

    position(17, 1);
    print("                                                                            ");
    position(17, 18);
    print("PLEASE WAIT - FORECAST BEING COMPUTED");
    for (x = 0;  x < 3200;  x++)
        ;
    position(17, 18);
    print("                                                 ");
    if (!strcmp (wind_direct, "T") && !strcmp (baro_pressure, "C8"))
        target62();
    if (!strcmp(wind_direct,"M") && !strcmp(baro_pressure,"C7"))
        target63();
    if (!strcmp(wind_direct,"Q") && !strcmp(baro_pressure,"C3"))
        target64();
    if (!strcmp(wind_direct,"Q") && !strcmp(baro_pressure,"C4"))
        target65();
    if (!strcmp(wind_direct,"Q") && !strcmp(baro_pressure,"C9"))
        target66();
    if (!strcmp(wind_direct,"P") && !strcmp(baro_pressure,"C3"))
        target67();
    if (!strcmp(wind_direct,"P") && !strcmp(baro_pressure,"C4"))
        target68();
    if (!strcmp(wind_direct,"P") && !strcmp(baro_pressure,"C5"))
        target69();
    if (!strcmp(wind_direct,"P") && !strcmp(baro_pressure,"C6"))
        target70();
    if (!strcmp(wind_direct,"P") && !strcmp(baro_pressure,"C9"))
        target66();
    if (!strcmp(wind_direct,"S") && !strcmp(baro_pressure,"C3"))
        target71();
    if (!strcmp(wind_direct,"S") && !strcmp(baro_pressure,"C4"))
        target72();
    if (!strcmp(wind_direct,"S") && !strcmp(baro_pressure,"C9"))
        target73();
    if (!strcmp(wind_direct,"N") && !strcmp(baro_pressure,"C1"))
        target74();
    if (!strcmp(wind_direct,"N") && !strcmp(baro_pressure,"C2"))
        target75();
    if (!strcmp(wind_direct,"N") && !strcmp(baro_pressure,"C3"))
        target76();
    if (!strcmp(wind_direct,"N") && !strcmp(baro_pressure,"C7"))
        target63();

    position(17, 20);
    print("WIND INCREASING; RAIN WITHIN 12 HOURS");
    target30();
}   /* end of target51() */

#ifdef VMS
static void target62 (void)
#else
static void target62 ()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position(17, 30);
    print("CLEARING AND COLDER");
    target30();
}   /* end of target62() */

#ifdef VMS
static void target63(void)
#else
static void target63()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 20);
    print ("CLEARING WITHIN A FEW HOURS/");
    position (19, 20);
    print ("FAIR FOR SEVERAL DAYS");
    target30();
}

#ifdef VMS
static void target64(void)
#else
static void target64()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 30);
    print ("RAIN WITHIN 24 HOURS");
    target30();
}

#ifdef VMS
static void target65(void)
#else
static void target65()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 20);
    print ("WIND INCREASING; RAIN WITHIN 24 HOURS");
    target30();
}

#ifdef VMS
static void target66(void)
#else
static void target66()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("SEVERE STORM IMMIMENT, FOLLOWED WITHIN 24 HOURS");
    position (19, 15);
    print ("BY CLEARING. IN WINTER, COLDER TEMPERATURES.");
    target30();
}

#ifdef VMS
static void target67(void)
#else
static void target67()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 30);
    print ("RAIN WITHIN 12 TO 18 HOURS");
    target30();
}

#ifdef VMS
static void target68(void)
#else
static void target68()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target69(void);
#else
    extern void position(), print(), target69();
#endif

    position (17, 20);
    target69();
}

#ifdef VMS
static void target69(void)
#else
static void target69()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 20);
    print ("RAIN WILL CONTINUE FOR 1 TO 2 DAYS");
    target30();
}

#ifdef VMS
static void target70(void)
#else
static void target70()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("RAIN, WITH HIGH WIND, FOLLOWED WITHIN 36 HOURS BY");
    position (19, 15);
    print ("CLEARING. IN WINTER - COLDER TEMPERATURES.");
    target30();
}

#ifdef VMS
static void target71(void)
#else
static void target71()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("SUMMER - LIGHT WINDS; RAIN MAY NOT FALL FOR");
    position (19, 15);
    print ("SEVERAL DAYS.  WINTER - RAIN WITHIN 24 HOURS");
    target30();
}

#ifdef VMS
static void target72(void)
#else
static void target72()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("SUMMER RAIN PROBABLE 12/24 HOURS.  WINTER");
    position (19, 15);
    print ("RAIN OR SNOW, INCREASING WIND; BAD WEATHER");
    position (21, 15);
    print ("OFTEN SETS IN WHEN BAROMETER BEGINS TO FALL AND");
    position (23, 15);
    print ("WINDS SET IN FROM THE NORTHEAST.");
    target30();
}

#ifdef VMS
static void target73(void)
#else
static void target73()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("SEVERE NORTHEAST GALE AND HEAVY PRECIPITATION,");
    position (19, 15);
    print ("IN WINTER - HEAVY SNOW FOLLOWED BY A COLD WAVE");
    target30();
}

#ifdef VMS
static void target74(void)
#else
static void target74()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 20);
    print ("CONTINUED FAIR WEATHER WITH");
    position (19, 20);
    print ("NO DECIDED TEMPERATURE CHANGE");
    target30();
}

#ifdef VMS
static void target75(void)
#else
static void target75()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 20);
    print ("FAIR, FOLLOWED WITHIN 2 DAYS BY RAIN");
    target30();
}

#ifdef VMS
static void target76(void)
#else
static void target76()
#endif
{
#ifdef VMS
    extern void position(int, int), print(char *), target30(void);
#else
    extern void position(), print(), target30();
#endif

    position (17, 15);
    print ("FAIR FOR 2 DAYS WITH SLOWLY RISING TEMPERATURES");
    target30();
}   /* end of target76() */

/*
**++
**  FUNCTIONAL DESCRIPTION:
**
**	This is the function which asks the User if they wish to do another
**  forecast or not.
**
**--
*/
#ifdef VMS
static void target30 (void)
#else
static void target30 ()
#endif
{
#ifdef VMS
    extern void position (int, int), print (char *), get_string (char *);
#else
    extern void position (), print (), get_string ();
#endif

    position(24, 17);
    print("DO YOU WISH TO RUN ANOTHER FORECAST (Y/N)");
    get_string(again);
}   /* end of target30() */
