#include <stdlib.h>
#include <signal.h>
#include <string.h>
+#include <errno.h>
#include <X11/Intrinsic.h> /* For Boolean */
#include <X11/Shell.h>
{
XSetWindowAttributes xswa;
XGCValues xgcv;
- XColor nullcolor;
int nitems = 0;
int window;
int i;
Win[window].gc = XCreateGC(dsp, Win[window].w,
GCForeground | GCBackground, &xgcv);
}
- nice(nicelevel);
+ if(-1 == nice(nicelevel)) {
+ fprintf(stderr, "dtscreen: failed to set nice() level '%s'\n", strerror(errno));
+ }
justDisplay();
#include <X11/Xutil.h>
#include <X11/Xos.h>
+#include <Dt/Dt.h>
+
#define MAXSCREENS 3
#define NUMCOLORS 64
extern void (*init) ();
extern void GetResources();
+extern void CheckResources();
extern void hsbramp();
extern void error();
extern long seconds();
register double x, y;
register int l;
{
- int xp, yp, i;
+ int i;
double nx, ny;
if (l == fs->max_levels) {
return False;
if (x > -1.0 && x < 1.0 && y > -1.0 && y < 1.0) {
- xp = fs->pts[fs->num_points].x = (int) ((fs->width / 2)
- * (x + 1.0));
- yp = fs->pts[fs->num_points].y = (int) ((fs->height / 2)
- * (y + 1.0));
fs->num_points++;
if (fs->num_points > MAXBATCH) { /* point buffer size */
XDrawPoints(dsp, fs->pwin->w, fs->pwin->gc, fs->pts,
flamestruct *fs = (flamestruct *)pwin->data;
int i, j, k;
- static alt = 0;
+ static int alt = 0;
if (!(fs->cur_level++ % fs->max_levels)) {
XClearWindow(dsp, fs->pwin->w);
x = random() % pp->width;
xvel = FLOATRAND(-pp->maxvelx, pp->maxvelx);
/* All this to stop too many rockets going offscreen: */
- if (x < pp->lmargin && xvel < 0.0 || x > pp->rmargin && xvel > 0.0)
+ if ((x < pp->lmargin && xvel < 0.0) || (x > pp->rmargin && xvel > 0.0))
xvel = -xvel;
yvel = FLOATRAND(pp->minvely, pp->maxvely);
fuse = INTRAND(MINFUSE, MAXFUSE);
extern void initworm();
extern void drawworm();
+void CheckResources(void);
+
typedef struct {
char *cmdline_arg;
void (*lp_init) ();
{
if (display != NULL) {
char *colon = strchr(display, ':');
- int n = colon - display;
if (colon == NULL)
#ifdef MIT_R5
}
-CheckResources()
+void CheckResources(void)
{
int i;
#define MAXANGLE 10000.0 /* irrectangular */
#define DEFAULTCOUNT 3
-typedef unsigned char Boolean;
+/*typedef unsigned char Boolean; */
#define IDENT(X) X
#if defined (__STDC__) || defined (AIXV3)