git-svn-id: svn://10.65.10.50/branches/R_10_00@23146 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2015-11-30 16:27:50 +00:00
parent 6c31e4ce6a
commit 50bf746c69
3 changed files with 19 additions and 25 deletions

@ -4000,8 +4000,7 @@ char *
XinWindowTitleGet( XinWindow Win )
{
/*END*/
static char title[250];
static char title[256];
if ( xvt_vobj_get_title( ( WINDOW ) Win, title, sizeof( title ) ) == NULL )
title[0] = '\0';
return title;
@ -4012,7 +4011,7 @@ XinWindowTitleGet( XinWindow Win )
this function sets the title of the specified window.
*/
void
XinWindowTitleSet( XinWindow Win, char *Title )
XinWindowTitleSet( XinWindow Win, const char *Title )
{
/*END*/
xvt_vobj_set_title( ( WINDOW ) Win, Title );

@ -357,16 +357,7 @@ static void xi_caret_suspend( XinWindow win );
static void xi_caret_restore( XinWindow win );
static void recalc_metrics( XI_OBJ * xi_obj );
char *
tstrncpy( char *dst, char *src, int n )
{
gstrncpy( dst, src, n );
dst[n - 1] = '\0';
return ( dst );
}
char *
gstrncpy( char *dst, char *src, int n )
char* gstrncpy( char *dst, const char *src, int n )
{
char *p = dst;
@ -380,14 +371,18 @@ gstrncpy( char *dst, char *src, int n )
return ( dst );
}
void
order_ints( int *ip1, int *ip2 )
char* tstrncpy( char *dst, const char *src, int n )
{
int temp;
gstrncpy(dst, src, n);
dst[n - 1] = '\0';
return ( dst );
}
void order_ints( int *ip1, int *ip2 )
{
if ( *ip1 > *ip2 )
{
temp = *ip1;
const int temp = *ip1;
*ip1 = *ip2;
*ip2 = temp;
}
@ -3995,20 +3990,17 @@ xi_set_clip( XinWindow win, XinRect * rctp )
char *
xi_get_text_string( char *src, unsigned long attrib )
{
int len;
static char buf[256];
char *dst;
static char buf[256] = { 0 };
len = strlen( src );
int len = strlen( src );
len = min( len, sizeof( buf ) - 1 );
if ( attrib & XI_ATR_PASSWORD )
memset( buf, ( char ) xi_get_pref( XI_PREF_PASSWORD_CHAR ), len );
else
gstrncpy( buf, src, len );
dst = buf;
dst[len] = '\0';
return ( dst );
buf[len] = '\0';
return buf;
}
BOOLEAN
@ -4159,7 +4151,10 @@ xi_get_obj_by_pointer( XI_OBJ * parent, XI_OBJ * target )
BOOLEAN
xi_is_obj( XI_OBJ* obj, XI_OBJ* itf )
{
/*
if (!xi_is_itf( itf ))
return FALSE;
return xi_get_obj_by_pointer( itf, obj );
*/
return xi_is_itf(itf) && xi_get_obj_by_pointer(itf, obj);
}

@ -37,7 +37,7 @@ XIDLL void order_ints( int *ip1, int *ip2 );
char* gstrncpy(char *dst, char *src, int n);
*/
XIDLL char *tstrncpy( char *dst, char *src, int n );
XIDLL char *tstrncpy( char *dst, const char *src, int n );
XIDLL void xi_adjust_sb_vir_itf( XinWindow win, XI_OBJ * itf );
XIDLL void xi_button_rect_calc( XI_OBJ * btn_obj, int sequence );
XIDLL void xi_container_rect_calc( XI_OBJ * cnt_obj, int max_text_len,