Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
09641eed
Commit
09641eed
authored
Oct 09, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Add support for 'regedit -' for feeding regedit from stdin.
parent
01e7891d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
regedit.c
programs/regedit/regedit.c
+31
-16
No files found.
programs/regedit/regedit.c
View file @
09641eed
...
...
@@ -138,25 +138,34 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
while
(
filename
[
0
])
{
char
*
realname
=
NULL
;
int
size
;
size
=
SearchPath
(
NULL
,
filename
,
NULL
,
0
,
NULL
,
NULL
);
if
(
size
>
0
)
{
realname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
size
=
SearchPath
(
NULL
,
filename
,
NULL
,
size
,
realname
,
NULL
);
}
if
(
size
==
0
)
if
(
strcmp
(
filename
,
"-"
)
==
0
)
{
fprintf
(
stderr
,
"%s: File not found
\"
%s
\"
(%d)
\n
"
,
getAppName
(),
filename
,
GetLastError
());
exit
(
1
);
reg_file
=
stdin
;
}
reg_file
=
fopen
(
realname
,
"r"
);
if
(
reg_file
==
NULL
)
else
{
perror
(
""
);
fprintf
(
stderr
,
"%s: Can't open file
\"
%s
\"\n
"
,
getAppName
(),
filename
);
exit
(
1
);
int
size
;
size
=
SearchPath
(
NULL
,
filename
,
NULL
,
0
,
NULL
,
NULL
);
if
(
size
>
0
)
{
realname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
size
=
SearchPath
(
NULL
,
filename
,
NULL
,
size
,
realname
,
NULL
);
}
if
(
size
==
0
)
{
fprintf
(
stderr
,
"%s: File not found
\"
%s
\"
(%d)
\n
"
,
getAppName
(),
filename
,
GetLastError
());
exit
(
1
);
}
reg_file
=
fopen
(
realname
,
"r"
);
if
(
reg_file
==
NULL
)
{
perror
(
""
);
fprintf
(
stderr
,
"%s: Can't open file
\"
%s
\"\n
"
,
getAppName
(),
filename
);
exit
(
1
);
}
}
processRegLines
(
reg_file
);
if
(
realname
)
...
...
@@ -240,6 +249,12 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
s
++
;
ch
=
*
s
;
if
(
!
ch
||
isspace
(
ch
))
{
/* '-' is a file name. It indicates we should use stdin */
s
--
;
break
;
}
ch2
=
*
(
s
+
1
);
chu
=
toupper
(
ch
);
if
(
!
ch2
||
isspace
(
ch2
))
{
...
...
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