/*
 * This is sample code generated by rpcgen.
 * These are only templates and you can use them
 * as a guideline for developing your own functions.
 */

#include "gcd.h"
#include <stdio.h>
#include <stdlib.h> /* getenv, exit */


void
gcd_program_1(host)
        char *host;
{
        CLIENT *clnt;
        int  *result_1;
        struct param_t params;

        clnt = clnt_create(host, GCD_PROGRAM, GCD_VERSION, "netpath");
        if (clnt == (CLIENT *) NULL) {
                clnt_pcreateerror(host);
                exit(1);
        }

        /* Enter code here to fill in params, similar to the one in the original code
         *     printf ("enter x: ");
         *     scanf ("%d", &(params.x));
         *     printf ("enter y: ");
         *     scanf ("%d", &(params.y));
         **/

        result_1 = computegcd_1(&params, clnt);
        if (result_1 == (int *) NULL) {
                clnt_perror(clnt, "call failed");
        }
        /*
         * Print out the result here
         **/
        clnt_destroy(clnt);
}


main(argc, argv)
        int argc;
        char *argv[];
{
        char *host;

        if (argc < 2) {
                printf("usage: %s server_host\n", argv[0]);
                exit(1);
        }
        host = argv[1];
        gcd_program_1(host);
}