/* $Header: /afs/athena.mit.edu/astaff/project/atdev/src/fmax/RCS/misc.c,v 1.3 91/03/05 09:13:37 dot Exp $ */

/*******************************************************************
  Copyright (C) 1990 by the Massachusetts Institute of Technology

   Export of this software from the United States of America is assumed
   to require a specific license from the United States Government.
   It is the responsibility of any person or organization contemplating
   export to obtain such a license before exporting.

WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
distribute this software and its documentation for any purpose and
without fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright notice and
this permission notice appear in supporting documentation, and that
the name of M.I.T. not be used in advertising or publicity pertaining
to distribution of the software without specific, written prior
permission.  M.I.T. makes no representations about the suitability of
this software for any purpose.  It is provided "as is" without express
or implied warranty.

***************************************************************** */

/*
 *
 *    G N U P L O T  --	 misc.c
 *
 *  Copyright (C) 1986, 1987  Thomas Williams, Colin Kelley
 *
 *  You may use this code as you wish if credit is given and this message
 *  is retained.
 *
 *  Please e-mail any useful additions to vu-vlsi!plot so they may be
 *  included in later releases.
 *
 */

#include <stdio.h>
#include <memory.h>
/* #include "windows.h" */
#include "datatypes.h"

extern double zero;
extern BOOLEAN screen_ok;

/*
save_functions(fp)
FILE *fp;
{
register struct udft_entry *udf = first_udf;
    
    if (fp) {
	while (udf) {
	    if (udf->definition)
		fprintf(fp,"%s\n",udf->definition);
	    udf = udf->next_udf;
	}
	(void) fclose(fp);
    } else
	oserr("Cannot open save file");	    
}
*/
/*
save_variables(fp)
FILE *fp;
{
register struct udvt_entry *udv = first_udv->next_udv; 

    if (fp) {
	while (udv) {
	    if (!udv->udv_undef) {
		fprintf(fp,"%s = ",udv->udv_name);
		dispval(fp,&(udv->udv_value));
		(void) putc('\n',fp);
	    }
	    udv = udv->next_udv;
	}
	(void) fclose(fp);
    } else
	oserr("Cannot open save file");	    
}

*/
/*
save_all(fp)
FILE *fp;
{
register struct udft_entry *udf = first_udf;
register struct udvt_entry *udv = first_udv->next_udv;	

    if (fp) {
	while (udf) {
	    if (udf->definition)
		fprintf(fp,"%s\n",udf->definition);
	    udf = udf->next_udf;
	}
	while (udv) {
	    if (!udv->udv_undef) {
		fprintf(fp,"%s = ",udv->udv_name);
		dispval(fp,&(udv->udv_value));
		(void) putc('\n',fp);
	    }
	    udv = udv->next_udv;
	}
	(void) fclose(fp);
    } else
	oserr("Cannot open save file");	    
}
*/
/*
load_file(fp)
FILE *fp;
{
register int len;
extern char input_line[];

    if (fp) {
	while (fgets(input_line,MAX_LINE_LEN,fp)) {
	    len = strlen(input_line) - 1;
	    if (input_line[len] == '\n')
		input_line[len] = '\0';

	    screen_ok = FALSE;	

	    do_line();
	}
	(void) fclose(fp);
    } else
	oserr("Cannot open load file");
}
*/
void error(msg)
char *msg;
{
     fprintf (stderr, "fmax: ");
     fprintf(stderr,msg);
     exit(10);
}






