Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-gpu
Commits
fdccf31c
Commit
fdccf31c
authored
Apr 05, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/misc/vlm.c: misc small fixes in config file saving/loading.
parent
581c7903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
src/misc/vlm.c
src/misc/vlm.c
+20
-19
No files found.
src/misc/vlm.c
View file @
fdccf31c
...
...
@@ -224,25 +224,30 @@ int vlm_Load( vlm_t *p_vlm, char *psz_file )
file
=
fopen
(
psz_file
,
"r"
);
if
(
file
==
NULL
)
return
1
;
if
(
fseek
(
file
,
0
,
SEEK_END
)
!=
0
)
return
2
;
if
(
fseek
(
file
,
0
,
SEEK_END
)
!=
0
)
{
fclose
(
file
);
return
2
;
}
i_size
=
ftell
(
file
);
fseek
(
file
,
0
,
SEEK_SET
);
fseek
(
file
,
0
,
SEEK_SET
);
psz_buffer
=
malloc
(
i_size
+
1
);
if
(
!
psz_buffer
)
{
fclose
(
file
);
return
2
;
}
fread
(
psz_buffer
,
1
,
i_size
,
file
);
fread
(
psz_buffer
,
1
,
i_size
,
file
);
psz_buffer
[
i_size
]
=
'\0'
;
if
(
Load
(
p_vlm
,
psz_buffer
)
)
{
fclose
(
file
);
free
(
psz_buffer
);
return
3
;
}
free
(
psz_buffer
);
free
(
psz_buffer
);
fclose
(
file
);
return
0
;
...
...
@@ -1932,32 +1937,28 @@ static int Load( vlm_t *vlm, char *file )
while
(
*
pf
!=
'\0'
)
{
vlm_message_t
*
message
=
NULL
;
int
i_temp
=
0
;
int
i_next
;
int
i_end
=
0
;
while
(
pf
[
i_
temp
]
!=
'\n'
&&
pf
[
i_temp
]
!=
'\0'
&&
pf
[
i_temp
]
!=
'\r'
)
while
(
pf
[
i_
end
]
!=
'\n'
&&
pf
[
i_end
]
!=
'\0'
&&
pf
[
i_end
]
!=
'\r'
)
{
i_
temp
++
;
i_
end
++
;
}
if
(
pf
[
i_temp
]
==
'\r'
||
pf
[
i_temp
]
==
'\n'
)
{
pf
[
i_temp
]
=
'\0'
;
i_next
=
i_temp
+
1
;
}
else
if
(
pf
[
i_end
]
==
'\r'
||
pf
[
i_end
]
==
'\n'
)
{
i_next
=
i_temp
;
pf
[
i_end
]
=
'\0'
;
i_end
++
;
if
(
pf
[
i_end
]
==
'\n'
)
i_end
++
;
}
if
(
ExecuteCommand
(
vlm
,
pf
,
&
message
)
)
if
(
*
pf
&&
ExecuteCommand
(
vlm
,
pf
,
&
message
)
)
{
free
(
message
);
if
(
message
)
free
(
message
);
return
1
;
}
free
(
message
);
if
(
message
)
free
(
message
);
pf
+=
i_
next
;
pf
+=
i_
end
;
}
return
0
;
...
...
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