blob: 0b4b3676b9eb0585a5e59cf7456bc233afef0600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
/* { dg-options "O3 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftracer" } */
void
parser_get_next_char (char c, int qm, char *p)
{
int quote_mode = 0;
for (; *p; p++)
{
if (qm)
{
if (quote_mode == 0 && *p == '"' && *(p - 1))
{
quote_mode = 1;
continue;
}
if (quote_mode && *p == '"' && *(p - 1))
quote_mode = 0;
}
if (quote_mode == 0 && *p == c && *(p - 1))
break;
}
}
void
parser_get_next_parameter (char *p)
{
parser_get_next_char (':', 1, p);
}
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
/* { dg-options "O3 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftracer" } */
void
parser_get_next_char (char c, int qm, char *p)
{
int quote_mode = 0;
for (; *p; p++)
{
if (qm)
{
if (quote_mode == 0 && *p == '"' && *(p - 1))
{
quote_mode = 1;
continue;
}
if (quote_mode && *p == '"' && *(p - 1))
quote_mode = 0;
}
if (quote_mode == 0 && *p == c && *(p - 1))
break;
}
}
void
parser_get_next_parameter (char *p)
{
parser_get_next_char (':', 1, p);
}
|