Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
0660f0fa
Commit
0660f0fa
authored
Dec 05, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profibus configurator, max line length increased
parent
1b938e60
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
profibus/lib/cow/src/cow_pb_gsd.cpp
profibus/lib/cow/src/cow_pb_gsd.cpp
+18
-15
No files found.
profibus/lib/cow/src/cow_pb_gsd.cpp
View file @
0660f0fa
...
...
@@ -411,7 +411,7 @@ int pb_gsd::read( char *filename)
{
pwr_tFileName
fname
;
int
state
;
char
line
[
1
000
];
char
line
[
2
000
];
gsd_sKeyword
*
keyp
;
gsd_sData
*
datap
;
char
line_part
[
6
][
500
];
...
...
@@ -1810,7 +1810,7 @@ int pb_gsd::print()
int
pb_gsd
::
str_to_ostring
(
unsigned
char
**
data
,
char
*
str
,
int
size
,
int
*
rsize
)
{
char
valstr
[
4
0
];
char
valstr
[
20
0
];
int
valcnt
;
unsigned
int
val
;
char
*
s
,
*
t
;
...
...
@@ -1834,7 +1834,7 @@ int pb_gsd::str_to_ostring( unsigned char **data, char *str, int size, int *rsiz
sts
=
sscanf
(
valstr
,
"%d"
,
&
val
);
*
(
*
data
+
valcnt
++
)
=
(
unsigned
char
)
val
;
if
(
sts
!=
1
)
printf
(
"Syntax error, line %d
\n
"
,
line_cnt
);
printf
(
"
**
Syntax error, line %d
\n
"
,
line_cnt
);
t
=
s
+
1
;
}
...
...
@@ -1877,30 +1877,33 @@ int pb_gsd::read_line( char *line, int lsize, FILE *fp)
continue
;
while
(
1
)
{
if
(
line
[
strlen
(
line
)
-
1
]
==
'\\'
)
{
if
(
line
[
strlen
(
line
)
-
1
]
==
'\\'
||
line
[
strlen
(
line
)
-
2
]
==
'\\'
)
{
char
line2
[
500
];
// Add next line
sts
=
dcli_read_line
(
&
line
[
strlen
(
line
)
-
1
],
lsize
-
strlen
(
line
),
fp
);
sts
=
dcli_read_line
(
line2
,
lsize
-
strlen
(
line2
),
fp
);
if
(
!
sts
)
break
;
line_cnt
++
;
// Remove comments
in_string
=
0
;
for
(
s
=
line
;
*
s
;
s
++
)
{
for
(
s
=
line
2
;
*
s
;
s
++
)
{
if
(
*
s
==
'"'
)
in_string
=
!
in_string
;
if
(
*
s
==
';'
&&
!
in_string
)
*
s
=
0
;
}
dcli_remove_blank
(
line
,
line
);
if
(
!
in_string
)
dcli_remove_blank
(
line2
,
line2
);
if
(
strlen
(
line
)
+
strlen
(
line2
)
>
(
unsigned
int
)
lsize
)
{
printf
(
"** Line to long, line %d
\n
"
,
line_cnt
);
return
0
;
}
else
if
(
line
[
strlen
(
line
)
-
2
]
==
'\\'
)
{
// Add next line
sts
=
dcli_read_line
(
&
line
[
strlen
(
line
)
-
2
],
lsize
-
strlen
(
line
),
fp
);
if
(
!
sts
)
break
;
line_cnt
++
;
dcli_remove_blank
(
line
,
line
);
if
(
line
[
strlen
(
line
)
-
1
]
==
'\\'
)
strcpy
(
&
line
[
strlen
(
line
)
-
1
],
line2
);
else
strcpy
(
&
line
[
strlen
(
line
)
-
2
],
line2
);
}
else
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment