From f1b5bedb72022c5e0ca8b9808bad89c0865e5be1 Mon Sep 17 00:00:00 2001 From: cancel Date: Mon, 13 Jan 2020 11:34:03 +0900 Subject: [PATCH] Cleanup --- bank.h | 9 ++------- field.h | 3 +-- osc_out.h | 3 +-- tui_main.c | 8 ++------ 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/bank.h b/bank.h index 52940e0..73f4d63 100644 --- a/bank.h +++ b/bank.h @@ -13,11 +13,7 @@ typedef struct { typedef struct { U8 oevent_type; - U8 channel; - U8 octave; - U8 note; - U8 velocity; - U8 bar_divisor; + U8 channel, octave, note, velocity, bar_divisor; } Oevent_midi; enum { Oevent_osc_int_count = 16 }; @@ -46,8 +42,7 @@ typedef union { typedef struct { Oevent *buffer; - Usz count; - Usz capacity; + Usz count, capacity; } Oevent_list; void oevent_list_init(Oevent_list *olist); diff --git a/field.h b/field.h index 2e17a2d..1707b0e 100644 --- a/field.h +++ b/field.h @@ -8,8 +8,7 @@ typedef struct { Glyph *buffer; - U16 height; - U16 width; + U16 width, height; } Field; void field_init(Field *field); diff --git a/osc_out.h b/osc_out.h index 932383e..f1985ea 100644 --- a/osc_out.h +++ b/osc_out.h @@ -34,8 +34,7 @@ typedef struct { typedef struct { Susnote *buffer; - Usz count; - Usz capacity; + Usz count, capacity; } Susnote_list; void susnote_list_init(Susnote_list *sl); diff --git a/tui_main.c b/tui_main.c index 6327a08..29f4759 100644 --- a/tui_main.c +++ b/tui_main.c @@ -311,13 +311,11 @@ void draw_grid_cursor(WINDOW *win, int draw_y, int draw_x, int draw_h, typedef struct Undo_node { Field field; Usz tick_num; - struct Undo_node *prev; - struct Undo_node *next; + struct Undo_node *prev, *next; } Undo_node; typedef struct { - Undo_node *first; - Undo_node *last; + Undo_node *first, *last; Usz count; Usz limit; } Undo_history; @@ -763,9 +761,7 @@ void midi_mode_init_osc_bidule(Midi_mode *mm, char const *path) { PmError portmidi_init_if_necessary(void) { if (portmidi_is_initialized) return 0; - // U64 t0 = stm_now(); PmError e = Pm_Initialize(); - // fprintf(stderr, "ms: %f\n", stm_sec(stm_since(t0)) * 1000); if (e) return e; portmidi_is_initialized = true;