document MwStringPrintIntoBuffer slightly better
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
35d2b4bb76
commit
32842ca160
11 changed files with 18 additions and 17 deletions
|
|
@ -173,13 +173,13 @@ static void color_picker_click(MwWidget handle, void* user, void* call) {
|
|||
picker->chosen_color.green = picker->color_picker_image_data[i + 1];
|
||||
picker->chosen_color.blue = picker->color_picker_image_data[i + 2];
|
||||
|
||||
MwPrintIntoBuffer(hexColor, 8, "#%02X%02X%02X", picker->chosen_color.red & 0xff, picker->chosen_color.green & 0xff, picker->chosen_color.blue & 0xff);
|
||||
MwStringPrintIntoBuffer(hexColor, 8, "#%02X%02X%02X", picker->chosen_color.red & 0xff, picker->chosen_color.green & 0xff, picker->chosen_color.blue & 0xff);
|
||||
|
||||
fr = picker->chosen_color.red > 128 ? 0 : 255;
|
||||
fg = picker->chosen_color.green > 128 ? 0 : 255;
|
||||
fb = picker->chosen_color.blue > 128 ? 0 : 255;
|
||||
|
||||
MwPrintIntoBuffer(fgColor, 8, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwStringPrintIntoBuffer(fgColor, 8, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwSetText(picker->color_display_text, MwNforeground, fgColor);
|
||||
|
||||
MwSetText(picker->color_display_text, MwNbackground, hexColor);
|
||||
|
|
@ -247,7 +247,7 @@ static void color_display_text_change(MwWidget handle, void* user,
|
|||
fg = color->common.green > 128 ? 0 : 255;
|
||||
fb = color->common.blue > 128 ? 0 : 255;
|
||||
|
||||
MwPrintIntoBuffer(fgColor, 9, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwStringPrintIntoBuffer(fgColor, 9, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwSetText(picker->color_display_text, MwNforeground, fgColor);
|
||||
|
||||
MwSetText(picker->color_display_text, MwNbackground, hexColor);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void MwStringTime(char* out, time_t t) {
|
|||
sprintf(out, "%s %2d %02d:%02d %d", months[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, 1900 + tm->tm_year);
|
||||
}
|
||||
}
|
||||
void MwPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) {
|
||||
void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) {
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ static void mouse_up(MwWidget handle, void* ptr) {
|
|||
if(e->mouse.x >= (w - e->right)) {
|
||||
char s[512];
|
||||
if(e->mouse.y >= (h / 2)) {
|
||||
MwPrintIntoBuffer(s, 512, "%g", atof(str) - 1);
|
||||
MwStringPrintIntoBuffer(s, 512, "%g", atof(str) - 1);
|
||||
} else {
|
||||
MwPrintIntoBuffer(s, 512, "%g", atof(str) + 1);
|
||||
MwStringPrintIntoBuffer(s, 512, "%g", atof(str) + 1);
|
||||
}
|
||||
MwSetText(handle, MwNtext, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ static void* mwVulkanGetFieldImpl(MwWidget handle, MwVulkanField field, MwErrorE
|
|||
case MwVulkanField_PresentQueue:
|
||||
return o->vkPresentQueue;
|
||||
default:
|
||||
MwPrintIntoBuffer(buf, 1024, "Unknown vulkan field request (%d given)", field);
|
||||
MwStringPrintIntoBuffer(buf, 1024, "Unknown vulkan field request (%d given)", field);
|
||||
MwDispatchError(1, buf);
|
||||
if(out != NULL) {
|
||||
*out = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue