Swap order of typedefs

This commit is contained in:
Johannes Marbach 2021-09-12 20:47:42 +02:00
parent 198219e536
commit 025caee162
3 changed files with 25 additions and 25 deletions

View file

@ -12,14 +12,6 @@ typedef enum {
SQ2LV_LAYOUT_TERMINAL_US = 0
} sq2lv_layout_id_t;
/* Layout type */
typedef struct {
/* Layers array */
const sq2lv_layer_t * const layers;
/* Total number of layers */
const int num_layers;
} sq2lv_layout_t;
/* Layer type */
typedef struct {
/* Key caps */
@ -42,6 +34,14 @@ typedef struct {
const int * const scancode_nums;
} sq2lv_layer_t;
/* Layout type */
typedef struct {
/* Layers array */
const sq2lv_layer_t * const layers;
/* Total number of layers */
const int num_layers;
} sq2lv_layout_t;
/* Layouts */
extern const sq2lv_layout_t sq2lv_layouts[];
extern const int sq2lv_num_layouts;

View file

@ -12,14 +12,6 @@ typedef enum {
SQ2LV_LAYOUT_US = 0
} sq2lv_layout_id_t;
/* Layout type */
typedef struct {
/* Layers array */
const sq2lv_layer_t * const layers;
/* Total number of layers */
const int num_layers;
} sq2lv_layout_t;
/* Layer type */
typedef struct {
/* Key caps */
@ -34,6 +26,14 @@ typedef struct {
const int * const switcher_dests;
} sq2lv_layer_t;
/* Layout type */
typedef struct {
/* Layers array */
const sq2lv_layer_t * const layers;
/* Total number of layers */
const int num_layers;
} sq2lv_layout_t;
/* Layouts */
extern const sq2lv_layout_t sq2lv_layouts[];
extern const int sq2lv_num_layouts;

View file

@ -679,15 +679,6 @@ if __name__ == '__main__':
h_builder.add_line('} sq2lv_layout_id_t;')
h_builder.add_line()
h_builder.add_line('/* Layout type */')
h_builder.add_line('typedef struct {')
h_builder.add_line(' /* Layers array */')
h_builder.add_line(' const sq2lv_layer_t * const layers;')
h_builder.add_line(' /* Total number of layers */')
h_builder.add_line(' const int num_layers;')
h_builder.add_line('} sq2lv_layout_t;')
h_builder.add_line()
h_builder.add_line('/* Layer type */')
h_builder.add_line('typedef struct {')
h_builder.add_line(' /* Key caps */')
@ -712,6 +703,15 @@ if __name__ == '__main__':
h_builder.add_line('} sq2lv_layer_t;')
h_builder.add_line()
h_builder.add_line('/* Layout type */')
h_builder.add_line('typedef struct {')
h_builder.add_line(' /* Layers array */')
h_builder.add_line(' const sq2lv_layer_t * const layers;')
h_builder.add_line(' /* Total number of layers */')
h_builder.add_line(' const int num_layers;')
h_builder.add_line('} sq2lv_layout_t;')
h_builder.add_line()
h_builder.add_line('/* Layouts */')
h_builder.add_line('extern const sq2lv_layout_t sq2lv_layouts[];')
h_builder.add_line('extern const int sq2lv_num_layouts;')