I need all kinds of help...
Here is the source of my pains (pardon the horrible pun):
if (XrmGetResource(database, "titleFont", "TitleFont", &value_type, &value)) {
int x;
for (x = 0; x <= strlen(value.addr); x++) {
int y = 0;
if (!isspace(value.addr[x])) {
TitleFont[y++] = value.addr[x];
}
}
}
Now as you can probably see, I am at best an amature programmer, but
I can usually get something to work when I need to. What I am doing
is using the X resource manager to get the value of TitleFont
from the file but that isn't really important. Where the problem
starts is here: The place that the value I want is stored is in
value.addr. The value in this case happens to be a font and when
I try to send it to the gtk font selector as it is it my program
explodes because of extra gunk in the string. So I thought I'd
write a little block to clean up the string and remove any gunk.
It may be silly and in efficient, but what the heck. Problem is
that TitleFont[y++] = value.addr[x] bursts into flame. That is
the only way I could think to add a given character to the end
of a string. So help me out, is there a better way to add
a character to the end of a string or some more efficient way
to clean up a string.
*shrug*
Rev Scott Garner (aka Mr_Fab)
Linux: Opening Doors And Shattering Windows
http://www.llamacom.com/~mrfab/linux/