Tweak grap to make it compile silently.
This commit is contained in:
parent
7534722667
commit
1e1cea296a
4 changed files with 11 additions and 7 deletions
|
|
@ -132,6 +132,8 @@ extern int pointsize, ps_set;
|
|||
#define min(x,y) (((x) <= (y)) ? (x) : (y))
|
||||
#define max(x,y) (((x) >= (y)) ? (x) : (y))
|
||||
|
||||
extern char *unsharp(char*);
|
||||
|
||||
extern void yyerror(char *);
|
||||
extern void coord_x(Point);
|
||||
extern void coord_y(Point);
|
||||
|
|
@ -202,6 +204,7 @@ extern void plot(Attr *, Point);
|
|||
extern void plotnum(double, char *, Point);
|
||||
extern void drawdesc(int, Obj *, Attr *, char *);
|
||||
extern void next(Obj *, Point, Attr *);
|
||||
#define print grapprint
|
||||
extern void print(void);
|
||||
extern void endstat(void);
|
||||
extern void graph(char *);
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ void copy(void) /* begin input from file, etc. */
|
|||
FILE *fin;
|
||||
|
||||
if (newfile) {
|
||||
if ((fin = fopen(newfile, "r")) == NULL)
|
||||
if ((fin = fopen(unsharp(newfile), "r")) == NULL)
|
||||
ERROR "can't open file %s", newfile FATAL;
|
||||
curfile++;
|
||||
curfile->fin = fin;
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@
|
|||
#include "grap.h"
|
||||
#include "y.tab.h"
|
||||
|
||||
extern char *unsharp(char*);
|
||||
|
||||
int dbg = 0;
|
||||
|
||||
#ifndef GRAPDEFINES
|
||||
#define GRAPDEFINES "#9/sys/lib/grap.defines"
|
||||
#endif
|
||||
char *lib_defines;
|
||||
|
||||
int lib = 1; /* 1 to include lib_defines */
|
||||
|
|
@ -40,7 +41,7 @@ main(int argc, char *argv[])
|
|||
{
|
||||
extern void onintr(int), fpecatch(int);
|
||||
|
||||
lib_defines = unsharp("#9/lib/grap.defines");
|
||||
lib_defines = unsharp(GRAPDEFINES);
|
||||
|
||||
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
|
||||
signal(SIGINT, onintr);
|
||||
|
|
@ -90,8 +91,8 @@ main(int argc, char *argv[])
|
|||
|
||||
void onintr(int n)
|
||||
{
|
||||
//n;
|
||||
if (!dbg)
|
||||
if(n){}
|
||||
if(!dbg)
|
||||
unlink(tempfile);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ void do_first(void) /* done at first .G1: definitions, etc. */
|
|||
sprintf(buf, "define pid /%d/\n", getpid());
|
||||
pbstr(buf);
|
||||
if (lib != 0) {
|
||||
if ((fp = fopen(lib_defines, "r")) != NULL) {
|
||||
if ((fp = fopen(unsharp(lib_defines), "r")) != NULL) {
|
||||
sprintf(buf1, "copy \"%s\"\n", lib_defines);
|
||||
pbstr(buf1);
|
||||
fclose(fp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue