1 |
– |
/* Copyright (c) 1987 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* ximage.c - driver for X-windows |
6 |
|
* |
15 |
|
#include <X/cursors/bcross_mask.cursor> |
16 |
|
|
17 |
|
#include <sys/types.h> |
18 |
< |
|
18 |
> |
#include <string.h> |
19 |
|
#include <ctype.h> |
20 |
+ |
#include <time.h> |
21 |
|
|
22 |
|
#include "color.h" |
25 |
– |
|
23 |
|
#include "resolu.h" |
27 |
– |
|
24 |
|
#include "xraster.h" |
29 |
– |
|
25 |
|
#include "view.h" |
31 |
– |
|
26 |
|
#include "pic.h" |
33 |
– |
|
27 |
|
#include "random.h" |
28 |
|
|
29 |
|
#define controlshift(e) (((XButtonEvent *)(e))->detail & (ShiftMask|ControlMask)) |
79 |
|
|
80 |
|
char errmsg[128]; |
81 |
|
|
89 |
– |
extern long ftell(); |
82 |
|
|
91 |
– |
extern char *malloc(), *calloc(); |
92 |
– |
|
93 |
– |
extern double pow(), log(); |
94 |
– |
|
95 |
– |
|
83 |
|
main(argc, argv) |
84 |
|
int argc; |
85 |
|
char *argv[]; |
158 |
|
} |
159 |
|
|
160 |
|
|
161 |
+ |
int |
162 |
|
headline(s) /* get relevant info from header */ |
163 |
|
char *s; |
164 |
|
{ |
171 |
|
wrongformat = strcmp(fmt, COLRFMT); |
172 |
|
} else if (isview(s) && sscanview(&ourview, s) > 0) |
173 |
|
gotview++; |
174 |
+ |
return(0); |
175 |
|
} |
176 |
|
|
177 |
|
|
240 |
|
} |
241 |
|
|
242 |
|
|
243 |
+ |
void |
244 |
|
eputs(s) |
245 |
|
char *s; |
246 |
|
{ |
248 |
|
} |
249 |
|
|
250 |
|
|
251 |
+ |
void |
252 |
|
quit(code) |
253 |
|
int code; |
254 |
|
{ |
562 |
|
cerr[x] = err + errp; |
563 |
|
} |
564 |
|
} |
565 |
< |
free((char *)inl); |
566 |
< |
free((char *)cerr); |
565 |
> |
free((void *)inl); |
566 |
> |
free((void *)cerr); |
567 |
|
} |
568 |
|
|
569 |
|
|
591 |
|
xr->cdefs[xr->ncolors].pixel = *p; |
592 |
|
xr->pmap[*p] = xr->ncolors++; |
593 |
|
} |
594 |
< |
xr->cdefs = (Color *)realloc((char *)xr->cdefs, xr->ncolors*sizeof(Color)); |
594 |
> |
xr->cdefs = (Color *)realloc((void *)xr->cdefs, xr->ncolors*sizeof(Color)); |
595 |
|
if (xr->cdefs == NULL) |
596 |
|
return(0); |
597 |
|
return(1); |
668 |
|
int y; |
669 |
|
pixel *l; |
670 |
|
{ |
671 |
< |
bcopy((char *)l, (char *)ourras->data.bz+BZPixmapSize(xmax,y), BZPixmapSize(xmax,1)); |
671 |
> |
memcpy((void *)ourras->data.bz+BZPixmapSize(xmax,y), (void *)l, BZPixmapSize(xmax,1)); |
672 |
|
} |
673 |
|
|
674 |
|
|