Commit ced2fee8 authored by kollo's avatar kollo

corrected usage of long integer type --> uint32_t

parent ea551924
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -1014,10 +1015,10 @@ short rsrc_load(const char *filename) { ...@@ -1014,10 +1015,10 @@ short rsrc_load(const char *filename) {
rsrc=malloc(len); rsrc=malloc(len);
int i,a; int i,a;
if((a=fread(rsrc,1,len,dptr))==len) { if((a=fread(rsrc,1,len,dptr))==len) {
WSWAP((char *)((long)rsrc)); WSWAP((char *)rsrc);
if(rsrc->rsh_vrsn==0 || rsrc->rsh_vrsn==1) { if(rsrc->rsh_vrsn==0 || rsrc->rsh_vrsn==1) {
// if(rsrc->rsh_vrsn==0) { // if(rsrc->rsh_vrsn==0) {
for(i=1;i<HDR_LENGTH/2;i++) {WSWAP((char *)((long)rsrc+2*i));} for(i=1;i<HDR_LENGTH/2;i++) {WSWAP((char *)((char *)rsrc+2*i));}
// } // }
#if DEBUG #if DEBUG
printf("RSC loaded: name=<%s> len=%d Bytes\n",filename,len); printf("RSC loaded: name=<%s> len=%d Bytes\n",filename,len);
......
...@@ -13,19 +13,18 @@ ...@@ -13,19 +13,18 @@
//#define GEMFONTSMALL "-*-fixed-*-r-normal-*-8-*-ISO10646-1" //#define GEMFONTSMALL "-*-fixed-*-r-normal-*-8-*-ISO10646-1"
#define GEMFONTSMALL "*5x8*" #define GEMFONTSMALL "*5x8*"
#define WORD short #define WORD int16_t
#define UWORD uint16_t
#define LONG uint32_t
#ifdef _LP64 #ifdef _LP64
#define LONG unsigned int
#define TEDINFO_P LONG #define TEDINFO_P LONG
#define BITBLK_P LONG #define BITBLK_P LONG
#define ICONBLK_P LONG #define ICONBLK_P LONG
#define USRBLK_P LONG #define USRBLK_P LONG
#define OBSPEK_P LONG #define OBSPEK_P LONG
#define CHAR_P LONG #define CHAR_P LONG
#else #else
#define LONG unsigned long
#define TEDINFO_P TEDINFO * #define TEDINFO_P TEDINFO *
#define BITBLK_P BITBLK * #define BITBLK_P BITBLK *
#define ICONBLK_P BITBLK * #define ICONBLK_P BITBLK *
...@@ -76,14 +75,13 @@ ...@@ -76,14 +75,13 @@
#define WHITEBAK 0x40 #define WHITEBAK 0x40
#define DRAW3D 0x80 #define DRAW3D 0x80
#undef BLACK
#undef BLACK #undef WHITE
#undef WHITE #undef RED
#undef RED #undef GREEN
#undef GREEN #undef BLUE
#undef BLUE #undef YELLOW
#undef YELLOW #undef MAGENTA
#undef MAGENTA
/* Object colors */ /* Object colors */
#define WHITE 0 #define WHITE 0
#define BLACK 1 #define BLACK 1
...@@ -205,9 +203,9 @@ OBJECT { ...@@ -205,9 +203,9 @@ OBJECT {
WORD ob_next; /* -> object's next sibling */ WORD ob_next; /* -> object's next sibling */
WORD ob_head; /* -> head of object's children */ WORD ob_head; /* -> head of object's children */
WORD ob_tail; /* -> tail of object's children */ WORD ob_tail; /* -> tail of object's children */
unsigned WORD ob_type; /* type of object- BOX, CHAR,...*/ UWORD ob_type; /* type of object- BOX, CHAR,...*/
unsigned WORD ob_flags; /* flags */ UWORD ob_flags; /* flags */
unsigned WORD ob_state; /* state- SELECTED, OPEN, ... */ UWORD ob_state; /* state- SELECTED, OPEN, ... */
OBSPEC ob_spec; /* "out"- -> anything else */ OBSPEC ob_spec; /* "out"- -> anything else */
WORD ob_x; /* upper left corner of object */ WORD ob_x; /* upper left corner of object */
WORD ob_y; /* upper left corner of object */ WORD ob_y; /* upper left corner of object */
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "defs.h" #include "defs.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <dirent.h> #include <dirent.h>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
......
...@@ -14,14 +14,14 @@ typedef struct { ...@@ -14,14 +14,14 @@ typedef struct {
unsigned char BRAs; /* DC_BRAs */ unsigned char BRAs; /* DC_BRAs */
unsigned char offs; /* sizeof(BYTECODE_HEADER)-2*/ unsigned char offs; /* sizeof(BYTECODE_HEADER)-2*/
unsigned short rsv; /* not used */ unsigned short rsv; /* not used */
unsigned long textseglen; /* size of the text/code segment */ uint32_t textseglen; /* size of the text/code segment */
unsigned long rodataseglen; /* size of the readonly data segment */ uint32_t rodataseglen; /* size of the readonly data segment */
unsigned long sdataseglen; /* size of the data segment for DATA statements*/ uint32_t sdataseglen; /* size of the data segment for DATA statements*/
unsigned long dataseglen; /* size of the data segment */ uint32_t dataseglen; /* size of the data segment */
unsigned long bssseglen; /* storage space for variables */ uint32_t bssseglen; /* storage space for variables */
unsigned long symbolseglen; /* size of the symbol table segment */ uint32_t symbolseglen; /* size of the symbol table segment */
unsigned long stringseglen; /* size of the string segment */ uint32_t stringseglen; /* size of the string segment */
unsigned long relseglen; /* size of the relocation data */ uint32_t relseglen; /* size of the relocation data */
unsigned short flags; /* not used */ unsigned short flags; /* not used */
unsigned short version; /* version, currently=0x117 */ unsigned short version; /* version, currently=0x117 */
} BYTECODE_HEADER; } BYTECODE_HEADER;
...@@ -33,8 +33,8 @@ typedef struct { ...@@ -33,8 +33,8 @@ typedef struct {
unsigned char typ; /* Typ of the symbol */ unsigned char typ; /* Typ of the symbol */
unsigned char subtyp; unsigned char subtyp;
unsigned short rsv; /* not used */ unsigned short rsv; /* not used */
unsigned long name; /* Pointer to Symbol string table */ uint32_t name; /* Pointer to Symbol string table */
unsigned long adr; /* address */ uint32_t adr; /* address */
} BYTECODE_SYMBOL; } BYTECODE_SYMBOL;
/* Symbol types */ /* Symbol types */
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "defs.h" #include "defs.h"
...@@ -50,9 +51,8 @@ void add_history(const char *line) { ...@@ -50,9 +51,8 @@ void add_history(const char *line) {
for(i=0;i<MAX_HISTORY;i++) history[i]=NULL; for(i=0;i<MAX_HISTORY;i++) history[i]=NULL;
historyp=0; historyp=0;
} }
if(historyp<MAX_HISTORY) { if(historyp<MAX_HISTORY) history[historyp++]=strdup(line);
history[historyp++]=strdup(line); else {
} else {
free(history[0]); free(history[0]);
for(i=0;i<MAX_HISTORY-1;i++) history[i]=history[i+1]; for(i=0;i<MAX_HISTORY-1;i++) history[i]=history[i+1];
history[historyp-1]=strdup(line); history[historyp-1]=strdup(line);
......
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include "config.h"
#include "defs.h"
#ifdef HAVE_RFFTW #ifdef HAVE_RFFTW
#include <rfftw.h> #include <rfftw.h>
#include "defs.h"
#include "x11basic.h"
#include "mathematics.h"
#include "fft.h" #include "fft.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
...@@ -730,7 +731,7 @@ static int f_swap(int a) {return(((a&0xffff)<<16)|((a&0xffff0000)>>16));} ...@@ -730,7 +731,7 @@ static int f_swap(int a) {return(((a&0xffff)<<16)|((a&0xffff0000)>>16));}
static double f_cvd(STRING n) {return((double)(*((double *)n.pointer))); } static double f_cvd(STRING n) {return((double)(*((double *)n.pointer))); }
static double f_cvf(STRING n) {return((double)(*((float *)n.pointer))); } static double f_cvf(STRING n) {return((double)(*((float *)n.pointer))); }
static int f_cvi(STRING n) {return((int)(*((short *)n.pointer))); } static int f_cvi(STRING n) {return((int)(*((short *)n.pointer))); }
static int f_cvl(STRING n) {return((int)(*((long *)n.pointer))); } static int f_cvl(STRING n) {return((int)(*((int32_t *)n.pointer))); }
static double f_deg(double d) {return(d/PI*180);} static double f_deg(double d) {return(d/PI*180);}
static int f_device(STRING n) {return(stat_device(n.pointer)); } static int f_device(STRING n) {return(stat_device(n.pointer)); }
static int f_dpeek(int adr) {return((int)(*(short *)INT2POINTER(adr)));} static int f_dpeek(int adr) {return((int)(*(short *)INT2POINTER(adr)));}
...@@ -742,7 +743,7 @@ static double f_frac(double b) {return(b-((double)((int)b)));} ...@@ -742,7 +743,7 @@ static double f_frac(double b) {return(b-((double)((int)b)));}
//static double f_real(COMPLEX b) {return(b.r);} //static double f_real(COMPLEX b) {return(b.r);}
static int f_inode(STRING n) {return(stat_inode(n.pointer)); } static int f_inode(STRING n) {return(stat_inode(n.pointer)); }
static int f_len(STRING n) {return(n.len); } static int f_len(STRING n) {return(n.len); }
static int f_lpeek(int adr) {return((int)(*(long *)INT2POINTER(adr)));} static int f_lpeek(int adr) {return((int)(*(int32_t *)INT2POINTER(adr)));}
static double f_ltextlen(STRING n) {return((double)ltextlen(ltextxfaktor,ltextpflg,n.pointer)); } static double f_ltextlen(STRING n) {return((double)ltextlen(ltextxfaktor,ltextpflg,n.pointer)); }
static int f_malloc(int size) {return(POINTER2INT(malloc((size_t)size)));} static int f_malloc(int size) {return(POINTER2INT(malloc((size_t)size)));}
static int f_mshrink(int adr,int size) {return(0);} /*always return zero*/ static int f_mshrink(int adr,int size) {return(0);} /*always return zero*/
...@@ -1051,7 +1052,7 @@ static int f_julian(STRING n) { /* Julianischer Tag aus time$ */ ...@@ -1051,7 +1052,7 @@ static int f_julian(STRING n) { /* Julianischer Tag aus time$ */
char buf[n.len+1],buf2[n.len+1]; char buf[n.len+1],buf2[n.len+1];
int e; int e;
int day,mon,jahr; int day,mon,jahr;
long jul; int32_t jul;
int ja,jy,jm; int ja,jy,jm;
memcpy(buf,n.pointer,n.len); memcpy(buf,n.pointer,n.len);
...@@ -1067,7 +1068,7 @@ static int f_julian(STRING n) { /* Julianischer Tag aus time$ */ ...@@ -1067,7 +1068,7 @@ static int f_julian(STRING n) { /* Julianischer Tag aus time$ */
if(jy<0) ++jy; if(jy<0) ++jy;
if(mon>2) jm=mon+1; if(mon>2) jm=mon+1;
else { --jy; jm=mon+13; } else { --jy; jm=mon+13; }
jul=(long)(floor(365.25*jy)+floor(30.6001*jm)+day+1720995); jul=(int32_t)(floor(365.25*jy)+floor(30.6001*jm)+day+1720995);
if(day+31L*(mon+12L*jahr)>=IGREG) { if(day+31L*(mon+12L*jahr)>=IGREG) {
ja=(int)(0.01*jy); ja=(int)(0.01*jy);
jul+=2-ja+(int)(0.25*ja); jul+=2-ja+(int)(0.25*ja);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#if defined(__CYGWIN__) || defined(__MINGW32__) #if defined(__CYGWIN__) || defined(__MINGW32__)
#include <windows.h> #include <windows.h>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -399,7 +400,7 @@ Status my_XAllocColor(Display *display,Colormap map,XColor *pixcolor) { ...@@ -399,7 +400,7 @@ Status my_XAllocColor(Display *display,Colormap map,XColor *pixcolor) {
Status rval; Status rval;
if((rval=XAllocColor(display, map, pixcolor))==0) { if((rval=XAllocColor(display, map, pixcolor))==0) {
int i,r,g,b; int i,r,g,b;
unsigned long e=0xfffffff,d; uint32_t e=0xfffffff,d;
XColor savecolor; XColor savecolor;
XColor ppixcolor[256]; XColor ppixcolor[256];
for(i=0;i<256;i++) ppixcolor[i].pixel=i; for(i=0;i<256;i++) ppixcolor[i].pixel=i;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#if defined(__CYGWIN__) || defined(__MINGW32__) #if defined(__CYGWIN__) || defined(__MINGW32__)
#include <windows.h> #include <windows.h>
#endif #endif
...@@ -1785,7 +1786,7 @@ int inp32(PARAMETER *plist,int e) { ...@@ -1785,7 +1786,7 @@ int inp32(PARAMETER *plist,int e) {
unsigned int ergebnis; unsigned int ergebnis;
FILEINFO fff=get_fileptr(plist->integer); FILEINFO fff=get_fileptr(plist->integer);
if(fff.typ==0) {xberror(24,"");return(-1);} /* File nicht geoeffnet */ if(fff.typ==0) {xberror(24,"");return(-1);} /* File nicht geoeffnet */
if(fread(&ergebnis,sizeof(long),1,fff.dptr)<1) io_error(errno,"fread"); if(fread(&ergebnis,sizeof(unsigned int),1,fff.dptr)<1) io_error(errno,"fread");
return(ergebnis); return(ergebnis);
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include "defs.h" #include "defs.h"
#ifdef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <signal.h> #include <signal.h>
...@@ -2520,8 +2521,8 @@ static void c_dpoke(PARAMETER *plist,int e) { ...@@ -2520,8 +2521,8 @@ static void c_dpoke(PARAMETER *plist,int e) {
*adr=(short)plist[1].integer; *adr=(short)plist[1].integer;
} }
static void c_lpoke(PARAMETER *plist,int e) { static void c_lpoke(PARAMETER *plist,int e) {
long *adr=(long *)INT2POINTER(plist->integer); uint32_t *adr=(uint32_t *)INT2POINTER(plist->integer);
*adr=(long)plist[1].integer; *adr=(uint32_t)plist[1].integer;
} }
/* SOUND channel,frequency [Hz],volume (0-1),duration (s)*/ /* SOUND channel,frequency [Hz],volume (0-1),duration (s)*/
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include "defs.h" #include "defs.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -33,7 +34,6 @@ ...@@ -33,7 +34,6 @@
#include "android.h" #include "android.h"
#endif #endif
#include "config.h"
#include "defs.h" #include "defs.h"
#include "x11basic.h" #include "x11basic.h"
#include "wort_sep.h" #include "wort_sep.h"
......
...@@ -11,10 +11,11 @@ ...@@ -11,10 +11,11 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "defs.h" #include "defs.h"
#include "x11basic.h"
#include "mathematics.h" #include "mathematics.h"
#include "fft.h" #include "fft.h"
#define min(a,b) ((a<b)?a:b)
#define max(a,b) ((a>b)?a:b)
/*Gibt 1 zurueck wenn sich der Punkt (x,y) innerhalb des /*Gibt 1 zurueck wenn sich der Punkt (x,y) innerhalb des
Polygonzugs befindet*/ Polygonzugs befindet*/
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "config.h"
#include "defs.h" #include "defs.h"
#include "options.h" #include "options.h"
#include "x11basic.h" #include "x11basic.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "defs.h" #include "defs.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <unistd.h> #include <unistd.h>
...@@ -789,10 +790,10 @@ static STRING f_mkis(int n) { ...@@ -789,10 +790,10 @@ static STRING f_mkis(int n) {
} }
static STRING f_mkls(int n) { static STRING f_mkls(int n) {
STRING ergebnis; STRING ergebnis;
ergebnis.pointer=malloc(sizeof(long)+1); ergebnis.pointer=malloc(4+1);
ergebnis.len=sizeof(long); ergebnis.len=4;
*((long *)ergebnis.pointer)=(long)n; *((uint32_t *)ergebnis.pointer)=(uint32_t)n;
*(ergebnis.pointer+sizeof(long))=0; *(ergebnis.pointer+4)=0;
return(ergebnis); return(ergebnis);
} }
static STRING f_mkfs(double n) { static STRING f_mkfs(double n) {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <SDL/SDL_audio.h> #include <SDL/SDL_audio.h>
#else #else
#define Uint32 unsigned long #define Uint32 uint32_t
#define Uint16 unsigned short #define Uint16 uint16_t
#define Uint8 unsigned char #define Uint8 uint8_t
#endif #endif
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <errno.h> #include <errno.h>
......
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
* COPYING for details * COPYING for details
*/ */
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "defs.h" #include "defs.h"
#include "x11basic.h" #include "x11basic.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include "defs.h" #include "defs.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* COPYING for details * COPYING for details
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "defs.h" #include "defs.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <dirent.h> #include <dirent.h>
...@@ -341,14 +342,14 @@ static int create_window2(int nummer,const char *title, const char* info,int x,i ...@@ -341,14 +342,14 @@ static int create_window2(int nummer,const char *title, const char* info,int x,i
} }
/* Welchen Bildschirm nehmen ? */ /* Welchen Bildschirm nehmen ? */
int screen_num = DefaultScreen(window[nummer].display);/* Ein Server kann mehrere Bildschirme haben */ int screen_num = DefaultScreen(window[nummer].display);/* Ein Server kann mehrere Bildschirme haben */
unsigned long border=0; unsigned int border=0;
/* Fenster Oeffnen */ /* Fenster Oeffnen */
window[nummer].bcolor=BlackPixel(window[nummer].display, DefaultScreen(window[nummer].display)); window[nummer].bcolor=BlackPixel(window[nummer].display, DefaultScreen(window[nummer].display));
window[nummer].fcolor=WhitePixel(window[nummer].display, screen_num); window[nummer].fcolor=WhitePixel(window[nummer].display, screen_num);
window[nummer].win = XCreateSimpleWindow(window[nummer].display, RootWindow(window[nummer].display, screen_num), window[nummer].win = XCreateSimpleWindow(window[nummer].display, RootWindow(window[nummer].display, screen_num),
x, y, w, h, border, window[nummer].fcolor, window[nummer].bcolor); x, y, w, h, border, window[nummer].fcolor, window[nummer].bcolor);
// printf("border=%d\n",border);
XGetGeometry(window[nummer].display,window[nummer].win,&root,&(window[nummer].x),&(window[nummer].y), XGetGeometry(window[nummer].display,window[nummer].win,&root,&(window[nummer].x),&(window[nummer].y),
&(window[nummer].w),&(window[nummer].h), &(window[nummer].w),&(window[nummer].h),
&(window[nummer].b),&(window[nummer].d)); &(window[nummer].b),&(window[nummer].d));
...@@ -772,9 +773,8 @@ void put_bitmap(const char *adr,int x,int y,unsigned int w, unsigned int h) { ...@@ -772,9 +773,8 @@ void put_bitmap(const char *adr,int x,int y,unsigned int w, unsigned int h) {
// memdump((char *)(data->format),sizeof(SDL_PixelFormat)); // memdump((char *)(data->format),sizeof(SDL_PixelFormat));
// memdump((char *)(data->format->palette),sizeof(SDL_Palette));