mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 18:14:15 +00:00
validate: Add { and [ as line continuation markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/177>
This commit is contained in:
parent
856944c960
commit
4f7217b0b3
1 changed files with 4 additions and 3 deletions
|
@ -558,6 +558,7 @@ skip_spaces (gchar * c)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse file that contains a list of GStructures */
|
/* Parse file that contains a list of GStructures */
|
||||||
|
#define GST_STRUCT_LINE_CONTINUATION_CHARS ",{\\["
|
||||||
static GList *
|
static GList *
|
||||||
_file_get_structures (GFile * file, gchar ** err)
|
_file_get_structures (GFile * file, gchar ** err)
|
||||||
{
|
{
|
||||||
|
@ -609,9 +610,9 @@ _file_get_structures (GFile * file, gchar ** err)
|
||||||
while (*tmp != '\n' && *tmp) {
|
while (*tmp != '\n' && *tmp) {
|
||||||
gchar next = *(tmp + 1);
|
gchar next = *(tmp + 1);
|
||||||
|
|
||||||
/* ',' and '\\' are line continuation indicators */
|
if (next && next == '\n'
|
||||||
if (next && next == '\n' && (*tmp == ',' || *tmp == '\\')) {
|
&& strchr (GST_STRUCT_LINE_CONTINUATION_CHARS, *tmp)) {
|
||||||
if (*tmp == ',')
|
if (*tmp != '\\')
|
||||||
g_string_append_c (l, *tmp);
|
g_string_append_c (l, *tmp);
|
||||||
|
|
||||||
tmp += 2;
|
tmp += 2;
|
||||||
|
|
Loading…
Reference in a new issue