mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Added binary file open as first step for creating typelib files.
This commit is contained in:
parent
c8b50d42a1
commit
21ec63486f
@ -490,9 +490,24 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
return 0;
|
||||
}
|
||||
if (generate_typelib) {
|
||||
if (strcmp(basename, "-")) {
|
||||
outname = g_strdup_printf("%s.xpt", basename);
|
||||
state.file = fopen(outname, "wb");
|
||||
if (!state.file) {
|
||||
perror("error opening output file");
|
||||
free(outname);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
state.file = stdout;
|
||||
}
|
||||
state.mode = TREESTATE_TYPELIB;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
ok = process_tree(&state);
|
||||
free(outname);
|
||||
if (state.file != stdout)
|
||||
fclose(state.file);
|
||||
if (!ok)
|
||||
return 0;
|
||||
}
|
||||
if (generate_docs) {
|
||||
|
@ -490,9 +490,24 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
return 0;
|
||||
}
|
||||
if (generate_typelib) {
|
||||
if (strcmp(basename, "-")) {
|
||||
outname = g_strdup_printf("%s.xpt", basename);
|
||||
state.file = fopen(outname, "wb");
|
||||
if (!state.file) {
|
||||
perror("error opening output file");
|
||||
free(outname);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
state.file = stdout;
|
||||
}
|
||||
state.mode = TREESTATE_TYPELIB;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
ok = process_tree(&state);
|
||||
free(outname);
|
||||
if (state.file != stdout)
|
||||
fclose(state.file);
|
||||
if (!ok)
|
||||
return 0;
|
||||
}
|
||||
if (generate_docs) {
|
||||
|
Loading…
Reference in New Issue
Block a user