mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-22 01:45:46 +01:00
- put back wmksize(), wmkrange() and wmkpoint() as functions instead of macros
- fixed some compilation warnings with -Wall - some code cleanup
This commit is contained in:
@@ -36,9 +36,6 @@ typedef struct {
|
||||
WMSize size;
|
||||
} WMRect;
|
||||
|
||||
#define wmksize(width, height) (WMSize){(width), (height)}
|
||||
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
||||
#define wmkrect(pos, size) (WMRect){(pos), (size)}
|
||||
|
||||
|
||||
|
||||
@@ -577,6 +574,17 @@ typedef struct W_DragDestinationProcs {
|
||||
|
||||
|
||||
|
||||
/* ...................................................................... */
|
||||
|
||||
|
||||
WMPoint wmkpoint(int x, int y);
|
||||
|
||||
WMSize wmksize(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)}
|
||||
#endif
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
|
||||
@@ -154,8 +154,6 @@ typedef struct {
|
||||
int count;
|
||||
} WMRange;
|
||||
|
||||
#define wmkrange(position, count) (WMRange){(position), (count)}
|
||||
|
||||
|
||||
|
||||
/* DO NOT ACCESS THE CONTENTS OF THIS STRUCT */
|
||||
@@ -277,6 +275,11 @@ void wtokenfree(char **tokens, int count);
|
||||
char* wtrimspace(char *s);
|
||||
|
||||
|
||||
WMRange wmkrange(int start, int count);
|
||||
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||
#define wmkrange(position, count) (WMRange){(position), (count)}
|
||||
#endif
|
||||
|
||||
|
||||
char* wusergnusteppath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user