ref: 98fed10bfb4baa2780927199b95039c18200c3e2
parent: 33916ec13481ff49aec79c409c741e4433e8df0f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 9 07:56:56 EST 2025
plot: don't put newline in sysfatal()
--- a/sys/src/cmd/plot/libplot/machdep.c
+++ b/sys/src/cmd/plot/libplot/machdep.c
@@ -119,7 +119,7 @@
///// einit(Emouse);
offscreen = allocimage(display, insetrect(screen->r, 4), screen->chan, 0, -1);
if(offscreen == nil)
- sysfatal("Can't double buffer\n");
+ sysfatal("Can't double buffer");
clipminx = mapminx = screen->r.min.x+4;
clipminy = mapminy = screen->r.min.y+4;
clipmaxx = mapmaxx = screen->r.max.x-5;
--- a/sys/src/cmd/plot/plot.c
+++ b/sys/src/cmd/plot/plot.c
@@ -157,7 +157,7 @@
eresized(int new)
{
if(new && getwindow(display, Refnone) < 0)
- sysfatal("plot: can't reattach to window: %r\n");
+ sysfatal("plot: can't reattach to window: %r");
// resizeto((Point){Dx(offscreen->r)+4, Dy(offscreen->r)+4});
m_swapbuf();
}
@@ -408,7 +408,7 @@
}while(strchr(" \t\n", c) || c!='.' && c!='+' && c!='-' && ispunct(c));
fsp->peekc=c;
if(!numstring())
- sysfatal("%s:%d: number expected\n", fsp->name, fsp->lineno);
+ sysfatal("%s:%d: number expected", fsp->name, fsp->lineno);
x[i]=atof(argstr)*fsp->scale;
}
}
@@ -525,7 +525,7 @@
fsp->peekc=c;
}
if(!pplots)
- sysfatal("%s:%d: no command\n", fsp->name, fsp->lineno);
+ sysfatal("%s:%d: no command", fsp->name, fsp->lineno);
switch(pplots-plots){
case ARC: numargs(7); rarc(x[0],x[1],x[2],x[3],x[4],x[5],x[6]); break;
case BOX: numargs(4); box(x[0], x[1], x[2], x[3]); break;
@@ -564,7 +564,7 @@
case TEXT: strarg(); text(argstr); pplots=0; break;
case VEC: numargs(2); vec(x[0], x[1]); break;
default:
- sysfatal("%s:%d: plot: missing case %zd\n", fsp->name, fsp->lineno, pplots-plots);
+ sysfatal("%s:%d: plot: missing case %zd", fsp->name, fsp->lineno, pplots-plots);
}
}
return 1;
@@ -582,7 +582,7 @@
ap = a;
while(isalpha(*ap))ap++;
if(ap == a)
- sysfatal("plot: no name with define\n");
+ sysfatal("plot: no name with define");
i = ap - a;
if(names+i+1 > enames){
names = malloc((unsigned)512);
--
⑨