Remove empty parts from an array returned by g_strsplit. */
| 191 | |
| 192 | /* Remove empty parts from an array returned by g_strsplit. */ |
| 193 | static void remove_empty_parts(gchar **parts) |
| 194 | { |
| 195 | gchar **src = parts; |
| 196 | gchar **dest = parts; |
| 197 | while (*src != NULL) |
| 198 | { |
| 199 | if (**src != '\0') |
| 200 | { |
| 201 | *dest++ = *src; |
| 202 | } |
| 203 | |
| 204 | src++; |
| 205 | } |
| 206 | |
| 207 | *dest = NULL; |
| 208 | } |
| 209 | |
| 210 | /* Parse VCD header to get values for context structure. |
| 211 | * The context structure should be zeroed before calling this. |