ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: 643d30a3626fc523afa6d4f8583321d3ec209007
Parent: c1ecb88aed169c4a3baabbeef7972e1910413c57
Author: Randy Palamar
Date:   Tue,  8 Oct 2024 15:24:44 -0600

use stream_append_byte for single byte s8s

Diffstat:
Mos_win32.c | 4++--
Mstatic.c | 2+-
Mui.c | 2+-
Mutil.c | 4++--
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/os_win32.c b/os_win32.c @@ -238,7 +238,7 @@ os_load_library(char *name, char *temp_name, Stream *e) s8 errs[] = {s8("WARNING: os_load_library("), cstr_to_s8(name), s8("): ")}; stream_append_s8_array(e, errs, ARRAY_COUNT(errs)); stream_append_i64(e, GetLastError()); - stream_append_s8(e, s8("\n")); + stream_append_byte(e, '\n'); os_write_err_msg(stream_to_s8(*e)); e->widx = 0; } @@ -259,7 +259,7 @@ os_lookup_dynamic_symbol(void *h, char *name, Stream *e) s8 errs[] = {s8("WARNING: os_lookup_dynamic_symbol("), cstr_to_s8(name), s8("): ")}; stream_append_s8_array(e, errs, ARRAY_COUNT(errs)); stream_append_i64(e, GetLastError()); - stream_append_s8(e, s8("\n")); + stream_append_byte(e, '\n'); os_write_err_msg(stream_to_s8(*e)); e->widx = 0; } diff --git a/static.c b/static.c @@ -106,7 +106,7 @@ dump_gl_params(GLParams *gl, Arena a) } stream_append_s8(&s, s8("Version: ")); stream_append_i64(&s, gl->version_major); - stream_append_s8(&s, s8(".")); + stream_append_byte(&s, '.'); stream_append_i64(&s, gl->version_minor); stream_append_s8(&s, s8("\nMax 1D/2D Texture Dimension: ")); stream_append_i64(&s, gl->max_2d_texture_dim); diff --git a/ui.c b/ui.c @@ -760,7 +760,7 @@ draw_ui(BeamformerCtx *ctx, Arena arena) for (u32 j = 0; j <= line_count; j++) { DrawLineEx(start_pos.rl, end_pos.rl, 3, colour_from_normalized(FG_COLOUR)); buf.widx = 0; - if (i == 0 && mm > 0) stream_append_s8(&buf, s8("+")); + if (i == 0 && mm > 0) stream_append_byte(&buf, '+'); stream_append_f64(&buf, mm, 10); stream_append_s8(&buf, s8(" mm")); draw_text(ctx->small_font, stream_to_s8(buf), txt_pos, diff --git a/util.c b/util.c @@ -87,7 +87,7 @@ static void stream_append_i64(Stream *s, i64 n) { if (n < 0) { - stream_append_s8(s, s8("-")); + stream_append_byte(s, '-'); n *= -1; } stream_append_u64(s, n); @@ -123,7 +123,7 @@ static void stream_append_f32_e(Stream *s, f32 f) { if (f < 0) { - stream_append_s8(s, s8("-")); + stream_append_byte(s, '-'); f *= -1; } /* TODO */