mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-12 03:35:52 +01:00
fixes to comply to ANSI C
This commit is contained in:
@@ -625,6 +625,8 @@ WMPoint wmkpoint(int x, int y);
|
||||
|
||||
WMSize wmksize(unsigned int width, unsigned int height);
|
||||
|
||||
WMRect wmkrect(int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||
#define wmksize(width, height) (WMSize){(width), (height)}
|
||||
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
||||
|
||||
@@ -1615,7 +1615,9 @@ WMReadPropListFromFile(char *file)
|
||||
pldata->lineNumber = 1;
|
||||
|
||||
if (fread(pldata->ptr, length, 1, f) != 1) {
|
||||
wsyserror(_("error reading from file '%s'"), file);
|
||||
if (ferror(f)) {
|
||||
wsyserror(_("error reading from file '%s'"), file);
|
||||
}
|
||||
plist = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,18 @@ wmksize(unsigned int width, unsigned int height)
|
||||
}
|
||||
|
||||
|
||||
|
||||
WMRect
|
||||
wmkrect(int x, int y, unsigned int width, unsigned int height)
|
||||
{
|
||||
WMRect rect;
|
||||
|
||||
rect.pos.x = x;
|
||||
rect.pos.y = y;
|
||||
rect.size.width = width;
|
||||
rect.size.height = height;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user