mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
invoke -> typelib
This commit is contained in:
parent
00b411a715
commit
f695bdad8d
@ -28,7 +28,7 @@ CSRCS = \
|
||||
xpidl.c \
|
||||
xpidl_idl.c \
|
||||
xpidl_header.c \
|
||||
xpidl_invoke.c \
|
||||
xpidl_typelib.c \
|
||||
xpidl_doc.c \
|
||||
$(NULL)
|
||||
|
||||
|
@ -26,13 +26,13 @@ gboolean enable_debug = FALSE;
|
||||
gboolean enable_warnings = FALSE;
|
||||
gboolean verbose_mode = FALSE;
|
||||
gboolean generate_docs = FALSE;
|
||||
gboolean generate_invoke = FALSE;
|
||||
gboolean generate_typelib = FALSE;
|
||||
gboolean generate_headers = FALSE;
|
||||
gboolean generate_nothing = FALSE;
|
||||
|
||||
static char xpidl_usage_str[] =
|
||||
"Usage: %s [-i] [-d] [-h] [-w] [-v] [-I path] [-n] [-o basename] filename.idl\n"
|
||||
" -i generate InterfaceInfo data (filename.int) (NYI)\n"
|
||||
"Usage: %s [-t] [-d] [-h] [-w] [-v] [-I path] [-n] [-o basename] filename.idl\n"
|
||||
" -t generate typelib data (filename.xpt) (NYI)\n"
|
||||
" -d generate HTML documentation (filename.html) (NYI)\n"
|
||||
" -h generate C++ headers (filename.h)\n"
|
||||
" -w turn on warnings (recommended)\n"
|
||||
@ -68,12 +68,12 @@ main(int argc, char *argv[])
|
||||
case 'd':
|
||||
generate_docs = TRUE;
|
||||
break;
|
||||
case 'i':
|
||||
generate_invoke = TRUE;
|
||||
case 't':
|
||||
generate_typelib = TRUE;
|
||||
break;
|
||||
case 'h':
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
enable_warnings = TRUE;
|
||||
break;
|
||||
@ -114,8 +114,8 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!(generate_docs || generate_invoke || generate_headers)) {
|
||||
fprintf(stderr, "ERROR: must specify one of -i, -d, -h\n");
|
||||
if (!(generate_docs || generate_typelib || generate_headers)) {
|
||||
fprintf(stderr, "ERROR: must specify one of -t, -d, -h\n");
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ extern gboolean enable_debug;
|
||||
extern gboolean enable_warnings;
|
||||
extern gboolean verbose_mode;
|
||||
extern gboolean generate_docs;
|
||||
extern gboolean generate_invoke;
|
||||
extern gboolean generate_typelib;
|
||||
extern gboolean generate_headers;
|
||||
extern gboolean generate_nothing;
|
||||
|
||||
@ -59,7 +59,7 @@ typedef struct {
|
||||
} TreeState;
|
||||
|
||||
#define TREESTATE_HEADER 0
|
||||
#define TREESTATE_INVOKE 1
|
||||
#define TREESTATE_TYPELIB 1
|
||||
#define TREESTATE_DOC 2
|
||||
#define TREESTATE_NUM 3
|
||||
|
||||
@ -74,7 +74,7 @@ typedef gboolean (*nodeHandler)(TreeState *);
|
||||
extern nodeHandler *nodeDispatch[TREESTATE_NUM];
|
||||
|
||||
extern nodeHandler *headerDispatch();
|
||||
extern nodeHandler *invokeDispatch();
|
||||
extern nodeHandler *typelibDispatch();
|
||||
extern nodeHandler *docDispatch();
|
||||
|
||||
/*
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "xpidl.h"
|
||||
|
||||
FILE *typelib_file = NULL;
|
||||
FILE *invoke_file = NULL;
|
||||
FILE *doc_file = NULL;
|
||||
FILE *header_file = NULL;
|
||||
|
||||
nodeHandler *nodeDispatch[TREESTATE_NUM] = { NULL };
|
||||
@ -466,7 +466,7 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
state.includes = stack.includes;
|
||||
state.include_path = include_path;
|
||||
nodeDispatch[TREESTATE_HEADER] = headerDispatch();
|
||||
nodeDispatch[TREESTATE_INVOKE] = invokeDispatch();
|
||||
nodeDispatch[TREESTATE_TYPELIB] = typelibDispatch();
|
||||
nodeDispatch[TREESTATE_DOC] = docDispatch();
|
||||
if (generate_headers) {
|
||||
if (strcmp(basename, "-")) {
|
||||
@ -489,8 +489,8 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
if (!ok)
|
||||
return 0;
|
||||
}
|
||||
if (generate_invoke) {
|
||||
state.mode = TREESTATE_INVOKE;
|
||||
if (generate_typelib) {
|
||||
state.mode = TREESTATE_TYPELIB;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
|
@ -17,12 +17,13 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Generate nsIDispatch invoke glue for calling from JS or other places.
|
||||
* Generate typelib files for use with InterfaceInfo.
|
||||
* http://www.mozilla.org/scriptable/typelib_file.html
|
||||
*/
|
||||
|
||||
#include "xpidl.h"
|
||||
|
||||
nodeHandler *invokeDispatch()
|
||||
nodeHandler *typelibDispatch()
|
||||
{
|
||||
static nodeHandler table[IDLN_LAST];
|
||||
static gboolean initialized = FALSE;
|
@ -28,7 +28,7 @@ CSRCS = \
|
||||
xpidl.c \
|
||||
xpidl_idl.c \
|
||||
xpidl_header.c \
|
||||
xpidl_invoke.c \
|
||||
xpidl_typelib.c \
|
||||
xpidl_doc.c \
|
||||
$(NULL)
|
||||
|
||||
|
@ -26,13 +26,13 @@ gboolean enable_debug = FALSE;
|
||||
gboolean enable_warnings = FALSE;
|
||||
gboolean verbose_mode = FALSE;
|
||||
gboolean generate_docs = FALSE;
|
||||
gboolean generate_invoke = FALSE;
|
||||
gboolean generate_typelib = FALSE;
|
||||
gboolean generate_headers = FALSE;
|
||||
gboolean generate_nothing = FALSE;
|
||||
|
||||
static char xpidl_usage_str[] =
|
||||
"Usage: %s [-i] [-d] [-h] [-w] [-v] [-I path] [-n] [-o basename] filename.idl\n"
|
||||
" -i generate InterfaceInfo data (filename.int) (NYI)\n"
|
||||
"Usage: %s [-t] [-d] [-h] [-w] [-v] [-I path] [-n] [-o basename] filename.idl\n"
|
||||
" -t generate typelib data (filename.xpt) (NYI)\n"
|
||||
" -d generate HTML documentation (filename.html) (NYI)\n"
|
||||
" -h generate C++ headers (filename.h)\n"
|
||||
" -w turn on warnings (recommended)\n"
|
||||
@ -68,12 +68,12 @@ main(int argc, char *argv[])
|
||||
case 'd':
|
||||
generate_docs = TRUE;
|
||||
break;
|
||||
case 'i':
|
||||
generate_invoke = TRUE;
|
||||
case 't':
|
||||
generate_typelib = TRUE;
|
||||
break;
|
||||
case 'h':
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
enable_warnings = TRUE;
|
||||
break;
|
||||
@ -114,8 +114,8 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!(generate_docs || generate_invoke || generate_headers)) {
|
||||
fprintf(stderr, "ERROR: must specify one of -i, -d, -h\n");
|
||||
if (!(generate_docs || generate_typelib || generate_headers)) {
|
||||
fprintf(stderr, "ERROR: must specify one of -t, -d, -h\n");
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ extern gboolean enable_debug;
|
||||
extern gboolean enable_warnings;
|
||||
extern gboolean verbose_mode;
|
||||
extern gboolean generate_docs;
|
||||
extern gboolean generate_invoke;
|
||||
extern gboolean generate_typelib;
|
||||
extern gboolean generate_headers;
|
||||
extern gboolean generate_nothing;
|
||||
|
||||
@ -59,7 +59,7 @@ typedef struct {
|
||||
} TreeState;
|
||||
|
||||
#define TREESTATE_HEADER 0
|
||||
#define TREESTATE_INVOKE 1
|
||||
#define TREESTATE_TYPELIB 1
|
||||
#define TREESTATE_DOC 2
|
||||
#define TREESTATE_NUM 3
|
||||
|
||||
@ -74,7 +74,7 @@ typedef gboolean (*nodeHandler)(TreeState *);
|
||||
extern nodeHandler *nodeDispatch[TREESTATE_NUM];
|
||||
|
||||
extern nodeHandler *headerDispatch();
|
||||
extern nodeHandler *invokeDispatch();
|
||||
extern nodeHandler *typelibDispatch();
|
||||
extern nodeHandler *docDispatch();
|
||||
|
||||
/*
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "xpidl.h"
|
||||
|
||||
FILE *typelib_file = NULL;
|
||||
FILE *invoke_file = NULL;
|
||||
FILE *doc_file = NULL;
|
||||
FILE *header_file = NULL;
|
||||
|
||||
nodeHandler *nodeDispatch[TREESTATE_NUM] = { NULL };
|
||||
@ -466,7 +466,7 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
state.includes = stack.includes;
|
||||
state.include_path = include_path;
|
||||
nodeDispatch[TREESTATE_HEADER] = headerDispatch();
|
||||
nodeDispatch[TREESTATE_INVOKE] = invokeDispatch();
|
||||
nodeDispatch[TREESTATE_TYPELIB] = typelibDispatch();
|
||||
nodeDispatch[TREESTATE_DOC] = docDispatch();
|
||||
if (generate_headers) {
|
||||
if (strcmp(basename, "-")) {
|
||||
@ -489,8 +489,8 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
|
||||
if (!ok)
|
||||
return 0;
|
||||
}
|
||||
if (generate_invoke) {
|
||||
state.mode = TREESTATE_INVOKE;
|
||||
if (generate_typelib) {
|
||||
state.mode = TREESTATE_TYPELIB;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
|
@ -17,12 +17,13 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Generate nsIDispatch invoke glue for calling from JS or other places.
|
||||
* Generate typelib files for use with InterfaceInfo.
|
||||
* http://www.mozilla.org/scriptable/typelib_file.html
|
||||
*/
|
||||
|
||||
#include "xpidl.h"
|
||||
|
||||
nodeHandler *invokeDispatch()
|
||||
nodeHandler *typelibDispatch()
|
||||
{
|
||||
static nodeHandler table[IDLN_LAST];
|
||||
static gboolean initialized = FALSE;
|
Loading…
Reference in New Issue
Block a user