1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

*** empty log message ***

This commit is contained in:
nwanua
2000-10-27 00:10:55 +00:00
parent af5e3da105
commit 9903bf9ca8

View File

@@ -3076,7 +3076,6 @@ WMCreateTextBlockWithObject(WMText *tPtr, WMWidget *w,
unsigned short first, unsigned short extraInfo) unsigned short first, unsigned short extraInfo)
{ {
TextBlock *tb; TextBlock *tb;
unsigned short len;
if (!w || !description || !color) if (!w || !description || !color)
return NULL; return NULL;
@@ -3085,12 +3084,8 @@ WMCreateTextBlockWithObject(WMText *tPtr, WMWidget *w,
if (!tb) if (!tb)
return NULL; return NULL;
len = strlen(description)+1; tb->text = wstrdup(description);
tb->text = (char *)wmalloc(len); tb->used = strlen(description);
memset(tb->text, 0, len);
memcpy(tb->text, description, len);
tb->used = len;
tb->text[tb->used] = 0;
tb->blank = False; tb->blank = False;
tb->d.widget = w; tb->d.widget = w;
tb->color = WMRetainColor(color); tb->color = WMRetainColor(color);
@@ -3118,7 +3113,6 @@ WMCreateTextBlockWithPixmap(WMText *tPtr, WMPixmap *p,
unsigned short first, unsigned short extraInfo) unsigned short first, unsigned short extraInfo)
{ {
TextBlock *tb; TextBlock *tb;
unsigned short len;
if (!p || !description || !color) if (!p || !description || !color)
return NULL; return NULL;
@@ -3127,12 +3121,8 @@ WMCreateTextBlockWithPixmap(WMText *tPtr, WMPixmap *p,
if (!tb) if (!tb)
return NULL; return NULL;
len = strlen(description)+1; tb->text = wstrdup(description);
tb->text = (char *)wmalloc(len); tb->used = strlen(description);
memset(tb->text, 0, len);
memcpy(tb->text, description, len);
tb->used = len;
tb->text[tb->used] = 0;
tb->blank = False; tb->blank = False;
tb->d.pixmap = WMRetainPixmap(p); tb->d.pixmap = WMRetainPixmap(p);
tb->color = WMRetainColor(color); tb->color = WMRetainColor(color);