829 |
|
|
830 |
/* extract the title from within brackets (for zipl) */ |
/* extract the title from within brackets (for zipl) */ |
831 |
static char * extractTitle(struct singleLine * line) { |
static char * extractTitle(struct singleLine * line) { |
832 |
/* bracketed title... let's extract it (leaks a byte) */ |
/* bracketed title... let's extract it */ |
833 |
char * title = NULL; |
char * title = NULL; |
834 |
if (line->type == LT_TITLE) { |
if (line->type == LT_TITLE) { |
835 |
title = strdup(line->elements[0].item); |
title = strdup(line->elements[0].item + 1); |
|
title++; |
|
836 |
*(title + strlen(title) - 1) = '\0'; |
*(title + strlen(title) - 1) = '\0'; |
837 |
} else if (line->type == LT_MENUENTRY) |
} else if (line->type == LT_MENUENTRY) |
838 |
title = strdup(line->elements[1].item); |
title = strdup(line->elements[1].item); |