Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
MyCard
ygopro
Commits
cc04ea9d
Commit
cc04ea9d
authored
Sep 19, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix getting command args"
This reverts commit
4db73567
.
parent
a8a12587
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
51 deletions
+3
-51
gframe/gframe.cpp
gframe/gframe.cpp
+3
-51
No files found.
gframe/gframe.cpp
View file @
cc04ea9d
...
...
@@ -63,57 +63,9 @@ int main(int argc, char* argv[]) {
wchar_t
*
command
=
GetCommandLineW
();
char
buffer
[
2048
];
BufferIO
::
EncodeUTF8
(
command
,
buffer
);
char
*
p
=
buffer
;
argc
=
0
;
int
j
=
0
;
bool
in_QM
=
false
,
in_TEXT
=
false
,
in_SPACE
=
true
;
while
(
*
p
)
{
if
(
in_QM
)
{
if
(
*
p
==
'\"'
)
in_QM
=
false
;
else
++
j
;
}
else
{
switch
(
*
p
)
{
case
'\"'
:
{
in_QM
=
true
;
in_TEXT
=
true
;
if
(
in_SPACE
)
{
argv
[
argc
]
=
p
+
1
;
j
=
0
;
}
in_SPACE
=
FALSE
;
break
;
}
case
' '
:
case
'\t'
:
case
'\n'
:
case
'\r'
:
{
if
(
in_TEXT
)
{
argv
[
argc
][
j
]
=
'\0'
;
++
argc
;
}
in_TEXT
=
FALSE
;
in_SPACE
=
TRUE
;
break
;
}
default:
{
in_TEXT
=
TRUE
;
if
(
in_SPACE
)
{
argv
[
argc
]
=
p
;
j
=
1
;
}
else
++
j
;
in_SPACE
=
FALSE
;
break
;
}
}
}
++
p
;
}
argv
[
argc
][
j
]
=
'\0'
;
++
argc
;
argv
[
argc
]
=
NULL
;
argv
[
0
]
=
strtok
(
buffer
,
" "
);
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
argv
[
i
]
=
strtok
(
NULL
,
" "
);
#endif // _WIN32
bool
keep_on_return
=
false
;
...
...
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