Commit ea5d653f authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

regedit: Add support for 'regedit /E -', to export the registry to stdout.

parent 09641eed
......@@ -832,11 +832,18 @@ static void export_hkey(FILE *file, HKEY key,
*/
static FILE *REGPROC_open_export_file(CHAR *file_name)
{
FILE *file = fopen(file_name, "w");
if (!file) {
perror("");
fprintf(stderr,"%s: Can't open file \"%s\"\n", getAppName(), file_name);
exit(1);
FILE *file;
if (strcmp(file_name,"-")==0)
file=stdout;
else
{
file = fopen(file_name, "w");
if (!file) {
perror("");
fprintf(stderr,"%s: Can't open file \"%s\"\n", getAppName(), file_name);
exit(1);
}
}
fputs("REGEDIT4\n", file);
return file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment