mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtscreen: Resolve (all) 11 warnigns caused by -Wall
This commit is contained in:
parent
a67b65198d
commit
b556633eca
6 changed files with 14 additions and 12 deletions
|
@ -112,6 +112,7 @@ nl_catd scmc_catd; /* Cat descriptor for scmc conversion */
|
|||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <X11/Intrinsic.h> /* For Boolean */
|
||||
#include <X11/Shell.h>
|
||||
|
@ -219,7 +220,6 @@ main(argc, argv)
|
|||
{
|
||||
XSetWindowAttributes xswa;
|
||||
XGCValues xgcv;
|
||||
XColor nullcolor;
|
||||
int nitems = 0;
|
||||
int window;
|
||||
int i;
|
||||
|
@ -375,7 +375,9 @@ main(argc, argv)
|
|||
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();
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#include <X11/Xutil.h>
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#include <Dt/Dt.h>
|
||||
|
||||
#define MAXSCREENS 3
|
||||
#define NUMCOLORS 64
|
||||
|
||||
|
@ -74,6 +76,7 @@ extern void (*callback) ();
|
|||
extern void (*init) ();
|
||||
|
||||
extern void GetResources();
|
||||
extern void CheckResources();
|
||||
extern void hsbramp();
|
||||
extern void error();
|
||||
extern long seconds();
|
||||
|
|
|
@ -119,7 +119,7 @@ recurse(fs, x, y, l)
|
|||
register double x, y;
|
||||
register int l;
|
||||
{
|
||||
int xp, yp, i;
|
||||
int i;
|
||||
double nx, ny;
|
||||
|
||||
if (l == fs->max_levels) {
|
||||
|
@ -128,10 +128,6 @@ recurse(fs, x, y, l)
|
|||
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,
|
||||
|
@ -162,7 +158,7 @@ drawflame(pwin)
|
|||
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);
|
||||
|
|
|
@ -250,7 +250,7 @@ ignite(pwin, pp)
|
|||
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);
|
||||
|
|
|
@ -101,6 +101,8 @@ extern void drawflame();
|
|||
extern void initworm();
|
||||
extern void drawworm();
|
||||
|
||||
void CheckResources(void);
|
||||
|
||||
typedef struct {
|
||||
char *cmdline_arg;
|
||||
void (*lp_init) ();
|
||||
|
@ -507,7 +509,6 @@ open_display()
|
|||
{
|
||||
if (display != NULL) {
|
||||
char *colon = strchr(display, ':');
|
||||
int n = colon - display;
|
||||
|
||||
if (colon == NULL)
|
||||
#ifdef MIT_R5
|
||||
|
@ -710,7 +711,7 @@ GetResources(argc, argv)
|
|||
}
|
||||
|
||||
|
||||
CheckResources()
|
||||
void CheckResources(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue