From eca2711718038c6ec31574258e0aeed1c8c4cf8e Mon Sep 17 00:00:00 2001 From: "shaver%netscape.com" Date: Fri, 18 Dec 1998 17:12:07 +0000 Subject: [PATCH] invoke -> typelib git-svn-id: svn://10.0.0.236/trunk@16670 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/tools/xpidl/Makefile.in | 2 +- mozilla/xpcom/tools/xpidl/xpidl.c | 18 +++++++++--------- mozilla/xpcom/tools/xpidl/xpidl.h | 6 +++--- mozilla/xpcom/tools/xpidl/xpidl_idl.c | 8 ++++---- .../xpidl/{xpidl_invoke.c => xpidl_typelib.c} | 5 +++-- mozilla/xpcom/typelib/xpidl/Makefile.in | 2 +- mozilla/xpcom/typelib/xpidl/xpidl.c | 18 +++++++++--------- mozilla/xpcom/typelib/xpidl/xpidl.h | 6 +++--- mozilla/xpcom/typelib/xpidl/xpidl_idl.c | 8 ++++---- .../xpidl/{xpidl_invoke.c => xpidl_typelib.c} | 5 +++-- 10 files changed, 40 insertions(+), 38 deletions(-) rename mozilla/xpcom/tools/xpidl/{xpidl_invoke.c => xpidl_typelib.c} (87%) rename mozilla/xpcom/typelib/xpidl/{xpidl_invoke.c => xpidl_typelib.c} (87%) diff --git a/mozilla/xpcom/tools/xpidl/Makefile.in b/mozilla/xpcom/tools/xpidl/Makefile.in index 6b0b7290bb2..12409cb712e 100644 --- a/mozilla/xpcom/tools/xpidl/Makefile.in +++ b/mozilla/xpcom/tools/xpidl/Makefile.in @@ -28,7 +28,7 @@ CSRCS = \ xpidl.c \ xpidl_idl.c \ xpidl_header.c \ - xpidl_invoke.c \ + xpidl_typelib.c \ xpidl_doc.c \ $(NULL) diff --git a/mozilla/xpcom/tools/xpidl/xpidl.c b/mozilla/xpcom/tools/xpidl/xpidl.c index f394211c3a0..b27120f0383 100644 --- a/mozilla/xpcom/tools/xpidl/xpidl.c +++ b/mozilla/xpcom/tools/xpidl/xpidl.c @@ -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; } diff --git a/mozilla/xpcom/tools/xpidl/xpidl.h b/mozilla/xpcom/tools/xpidl/xpidl.h index 4e8ca79c1e7..de5710683d9 100644 --- a/mozilla/xpcom/tools/xpidl/xpidl.h +++ b/mozilla/xpcom/tools/xpidl/xpidl.h @@ -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(); /* diff --git a/mozilla/xpcom/tools/xpidl/xpidl_idl.c b/mozilla/xpcom/tools/xpidl/xpidl_idl.c index 695e0453e0d..059f80da14e 100644 --- a/mozilla/xpcom/tools/xpidl/xpidl_idl.c +++ b/mozilla/xpcom/tools/xpidl/xpidl_idl.c @@ -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; diff --git a/mozilla/xpcom/tools/xpidl/xpidl_invoke.c b/mozilla/xpcom/tools/xpidl/xpidl_typelib.c similarity index 87% rename from mozilla/xpcom/tools/xpidl/xpidl_invoke.c rename to mozilla/xpcom/tools/xpidl/xpidl_typelib.c index eb2ac604795..a13e2c4dcef 100644 --- a/mozilla/xpcom/tools/xpidl/xpidl_invoke.c +++ b/mozilla/xpcom/tools/xpidl/xpidl_typelib.c @@ -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; diff --git a/mozilla/xpcom/typelib/xpidl/Makefile.in b/mozilla/xpcom/typelib/xpidl/Makefile.in index 6b0b7290bb2..12409cb712e 100644 --- a/mozilla/xpcom/typelib/xpidl/Makefile.in +++ b/mozilla/xpcom/typelib/xpidl/Makefile.in @@ -28,7 +28,7 @@ CSRCS = \ xpidl.c \ xpidl_idl.c \ xpidl_header.c \ - xpidl_invoke.c \ + xpidl_typelib.c \ xpidl_doc.c \ $(NULL) diff --git a/mozilla/xpcom/typelib/xpidl/xpidl.c b/mozilla/xpcom/typelib/xpidl/xpidl.c index f394211c3a0..b27120f0383 100644 --- a/mozilla/xpcom/typelib/xpidl/xpidl.c +++ b/mozilla/xpcom/typelib/xpidl/xpidl.c @@ -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; } diff --git a/mozilla/xpcom/typelib/xpidl/xpidl.h b/mozilla/xpcom/typelib/xpidl/xpidl.h index 4e8ca79c1e7..de5710683d9 100644 --- a/mozilla/xpcom/typelib/xpidl/xpidl.h +++ b/mozilla/xpcom/typelib/xpidl/xpidl.h @@ -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(); /* diff --git a/mozilla/xpcom/typelib/xpidl/xpidl_idl.c b/mozilla/xpcom/typelib/xpidl/xpidl_idl.c index 695e0453e0d..059f80da14e 100644 --- a/mozilla/xpcom/typelib/xpidl/xpidl_idl.c +++ b/mozilla/xpcom/typelib/xpidl/xpidl_idl.c @@ -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; diff --git a/mozilla/xpcom/typelib/xpidl/xpidl_invoke.c b/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c similarity index 87% rename from mozilla/xpcom/typelib/xpidl/xpidl_invoke.c rename to mozilla/xpcom/typelib/xpidl/xpidl_typelib.c index eb2ac604795..a13e2c4dcef 100644 --- a/mozilla/xpcom/typelib/xpidl/xpidl_invoke.c +++ b/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c @@ -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;