[860] in BarnOwl Developers
[D-O-H] r849 - branches/barnowl_unicode/owl
daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:10:29 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Sat, 12 Jan 2008 02:26:49 -0500 (EST)
Author: asedeno
Date: 2008-01-12 02:26:49 -0500 (Sat, 12 Jan 2008)
New Revision: 849
Modified:
branches/barnowl_unicode/owl/fmtext.c
Log:
unicode/glib branch
* fix a typo that was causing background problems
* pass defaults attributes through in the truncate functions
Modified: branches/barnowl_unicode/owl/fmtext.c
===================================================================
--- branches/barnowl_unicode/owl/fmtext.c 2008-01-12 07:00:53 UTC (rev 848)
+++ branches/barnowl_unicode/owl/fmtext.c 2008-01-12 07:26:49 UTC (rev 849)
@@ -13,7 +13,7 @@
f->textbuff[0] = 0;
f->default_attrs = OWL_FMTEXT_ATTR_NONE;
f->default_fgcolor = OWL_COLOR_DEFAULT;
- f->default_fgcolor = OWL_COLOR_DEFAULT;
+ f->default_bgcolor = OWL_COLOR_DEFAULT;
}
/* Clear the data from an fmtext, but don't deallocate memory. This
@@ -24,7 +24,7 @@
f->textbuff[0] = 0;
f->default_attrs = OWL_FMTEXT_ATTR_NONE;
f->default_fgcolor = OWL_COLOR_DEFAULT;
- f->default_fgcolor = OWL_COLOR_DEFAULT;
+ f->default_bgcolor = OWL_COLOR_DEFAULT;
}
void _owl_fmtext_realloc(owl_fmtext *f, int newlen) /*noproto*/
@@ -387,6 +387,11 @@
/* ptr1 now holds the starting point */
+ /* copy the default attributes */
+ out->default_attrs = in->default_attrs;
+ out->default_fgcolor = in->default_fgcolor;
+ out->default_bgcolor = in->default_bgcolor;
+
/* copy in the next 'lines' lines */
if (lines < 1) return(-1);
@@ -416,6 +421,11 @@
char *ptr_s, *ptr_e, *ptr_c, *last;
int col, st, padding, chwidth;
+ /* copy the default attributes */
+ out->default_attrs = in->default_attrs;
+ out->default_fgcolor = in->default_fgcolor;
+ out->default_bgcolor = in->default_bgcolor;
+
last=in->textbuff+in->textlen-1;
ptr_s=in->textbuff;
while (ptr_s <= last) {