Release calc version 2.12.0.4

This commit is contained in:
Landon Curt Noll
2006-06-20 03:31:22 -07:00
parent bd3086138b
commit afe37ec851
25 changed files with 437 additions and 202 deletions

24
token.c
View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.8 $
* @(#) $Id: token.c,v 29.8 2006/06/03 22:47:28 chongo Exp $
* @(#) $Revision: 29.9 $
* @(#) $Id: token.c,v 29.9 2006/06/20 10:28:06 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/token.c,v $
*
* Under source code control: 1990/02/15 01:48:25
@@ -770,3 +770,23 @@ scanerror(int skip, char *fmt, ...)
}
}
}
/*
* Display a warning and return to compiling
*/
void
warning(char *fmt, ...)
{
va_list ap;
char *name; /* name of file with error */
char buf[MAXERROR+1];
name = inputname();
if (name)
fprintf(stderr, "\"%s\", line %ld: ", name, linenumber());
va_start(ap, fmt);
vsnprintf(buf, MAXERROR, fmt, ap);
va_end(ap);
buf[MAXERROR] = '\0';
fprintf(stderr, "Warning: %s\n", buf);
}