⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.c

📁 把fortran语言编的程序转为c语言编的程序, 运行环境linux
💻 C
字号:
/****************************************************************Copyright 1990, 1993, 1994 by AT&T Bell Laboratories and Bellcore.Permission to use, copy, modify, and distribute this softwareand its documentation for any purpose and without fee is herebygranted, provided that the above copyright notice appear in allcopies and that both that the copyright notice and thispermission notice and warranty disclaimer appear in supportingdocumentation, and that the names of AT&T Bell Laboratories orBellcore or any of their entities not be used in advertising orpublicity pertaining to distribution of the software withoutspecific, written prior permission.AT&T and Bellcore disclaim all warranties with regard to thissoftware, including all implied warranties of merchantabilityand fitness.  In no event shall AT&T or Bellcore be liable forany special, indirect or consequential damages or any damageswhatsoever resulting from loss of use, data or profits, whetherin an action of contract, negligence or other tortious action,arising out of or in connection with the use or performance ofthis software.****************************************************************/#include "defs.h" void#ifdef KR_headerswarni(s, t)	char *s;	int t;#elsewarni(char *s, int t)#endif{	char buf[100];	sprintf(buf,s,t);	warn(buf);	} void#ifdef KR_headerswarn1(s, t)	char *s;	char *t;#elsewarn1(char *s, char *t)#endif{	char buff[100];	sprintf(buff, s, t);	warn(buff);} void#ifdef KR_headerswarn(s)	char *s;#elsewarn(char *s)#endif{	if(nowarnflag)		return;	if (infname && *infname)		fprintf(diagfile, "Warning on line %ld of %s: %s\n",			lineno, infname, s);	else		fprintf(diagfile, "Warning on line %ld: %s\n", lineno, s);	fflush(diagfile);	++nwarn;} void#ifdef KR_headerserrstr(s, t)	char *s;	char *t;#elseerrstr(char *s, char *t)#endif{	char buff[100];	sprintf(buff, s, t);	err(buff);} void#ifdef KR_headerserri(s, t)	char *s;	int t;#elseerri(char *s, int t)#endif{	char buff[100];	sprintf(buff, s, t);	err(buff);} void#ifdef KR_headerserrl(s, t)	char *s;	long t;#elseerrl(char *s, long t)#endif{	char buff[100];	sprintf(buff, s, t);	err(buff);} char *err_proc = 0; void#ifdef KR_headerserr(s)	char *s;#elseerr(char *s)#endif{	if (err_proc)		fprintf(diagfile,			"Error processing %s before line %ld",			err_proc, lineno);	else		fprintf(diagfile, "Error on line %ld", lineno);	if (infname && *infname)		fprintf(diagfile, " of %s", infname);	fprintf(diagfile, ": %s\n", s);	fflush(diagfile);	++nerr;} void#ifdef KR_headersyyerror(s)	char *s;#elseyyerror(char *s)#endif{	err(s);} void#ifdef KR_headersdclerr(s, v)	char *s;	Namep v;#elsedclerr(char *s, Namep v)#endif{	char buff[100];	if(v)	{		sprintf(buff, "Declaration error for %s: %s", v->fvarname, s);		err(buff);	}	else		errstr("Declaration error %s", s);} void#ifdef KR_headersexecerr(s, n)	char *s;	char *n;#elseexecerr(char *s, char *n)#endif{	char buf1[100], buf2[100];	sprintf(buf1, "Execution error %s", s);	sprintf(buf2, buf1, n);	err(buf2);} void#ifdef KR_headersFatal(t)	char *t;#elseFatal(char *t)#endif{	fprintf(diagfile, "Compiler error line %ld", lineno);	if (infname)		fprintf(diagfile, " of %s", infname);	fprintf(diagfile, ": %s\n", t);	done(3);} void#ifdef KR_headersfatalstr(t, s)	char *t;	char *s;#elsefatalstr(char *t, char *s)#endif{	char buff[100];	sprintf(buff, t, s);	Fatal(buff);} void#ifdef KR_headersfatali(t, d)	char *t;	int d;#elsefatali(char *t, int d)#endif{	char buff[100];	sprintf(buff, t, d);	Fatal(buff);} void#ifdef KR_headersbadthing(thing, r, t)	char *thing;	char *r;	int t;#elsebadthing(char *thing, char *r, int t)#endif{	char buff[50];	sprintf(buff, "Impossible %s %d in routine %s", thing, t, r);	Fatal(buff);} void#ifdef KR_headersbadop(r, t)	char *r;	int t;#elsebadop(char *r, int t)#endif{	badthing("opcode", r, t);} void#ifdef KR_headersbadtag(r, t)	char *r;	int t;#elsebadtag(char *r, int t)#endif{	badthing("tag", r, t);} void#ifdef KR_headersbadstg(r, t)	char *r;	int t;#elsebadstg(char *r, int t)#endif{	badthing("storage class", r, t);} void#ifdef KR_headersbadtype(r, t)	char *r;	int t;#elsebadtype(char *r, int t)#endif{	badthing("type", r, t);} void#ifdef KR_headersmany(s, c, n)	char *s;	char c;	int n;#elsemany(char *s, char c, int n)#endif{	char buff[250];	sprintf(buff,	    "Too many %s.\nTable limit now %d.\nTry rerunning with the -N%c%d option.\n",	    s, n, c, 2*n);	Fatal(buff);} void#ifdef KR_headerserr66(s)	char *s;#elseerr66(char *s)#endif{	errstr("Fortran 77 feature used: %s", s);	--nerr;} void#ifdef KR_headerserrext(s)	char *s;#elseerrext(char *s)#endif{	errstr("f2c extension used: %s", s);	--nerr;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -