… | |
… | |
1145 | |
1145 | |
1146 | e->fname = xstrdup (fname); |
1146 | e->fname = xstrdup (fname); |
1147 | if (openlog (e) == NULL) |
1147 | if (openlog (e) == NULL) |
1148 | perror (fname), exit (1); |
1148 | perror (fname), exit (1); |
1149 | |
1149 | |
1150 | l = strlen (desc); |
1150 | e->desc = xstrdup (desc); |
1151 | /* HACK-6: width is in pixels now */ |
|
|
1152 | if (l > width - 2) /* must account for [ ] */ |
|
|
1153 | l = width - 2; |
|
|
1154 | e->desc = xmalloc (l + 1); |
|
|
1155 | memcpy (e->desc, desc, l); |
|
|
1156 | *(e->desc + l) = '\0'; |
|
|
1157 | } |
1151 | } |
1158 | |
1152 | |
1159 | e->color = GetColor (fcolor); |
1153 | e->color = GetColor (fcolor); |
1160 | e->partial = 0; |
1154 | e->partial = 0; |
1161 | e->next = NULL; |
1155 | e->next = NULL; |