History

Cleanup

cancel committed 6 years ago

Commit 0ee76d01 parent 08f1d651 file · +17 −18Browse files

Unified · Split

tui_main.c+17−18
@@ -1055,7 +1055,7 @@ staticni void apply_time_to_sustained_notes(Oosc_dev *oosc_dev, · 1054 unmodified lines
10551055 }
10561056 }
10571057
1058−void ged_stop_all_sustained_notes(Ged *a) {
1058+staticni void ged_stop_all_sustained_notes(Ged *a) {
10591059 Susnote_list *sl = &a->susnote_list;
10601060 send_midi_note_offs(a->oosc_dev, &a->midi_mode, sl->buffer,
10611061 sl->buffer + sl->count);
@@ -1070,9 +1070,9 @@ void ged_stop_all_sustained_notes(Ged *a) { · 8 unmodified lines
10701070 // seems redundant/weird", that's because it is, not because there's a good
10711071 // reason.
10721072
1073−void send_output_events(Oosc_dev *oosc_dev, Midi_mode *midi_mode, Usz bpm,
1074− Susnote_list *susnote_list, Oevent const *events,
1075− Usz count) {
1073+staticni void send_output_events(Oosc_dev *oosc_dev, Midi_mode *midi_mode,
1074+ Usz bpm, Susnote_list *susnote_list,
1075+ Oevent const *events, Usz count) {
10761076 enum { Midi_on_capacity = 512 };
10771077 typedef struct {
10781078 U8 channel;
@@ -1213,7 +1213,7 @@ do_note_ons: · 134 unmodified lines
12131213 }
12141214 }
12151215
1216−void ged_clear_osc_udp(Ged *a) {
1216+staticni void ged_clear_osc_udp(Ged *a) {
12171217 if (a->oosc_dev) {
12181218 if (a->midi_mode.any.type == Midi_mode_type_osc_bidule) {
12191219 ged_stop_all_sustained_notes(a);
@@ -1222,8 +1222,9 @@ void ged_clear_osc_udp(Ged *a) { · 2 unmodified lines
12221222 a->oosc_dev = NULL;
12231223 }
12241224 }
1225−bool ged_is_using_osc_udp(Ged *a) { return (bool)a->oosc_dev; }
1226−bool ged_set_osc_udp(Ged *a, char const *dest_addr, char const *dest_port) {
1225+static bool ged_is_using_osc_udp(Ged *a) { return (bool)a->oosc_dev; }
1226+static bool ged_set_osc_udp(Ged *a, char const *dest_addr,
1227+ char const *dest_port) {
12271228 ged_clear_osc_udp(a);
12281229 if (dest_port) {
12291230 Oosc_udp_create_error err =
@@ -1256,17 +1257,15 @@ static double ged_secs_to_deadline(Ged const *a) { · 26 unmodified lines
12561257 return rem;
12571258 }
12581259
1259−void ged_reset_clock(Ged *a) { a->clock = stm_now(); }
1260−
1261−void clear_and_run_vm(Glyph *restrict gbuf, Mark *restrict mbuf, Usz height,
1262− Usz width, Usz tick_number, Oevent_list *oevent_list,
1263− Usz random_seed) {
1260+staticni void clear_and_run_vm(Glyph *restrict gbuf, Mark *restrict mbuf,
1261+ Usz height, Usz width, Usz tick_number,
1262+ Oevent_list *oevent_list, Usz random_seed) {
12641263 mbuffer_clear(mbuf, height, width);
12651264 oevent_list_clear(oevent_list);
12661265 orca_run(gbuf, mbuf, height, width, tick_number, oevent_list, random_seed);
12671266 }
12681267
1269−void ged_do_stuff(Ged *a) {
1268+staticni void ged_do_stuff(Ged *a) {
12701269 if (!a->is_playing)
12711270 return;
12721271 double secs_span = 60.0 / (double)a->bpm / 4.0;
@@ -1341,9 +1340,9 @@ static inline Isz isz_clamp(Isz x, Isz low, Isz high) { · 68 unmodified lines
13411340 }
13421341
13431342 // todo cleanup to use proper unsigned/signed w/ overflow check
1344−Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len,
1345− Isz cursor_pos, Isz pad,
1346− Isz cur_scroll) {
1343+staticni Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len,
1344+ Isz cursor_pos, Isz pad,
1345+ Isz cur_scroll) {
13471346 if (win_len <= 0 || cont_len <= 0)
13481347 return 0;
13491348 if (cont_len <= win_len)
@@ -1363,7 +1362,7 @@ Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len, · 13 unmodified lines
13631362 return isz_clamp(new_scroll, 0, cont_len - win_len);
13641363 }
13651364
1366−void ged_make_cursor_visible(Ged *a) {
1365+staticni void ged_make_cursor_visible(Ged *a) {
13671366 int grid_h = a->grid_h;
13681367 int cur_scr_y = a->grid_scroll_y;
13691368 int cur_scr_x = a->grid_scroll_x;
@@ -1380,7 +1379,7 @@ void ged_make_cursor_visible(Ged *a) { · 10 unmodified lines
13801379
13811380 enum { Hud_height = 2 };
13821381
1383−void ged_update_internal_geometry(Ged *a) {
1382+staticni void ged_update_internal_geometry(Ged *a) {
13841383 int win_h = a->win_h;
13851384 int softmargin_y = a->softmargin_y;
13861385 bool show_hud = win_h > Hud_height + 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t