From 2a13666707f34333a86ad2498f8c931028c7d5a0 Mon Sep 17 00:00:00 2001 From: turbocat Date: Thu, 2 Dec 2021 19:24:53 +0000 Subject: [PATCH] Newlibc: Added con_set_title wrapper git-svn-id: svn://kolibrios.org@9354 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/sources/newlib/libc/crt/console.asm | 4 +++- contrib/sdk/sources/newlib/libc/sys/conio.c | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/sdk/sources/newlib/libc/crt/console.asm b/contrib/sdk/sources/newlib/libc/crt/console.asm index c98f8a8684..ce1ac3e41b 100644 --- a/contrib/sdk/sources/newlib/libc/crt/console.asm +++ b/contrib/sdk/sources/newlib/libc/crt/console.asm @@ -12,6 +12,7 @@ public _con_cls public _con_write_string@8 public _con_getch2@0 public _con_gets +public con_set_title as '_con_set_title_ptr' section '.text' align 16 @@ -272,7 +273,8 @@ import console, \ con_set_cursor_pos, 'con_set_cursor_pos',\ con_write_string, 'con_write_string',\ con_get_flags, 'con_get_flags', \ - con_set_flags, 'con_set_flags' + con_set_flags, 'con_set_flags', \ + con_set_title, 'con_set_title' s_libdir: db '/sys/lib/' diff --git a/contrib/sdk/sources/newlib/libc/sys/conio.c b/contrib/sdk/sources/newlib/libc/sys/conio.c index 25fdfd1cda..15fbf6ac62 100644 --- a/contrib/sdk/sources/newlib/libc/sys/conio.c +++ b/contrib/sdk/sources/newlib/libc/sys/conio.c @@ -15,6 +15,8 @@ void __stdcall con_write_string(const char* string, unsigned length); short __stdcall con_getch2(void); char* __stdcall con_gets(char*, unsigned); +extern void __stdcall (*con_set_title_ptr)(char*); + int __gui_mode; void con_init_opt(unsigned w_w, unsigned w_h, unsigned s_w, unsigned s_h, const char* t){ @@ -80,6 +82,7 @@ void __fini_conio() con_exit(0); } - - - +void con_set_title(char *title) +{ + con_set_title_ptr(title); +}