Skip to content

Instantly share code, notes, and snippets.

@krypt-n
Created November 15, 2015 21:09
Show Gist options
  • Save krypt-n/92a5b1df5b40f5c3a8c3 to your computer and use it in GitHub Desktop.
Save krypt-n/92a5b1df5b40f5c3a8c3 to your computer and use it in GitHub Desktop.
#include <xcb/xcb.h>
#include <stdio.h>
#include <stdbool.h>
struct area1_t {
unsigned int begin:16;
unsigned int end:16;
bool active:1;
int align:3;
int button:3;
xcb_window_t window;
char *cmd;
};
struct area2_t {
unsigned int begin:16;
unsigned int end:16;
bool active:1;
int align:3;
int button;
xcb_window_t window;
char *cmd;
};
struct area3_t {
uint16_t begin;
uint16_t end;
bool active;
int8_t align;
xcb_button_t button;
xcb_window_t window;
char *cmd;
};
int main(int argc, char** argv) {
printf("%ld\n", sizeof(struct area1_t));
printf("%ld\n", sizeof(struct area2_t));
printf("%ld\n", sizeof(struct area3_t));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment