--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+bin_PROGRAMS = forb-idl
+include_HEADERS = config.h
+
+#GLIB_FLAGS := $(shell pkg-config --cflags glib-2.0)
+IDL_FLAGS := $(shell pkg-config --cflags libIDL-2.0)
+CFLAGS += $(IDL_FLAGS) -DFORB_BACKENDS_DIR=\"/orbit-backend-dir\" -DVERSION=\"0.1\"
+
+forb-idl_SOURCES = forb-idl-backend.c forb-idl-backend.h \
+ forb-idl-c-backend.c forb-idl-c-backend.h \
+ forb-idl-c-common.c forb-idl-c-deps.c \
+ forb-idl-c-headers.c forb-idl-c-imodule.c \
+ forb-idl-c-skelimpl.c forb-idl-c-skels.c \
+ forb-idl-c-stubs.c forb-idl-c-typecode.c \
+ forb-idl-c-utils.c forb-idl-driver.c \
+ forb-idl-main.c forb-idl-utils.c forb-idl2.h \
+ forb-idl3-types.h
+forb-idl_LIBS = IDL-2 glib-2.0 gtk
--- /dev/null
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define if HTTP connections are available */
+/* #undef ENABLE_HTTP */
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H 1
+
+/* Define to 1 if you have the `basename' function. */
+#define HAVE_BASENAME 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define HAVE_ENDIAN_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if getaddrinfo() is available */
+#define HAVE_GETADDRINFO 1
+
+/* Define if getnameinfo() is available */
+#define HAVE_GETNAMEINFO 1
+
+/* Define if inet_pton() is available */
+#define HAVE_INET_PTON 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the <linux/socket.h> header file. */
+#define HAVE_LINUX_SOCKET_H 1
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/types.h> header file. */
+/* #undef HAVE_MACHINE_TYPES_H */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#define HAVE_NETINET_TCP_H 1
+
+/* Define to 1 if you have the `poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H 1
+
+/* Define if sockaddr has sa_len member */
+/* #undef HAVE_SOCKADDR_SA_LEN */
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#define HAVE_SYSLOG_H 1
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+/* #undef HAVE_SYS_ENDIAN_H */
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#define HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#define HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+/* #undef HAVE_SYS_UTIME_H */
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define to 1 if you have the <wcstr.h> header file. */
+/* #undef HAVE_WCSTR_H */
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+/* #undef HAVE_WINSOCK2_H */
+
+/* defined if purify is enabled */
+/* #undef ORBIT_PURIFY */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=ORBit2"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "ORBit2"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "ORBit2 2.14.13"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "ORBit2"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.14.13"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
+#if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+#elif ! defined __LITTLE_ENDIAN__
+/* # undef WORDS_BIGENDIAN */
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define socklen_t to be of type size_t */
+/* #undef socklen_t */
#include <config.h>
-#include "orbit-idl-backend.h"
-#include "orbit-idl2.h"
+#include "forb-idl-backend.h"
+#include "forb-idl2.h"
#include <glib.h>
#include <gmodule.h>
strv = g_strsplit (val, ";", -1);
for (i = 0; strv [i]; i++)
paths = g_slist_prepend (
- paths, g_strconcat (strv [i], "/lib/orbit-2.0/idl-backends", NULL));
+ paths, g_strconcat (strv [i], "/lib/forb-2.0/idl-backends", NULL));
g_strfreev (strv);
return paths;
}
-static ORBitIDLBackendFunc
+static ForbIDLBackendFunc
load_language_backend (const char *path,
const char *language)
{
- ORBitIDLBackendFunc retval = NULL;
+ ForbIDLBackendFunc retval = NULL;
GModule *module;
char *modname;
char *modpath;
- modname = g_strconcat ("ORBit-idl-backend-", language, NULL);
+ modname = g_strconcat ("forb-idl-backend-", language, NULL);
modpath = g_module_build_path (path, modname);
g_free (modname);
return NULL;
}
- if (!g_module_symbol (module, "orbit_idl_backend_func", (gpointer *) &retval))
- g_warning ("backend %s has no \"orbit_idl_backend_func\" defined", modpath);
+ if (!g_module_symbol (module, "forb_idl_backend_func", (gpointer *) &retval))
+ g_warning ("backend %s has no \"forb_idl_backend_func\" defined", modpath);
g_free (modpath);
}
gboolean
-orbit_idl_backend_output (OIDL_Run_Info *rinfo,
+forb_idl_backend_output (OIDL_Run_Info *rinfo,
IDL_tree tree)
{
- ORBitIDLBackendFunc func = NULL;
- ORBitIDLBackendContext context;
+ ForbIDLBackendFunc func = NULL;
+ ForbIDLBackendContext context;
GSList *paths = NULL;
GSList *l;
paths = prepend_from_env_var (paths, "GNOME2_PATH");
- paths = prepend_from_env_var (paths, "ORBIT_BACKENDS_PATH");
+ paths = prepend_from_env_var (paths, "FORB_BACKENDS_PATH");
- paths = g_slist_prepend (paths, g_strdup (ORBIT_BACKENDS_DIR));
+ paths = g_slist_prepend (paths, g_strdup (FORB_BACKENDS_DIR));
if (rinfo->backend_directory)
paths = g_slist_prepend (paths, g_strdup (rinfo->backend_directory));
/*
- * orbit-idl-backend.h:
+ * forb-idl-backend.h:
*
* Copyright (C) 2002 Sun Microsystems, Inc.
*
* Mark McLoughlin <mark@skynet.ie>
*/
-#ifndef __ORBIT_IDL_BACKEND_H__
-#define __ORBIT_IDL_BACKEND_H__
+#ifndef __FORB_IDL_BACKEND_H__
+#define __FORB_IDL_BACKEND_H__
#include <glib.h>
#include <libIDL/IDL.h>
guint do_stubs : 1;
guint do_skels : 1;
guint do_common : 1;
-} ORBitIDLBackendContext;
+} ForbIDLBackendContext;
-/* Define a function with this signature and named "orbit_idl_backend_func"
+/* Define a function with this signature and named "forb_idl_backend_func"
* in the module.
*
- * The module should be named libORBit-idl-backend-$(language).so. $(language)
+ * The module should be named libforb-idl-backend-$(language).so. $(language)
* is defined with the --lang idl-compiler command line option.
*
* Modules are searched for in the following order:
* 1. The directory specified by the --backenddir option.
- * 2. %(prefix)/lib/orbit-2.0/idl-backends/, where $(prefix) is the prefix
- * ORBit2 was installed in.
- * 3. For each $(path) in the $ORBIT_BACKENDS_PATH environment variable,
- * the module is searched for in $(path)/lib/orbit-2.0/idl-backends/
+ * 2. %(prefix)/lib/forb-2.0/idl-backends/, where $(prefix) is the prefix
+ * Forb2 was installed in.
+ * 3. For each $(path) in the $FORB_BACKENDS_PATH environment variable,
+ * the module is searched for in $(path)/lib/forb-2.0/idl-backends/
* 4. For each $(path) in the $GNOME2_PATH environment variable,
- * the module is searched for in $(path)/lib/orbit-2.0/idl-backends/
+ * the module is searched for in $(path)/lib/forb-2.0/idl-backends/
*/
-typedef gboolean (*ORBitIDLBackendFunc) (ORBitIDLBackendContext *context);
+typedef gboolean (*ForbIDLBackendFunc) (ForbIDLBackendContext *context);
G_END_DECLS
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
OIDL_Run_Info *rinfo);
gboolean
-orbit_idl_output_c (IDL_tree tree,
+forb_idl_output_c (IDL_tree tree,
OIDL_Run_Info *rinfo)
{
int i;
switch(1 << i) {
case OUTPUT_STUBS:
- orbit_idl_output_c_stubs(tree, rinfo, &ci);
+ forb_idl_output_c_stubs(tree, rinfo, &ci);
break;
case OUTPUT_SKELS:
- orbit_idl_output_c_skeletons(tree, rinfo, &ci);
+ forb_idl_output_c_skeletons(tree, rinfo, &ci);
break;
case OUTPUT_COMMON:
- orbit_idl_output_c_common(tree, rinfo, &ci);
+ forb_idl_output_c_common(tree, rinfo, &ci);
break;
case OUTPUT_HEADERS:
- orbit_idl_output_c_headers(tree, rinfo, &ci);
+ forb_idl_output_c_headers(tree, rinfo, &ci);
break;
case OUTPUT_SKELIMPL:
- orbit_idl_output_c_skelimpl(tree, rinfo, &ci);
+ forb_idl_output_c_skelimpl(tree, rinfo, &ci);
break;
case OUTPUT_IMODULE:
- orbit_idl_output_c_imodule(tree, rinfo, &ci);
+ forb_idl_output_c_imodule(tree, rinfo, &ci);
break;
case OUTPUT_DEPS:
- orbit_idl_output_c_deps(tree, rinfo, &ci);
+ forb_idl_output_c_deps(tree, rinfo, &ci);
break;
}
fclose(ci.fh);
}
char *
-orbit_idl_c_filename_for_pass (const char *input_filename,
+forb_idl_c_filename_for_pass (const char *input_filename,
int pass)
{
char *filename;
rinfo->deps_file, g_strerror (errno));
} else {
- output_filename = orbit_idl_c_filename_for_pass (input_filename, pass);
+ output_filename = forb_idl_c_filename_for_pass (input_filename, pass);
output_full_path = g_build_path (G_DIR_SEPARATOR_S, rinfo->output_directory, output_filename, NULL);
g_free (output_filename);
-#ifndef ORBIT_IDL_C_BACKEND_H
-#define ORBIT_IDL_C_BACKEND_H
+#ifndef FORB_IDL_C_BACKEND_H
+#define FORB_IDL_C_BACKEND_H
-#include "orbit-idl2.h"
+#include "forb-idl2.h"
-#define OIDL_C_WARNING "/*\n * This file was generated by orbit-idl-2 - DO NOT EDIT!\n */\n\n"
+#define OIDL_C_WARNING "/*\n * This file was generated by forb-idl-2 - DO NOT EDIT!\n */\n\n"
typedef struct {
char *base_name;
gboolean do_skel_defs;
} OIDL_C_Info;
-gboolean orbit_idl_output_c (IDL_tree tree,
+gboolean forb_idl_output_c (IDL_tree tree,
OIDL_Run_Info *rinfo);
-void orbit_idl_output_c_headers (IDL_tree tree,
+void forb_idl_output_c_headers (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_stubs (IDL_tree tree,
+void forb_idl_output_c_stubs (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_skeletons (IDL_tree tree,
+void forb_idl_output_c_skeletons (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_common (IDL_tree tree,
+void forb_idl_output_c_common (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_skelimpl (IDL_tree tree,
+void forb_idl_output_c_skelimpl (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_imodule (IDL_tree tree,
+void forb_idl_output_c_imodule (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_idl_output_c_deps (IDL_tree tree,
+void forb_idl_output_c_deps (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci);
-void orbit_output_typecode (OIDL_C_Info *ci, IDL_tree ts);
+void forb_output_typecode (OIDL_C_Info *ci, IDL_tree ts);
-char *orbit_idl_c_filename_for_pass (const char *input_filename, int pass);
+char *forb_idl_c_filename_for_pass (const char *input_filename, int pass);
/* utils */
-char *orbit_cbe_get_typespec_str (IDL_tree tree);
-void orbit_cbe_write_typespec (FILE *of,
+char *forb_cbe_get_typespec_str (IDL_tree tree);
+void forb_cbe_write_typespec (FILE *of,
IDL_tree tree);
-void orbit_cbe_write_param_typespec (FILE *of,
+void forb_cbe_write_param_typespec (FILE *of,
IDL_tree tree);
-void orbit_cbe_op_write_proto (FILE *of,
+void forb_cbe_op_write_proto (FILE *of,
IDL_tree op,
const char *nom_prefix,
gboolean for_epv);
-IDL_tree orbit_cbe_get_typespec (IDL_tree tree);
-void orbit_cbe_write_const (FILE *of,
+IDL_tree forb_cbe_get_typespec (IDL_tree tree);
+void forb_cbe_write_const (FILE *of,
IDL_tree tree);
-gboolean orbit_cbe_type_is_fixed_length (IDL_tree ts);
-gboolean orbit_cbe_type_is_builtin (IDL_tree tree);
-void orbit_cbe_id_define_hack (FILE *fh,
+gboolean forb_cbe_type_is_fixed_length (IDL_tree ts);
+gboolean forb_cbe_type_is_builtin (IDL_tree tree);
+void forb_cbe_id_define_hack (FILE *fh,
const char *def_prefix,
const char *def_name,
const char *def_value);
-void orbit_cbe_id_cond_hack (FILE *fh,
+void forb_cbe_id_cond_hack (FILE *fh,
const char *def_prefix,
const char *def_name,
const char *def_value);
-char *orbit_cbe_get_typecode_name (IDL_tree tree);
-void orbit_cbe_flatten_args (IDL_tree tree,
+char *forb_cbe_get_typecode_name (IDL_tree tree);
+void forb_cbe_flatten_args (IDL_tree tree,
FILE *of,
const char *name);
-void orbit_cbe_unflatten_args (IDL_tree tree,
+void forb_cbe_unflatten_args (IDL_tree tree,
FILE *of,
const char *name);
#endif
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
char *type_str;
char *seq_type_str;
- seq_type = orbit_cbe_get_typespec (IDL_TYPE_SEQUENCE (tree).simple_type_spec);
+ seq_type = forb_cbe_get_typespec (IDL_TYPE_SEQUENCE (tree).simple_type_spec);
if (IDL_NODE_TYPE (seq_type) != IDLN_INTERFACE)
- seq_type_str = orbit_cbe_get_typespec_str (seq_type);
+ seq_type_str = forb_cbe_get_typespec_str (seq_type);
else {
seq_type_str = g_strdup ("CORBA_Object");
fake_seq_type = IDL_type_object_new ();
}
- type_str = orbit_cbe_get_typespec_str (IDL_TYPE_SEQUENCE (tree).simple_type_spec);
+ type_str = forb_cbe_get_typespec_str (IDL_TYPE_SEQUENCE (tree).simple_type_spec);
if (strcmp (type_str, seq_type_str)) {
IDL_tree fake_seq;
case IDLN_TYPE_ENUM:
case IDLN_TYPE_FIXED:
if (tfd->step)
- orbit_output_typecode (ci, tree);
+ forb_output_typecode (ci, tree);
break;
default:
break;
iface_id = IDL_ns_ident_to_qstring (
IDL_IDENT_TO_NS (IDL_INTERFACE (tree).ident), "_", 0);
- fprintf (ci->fh, "\n#ifndef ORBIT_IDL_C_IMODULE_%s\n",ci->c_base_name);
+ fprintf (ci->fh, "\n#ifndef FORB_IDL_C_IMODULE_%s\n",ci->c_base_name);
fprintf (ci->fh, "CORBA_unsigned_long %s__classid = 0;\n", iface_id);
fprintf (ci->fh, "#endif\n");
char *tc;
if (!arg_count)
- fprintf (of, "static ORBit_IArg %s__arginfo [] = {\n", method);
+ fprintf (of, "static Forb_IArg %s__arginfo [] = {\n", method);
parm = IDL_LIST(sub).data;
fprintf (of, "\t{ ");
/* TypeCode tc */
- tc = orbit_cbe_get_typecode_name (
+ tc = forb_cbe_get_typecode_name (
IDL_PARAM_DCL (parm).param_type_spec);
if (!tc) {
g_warning ("Can't get typecode");
/* IArgFlag flags */
switch (IDL_PARAM_DCL (parm).attr) {
case IDL_PARAM_IN:
- fprintf (of, " ORBit_I_ARG_IN ");
+ fprintf (of, " Forb_I_ARG_IN ");
break;
case IDL_PARAM_OUT:
- fprintf (of, " ORBit_I_ARG_OUT ");
+ fprintf (of, " Forb_I_ARG_OUT ");
break;
case IDL_PARAM_INOUT:
- fprintf (of, " ORBit_I_ARG_INOUT ");
+ fprintf (of, " Forb_I_ARG_INOUT ");
break;
}
- if (orbit_cbe_type_is_fixed_length (
+ if (forb_cbe_type_is_fixed_length (
IDL_PARAM_DCL (parm).param_type_spec))
- fprintf (of, "| ORBit_I_COMMON_FIXED_SIZE");
+ fprintf (of, "| Forb_I_COMMON_FIXED_SIZE");
else if (IDL_PARAM_DCL(parm).attr == IDL_PARAM_OUT) {
- IDL_tree ts = orbit_cbe_get_typespec (
+ IDL_tree ts = forb_cbe_get_typespec (
IDL_PARAM_DCL (parm).param_type_spec);
switch(IDL_NODE_TYPE (ts)) {
case IDLN_TYPE_STRUCT:
case IDLN_TYPE_UNION:
case IDLN_TYPE_ARRAY:
-/* fprintf (of, "| ORBIT_I_ARG_FIXED");*/
+/* fprintf (of, "| FORB_I_ARG_FIXED");*/
break;
default:
break;
char *type_id;
IDL_tree curnode = IDL_LIST(curitem).data;
- type_id = orbit_cbe_get_typecode_name (curnode);
+ type_id = forb_cbe_get_typecode_name (curnode);
fprintf (of, "\t%s,\n", type_id);
g_free (type_id);
}
if (IDL_OP_DCL (tree).op_type_spec) {
char *type_id;
- type_id = orbit_cbe_get_typespec_str (
+ type_id = forb_cbe_get_typespec_str (
IDL_OP_DCL (tree).op_type_spec);
fprintf (of, "\t\tTC_%s, ", type_id);
g_free (type_id);
fprintf (of, "\t\t0");
if (IDL_OP_DCL(tree).f_oneway)
- fprintf (of, " | ORBit_I_METHOD_1_WAY");
+ fprintf (of, " | Forb_I_METHOD_1_WAY");
/* FIXME: re-scan for no_out */
/* if (no_out)
- fprintf (of, " | ORBit_I_METHOD_NO_OUT");*/
+ fprintf (of, " | Forb_I_METHOD_NO_OUT");*/
if (IDL_OP_DCL (tree).op_type_spec &&
- orbit_cbe_type_is_fixed_length (
+ forb_cbe_type_is_fixed_length (
IDL_OP_DCL (tree).op_type_spec))
- fprintf (of, "| ORBit_I_COMMON_FIXED_SIZE");
+ fprintf (of, "| Forb_I_COMMON_FIXED_SIZE");
if (IDL_OP_DCL(tree).context_expr)
- fprintf (of, "| ORBit_I_METHOD_HAS_CONTEXT");
+ fprintf (of, "| Forb_I_METHOD_HAS_CONTEXT");
fprintf (of, "\n}\n");
cc_output_method_bits (m->data, id, ci);
if (i->methods) {
- fprintf (of, "\n#ifdef ORBIT_IDL_C_IMODULE_%s\n",
+ fprintf (of, "\n#ifdef FORB_IDL_C_IMODULE_%s\n",
ci->c_base_name);
fprintf (of, "static\n");
fprintf (of, "#endif\n");
- fprintf (of, "ORBit_IMethod %s__imethods [] = {\n", id);
+ fprintf (of, "Forb_IMethod %s__imethods [] = {\n", id);
if (!(m = i->methods))
fprintf (of, "{{0}}");
fprintf (of, "(char *)\"IDL:omg.org/CORBA/Object:1.0\"\n};");
- fprintf (of, "\n#ifdef ORBIT_IDL_C_IMODULE_%s\n",
+ fprintf (of, "\n#ifdef FORB_IDL_C_IMODULE_%s\n",
ci->c_base_name);
fprintf (of, "static\n");
fprintf (of, "#endif\n");
- fprintf (of, "ORBit_IInterface %s__iinterface = {\n", id);
+ fprintf (of, "Forb_IInterface %s__iinterface = {\n", id);
fprintf (of, "TC_%s,", id);
fprintf (of, "{%d, %d, %s__imethods, FALSE},\n",
g_slist_length (i->methods),
opname = IDL_ns_ident_to_qstring (IDL_IDENT_TO_NS (IDL_OP_DCL (tree).ident), "_", 0);
ifname = IDL_ns_ident_to_qstring (IDL_IDENT_TO_NS (IDL_INTERFACE (intf).ident), "_", 0);
- fprintf (ci->fh, "void _ORBIT_skel_small_%s("
+ fprintf (ci->fh, "void _FORB_skel_small_%s("
"POA_%s *_o_servant, "
"gpointer _o_retval,"
"gpointer *_o_args,"
"CORBA_Context _o_ctx,"
"CORBA_Environment *_o_ev,\n", opname, ifname);
- orbit_cbe_op_write_proto (ci->fh, tree, "_impl_", TRUE);
+ forb_cbe_op_write_proto (ci->fh, tree, "_impl_", TRUE);
fprintf (ci->fh, ") {\n");
if (has_retval) {
fprintf (ci->fh, "*(");
- orbit_cbe_write_param_typespec (ci->fh, tree);
+ forb_cbe_write_param_typespec (ci->fh, tree);
fprintf (ci->fh, " *)_o_retval = ");
}
fprintf (ci->fh, "_impl_%s (_o_servant, ", IDL_IDENT (IDL_OP_DCL (tree).ident).str);
- orbit_cbe_unflatten_args (tree, ci->fh, "_o_args");
+ forb_cbe_unflatten_args (tree, ci->fh, "_o_args");
if (IDL_OP_DCL (tree).context_expr)
fprintf (ci->fh, "_o_ctx, ");
}
void
-orbit_idl_output_c_common (IDL_tree tree,
+forb_idl_output_c_common (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci)
{
fprintf (ci->fh, OIDL_C_WARNING);
fprintf (ci->fh, "#include <string.h>\n");
- fprintf (ci->fh, "#define ORBIT2_STUBS_API\n");
- fprintf (ci->fh, "#define ORBIT_IDL_C_COMMON\n");
+ fprintf (ci->fh, "#define FORB2_STUBS_API\n");
+ fprintf (ci->fh, "#define FORB_IDL_C_COMMON\n");
fprintf (ci->fh, "#define %s_COMMON\n", ci->c_base_name);
fprintf (ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
- fprintf (ci->fh, "static const CORBA_unsigned_long ORBit_zero_int = 0;\n");
+ fprintf (ci->fh, "static const CORBA_unsigned_long Forb_zero_int = 0;\n");
/* FIXME: this is slightly nasty, but we need these in common,
and this fixes an internal build issue */
if (rinfo->enabled_passes & OUTPUT_SKELS ||
rinfo->enabled_passes & OUTPUT_STUBS) {
- fprintf (ci->fh, "\n#ifndef ORBIT_IDL_C_IMODULE_%s\n",ci->c_base_name);
+ fprintf (ci->fh, "\n#ifndef FORB_IDL_C_IMODULE_%s\n",ci->c_base_name);
cc_output_skels (tree, rinfo, ci, NULL);
fprintf (ci->fh, "\n#endif\n");
}
*/
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
#include <ctype.h>
}
void
-orbit_idl_output_c_deps (IDL_tree tree,
+forb_idl_output_c_deps (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci)
{
g_return_if_fail (ci->fh != NULL);
for (i = 0; i < OUTPUT_NUM_PASSES - 1; i++) {
- char *name = orbit_idl_c_filename_for_pass (
+ char *name = forb_idl_c_filename_for_pass (
rinfo->input_filename, 1 << i);
fprintf (ci->fh, "%s ", name);
g_free (name);
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
+#include <forb_config.h>
#include <string.h>
#include <ctype.h>
GSList *methods; /* IDLN_OP_DCLs */
} Interface;
-/* this is hardcopy from cc_build_interfaces() defined in orbit-idl-c-common.c */
+/* this is hardcopy from cc_build_interfaces() defined in forb-idl-c-common.c */
static GSList *
ch_build_interfaces (GSList *list, IDL_tree tree)
{
void
-orbit_idl_output_c_headers (IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
+forb_idl_output_c_headers (IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
{
fprintf (ci->fh, OIDL_C_WARNING);
fprintf(ci->fh, "#ifndef %s%s_H\n", rinfo->header_guard_prefix, ci->c_base_name);
fprintf(ci->fh, "#define %s%s_H 1\n", rinfo->header_guard_prefix, ci->c_base_name);
fprintf(ci->fh, "#include <glib.h>\n");
- fprintf(ci->fh, "#define ORBIT_IDL_SERIAL %d\n", ORBIT_CONFIG_SERIAL);
- fprintf(ci->fh, "#include <orbit/orbit-types.h>\n\n");
+ fprintf(ci->fh, "#define FORB_IDL_SERIAL %d\n", FORB_CONFIG_SERIAL);
+ fprintf(ci->fh, "#include <forb/forb-types.h>\n\n");
fprintf(ci->fh, "#ifdef __cplusplus\n");
fprintf(ci->fh, "extern \"C\" {\n");
if (rinfo->idata) {
/* FIXME: hackish ? */
- fprintf(ci->fh, "#include <orbit/orb-core/orbit-interface.h>\n\n");
+ fprintf(ci->fh, "#include <forb/orb-core/forb-interface.h>\n\n");
ch_output_itypes(tree, ci);
}
ch_output_imethods_index (list, ci);
}
- fprintf(ci->fh, "#ifndef __ORBIT_IMETHODS_INDEX\n");
- fprintf(ci->fh, "#define __ORBIT_IMETHODS_INDEX\n");
- fprintf(ci->fh, "#define ORBIT_IMETHODS_INDEX(m) (m ## __imethods_index)\n");
- fprintf(ci->fh, "#endif /* __ORBIT_IMETHODS_INDEX */\n\n");
+ fprintf(ci->fh, "#ifndef __FORB_IMETHODS_INDEX\n");
+ fprintf(ci->fh, "#define __FORB_IMETHODS_INDEX\n");
+ fprintf(ci->fh, "#define FORB_IMETHODS_INDEX(m) (m ## __imethods_index)\n");
+ fprintf(ci->fh, "#endif /* __FORB_IMETHODS_INDEX */\n\n");
fprintf(ci->fh, "#ifdef __cplusplus\n");
fprintf(ci->fh, "}\n");
fprintf(ci->fh, "#endif /* __cplusplus */\n\n");
- fprintf(ci->fh, "#ifndef EXCLUDE_ORBIT_H\n");
- fprintf(ci->fh, "#include <orbit/orbit.h>\n\n");
- fprintf(ci->fh, "#endif /* EXCLUDE_ORBIT_H */\n");
+ fprintf(ci->fh, "#ifndef EXCLUDE_FORB_H\n");
+ fprintf(ci->fh, "#include <forb/forb.h>\n\n");
+ fprintf(ci->fh, "#endif /* EXCLUDE_FORB_H */\n");
fprintf(ci->fh, "#endif\n");
- fprintf(ci->fh, "#undef ORBIT_IDL_SERIAL\n");
+ fprintf(ci->fh, "#undef FORB_IDL_SERIAL\n");
}
static void
ch_output_var(IDL_tree val, IDL_tree name, OIDL_C_Info *ci)
{
- orbit_cbe_write_typespec(ci->fh, val);
+ forb_cbe_write_typespec(ci->fh, val);
fprintf(ci->fh, " ");
switch(IDL_NODE_TYPE(name)) {
ch_output_interface(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
{
char *fullname;
- fullname = orbit_cbe_get_typespec_str(tree);
- fprintf(ci->fh, "#if !defined(ORBIT_DECL_%s) && !defined(_%s_defined)\n#define ORBIT_DECL_%s 1\n#define _%s_defined 1\n", fullname, fullname, fullname, fullname);
+ fullname = forb_cbe_get_typespec_str(tree);
+ fprintf(ci->fh, "#if !defined(FORB_DECL_%s) && !defined(_%s_defined)\n#define FORB_DECL_%s 1\n#define _%s_defined 1\n", fullname, fullname, fullname, fullname);
if ( tree->declspec & IDLF_DECLSPEC_PIDL ) {
/* PIDL interfaces are not normal CORBA Objects */
fprintf (ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", ctmp, ctmp);
fprintf (ci->fh, "typedef ");
- orbit_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
+ forb_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
switch (IDL_NODE_TYPE (ent)) {
case IDLN_IDENT:
fprintf (ci->fh, " %s;\n", ctmp);
fprintf (ci->fh, "#define %s_marshal(x,y,z) ", ctmp);
- orbit_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
+ forb_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
fprintf (ci->fh, "_marshal((x),(y),(z))\n");
fprintf (ci->fh, "#define %s_demarshal(x,y,z,i) ", ctmp);
- orbit_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
+ forb_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
fprintf (ci->fh, "_demarshal((x),(y),(z),(i))\n");
break;
case IDLN_TYPE_ARRAY: {
fprintf (ci->fh, ";\n");
fprintf (ci->fh, "typedef ");
- orbit_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
+ forb_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
fprintf (ci->fh, " %s_slice", ctmp);
for (sub = IDL_LIST (IDL_TYPE_ARRAY (ent).size_list).next;
sub; sub = IDL_LIST (sub).next)
}
fprintf(ci->fh, "struct %s_type {\n", id);
- orbit_cbe_write_typespec(ci->fh, IDL_TYPE_UNION(tree).switch_type_spec);
+ forb_cbe_write_typespec(ci->fh, IDL_TYPE_UNION(tree).switch_type_spec);
fprintf(ci->fh, " _d;\nunion {\n");
for(curitem = IDL_TYPE_UNION(tree).switch_body; curitem; curitem = IDL_LIST(curitem).next) {
fprintf(ci->fh, "#ifndef %s\n", id);
fprintf(ci->fh, "#define %s ", id);
- orbit_cbe_write_const(ci->fh,
+ forb_cbe_write_const(ci->fh,
IDL_CONST_DCL(tree).const_exp);
- typespec = orbit_cbe_get_typespec (IDL_CONST_DCL(tree).const_type);
+ typespec = forb_cbe_get_typespec (IDL_CONST_DCL(tree).const_type);
if (IDL_NODE_TYPE (typespec) == IDLN_TYPE_INTEGER &&
!IDL_TYPE_INTEGER (typespec).f_signed)
fprintf(ci->fh, "U");
{
char *ctmp;
- ctmp = orbit_cbe_get_typespec_str(tree);
+ ctmp = forb_cbe_get_typespec_str(tree);
fprintf(ci->fh,
"typedef struct { CORBA_unsigned_short _digits; CORBA_short _scale; CORBA_char _value[%d]; } %s;\n",
(int) (IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value + 2)/2,
gboolean separate_defs, fake_if;
IDL_tree fake_seq = NULL;
- tts = orbit_cbe_get_typespec(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
- ctmp = orbit_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
- ctmp2 = orbit_cbe_get_typespec_str(tts);
+ tts = forb_cbe_get_typespec(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
+ ctmp = forb_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
+ ctmp2 = forb_cbe_get_typespec_str(tts);
fake_if = (IDL_NODE_TYPE(tts) == IDLN_INTERFACE);
if(fake_if)
{
ctmp2 = g_strdup("CORBA_Object");
}
separate_defs = strcmp(ctmp, ctmp2);
- fullname = orbit_cbe_get_typespec_str(tree);
+ fullname = forb_cbe_get_typespec_str(tree);
if(separate_defs)
{
== IDLN_TYPE_SEQUENCE)
ch_prep_sequence(IDL_TYPE_SEQUENCE(tree).simple_type_spec, rinfo, ci);
- /* NOTE: ORBIT_DECL_%s protects redef of everything (struct,TC,externs)
+ /* NOTE: FORB_DECL_%s protects redef of everything (struct,TC,externs)
* while _%s_defined protects only the struct */
- fprintf(ci->fh, "#if !defined(ORBIT_DECL_%s)\n#define ORBIT_DECL_%s 1\n",
+ fprintf(ci->fh, "#if !defined(FORB_DECL_%s)\n#define FORB_DECL_%s 1\n",
fullname, fullname);
if ( ci->do_impl_hack )
- orbit_cbe_id_define_hack(ci->fh, "ORBIT_IMPL", fullname, ci->c_base_name);
+ forb_cbe_id_define_hack(ci->fh, "FORB_IMPL", fullname, ci->c_base_name);
if(separate_defs)
{
fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n",
fullname, fullname);
fprintf(ci->fh, "typedef struct { CORBA_unsigned_long _maximum, _length; ");
- orbit_cbe_write_typespec(ci->fh, IDL_TYPE_SEQUENCE(tree).simple_type_spec);
+ forb_cbe_write_typespec(ci->fh, IDL_TYPE_SEQUENCE(tree).simple_type_spec);
fprintf(ci->fh, "* _buffer; CORBA_boolean _release; } ");
- orbit_cbe_write_typespec(ci->fh, tree);
+ forb_cbe_write_typespec(ci->fh, tree);
fprintf(ci->fh, ";\n#endif\n");
ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
- tc = orbit_cbe_get_typecode_name (orbit_cbe_get_typespec (tree));
- member_type = orbit_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tree).simple_type_spec) ?
+ tc = forb_cbe_get_typecode_name (forb_cbe_get_typespec (tree));
+ member_type = forb_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tree).simple_type_spec) ?
ctmp + strlen ("CORBA_") : ctmp;
fprintf (ci->fh, "#define CORBA_sequence_%s_allocbuf(l) "
- "((%s*)ORBit_small_allocbuf (%s, (l)))\n",
+ "((%s*)Forb_small_allocbuf (%s, (l)))\n",
member_type, member_type, tc);
g_free (tc);
char *ctmp;
IDL_tree tts;
- ctmp = orbit_cbe_get_typespec_str(tree);
+ ctmp = forb_cbe_get_typespec_str(tree);
if ( ci->do_impl_hack ) {
fprintf(ci->fh, "#if !defined(TC_IMPL_TC_%s_0)\n", ctmp);
- orbit_cbe_id_define_hack(ci->fh, "TC_IMPL_TC", ctmp, ci->c_base_name);
+ forb_cbe_id_define_hack(ci->fh, "TC_IMPL_TC", ctmp, ci->c_base_name);
}
- fprintf (ci->fh, "#ifdef ORBIT_IDL_C_IMODULE_%s\n", ci->c_base_name);
+ fprintf (ci->fh, "#ifdef FORB_IDL_C_IMODULE_%s\n", ci->c_base_name);
fprintf (ci->fh, "static\n");
fprintf (ci->fh, "#else\n");
fprintf (ci->fh, "extern\n");
fprintf (ci->fh, "#endif\n");
- fprintf (ci->fh, "ORBIT2_MAYBE_CONST struct CORBA_TypeCode_struct TC_%s_struct;\n", ctmp);
+ fprintf (ci->fh, "FORB2_MAYBE_CONST struct CORBA_TypeCode_struct TC_%s_struct;\n", ctmp);
fprintf (ci->fh, "#define TC_%s ((CORBA_TypeCode)&TC_%s_struct)\n", ctmp, ctmp);
if (ci->do_impl_hack)
if(do_alloc) {
char *tc;
- tts = orbit_cbe_get_typespec(tree);
+ tts = forb_cbe_get_typespec(tree);
- tc = orbit_cbe_get_typecode_name (tts);
+ tc = forb_cbe_get_typecode_name (tts);
- fprintf (ci->fh, "#define %s__alloc() ((%s%s *)ORBit_small_alloc (%s))\n",
+ fprintf (ci->fh, "#define %s__alloc() ((%s%s *)Forb_small_alloc (%s))\n",
ctmp, ctmp, (IDL_NODE_TYPE(tree) == IDLN_TYPE_ARRAY)?"_slice":"", tc);
- fprintf (ci->fh, "#define %s__freekids(m,d) ORBit_small_freekids (%s,(m),(d))\n", ctmp, tc);
+ fprintf (ci->fh, "#define %s__freekids(m,d) Forb_small_freekids (%s,(m),(d))\n", ctmp, tc);
if ( IDL_NODE_TYPE(tts) == IDLN_TYPE_SEQUENCE )
{
- char *member_type = orbit_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tts).simple_type_spec);
- char *member_name = orbit_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tts).simple_type_spec) ?
+ char *member_type = forb_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tts).simple_type_spec);
+ char *member_name = forb_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tts).simple_type_spec) ?
member_type + strlen ("CORBA_") : member_type;
fprintf (ci->fh, "#define %s_allocbuf(l) "
- "((%s*)ORBit_small_allocbuf (%s, (l)))\n",
+ "((%s*)Forb_small_allocbuf (%s, (l)))\n",
ctmp, member_name, tc);
g_free (member_type);
switch(IDL_NODE_TYPE(cur)) {
case IDLN_OP_DCL:
- orbit_cbe_op_write_proto(ci->fh, cur, "", TRUE);
+ forb_cbe_op_write_proto(ci->fh, cur, "", TRUE);
fprintf(ci->fh, ";\n");
break;
case IDLN_ATTR_DCL:
for(curitem = IDL_ATTR_DCL(cur).simple_declarations; curitem; curitem = IDL_LIST(curitem).next) {
ai = IDL_LIST(curitem).data->data;
- orbit_cbe_op_write_proto(ci->fh, ai->op1, "", TRUE);
+ forb_cbe_op_write_proto(ci->fh, ai->op1, "", TRUE);
fprintf(ci->fh, ";\n");
if(ai->op2) {
- orbit_cbe_op_write_proto(ci->fh, ai->op2, "", TRUE);
+ forb_cbe_op_write_proto(ci->fh, ai->op2, "", TRUE);
fprintf(ci->fh, ";\n");
}
}
switch(IDL_NODE_TYPE(cur)) {
case IDLN_OP_DCL:
- orbit_idl_check_oneway_op (cur);
- orbit_cbe_op_write_proto(ci->fh, cur, "", FALSE);
+ forb_idl_check_oneway_op (cur);
+ forb_cbe_op_write_proto(ci->fh, cur, "", FALSE);
fprintf(ci->fh, ";\n");
break;
case IDLN_ATTR_DCL:
for(curitem = IDL_ATTR_DCL(cur).simple_declarations; curitem; curitem = IDL_LIST(curitem).next) {
ai = IDL_LIST(curitem).data->data;
- orbit_cbe_op_write_proto(ci->fh, ai->op1, "", FALSE);
+ forb_cbe_op_write_proto(ci->fh, ai->op1, "", FALSE);
fprintf(ci->fh, ";\n");
if(ai->op2) {
- orbit_cbe_op_write_proto(ci->fh, ai->op2, "", FALSE);
+ forb_cbe_op_write_proto(ci->fh, ai->op2, "", FALSE);
fprintf(ci->fh, ";\n");
}
}
id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_OP_DCL(cur).ident), "_", 0);
- fprintf(ci->fh, "void _ORBIT_skel_small_%s("
- "POA_%s *_ORBIT_servant, "
- "gpointer _ORBIT_retval, "
- "gpointer *_ORBIT_args, "
+ fprintf(ci->fh, "void _FORB_skel_small_%s("
+ "POA_%s *_FORB_servant, "
+ "gpointer _FORB_retval, "
+ "gpointer *_FORB_args, "
"CORBA_Context ctx,"
"CORBA_Environment *ev, ", id, ifid);
- orbit_cbe_op_write_proto(ci->fh, cur, "_impl_", TRUE);
+ forb_cbe_op_write_proto(ci->fh, cur, "_impl_", TRUE);
fprintf(ci->fh, ");\n");
g_free(id);
ch_output_itypes (IDL_INTERFACE(tree).body, ci);
- fprintf (ci->fh, "#ifdef ORBIT_IDL_C_IMODULE_%s\n",
+ fprintf (ci->fh, "#ifdef FORB_IDL_C_IMODULE_%s\n",
ci->c_base_name);
fprintf (ci->fh, "static \n");
fprintf (ci->fh, "#else\n");
fprintf (ci->fh, "extern \n");
fprintf (ci->fh, "#endif\n");
- fprintf (ci->fh, "ORBit_IInterface %s__iinterface;\n", id);
+ fprintf (ci->fh, "Forb_IInterface %s__iinterface;\n", id);
fprintf (ci->fh, "#define %s_IMETHODS_LEN %d\n", id, num_methods);
if (num_methods == 0)
- fprintf (ci->fh, "#define %s__imethods (ORBit_IMethod*) NULL\n", id);
+ fprintf (ci->fh, "#define %s__imethods (Forb_IMethod*) NULL\n", id);
else {
- fprintf (ci->fh, "#ifdef ORBIT_IDL_C_IMODULE_%s\n",
+ fprintf (ci->fh, "#ifdef FORB_IDL_C_IMODULE_%s\n",
ci->c_base_name);
fprintf (ci->fh, "static \n");
fprintf (ci->fh, "#else\n");
fprintf (ci->fh, "extern \n");
fprintf (ci->fh, "#endif\n");
- fprintf (ci->fh, "ORBit_IMethod %s__imethods[%s_IMETHODS_LEN];\n", id, id);
+ fprintf (ci->fh, "Forb_IMethod %s__imethods[%s_IMETHODS_LEN];\n", id, id);
}
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
+#include <forb_config.h>
static void
ci_build_interfaces (OIDL_C_Info *ci,
IDL_tree ent = IDL_LIST (sub).data;
gchar *id;
- id = orbit_cbe_get_typespec_str (ent);
+ id = forb_cbe_get_typespec_str (ent);
fprintf (ci->fh, "\tTC_%s,\n", id);
(*count)++;
gchar *id;
IDL_tree l;
- id = orbit_cbe_get_typespec_str (tree);
+ id = forb_cbe_get_typespec_str (tree);
fprintf (ci->fh, "\tTC_%s,\n", id);
(*count)++;
gchar *id;
IDL_tree l;
- id = orbit_cbe_get_typespec_str (tree);
+ id = forb_cbe_get_typespec_str (tree);
fprintf (ci->fh, "\tTC_%s,\n", id);
(*count)++;
gchar *id;
IDL_tree l;
- id = orbit_cbe_get_typespec_str (tree);
+ id = forb_cbe_get_typespec_str (tree);
fprintf (ci->fh, "\tTC_%s,\n", id);
(*count)++;
case IDLN_TYPE_OBJECT: {
gchar *id;
- id = orbit_cbe_get_typespec_str (tree);
+ id = forb_cbe_get_typespec_str (tree);
fprintf (ci->fh, "\tTC_%s,\n", id);
(*count)++;
}
void
-orbit_idl_output_c_imodule (IDL_tree tree,
+forb_idl_output_c_imodule (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci)
{
fprintf (ci->fh, OIDL_C_WARNING);
fprintf (ci->fh, "#include <string.h>\n");
- fprintf (ci->fh, "#define ORBIT_IDL_C_IMODULE_%s\n\n",ci->c_base_name);
+ fprintf (ci->fh, "#define FORB_IDL_C_IMODULE_%s\n\n",ci->c_base_name);
fprintf (ci->fh, "#include \"%s-common.c\"\n\n", ci->base_name);
- fprintf (ci->fh, "#include <orbit/orb-core/orbit-small.h>\n\n");
+ fprintf (ci->fh, "#include <forb/orb-core/forb-small.h>\n\n");
fprintf (ci->fh, "static CORBA_TypeCode %s__itypes[] = {\n",
ci->c_base_name);
fprintf (ci->fh, "\tNULL\n};\n\n");
- fprintf (ci->fh, "static ORBit_IInterface *%s__iinterfaces[] = {\n",
+ fprintf (ci->fh, "static Forb_IInterface *%s__iinterfaces[] = {\n",
ci->c_base_name);
ci_build_interfaces (ci, tree);
fprintf (ci->fh, "\tNULL\n};\n");
- fprintf (ci->fh, "ORBit_IModule orbit_imodule_data = {\n");
- fprintf (ci->fh, " %d,\n", ORBIT_CONFIG_SERIAL);
+ fprintf (ci->fh, "Forb_IModule forb_imodule_data = {\n");
+ fprintf (ci->fh, " %d,\n", FORB_CONFIG_SERIAL);
fprintf (ci->fh, " %s__iinterfaces,\n", ci->c_base_name);
fprintf (ci->fh, " { %u, %u, %s__itypes, FALSE }\n",
count, count, ci->c_base_name);
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
-/* This file copied from the old IDL compiler orbit-c-skelimpl.c, with minimal changes. */
+/* This file copied from the old IDL compiler forb-c-skelimpl.c, with minimal changes. */
-static void orbit_cbe_write_skelimpl(FILE *outfile, IDL_tree tree, const char *hdrname);
+static void forb_cbe_write_skelimpl(FILE *outfile, IDL_tree tree, const char *hdrname);
void
-orbit_idl_output_c_skelimpl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
+forb_idl_output_c_skelimpl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
{
- orbit_cbe_write_skelimpl(ci->fh, tree, ci->base_name);
+ forb_cbe_write_skelimpl(ci->fh, tree, ci->base_name);
}
#include <ctype.h>
"Boohoo!"
};
-static void orbit_cbe_ski_process_piece(CBESkelImplInfo *ski);
+static void forb_cbe_ski_process_piece(CBESkelImplInfo *ski);
static void cbe_ski_do_list(CBESkelImplInfo *ski);
static void cbe_ski_do_inherited_attr_dcl(CBESkelImplInfo *ski, IDL_tree current_interface);
static void cbe_ski_do_attr_dcl(CBESkelImplInfo *ski);
static void cbe_ski_do_module(CBESkelImplInfo *ski);
static void
-orbit_cbe_write_skelimpl(FILE *outfile, IDL_tree tree, const char *hdrname)
+forb_cbe_write_skelimpl(FILE *outfile, IDL_tree tree, const char *hdrname)
{
CBESkelImplInfo ski = {NULL, NULL, PASS_SERVANTS};
g_return_if_fail(IDL_NODE_TYPE(tree) == IDLN_LIST);
fprintf(outfile, "/* This is a template file generated by command */\n");
- fprintf(outfile, "/* orbit-idl-2 --skeleton-impl %s.idl */\n", hdrname);
+ fprintf(outfile, "/* forb-idl-2 --skeleton-impl %s.idl */\n", hdrname);
fprintf(outfile, "/* User must edit this file, inserting servant */\n");
fprintf(outfile, "/* specific code between markers. */\n\n");
for(ski.pass = PASS_SERVANTS; ski.pass < PASS_LAST; ski.pass++) {
fprintf(ski.of, "\n/*** %s ***/\n\n", passnames[ski.pass]);
- orbit_cbe_ski_process_piece(&ski);
+ forb_cbe_ski_process_piece(&ski);
}
}
static void
-orbit_cbe_ski_process_piece(CBESkelImplInfo *ski)
+forb_cbe_ski_process_piece(CBESkelImplInfo *ski)
{
/* I'm not implementing this as an array of function pointers
because we may want to do special logic for particular cases in
for(curitem = ski->tree; curitem; curitem = IDL_LIST(curitem).next) {
subski.tree = IDL_LIST(curitem).data;
- orbit_cbe_ski_process_piece(&subski);
+ forb_cbe_ski_process_piece(&subski);
if(!prev_char_is_nl(ski->of))
fprintf(ski->of, "\n");
}
if(ski->pass == PASS_SERVANTS) {
for(curitem = IDL_ATTR_DCL(ski->tree).simple_declarations; curitem;
curitem = IDL_LIST(curitem).next) {
- orbit_cbe_write_typespec(ski->of, IDL_ATTR_DCL(ski->tree).param_type_spec);
+ forb_cbe_write_typespec(ski->of, IDL_ATTR_DCL(ski->tree).param_type_spec);
fprintf(ski->of, " attr_%s;\n", IDL_IDENT(IDL_LIST(curitem).data).str);
}
}
if(inherited==TRUE)
cbe_ski_do_inherited_op_dcl(&subski, current_interface);
else
- orbit_cbe_ski_process_piece(&subski);
+ forb_cbe_ski_process_piece(&subski);
/* Restore the fake link to the original in the namespace */
IDL_GENTREE(IDL_IDENT_TO_NS(IDL_LIST(curitem).data)).data = ns_data_save;
fprintf(ski->of, "%s_ 1\n", id);
fprintf(ski->of, "static ");
- orbit_cbe_write_param_typespec(ski->of, ski->tree);
+ forb_cbe_write_param_typespec(ski->of, ski->tree);
fprintf(ski->of, "\nimpl_%s(impl_POA_%s *servant,\n", id, id2);
g_free(id); g_free(id2);
for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls;
curitem; curitem = IDL_LIST(curitem).next) {
subski.tree = IDL_LIST(curitem).data;
- orbit_cbe_ski_process_piece(&subski);
+ forb_cbe_ski_process_piece(&subski);
}
if(IDL_OP_DCL(op).context_expr)
if(ski->pass == PASS_IMPLSTUBS) {
fprintf(ski->of, "\n{\n");
if(IDL_OP_DCL(op).op_type_spec) {
- orbit_cbe_write_param_typespec(ski->of, ski->tree);
+ forb_cbe_write_param_typespec(ski->of, ski->tree);
fprintf(ski->of, " retval;\n");
fprintf(ski->of, " /* ------ insert method code here ------ */\n");
fprintf(ski->of, " /* ------ ---------- end ------------ ------ */\n");
fprintf(ski->of, "%s_%s_ 1\n", id, IDL_IDENT(ident).str);
fprintf(ski->of, "static ");
- orbit_cbe_write_param_typespec(ski->of, ski->tree);
+ forb_cbe_write_param_typespec(ski->of, ski->tree);
fprintf(ski->of, "\nimpl_%s_%s(impl_POA_%s *servant,\n", id, IDL_IDENT(ident).str, id);
op = ski->tree;
for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls;
curitem; curitem = IDL_LIST(curitem).next) {
subski.tree = IDL_LIST(curitem).data;
- orbit_cbe_ski_process_piece(&subski);
+ forb_cbe_ski_process_piece(&subski);
}
if(IDL_OP_DCL(op).context_expr)
if(ski->pass == PASS_IMPLSTUBS) {
fprintf(ski->of, "\n{\n");
if(IDL_OP_DCL(op).op_type_spec) {
- orbit_cbe_write_param_typespec(ski->of, ski->tree);
+ forb_cbe_write_param_typespec(ski->of, ski->tree);
fprintf(ski->of, " retval;\n");
fprintf(ski->of, " /* ------ insert method code here ------ */\n");
fprintf(ski->of, " /* ------ ---------- end ------------ ------ */\n");
static void
cbe_ski_do_param_dcl(CBESkelImplInfo *ski)
{
- orbit_cbe_write_param_typespec(ski->of, ski->tree);
+ forb_cbe_write_param_typespec(ski->of, ski->tree);
fprintf(ski->of, " %s,\n", IDL_IDENT(IDL_PARAM_DCL(ski->tree).simple_declarator).str);
}
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
iti->curlevel + 1, opi->opname + iti->curlevel+1);
fprintf(iti->ci->fh, "*impl = (gpointer)servant->vepv->%s_epv->%s;\n",
opi->iface_id, opi->opname);
- fprintf(iti->ci->fh, "{ORBit_IInterface *volatile _t_=&%s__iinterface;*m_data = (gpointer)&_t_->methods._buffer [%d];}\n",
+ fprintf(iti->ci->fh, "{Forb_IInterface *volatile _t_=&%s__iinterface;*m_data = (gpointer)&_t_->methods._buffer [%d];}\n",
opi->iface_id, opi->idx);
- fprintf(iti->ci->fh, "return (ORBitSmallSkeleton)_ORBIT_skel_small_%s_%s;\n",
+ fprintf(iti->ci->fh, "return (ForbSmallSkeleton)_FORB_skel_small_%s_%s;\n",
opi->iface_id, opi->opname);
}
fprintf(iti->ci->fh, "break;\n");
CBESkelInterfaceTraverseInfo iti;
id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_INTERFACE(tree).ident), "_", 0);
- fprintf(ci->fh, "static ORBitSmallSkeleton get_skel_small_%s(POA_%s *servant,\nconst char *opname,"
+ fprintf(ci->fh, "static ForbSmallSkeleton get_skel_small_%s(POA_%s *servant,\nconst char *opname,"
"gpointer *m_data, gpointer *impl)\n{\n", id, id);
iti.ci = ci;
char *id;
id = IDL_ns_ident_to_qstring (IDL_IDENT_TO_NS (IDL_INTERFACE (node).ident), "_", 0);
fprintf (ti->ci->fh, "(CORBA_unsigned_long) %s__classid,\n", id);
- fprintf (ti->ci->fh, "ORBIT_VEPV_OFFSET (POA_%s__vepv, %s_epv),\n", ti->for_id, id);
+ fprintf (ti->ci->fh, "FORB_VEPV_OFFSET (POA_%s__vepv, %s_epv),\n", ti->for_id, id);
g_free (id);
}
fprintf(ci->fh, "{\n");
fprintf(ci->fh," static PortableServer_ClassInfo class_info = {");
- fprintf(ci->fh, "NULL, (ORBit_small_impl_finder)&get_skel_small_%s, ", id);
+ fprintf(ci->fh, "NULL, (Forb_small_impl_finder)&get_skel_small_%s, ", id);
fprintf(ci->fh,"\"%s\", &%s__classid, NULL, &%s__iinterface};\n",
IDL_IDENT(IDL_INTERFACE(tree).ident).repo_id, id, id);
}
/* registering after other __inits() makes the classids increment nicely. */
- fprintf (ci->fh, " ORBit_skel_class_register (&class_info,\n");
+ fprintf (ci->fh, " Forb_skel_class_register (&class_info,\n");
fprintf (ci->fh, " (PortableServer_ServantBase *)servant, POA_%s__fini,\n", id);
- fprintf (ci->fh, " ORBIT_VEPV_OFFSET (POA_%s__vepv, %s_epv),\n", id, id);
+ fprintf (ci->fh, " FORB_VEPV_OFFSET (POA_%s__vepv, %s_epv),\n", id, id);
ti.for_id = id; ti.ci = ci;
IDL_tree_traverse_parents_full (tree, (GFunc) cbe_skel_interface_print_vepvmap_offsets, &ti, FALSE);
fprintf (ci->fh, " (CORBA_unsigned_long) 0);");
}
void
-orbit_idl_output_c_skeletons (IDL_tree tree,
+forb_idl_output_c_skeletons (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci)
{
fprintf (ci->fh, OIDL_C_WARNING);
fprintf (ci->fh, "#include <string.h>\n");
- fprintf (ci->fh, "#define ORBIT2_STUBS_API\n");
+ fprintf (ci->fh, "#define FORB2_STUBS_API\n");
fprintf (ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
ck_output_poastuff (tree, rinfo, ci);
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
has_retval = IDL_OP_DCL (tree).op_type_spec != NULL;
has_args = IDL_OP_DCL (tree).parameter_dcls != NULL;
- orbit_cbe_op_write_proto (of, tree, "", FALSE);
+ forb_cbe_op_write_proto (of, tree, "", FALSE);
fprintf (of, "{\n");
if (has_retval) {
- orbit_cbe_write_param_typespec (of, tree);
- fprintf (of, " " ORBIT_RETVAL_VAR_NAME ";\n");
+ forb_cbe_write_param_typespec (of, tree);
+ fprintf (of, " " FORB_RETVAL_VAR_NAME ";\n");
}
#if 0
- fprintf (ci->fh, "POA_%s__epv *%s;\n", iface_id, ORBIT_EPV_VAR_NAME);
- fprintf (ci->fh, "gpointer _ORBIT_servant;\n");
+ fprintf (ci->fh, "POA_%s__epv *%s;\n", iface_id, FORB_EPV_VAR_NAME);
+ fprintf (ci->fh, "gpointer _FORB_servant;\n");
/* in-proc part */
- fprintf (ci->fh, "if ((%s = ORBit_c_stub_invoke\n", ORBIT_EPV_VAR_NAME);
- fprintf (ci->fh, " (_obj, %s__classid, &_ORBIT_servant,\n", iface_id);
+ fprintf (ci->fh, "if ((%s = Forb_c_stub_invoke\n", FORB_EPV_VAR_NAME);
+ fprintf (ci->fh, " (_obj, %s__classid, &_FORB_servant,\n", iface_id);
fprintf (ci->fh, " G_STRUCT_OFFSET (POA_%s__epv, %s)))) {\n",
iface_id, IDL_IDENT (IDL_OP_DCL (tree).ident).str);
- fprintf (ci->fh, "if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && \n");
- fprintf (ci->fh, " ORBIT_STUB_IsBypass (_obj, %s__classid) && \n", iface_id);
- fprintf (ci->fh, " (%s = (POA_%s__epv*) ORBIT_STUB_GetEpv (_obj, %s__classid))->%s) {\n",
- ORBIT_EPV_VAR_NAME, iface_id, iface_id, IDL_IDENT (IDL_OP_DCL (tree).ident).str);
+ fprintf (ci->fh, "if (Forb_small_flags & FORB_SMALL_FAST_LOCALS && \n");
+ fprintf (ci->fh, " FORB_STUB_IsBypass (_obj, %s__classid) && \n", iface_id);
+ fprintf (ci->fh, " (%s = (POA_%s__epv*) FORB_STUB_GetEpv (_obj, %s__classid))->%s) {\n",
+ FORB_EPV_VAR_NAME, iface_id, iface_id, IDL_IDENT (IDL_OP_DCL (tree).ident).str);
- fprintf (ci->fh, "ORBIT_STUB_PreCall (_obj);\n");
+ fprintf (ci->fh, "FORB_STUB_PreCall (_obj);\n");
- fprintf (ci->fh, "%s%s->%s (_ORBIT_servant, ",
- IDL_OP_DCL (tree).op_type_spec? ORBIT_RETVAL_VAR_NAME " = ":"",
- ORBIT_EPV_VAR_NAME,
+ fprintf (ci->fh, "%s%s->%s (_FORB_servant, ",
+ IDL_OP_DCL (tree).op_type_spec? FORB_RETVAL_VAR_NAME " = ":"",
+ FORB_EPV_VAR_NAME,
IDL_IDENT (IDL_OP_DCL (tree).ident).str);
for (node = IDL_OP_DCL (tree).parameter_dcls; node; node = IDL_LIST (node).next)
fprintf (ci->fh, "ev);\n");
- fprintf (ci->fh, "ORBit_stub_post_invoke (_obj, %s);\n", ORBIT_EPV_VAR_NAME);
+ fprintf (ci->fh, "Forb_stub_post_invoke (_obj, %s);\n", FORB_EPV_VAR_NAME);
fprintf (of, " } else { /* remote marshal */\n");
#endif
/* remote invocation part */
if (has_args)
- orbit_cbe_flatten_args (tree, of, "_args");
+ forb_cbe_flatten_args (tree, of, "_args");
- fprintf (of, "ORBit_c_stub_invoke (_obj, "
+ fprintf (of, "Forb_c_stub_invoke (_obj, "
"&%s__iinterface.methods, %d, ", iface_id, *idx);
if (has_retval)
- fprintf (of, "&_ORBIT_retval, ");
+ fprintf (of, "&_FORB_retval, ");
else
fprintf (of, "NULL, ");
fprintf (of, "%s__classid, G_STRUCT_OFFSET (POA_%s__epv, %s),\n",
iface_id, iface_id, IDL_IDENT (IDL_OP_DCL (tree).ident).str);
- fprintf (of, "(ORBitSmallSkeleton) _ORBIT_skel_small_%s);\n\n", opname);
+ fprintf (of, "(ForbSmallSkeleton) _FORB_skel_small_%s);\n\n", opname);
if (has_retval)
- fprintf (of, "return " ORBIT_RETVAL_VAR_NAME ";\n");
+ fprintf (of, "return " FORB_RETVAL_VAR_NAME ";\n");
fprintf (of, "}\n");
}
void
-orbit_idl_output_c_stubs (IDL_tree tree,
+forb_idl_output_c_stubs (IDL_tree tree,
OIDL_Run_Info *rinfo,
OIDL_C_Info *ci)
{
fprintf (ci->fh, OIDL_C_WARNING);
fprintf (ci->fh, "#include <string.h>\n");
- fprintf (ci->fh, "#define ORBIT2_STUBS_API\n");
+ fprintf (ci->fh, "#define FORB2_STUBS_API\n");
fprintf (ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
cs_output_stubs (tree, ci, NULL);
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
static int random_id = 0;
-static char *orbit_generate_tcstruct_name (IDL_tree ts);
+static char *forb_generate_tcstruct_name (IDL_tree ts);
static void cbe_tc_generate (OIDL_C_Info *ci, CBETCGenInfo *tci);
void
-orbit_output_typecode (OIDL_C_Info *ci,
+forb_output_typecode (OIDL_C_Info *ci,
IDL_tree node)
{
CBETCGenInfo tci;
}
tci.ts = node;
- tci.structname = orbit_generate_tcstruct_name (node);
+ tci.structname = forb_generate_tcstruct_name (node);
tci.substructname = NULL;
tci.array_gen_ctr = 0;
}
static char *
-orbit_generate_tcstruct_name (IDL_tree node)
+forb_generate_tcstruct_name (IDL_tree node)
{
GString *tmpstr;
char *retval;
case IDLN_INTERFACE:
case IDLN_FORWARD_DCL:
case IDLN_TYPE_OBJECT: {
- char *typespec = orbit_cbe_get_typespec_str (node);
+ char *typespec = forb_cbe_get_typespec_str (node);
g_string_printf (tmpstr, "TC_%s", typespec);
}
static void
-orbit_output_tcstruct_anon_subnames_array (FILE *fh, IDL_tree node, int subnames_id)
+forb_output_tcstruct_anon_subnames_array (FILE *fh, IDL_tree node, int subnames_id)
{
IDL_tree l;
}
static void
-orbit_output_tcstruct_anon_subtypes_array (FILE *fh,
+forb_output_tcstruct_anon_subtypes_array (FILE *fh,
IDL_tree node,
int subtypes_id,
char *substructname)
if (!IDL_TYPE_STRUCT (node).member_list)
break;
- fprintf (fh, "static ORBIT2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = {",
+ fprintf (fh, "static FORB2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = {",
subtypes_id);
for (l = IDL_TYPE_STRUCT (node).member_list; l; l = IDL_LIST (l).next) {
case IDLN_INTERFACE:
case IDLN_TYPE_OBJECT:
case IDLN_FORWARD_DCL:
- dcl = orbit_cbe_get_typespec (dcl);
+ dcl = forb_cbe_get_typespec (dcl);
if (IDL_NODE_DECLSPEC (dcl) & IDLF_DECLSPEC_PIDL &&
(IDL_NODE_TYPE (dcl) == IDLN_INTERFACE ||
IDL_NODE_TYPE (dcl) == IDLN_FORWARD_DCL))
tmpstr = g_strdup ("Object");
else
- tmpstr = orbit_cbe_get_typespec_str (
+ tmpstr = forb_cbe_get_typespec_str (
IDL_MEMBER (IDL_LIST (l).data).type_spec);
break;
default:
- tmpstr = orbit_cbe_get_typespec_str (
+ tmpstr = forb_cbe_get_typespec_str (
IDL_MEMBER (IDL_LIST (l).data).type_spec);
break;
}
if (!IDL_TYPE_UNION (node).switch_body)
break;
- fprintf (fh, "static ORBIT2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = {", subtypes_id);
+ fprintf (fh, "static FORB2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = {", subtypes_id);
for (l = IDL_TYPE_UNION (node).switch_body; l; l = IDL_LIST (l).next) {
IDL_tree label, dcl;
dcl = IDL_MEMBER (IDL_CASE_STMT (IDL_LIST (l).data).element_spec).type_spec;
- switch (IDL_NODE_TYPE (orbit_cbe_get_typespec (dcl))) {
+ switch (IDL_NODE_TYPE (forb_cbe_get_typespec (dcl))) {
case IDLN_INTERFACE:
case IDLN_FORWARD_DCL:
if (IDL_NODE_DECLSPEC (dcl) & IDLF_DECLSPEC_PIDL)
tmpstr = g_strdup ( "Object");
else
- tmpstr = orbit_cbe_get_typespec_str (dcl);
+ tmpstr = forb_cbe_get_typespec_str (dcl);
break;
default:
- tmpstr = orbit_cbe_get_typespec_str (dcl);
+ tmpstr = forb_cbe_get_typespec_str (dcl);
break;
}
IDL_tree seqts;
char *tmpstr;
- seqts = orbit_cbe_get_typespec (IDL_TYPE_SEQUENCE (node).simple_type_spec);
+ seqts = forb_cbe_get_typespec (IDL_TYPE_SEQUENCE (node).simple_type_spec);
- fprintf (fh, "static ORBIT2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = ", subtypes_id);
+ fprintf (fh, "static FORB2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = ", subtypes_id);
switch (IDL_NODE_TYPE (seqts)) {
case IDLN_INTERFACE:
if (IDL_NODE_DECLSPEC (seqts) && IDLF_DECLSPEC_PIDL)
tmpstr = g_strdup ("Object");
else
- tmpstr = orbit_cbe_get_typespec_str (
+ tmpstr = forb_cbe_get_typespec_str (
IDL_TYPE_SEQUENCE (node).simple_type_spec);
break;
default:
- tmpstr = orbit_cbe_get_typespec_str (
+ tmpstr = forb_cbe_get_typespec_str (
IDL_TYPE_SEQUENCE (node).simple_type_spec);
break;
}
break;
case IDLN_TYPE_ARRAY:
case IDLN_IDENT:
- fprintf (fh, "static ORBIT2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = ", subtypes_id);
+ fprintf (fh, "static FORB2_MAYBE_CONST CORBA_TypeCode anon_subtypes_array%d[] = ", subtypes_id);
fprintf (fh, "{(CORBA_TypeCode)&%s_struct};\n", substructname);
break;
default:
}
static int
-orbit_output_tcstruct_anon_sublabels_array (FILE *fh,
+forb_output_tcstruct_anon_sublabels_array (FILE *fh,
IDL_tree node,
int sublabels_id)
{
!IDL_TYPE_UNION (node).switch_body)
return default_index;
- fprintf (fh, "static ORBIT2_MAYBE_CONST CORBA_long anon_sublabels_array%d[] = {", sublabels_id);
+ fprintf (fh, "static FORB2_MAYBE_CONST CORBA_long anon_sublabels_array%d[] = {", sublabels_id);
for (l = IDL_TYPE_UNION (node).switch_body; l; l = IDL_LIST (l).next)
for (label = IDL_CASE_STMT (IDL_LIST (l).data).labels; label;
if (IDL_LIST (label).data) {
fprintf (fh, "(CORBA_long) ");
- orbit_cbe_write_const (fh, IDL_LIST (label).data);
+ forb_cbe_write_const (fh, IDL_LIST (label).data);
} else { /* default case */
fprintf (fh, "-1");
}
static void
-orbit_output_tcstruct_parent (FILE *fh)
+forb_output_tcstruct_parent (FILE *fh)
{
- fprintf (fh, "{&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}");
+ fprintf (fh, "{&Forb_TypeCode_epv, FORB_REFCOUNT_STATIC}");
}
static void
-orbit_output_tcstruct_kind (FILE *fh, IDL_tree node, int array_gen_ctr)
+forb_output_tcstruct_kind (FILE *fh, IDL_tree node, int array_gen_ctr)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_ARRAY:
}
static void
-orbit_output_tcstruct_name (FILE *fh, IDL_tree node, int array_gen_ctr)
+forb_output_tcstruct_name (FILE *fh, IDL_tree node, int array_gen_ctr)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_STRUCT:
}
static void
-orbit_output_tcstruct_repo_id (FILE *fh, IDL_tree node, int array_gen_ctr)
+forb_output_tcstruct_repo_id (FILE *fh, IDL_tree node, int array_gen_ctr)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_STRUCT:
}
static void
-orbit_output_tcstruct_length (FILE *fh, IDL_tree node, int array_gen_ctr)
+forb_output_tcstruct_length (FILE *fh, IDL_tree node, int array_gen_ctr)
{
int length = 0;
}
static void
-orbit_output_tcstruct_sub_parts (FILE *fh, IDL_tree node)
+forb_output_tcstruct_sub_parts (FILE *fh, IDL_tree node)
{
int length = 0;
}
static void
-orbit_output_tcstruct_subnames (FILE *fh, IDL_tree node, int subnames_id)
+forb_output_tcstruct_subnames (FILE *fh, IDL_tree node, int subnames_id)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_ENUM:
}
static void
-orbit_output_tcstruct_subtypes (FILE *fh, IDL_tree node, int subtypes_id)
+forb_output_tcstruct_subtypes (FILE *fh, IDL_tree node, int subtypes_id)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_EXCEPT_DCL:
}
static void
-orbit_output_tcstruct_sublabels (FILE *fh, IDL_tree node, int sublabels_id)
+forb_output_tcstruct_sublabels (FILE *fh, IDL_tree node, int sublabels_id)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_UNION:
}
static void
-orbit_output_tcstruct_discriminator (FILE *fh, IDL_tree node)
+forb_output_tcstruct_discriminator (FILE *fh, IDL_tree node)
{
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_UNION: {
char *switch_type_spec_str;
switch_type_spec_str =
- orbit_cbe_get_typespec_str (IDL_TYPE_UNION (node).switch_type_spec);
+ forb_cbe_get_typespec_str (IDL_TYPE_UNION (node).switch_type_spec);
fprintf (fh, "(CORBA_TypeCode)&TC_%s_struct", switch_type_spec_str);
}
static void
-orbit_output_tcstruct_recurse_depth (FILE *fh)
+forb_output_tcstruct_recurse_depth (FILE *fh)
{
fprintf (fh, "0");
}
static void
-orbit_output_tcstruct_default_index (FILE *fh, int union_default_index)
+forb_output_tcstruct_default_index (FILE *fh, int union_default_index)
{
fprintf (fh, "%d", union_default_index);
}
static void
-orbit_output_tcstruct_digits_scale (FILE *fh, IDL_tree node)
+forb_output_tcstruct_digits_scale (FILE *fh, IDL_tree node)
{
if (IDL_NODE_TYPE (node) == IDLN_TYPE_FIXED) {
fprintf (fh, "%" IDL_LL "d, %" IDL_LL "d" ,
}
static void
-orbit_add_align (GSList **max, const char *str)
+forb_add_align (GSList **max, const char *str)
{
GSList *l;
}
static GSList *
-orbit_find_c_align (GSList *max, IDL_tree node)
+forb_find_c_align (GSList *max, IDL_tree node)
{
- node = orbit_cbe_get_typespec (node);
+ node = forb_cbe_get_typespec (node);
switch (IDL_NODE_TYPE (node)) {
case IDLN_TYPE_INTEGER:
switch (IDL_TYPE_INTEGER (node).f_type) {
case IDL_INTEGER_TYPE_SHORT:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_SHORT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_SHORT");
break;
case IDL_INTEGER_TYPE_LONG:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_LONG");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_LONG");
break;
case IDL_INTEGER_TYPE_LONGLONG:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_LONG_LONG");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_LONG_LONG");
break;
}
break;
case IDLN_TYPE_FLOAT:
switch (IDL_TYPE_FLOAT (node).f_type) {
case IDL_FLOAT_TYPE_FLOAT:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_FLOAT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_FLOAT");
break;
case IDL_FLOAT_TYPE_DOUBLE:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_DOUBLE");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_DOUBLE");
break;
case IDL_FLOAT_TYPE_LONGDOUBLE:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_LONG_DOUBLE");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_LONG_DOUBLE");
break;
}
break;
case IDLN_TYPE_ENUM:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_LONG");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_LONG");
break;
case IDLN_TYPE_CHAR: /* drop through */
case IDLN_TYPE_BOOLEAN:
case IDLN_TYPE_OCTET:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_CHAR");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_CHAR");
break;
case IDLN_TYPE_WIDE_CHAR:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_SHORT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_SHORT");
break;
case IDLN_TYPE_UNION: {
IDL_tree l = IDL_TYPE_UNION (node).switch_body;
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_STRUCT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_STRUCT");
for (; l; l = IDL_LIST (l).next) {
IDL_tree subtype = IDL_MEMBER (IDL_CASE_STMT (
IDL_LIST (l).data).element_spec).type_spec;
- max = orbit_find_c_align (max, subtype);
+ max = forb_find_c_align (max, subtype);
}
break;
}
for (; l; l = IDL_LIST (l).next) {
IDL_tree member = IDL_MEMBER (IDL_LIST (l).data).type_spec;
- max = orbit_find_c_align (max, member);
+ max = forb_find_c_align (max, member);
}
break;
}
case IDLN_TYPE_TYPECODE:
case IDLN_FORWARD_DCL:
case IDLN_INTERFACE:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_POINTER");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_POINTER");
break;
case IDLN_TYPE_ARRAY: {
IDL_tree subtype = IDL_TYPE_DCL (
IDL_get_parent_node (node, IDLN_TYPE_DCL, NULL)).type_spec;
- max = orbit_find_c_align (max, subtype);
+ max = forb_find_c_align (max, subtype);
break;
}
case IDLN_TYPE_SEQUENCE:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_STRUCT");
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_LONG");
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_POINTER");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_STRUCT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_LONG");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_POINTER");
break;
case IDLN_TYPE_ANY:
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_STRUCT");
- orbit_add_align (&max, "ORBIT_ALIGNOF_CORBA_POINTER");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_STRUCT");
+ forb_add_align (&max, "FORB_ALIGNOF_CORBA_POINTER");
break;
default:
g_error ("Can't find alignment %s\n",
}
static void
-orbit_output_tcstruct_c_align (FILE *fh, IDL_tree node)
+forb_output_tcstruct_c_align (FILE *fh, IDL_tree node)
{
GSList *max;
GString *str = g_string_sized_new (120);
- max = orbit_find_c_align (NULL, node);
+ max = forb_find_c_align (NULL, node);
if (!max)
g_string_append (str, "1");
if (strncmp (tci->structname, "anon", 4)) {
fprintf (ci->fh, "#if ");
- orbit_cbe_id_cond_hack (ci->fh, "TC_IMPL",
+ forb_cbe_id_cond_hack (ci->fh, "TC_IMPL",
tci->structname, ci->c_base_name);
fprintf (ci->fh, " && !defined(TC_DEF_%s)\n", tci->structname);
fprintf (ci->fh, "#define TC_DEF_%s 1\n", tci->structname);
subtci = *tci;
curitem = IDL_TYPE_DCL (tci->ts).type_spec;
- subtci.substructname = ctmp = orbit_generate_tcstruct_name (curitem);
+ subtci.substructname = ctmp = forb_generate_tcstruct_name (curitem);
/*
* The only type not already defined elsewhere
subtci.ts = IDL_LIST (curitem).data;
if (IDL_NODE_TYPE (subtci.ts) == IDLN_TYPE_ARRAY)
- subtci.structname = orbit_generate_tcstruct_name (
+ subtci.structname = forb_generate_tcstruct_name (
IDL_TYPE_ARRAY (subtci.ts).ident);
else
- subtci.structname = orbit_generate_tcstruct_name (subtci.ts);
+ subtci.structname = forb_generate_tcstruct_name (subtci.ts);
cbe_tc_generate (ci, &subtci);
g_free (subtci.structname);
tci->array_gen_ctr - 1);
subtci = *tci;
- subtci.structname = ctmp = orbit_generate_tcstruct_name (curitem);
+ subtci.structname = ctmp = forb_generate_tcstruct_name (curitem);
subtci.array_gen_ctr++;
cbe_tc_generate (ci, &subtci);
tci->substructname = ctmp; /* FIXME: memory leak */
}
- orbit_output_tcstruct_anon_subnames_array (ci->fh, tci->ts, subnames_id);
- orbit_output_tcstruct_anon_subtypes_array (ci->fh, tci->ts, subtypes_id,
+ forb_output_tcstruct_anon_subnames_array (ci->fh, tci->ts, subnames_id);
+ forb_output_tcstruct_anon_subtypes_array (ci->fh, tci->ts, subtypes_id,
tci->substructname);
- union_default_index = orbit_output_tcstruct_anon_sublabels_array (
+ union_default_index = forb_output_tcstruct_anon_sublabels_array (
ci->fh, tci->ts, sublabels_id);
if (!strncmp (tci->structname, "anon", 4))
fprintf (ci->fh, "static ");
else {
- fprintf (ci->fh, "#ifdef ORBIT_IDL_C_IMODULE_%s\n",
+ fprintf (ci->fh, "#ifdef FORB_IDL_C_IMODULE_%s\n",
ci->c_base_name);
fprintf (ci->fh, "static\n");
fprintf (ci->fh, "#endif\n");
}
- fprintf (ci->fh, "ORBIT2_MAYBE_CONST struct CORBA_TypeCode_struct %s_struct = {\n",
+ fprintf (ci->fh, "FORB2_MAYBE_CONST struct CORBA_TypeCode_struct %s_struct = {\n",
tci->structname);
- orbit_output_tcstruct_parent (ci->fh);
+ forb_output_tcstruct_parent (ci->fh);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_kind (ci->fh, tci->ts, tci->array_gen_ctr);
+ forb_output_tcstruct_kind (ci->fh, tci->ts, tci->array_gen_ctr);
fprintf (ci->fh, ",\n");
/* c_length */
fprintf (ci->fh, "0,\n");
- orbit_output_tcstruct_c_align (ci->fh, tci->ts);
+ forb_output_tcstruct_c_align (ci->fh, tci->ts);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_length (ci->fh, tci->ts, tci->array_gen_ctr);
+ forb_output_tcstruct_length (ci->fh, tci->ts, tci->array_gen_ctr);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_sub_parts (ci->fh, tci->ts);
+ forb_output_tcstruct_sub_parts (ci->fh, tci->ts);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_subtypes (ci->fh, tci->ts, subtypes_id);
+ forb_output_tcstruct_subtypes (ci->fh, tci->ts, subtypes_id);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_discriminator (ci->fh, tci->ts);
+ forb_output_tcstruct_discriminator (ci->fh, tci->ts);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_name (ci->fh, tci->ts, tci->array_gen_ctr);
+ forb_output_tcstruct_name (ci->fh, tci->ts, tci->array_gen_ctr);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_repo_id (ci->fh, tci->ts, tci->array_gen_ctr);
+ forb_output_tcstruct_repo_id (ci->fh, tci->ts, tci->array_gen_ctr);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_subnames (ci->fh, tci->ts, subnames_id);
+ forb_output_tcstruct_subnames (ci->fh, tci->ts, subnames_id);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_sublabels (ci->fh, tci->ts, sublabels_id);
+ forb_output_tcstruct_sublabels (ci->fh, tci->ts, sublabels_id);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_default_index (ci->fh, union_default_index);
+ forb_output_tcstruct_default_index (ci->fh, union_default_index);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_recurse_depth (ci->fh);
+ forb_output_tcstruct_recurse_depth (ci->fh);
fprintf (ci->fh, ",\n");
- orbit_output_tcstruct_digits_scale (ci->fh, tci->ts);
+ forb_output_tcstruct_digits_scale (ci->fh, tci->ts);
fprintf (ci->fh, "\n};\n");
#include "config.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
char *
-orbit_cbe_get_typecode_name (IDL_tree tree)
+forb_cbe_get_typecode_name (IDL_tree tree)
{
if (!tree)
return g_strdup ("TC_FIXME");
else
- return g_strconcat ("TC_", orbit_cbe_get_typespec_str (tree), NULL);
+ return g_strconcat ("TC_", forb_cbe_get_typespec_str (tree), NULL);
}
gboolean
-orbit_cbe_type_is_builtin(IDL_tree tree)
+forb_cbe_type_is_builtin(IDL_tree tree)
{
return FALSE;
switch(IDL_NODE_TYPE(tree)) {
The return value was alloc'd via g_malloc, and must be g_free'd.
**/
char *
-orbit_cbe_get_typespec_str(IDL_tree tree)
+forb_cbe_get_typespec_str(IDL_tree tree)
{
char *retval = NULL;
GString *tmpstr = NULL;
switch(IDL_NODE_TYPE(tree)) {
case IDLN_MEMBER:
- return orbit_cbe_get_typespec_str(IDL_MEMBER(tree).type_spec);
+ return forb_cbe_get_typespec_str(IDL_MEMBER(tree).type_spec);
break;
case IDLN_TYPE_ANY:
retval = "CORBA_any";
retval = "CORBA_boolean";
break;
case IDLN_TYPE_STRUCT:
- return orbit_cbe_get_typespec_str(IDL_TYPE_STRUCT(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_TYPE_STRUCT(tree).ident);
case IDLN_EXCEPT_DCL:
- return orbit_cbe_get_typespec_str(IDL_EXCEPT_DCL(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_EXCEPT_DCL(tree).ident);
case IDLN_TYPE_ARRAY:
- return orbit_cbe_get_typespec_str(IDL_TYPE_ARRAY(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_TYPE_ARRAY(tree).ident);
case IDLN_TYPE_UNION:
- return orbit_cbe_get_typespec_str(IDL_TYPE_UNION(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_TYPE_UNION(tree).ident);
case IDLN_TYPE_ENUM:
- return orbit_cbe_get_typespec_str(IDL_TYPE_ENUM(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_TYPE_ENUM(tree).ident);
case IDLN_IDENT:
return IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(tree), "_", 0);
case IDLN_PARAM_DCL:
- return orbit_cbe_get_typespec_str(IDL_PARAM_DCL(tree).param_type_spec);
+ return forb_cbe_get_typespec_str(IDL_PARAM_DCL(tree).param_type_spec);
case IDLN_TYPE_SEQUENCE:
{
IDL_tree subtype = IDL_TYPE_SEQUENCE(tree).simple_type_spec;
char *ctmp, *base;
- ctmp = orbit_cbe_get_typespec_str(subtype);
+ ctmp = forb_cbe_get_typespec_str(subtype);
/* We should have built-in alias to make this next line not needed */
- base = orbit_cbe_type_is_builtin(subtype)
+ base = forb_cbe_type_is_builtin(subtype)
? ctmp + strlen("CORBA_") : ctmp;
retval = g_strdup_printf( "CORBA_sequence_%s", base);
g_free(ctmp);
break;
case IDLN_FORWARD_DCL:
case IDLN_INTERFACE:
- return orbit_cbe_get_typespec_str(IDL_INTERFACE(tree).ident);
+ return forb_cbe_get_typespec_str(IDL_INTERFACE(tree).ident);
case IDLN_TYPE_OBJECT:
retval = "CORBA_Object";
break;
}
void
-orbit_cbe_write_typespec(FILE *of, IDL_tree tree)
+forb_cbe_write_typespec(FILE *of, IDL_tree tree)
{
- char *name = orbit_cbe_get_typespec_str(tree);
+ char *name = forb_cbe_get_typespec_str(tree);
fprintf( of, name);
g_free(name);
}
be produced without the hack).
**/
static char *
-orbit_cbe_write_param_typespec_str(IDL_tree ts, IDL_ParamRole role)
+forb_cbe_write_param_typespec_str(IDL_tree ts, IDL_ParamRole role)
{
int i, n;
gboolean isSlice;
char *typedef_name;
n = oidl_param_info (ts, role, &isSlice);
- name = orbit_cbe_get_typespec_str (ts);
+ name = forb_cbe_get_typespec_str (ts);
if ( role == DATA_IN ) {
/* We want to check if this is a typedef for CORBA_string so we can do special handling
* in that case.
*/
- typedef_spec = orbit_cbe_get_typespec (ts);
- typedef_name = orbit_cbe_get_typespec_str (typedef_spec);
+ typedef_spec = forb_cbe_get_typespec (ts);
+ typedef_name = forb_cbe_get_typespec_str (typedef_spec);
g_string_printf (str, "const %s",
!strcmp (typedef_name, "CORBA_string") ?
}
static void
-orbit_cbe_write_param_typespec_raw (FILE *of, IDL_tree ts, IDL_ParamRole role)
+forb_cbe_write_param_typespec_raw (FILE *of, IDL_tree ts, IDL_ParamRole role)
{
char *str;
- str = orbit_cbe_write_param_typespec_str (ts, role);
+ str = forb_cbe_write_param_typespec_str (ts, role);
fprintf (of, str);
g_free (str);
}
void
-orbit_cbe_write_param_typespec(FILE *of, IDL_tree tree) {
+forb_cbe_write_param_typespec(FILE *of, IDL_tree tree) {
IDL_tree ts = NULL /* Quiet gcc */;
IDL_ParamRole role = 0 /* Quiet gcc */;
default:
g_assert_not_reached();
}
- orbit_cbe_write_param_typespec_raw(of, ts, role);
+ forb_cbe_write_param_typespec_raw(of, ts, role);
}
void
-orbit_cbe_op_write_proto (FILE *of,
+forb_cbe_op_write_proto (FILE *of,
IDL_tree op,
const char *nom_prefix,
gboolean for_epv)
g_assert (IDL_NODE_TYPE(op) == IDLN_OP_DCL);
- orbit_cbe_write_param_typespec (of, op);
+ forb_cbe_write_param_typespec (of, op);
id = IDL_ns_ident_to_qstring (
IDL_IDENT_TO_NS (IDL_INTERFACE (
for (sub = IDL_OP_DCL (op).parameter_dcls; sub; sub = IDL_LIST (sub).next) {
IDL_tree parm = IDL_LIST (sub).data;
- orbit_cbe_write_param_typespec (of, parm);
+ forb_cbe_write_param_typespec (of, parm);
fprintf (of, " %s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str);
}
/* Writes the value of the constant in 'tree' to file handle 'of' */
static char *
-orbit_cbe_get_const(IDL_tree tree)
+forb_cbe_get_const(IDL_tree tree)
{
char *opc = NULL, *retval, *ctmp;
GString *tmpstr = g_string_new(NULL);
break;
case IDLN_BINOP:
g_string_printf(tmpstr, "(");
- ctmp = orbit_cbe_get_const(IDL_BINOP(tree).left);
+ ctmp = forb_cbe_get_const(IDL_BINOP(tree).left);
g_string_append(tmpstr, ctmp);
g_free(ctmp);
switch(IDL_BINOP(tree).op) {
break;
}
g_string_append_printf(tmpstr, " %s ", opc);
- ctmp = orbit_cbe_get_const(IDL_BINOP(tree).right);
+ ctmp = forb_cbe_get_const(IDL_BINOP(tree).right);
g_string_append_printf(tmpstr, "%s)", ctmp);
g_free(ctmp);
break;
case IDL_UNARYOP_MINUS: opc = "-"; break;
case IDL_UNARYOP_COMPLEMENT: opc = "~"; break;
}
- ctmp = orbit_cbe_get_const(IDL_UNARYOP(tree).operand);
+ ctmp = forb_cbe_get_const(IDL_UNARYOP(tree).operand);
g_string_printf(tmpstr, "%s%s", opc, ctmp);
g_free(ctmp);
break;
}
void
-orbit_cbe_write_const(FILE *of, IDL_tree tree)
+forb_cbe_write_const(FILE *of, IDL_tree tree)
{
char *ctmp;
- ctmp = orbit_cbe_get_const(tree);
+ ctmp = forb_cbe_get_const(tree);
fprintf(of, "%s", ctmp);
g_free(ctmp);
}
/* This is the WORST HACK in the WORLD, really truly, but the C preprocessor doesn't allow us to use
strings, so we have to work around it by using individual characters. */
void
-orbit_cbe_id_define_hack(FILE *fh, const char *def_prefix, const char *def_name, const char *def_value)
+forb_cbe_id_define_hack(FILE *fh, const char *def_prefix, const char *def_name, const char *def_value)
{
int i, n;
n = strlen(def_value);
}
void
-orbit_cbe_id_cond_hack(FILE *fh, const char *def_prefix, const char *def_name, const char *def_value)
+forb_cbe_id_cond_hack(FILE *fh, const char *def_prefix, const char *def_name, const char *def_value)
{
int i, n;
n = strlen(def_value);
case IDLN_FORWARD_DCL
static const char *
-orbit_cbe_flatten_ref (IDL_ParamRole role, IDL_tree typespec)
+forb_cbe_flatten_ref (IDL_ParamRole role, IDL_tree typespec)
{
gboolean is_fixed;
- is_fixed = orbit_cbe_type_is_fixed_length (typespec);
+ is_fixed = forb_cbe_type_is_fixed_length (typespec);
switch (role) {
case DATA_IN:
}
void
-orbit_cbe_flatten_args (IDL_tree tree, FILE *of, const char *name)
+forb_cbe_flatten_args (IDL_tree tree, FILE *of, const char *name)
{
int i = 0;
IDL_tree l;
for (l = IDL_OP_DCL(tree).parameter_dcls; l;
l = IDL_LIST(l).next) {
IDL_tree decl = IDL_LIST (l).data;
- IDL_tree tspec = orbit_cbe_get_typespec (decl);
+ IDL_tree tspec = forb_cbe_get_typespec (decl);
IDL_ParamRole r = 0;
switch(IDL_PARAM_DCL(decl).attr) {
fprintf (of, "%s[%d] = %s%s;\n",
name, i,
- orbit_cbe_flatten_ref (r, tspec),
+ forb_cbe_flatten_ref (r, tspec),
IDL_IDENT (IDL_PARAM_DCL (decl).simple_declarator).str);
i++;
}
}
static char *
-orbit_cbe_unflatten_ref (IDL_ParamRole role, IDL_tree typespec)
+forb_cbe_unflatten_ref (IDL_ParamRole role, IDL_tree typespec)
{
gboolean is_fixed;
char *typestr;
char *retval;
- is_fixed = orbit_cbe_type_is_fixed_length (typespec);
+ is_fixed = forb_cbe_type_is_fixed_length (typespec);
- typestr = orbit_cbe_write_param_typespec_str (typespec, role);
+ typestr = forb_cbe_write_param_typespec_str (typespec, role);
switch (role) {
case DATA_IN:
}
void
-orbit_cbe_unflatten_args (IDL_tree tree, FILE *of, const char *name)
+forb_cbe_unflatten_args (IDL_tree tree, FILE *of, const char *name)
{
IDL_tree l;
int i = 0;
for (l = IDL_OP_DCL(tree).parameter_dcls; l;
l = IDL_LIST(l).next) {
IDL_tree decl = IDL_LIST (l).data;
- IDL_tree tspec = orbit_cbe_get_typespec (decl);
+ IDL_tree tspec = forb_cbe_get_typespec (decl);
IDL_ParamRole r = 0;
char *unflatten;
g_error("Unknown IDL_PARAM type");
}
- unflatten = orbit_cbe_unflatten_ref (r, tspec);
+ unflatten = forb_cbe_unflatten_ref (r, tspec);
fprintf (of, "%s%s[%d], ", unflatten, name, i++);
g_free (unflatten);
}
/**************************************************************************
- orbit-idl-driver.c (Dispatch parsed tree to various backends)
+ forb-idl-driver.c (Dispatch parsed tree to various backends)
Copyright (C) 1999 Elliot Lee
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: orbit-idl-driver.c 1302 2002-09-04 10:38:18Z mmclouglin $
+ $Id: forb-idl-driver.c 1302 2002-09-04 10:38:18Z mmclouglin $
***************************************************************************/
#include "config.h"
-#include "orbit-idl2.h"
-#include "orbit-idl-backend.h"
-#include "orbit-idl-c-backend.h"
+#include "forb-idl2.h"
+#include "forb-idl-backend.h"
+#include "forb-idl-c-backend.h"
#include <string.h>
static void
-orbit_idl_tree_fake_ops (IDL_tree tree, IDL_ns ns)
+forb_idl_tree_fake_ops (IDL_tree tree, IDL_ns ns)
{
IDL_tree node;
switch(IDL_NODE_TYPE(tree)) {
case IDLN_MODULE:
- orbit_idl_tree_fake_ops (IDL_MODULE (tree).definition_list, ns);
+ forb_idl_tree_fake_ops (IDL_MODULE (tree).definition_list, ns);
break;
case IDLN_INTERFACE:
- orbit_idl_tree_fake_ops (IDL_INTERFACE (tree).body, ns);
+ forb_idl_tree_fake_ops (IDL_INTERFACE (tree).body, ns);
break;
case IDLN_LIST:
for (node = tree; node; node = IDL_LIST (node).next)
- orbit_idl_tree_fake_ops (IDL_LIST (node).data, ns);
+ forb_idl_tree_fake_ops (IDL_LIST (node).data, ns);
break;
case IDLN_ATTR_DCL:
- orbit_idl_attr_fake_ops (tree, ns);
+ forb_idl_attr_fake_ops (tree, ns);
break;
default:
break;
}
gboolean
-orbit_idl_to_backend (const char *filename,
+forb_idl_to_backend (const char *filename,
OIDL_Run_Info *rinfo)
{
IDL_ns ns;
rinfo->ns = ns;
if (rinfo->debug_level > 3)
- orbit_idl_print_node (tree, 0);
+ forb_idl_print_node (tree, 0);
if (errcode != IDL_SUCCESS) {
if (errcode == -1)
return 0;
}
- orbit_idl_tree_fake_ops (tree, ns);
+ forb_idl_tree_fake_ops (tree, ns);
if (!strcmp (rinfo->output_language, "c"))
- retval = orbit_idl_output_c (tree, rinfo);
+ retval = forb_idl_output_c (tree, rinfo);
else
- retval = orbit_idl_backend_output (rinfo, tree);
+ retval = forb_idl_backend_output (rinfo, tree);
return retval;
}
/**************************************************************************
- orbit-idl-main.c (Driver program for the IDL parser & backend)
+ forb-idl-main.c (Driver program for the IDL parser & backend)
Copyright (C) 1999 Elliot Lee
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: orbit-idl-main.c 2060 2008-05-19 21:11:07Z tml $
+ $Id: forb-idl-main.c 2060 2008-05-19 21:11:07Z tml $
***************************************************************************/
#include <libIDL/IDL.h>
#include <glib/goption.h>
#include <glib/gi18n.h>
+#include <forb_config.h>
-#include "orbit-idl2.h"
+#include "forb-idl2.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
static char *cl_output_directory = "";
static char **idl_files = NULL;
-#define BASE_CPP_ARGS "-D__ORBIT_IDL__ "
+#define BASE_CPP_ARGS "-D__FORB_IDL__ "
static GString *cl_cpp_args;
/* Callbacks for goption */
gpointer data,
GError **error)
{
- g_print ("orbit-idl-2 %s - serial %d\n",
- VERSION, ORBIT_CONFIG_SERIAL);
+ g_print ("forb-idl-2 %s - serial %d\n",
+ VERSION, FORB_CONFIG_SERIAL);
exit(0);
}
guint i;
/* Argument parsing, etc. */
- cl_cpp_args = g_string_new("-D__ORBIT_IDL__ ");
+ cl_cpp_args = g_string_new("-D__FORB_IDL__ ");
/* GOption cannot parse single-letter options without space
* between option and argument (-I../dir) or single-dash options.
* So fix those up before parsing, to retain command line compatibility
- * with previous popt based versions of orbit-idl-2
+ * with previous popt based versions of forb-idl-2
*/
args = g_ptr_array_sized_new (2 * argc);
g_ptr_array_add (args, g_strdup (argv[0]));
g_free (freeme);
if (!result) {
- g_print ("orbit-idl-2: %s\n", error->message);
+ g_print ("forb-idl-2: %s\n", error->message);
g_error_free (error);
exit (1);
}
rinfo.onlytop = cl_onlytop;
rinfo.idata = !cl_disable_idata;
- printf ("orbit-idl-2 " VERSION " compiling\n");
+ printf ("forb-idl-2 " VERSION " compiling\n");
printf (" %s mode, %s preprocessor errors, passes: %s%s%s%s%s%s\n\n",
rinfo.is_pidl ? "pidl" : "",
rinfo.show_cpp_errors ? "show" : "hide",
for (i = 0; idl_files[i]; ++i) {
g_print ("Processing file %s\n", idl_files[i]);
rinfo.input_filename = idl_files[i];
- if (!orbit_idl_to_backend(idl_files[i], &rinfo)) {
+ if (!forb_idl_to_backend(idl_files[i], &rinfo)) {
g_warning("%s compilation failed", idl_files[i]);
retval = 1;
}
#include "config.h"
-#include "orbit-idl2.h"
+#include "forb-idl2.h"
#include <string.h>
void
-orbit_idl_check_oneway_op (IDL_tree op)
+forb_idl_check_oneway_op (IDL_tree op)
{
g_assert (IDL_NODE_TYPE(op) == IDLN_OP_DCL);
}
void
-orbit_idl_attr_fake_ops(IDL_tree attr, IDL_ns ns)
+forb_idl_attr_fake_ops(IDL_tree attr, IDL_ns ns)
{
IDL_tree attr_name, ident, curnode, op1, op2, intf;
GString *attrname;
}
void
-orbit_idl_print_node(IDL_tree node, int indent_level)
+forb_idl_print_node(IDL_tree node, int indent_level)
{
IDL_tree curnode;
char *s;
g_print("LIST:\n");
for(curnode = node; curnode;
curnode = IDL_LIST(curnode).next) {
- orbit_idl_print_node(IDL_LIST(curnode).data, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_LIST(curnode).data, indent_level + INDENT_INCREMENT_1);
}
break;
case IDLN_TYPE_DCL:
g_print("TYPE DCL:\n");
- orbit_idl_print_node(IDL_TYPE_DCL(node).type_spec, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_DCL(node).type_spec, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("decls:\n");
- orbit_idl_print_node(IDL_TYPE_DCL(node).dcls, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_DCL(node).dcls, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_CONST_DCL:
g_print("CONST DCL:\n");
- orbit_idl_print_node(IDL_CONST_DCL(node).const_type, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_CONST_DCL(node).const_type, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("ident:\n");
- orbit_idl_print_node(IDL_CONST_DCL(node).ident, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_CONST_DCL(node).ident, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("const_exp:\n");
- orbit_idl_print_node(IDL_CONST_DCL(node).const_exp, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_CONST_DCL(node).const_exp, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_EXCEPT_DCL:
g_print("EXCEPT DCL:\n");
- orbit_idl_print_node(IDL_EXCEPT_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_EXCEPT_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("members:\n");
- orbit_idl_print_node(IDL_EXCEPT_DCL(node).members, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_EXCEPT_DCL(node).members, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_ATTR_DCL:
g_print("ATTR_DCL (%s):\n", (IDL_ATTR_DCL(node).f_readonly)?"readonly":"rw");
- orbit_idl_print_node(IDL_ATTR_DCL(node).param_type_spec, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_ATTR_DCL(node).param_type_spec, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("simple_declarations:\n");
- orbit_idl_print_node(IDL_ATTR_DCL(node).simple_declarations, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_ATTR_DCL(node).simple_declarations, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_OP_DCL:
g_print("OP DCL (%s):\n", (IDL_OP_DCL(node).f_oneway)?"oneway":"normal");
- orbit_idl_print_node(IDL_OP_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_OP_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("op_type_spec:\n");
- orbit_idl_print_node(IDL_OP_DCL(node).op_type_spec, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_OP_DCL(node).op_type_spec, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("parameter_dcls:\n");
- orbit_idl_print_node(IDL_OP_DCL(node).parameter_dcls, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_OP_DCL(node).parameter_dcls, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("raises_expr:\n");
- orbit_idl_print_node(IDL_OP_DCL(node).raises_expr, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_OP_DCL(node).raises_expr, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("context_expr:\n");
- orbit_idl_print_node(IDL_OP_DCL(node).context_expr, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_OP_DCL(node).context_expr, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_PARAM_DCL:
case IDL_PARAM_OUT: g_print("(out)\n"); break;
case IDL_PARAM_INOUT: g_print("(inout)\n"); break;
}
- orbit_idl_print_node(IDL_PARAM_DCL(node).param_type_spec, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_PARAM_DCL(node).param_type_spec, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("simple_declarator:\n");
- orbit_idl_print_node(IDL_PARAM_DCL(node).simple_declarator, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_PARAM_DCL(node).simple_declarator, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_FORWARD_DCL:
g_print("FORWARD DCL:\n");
- orbit_idl_print_node(IDL_FORWARD_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_FORWARD_DCL(node).ident, indent_level + INDENT_INCREMENT_1);
break;
case IDLN_INTERFACE:
g_print("INTERFACE:\n");
- orbit_idl_print_node(IDL_INTERFACE(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_INTERFACE(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("inheritance_spec:\n");
- orbit_idl_print_node(IDL_INTERFACE(node).inheritance_spec, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_INTERFACE(node).inheritance_spec, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("body:\n");
- orbit_idl_print_node(IDL_INTERFACE(node).body, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_INTERFACE(node).body, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_MODULE:
g_print("MODULE:\n");
- orbit_idl_print_node(IDL_MODULE(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_MODULE(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("definition_list:\n");
- orbit_idl_print_node(IDL_MODULE(node).definition_list, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_MODULE(node).definition_list, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_TYPE_INTEGER:
break;
case IDLN_TYPE_FIXED:
g_print("TYPE fixed:\n");
- orbit_idl_print_node(IDL_TYPE_FIXED(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
- orbit_idl_print_node(IDL_TYPE_FIXED(node).integer_lit, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_FIXED(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_FIXED(node).integer_lit, indent_level + INDENT_INCREMENT_1);
break;
case IDLN_TYPE_STRING:
g_print("TYPE string:\n");
- orbit_idl_print_node(IDL_TYPE_STRING(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_STRING(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
break;
case IDLN_TYPE_WIDE_STRING:
g_print("TYPE wide string:\n");
- orbit_idl_print_node(IDL_TYPE_WIDE_STRING(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_WIDE_STRING(node).positive_int_const, indent_level + INDENT_INCREMENT_1);
break;
case IDLN_TYPE_ENUM:
g_print("TYPE enum:\n");
- orbit_idl_print_node(IDL_TYPE_ENUM(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_ENUM(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("enumerator_list:\n");
- orbit_idl_print_node(IDL_TYPE_ENUM(node).enumerator_list, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_ENUM(node).enumerator_list, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_TYPE_ARRAY:
g_print("TYPE array:\n");
- orbit_idl_print_node(IDL_TYPE_ARRAY(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_ARRAY(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("size_list:\n");
- orbit_idl_print_node(IDL_TYPE_ARRAY(node).size_list, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_ARRAY(node).size_list, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_TYPE_SEQUENCE:
g_print("TYPE sequence:\n");
- orbit_idl_print_node(IDL_TYPE_SEQUENCE(node).simple_type_spec, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_SEQUENCE(node).simple_type_spec, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("positive_int_const:\n");
- orbit_idl_print_node(IDL_TYPE_SEQUENCE(node).positive_int_const, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_SEQUENCE(node).positive_int_const, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_TYPE_STRUCT:
g_print("TYPE struct:\n");
- orbit_idl_print_node(IDL_TYPE_STRUCT(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_STRUCT(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("member_list:\n");
- orbit_idl_print_node(IDL_TYPE_STRUCT(node).member_list, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_STRUCT(node).member_list, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_TYPE_UNION:
g_print("TYPE union:\n");
- orbit_idl_print_node(IDL_TYPE_UNION(node).ident, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_TYPE_UNION(node).ident, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("switch_type_spec:\n");
- orbit_idl_print_node(IDL_TYPE_UNION(node).switch_type_spec, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_UNION(node).switch_type_spec, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("switch_body:\n");
- orbit_idl_print_node(IDL_TYPE_UNION(node).switch_body, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_TYPE_UNION(node).switch_body, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_MEMBER:
g_print("MEMBER:\n");
- orbit_idl_print_node(IDL_MEMBER(node).type_spec, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_MEMBER(node).type_spec, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("dcls:\n");
- orbit_idl_print_node(IDL_MEMBER(node).dcls, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_MEMBER(node).dcls, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_CASE_STMT:
g_print("CASE_STMT:\n");
- orbit_idl_print_node(IDL_CASE_STMT(node).labels, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_CASE_STMT(node).labels, indent_level + INDENT_INCREMENT_1);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("element_spec:\n");
- orbit_idl_print_node(IDL_CASE_STMT(node).element_spec, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_CASE_STMT(node).element_spec, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_BINOP:
g_print("BINOP ");
case IDL_BINOP_MOD: g_print("mod:\n"); break;
}
do_indent(indent_level + INDENT_INCREMENT_1); g_print("left:\n");
- orbit_idl_print_node(IDL_BINOP(node).left, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_BINOP(node).left, indent_level + INDENT_INCREMENT_2);
do_indent(indent_level + INDENT_INCREMENT_1); g_print("right:\n");
- orbit_idl_print_node(IDL_BINOP(node).right, indent_level + INDENT_INCREMENT_2);
+ forb_idl_print_node(IDL_BINOP(node).right, indent_level + INDENT_INCREMENT_2);
break;
case IDLN_UNARYOP:
g_print("UNARYOP ");
case IDL_UNARYOP_MINUS: g_print("minus:\n"); break;
case IDL_UNARYOP_COMPLEMENT: g_print("complement:\n"); break;
}
- orbit_idl_print_node(IDL_UNARYOP(node).operand, indent_level + INDENT_INCREMENT_1);
+ forb_idl_print_node(IDL_UNARYOP(node).operand, indent_level + INDENT_INCREMENT_1);
break;
case IDLN_TYPE_CHAR:
g_print("TYPE char\n");
/* For use by below function */
static const int *
-orbit_cbe_get_typeoffsets_table (void)
+forb_cbe_get_typeoffsets_table (void)
{
static int typeoffsets[IDLN_LAST];
static gboolean initialized = FALSE;
oidl_param_info(IDL_tree in_param, IDL_ParamRole role, gboolean *isSlice)
{
IDL_tree param;
- const int * const typeoffsets = orbit_cbe_get_typeoffsets_table ();
+ const int * const typeoffsets = forb_cbe_get_typeoffsets_table ();
const int nptrrefs_required[][4] = {
{0,1,1,0} /* float */,
{0,1,1,0} /* double */,
return 0; /* void */
/* Now, how do we use this table? :) */
- param = orbit_cbe_get_typespec (in_param);
+ param = forb_cbe_get_typespec (in_param);
g_assert (param);
case IDLN_TYPE_STRUCT:
case IDLN_TYPE_UNION:
if (((role == DATA_RETURN) || (role == DATA_OUT)) &&
- !orbit_cbe_type_is_fixed_length(param))
+ !forb_cbe_type_is_fixed_length(param))
retval++;
break;
retval = 1;
} else if (role == DATA_OUT &&
- !orbit_cbe_type_is_fixed_length (param)) {
+ !forb_cbe_type_is_fixed_length (param)) {
*isSlice = TRUE;
retval = 2;
}
**/
gboolean
-orbit_cbe_type_is_fixed_length(IDL_tree ts)
+forb_cbe_type_is_fixed_length(IDL_tree ts)
{
gboolean is_fixed = TRUE;
IDL_tree curitem;
- ts = orbit_cbe_get_typespec(ts);
+ ts = forb_cbe_get_typespec(ts);
switch(IDL_NODE_TYPE(ts)) {
case IDLN_TYPE_FLOAT:
case IDLN_TYPE_INTEGER:
case IDLN_TYPE_UNION:
for(curitem = IDL_TYPE_UNION(ts).switch_body; curitem;
curitem = IDL_LIST(curitem).next) {
- is_fixed &= orbit_cbe_type_is_fixed_length(IDL_LIST(IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec).data);
+ is_fixed &= forb_cbe_type_is_fixed_length(IDL_LIST(IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec).data);
}
return is_fixed;
break;
case IDLN_TYPE_STRUCT:
for(curitem = IDL_TYPE_STRUCT(ts).member_list; curitem;
curitem = IDL_LIST(curitem).next) {
- is_fixed &= orbit_cbe_type_is_fixed_length(IDL_LIST(curitem).data);
+ is_fixed &= forb_cbe_type_is_fixed_length(IDL_LIST(curitem).data);
}
return is_fixed;
break;
case IDLN_TYPE_ARRAY:
- return orbit_cbe_type_is_fixed_length(IDL_TYPE_DCL(IDL_get_parent_node(ts, IDLN_TYPE_DCL, NULL)).type_spec);
+ return forb_cbe_type_is_fixed_length(IDL_TYPE_DCL(IDL_get_parent_node(ts, IDLN_TYPE_DCL, NULL)).type_spec);
break;
case IDLN_TYPE_DCL:
- return orbit_cbe_type_is_fixed_length(IDL_TYPE_DCL(ts).type_spec);
+ return forb_cbe_type_is_fixed_length(IDL_TYPE_DCL(ts).type_spec);
break;
case IDLN_IDENT:
case IDLN_LIST:
- return orbit_cbe_type_is_fixed_length(IDL_NODE_UP(ts));
+ return forb_cbe_type_is_fixed_length(IDL_NODE_UP(ts));
break;
case IDLN_MEMBER:
- return orbit_cbe_type_is_fixed_length(IDL_MEMBER(ts).type_spec);
+ return forb_cbe_type_is_fixed_length(IDL_MEMBER(ts).type_spec);
break;
default:
g_warning("I'm not sure if type %s is fixed-length", IDL_tree_type_names[IDL_NODE_TYPE(ts)]);
}
IDL_tree
-orbit_cbe_get_typespec(IDL_tree node)
+forb_cbe_get_typespec(IDL_tree node)
{
if(node == NULL)
return NULL;
return node;
break;
case IDLN_TYPE_DCL:
- return orbit_cbe_get_typespec(IDL_TYPE_DCL(node).type_spec);
+ return forb_cbe_get_typespec(IDL_TYPE_DCL(node).type_spec);
break;
case IDLN_PARAM_DCL:
- return orbit_cbe_get_typespec(IDL_PARAM_DCL(node).param_type_spec);
+ return forb_cbe_get_typespec(IDL_PARAM_DCL(node).param_type_spec);
break;
case IDLN_MEMBER:
- return orbit_cbe_get_typespec(IDL_MEMBER(node).type_spec);
+ return forb_cbe_get_typespec(IDL_MEMBER(node).type_spec);
break;
case IDLN_LIST:
case IDLN_IDENT:
- return orbit_cbe_get_typespec(IDL_get_parent_node(node, IDLN_ANY, NULL));
+ return forb_cbe_get_typespec(IDL_get_parent_node(node, IDLN_ANY, NULL));
break;
default:
g_error("Unhandled node type %s!", IDL_tree_type_names[IDL_NODE_TYPE(node)]);
-#ifndef ORBIT_IDL2_H
-#define ORBIT_IDL2_H 1
+#ifndef FORB_IDL2_H
+#define FORB_IDL2_H 1
-#include "orbit-idl3-types.h"
+#include "forb-idl3-types.h"
-gboolean orbit_idl_to_backend (const char *filename,
+gboolean forb_idl_to_backend (const char *filename,
OIDL_Run_Info *rinfo);
-gboolean orbit_idl_backend_output (OIDL_Run_Info *rinfo,
+gboolean forb_idl_backend_output (OIDL_Run_Info *rinfo,
IDL_tree tree);
/* Utils */
-void orbit_idl_attr_fake_ops (IDL_tree attr,
+void forb_idl_attr_fake_ops (IDL_tree attr,
IDL_ns ns);
-void orbit_idl_print_node (IDL_tree node,
+void forb_idl_print_node (IDL_tree node,
int indent_level);
void IDL_tree_traverse_parents (IDL_tree p,
GFunc f,
GFunc f,
gconstpointer func_data,
gboolean include_self);
-gboolean orbit_cbe_type_contains_complex (IDL_tree ts);
-void orbit_idl_check_oneway_op (IDL_tree op);
+gboolean forb_cbe_type_contains_complex (IDL_tree ts);
+void forb_idl_check_oneway_op (IDL_tree op);
typedef enum { DATA_IN=1, DATA_INOUT=2, DATA_OUT=4, DATA_RETURN=8 } IDL_ParamRole;
gint oidl_param_info(IDL_tree param, IDL_ParamRole role, gboolean *isSlice);
-gboolean orbit_cbe_type_is_fixed_length(IDL_tree ts);
-IDL_tree orbit_cbe_get_typespec(IDL_tree node);
+gboolean forb_cbe_type_is_fixed_length(IDL_tree ts);
+IDL_tree forb_cbe_get_typespec(IDL_tree node);
IDL_ParamRole oidl_attr_to_paramrole(enum IDL_param_attr attr);
-#define ORBIT_RETVAL_VAR_NAME "_ORBIT_retval"
-#define ORBIT_EPV_VAR_NAME "_ORBIT_epv"
+#define FORB_RETVAL_VAR_NAME "_FORB_retval"
+#define FORB_EPV_VAR_NAME "_FORB_epv"
-#endif /* ORBIT_IDL2_H */
+#endif /* FORB_IDL2_H */
#include <errno.h>
#include <stdio.h>
#include <libIDL/IDL.h>
-#include <orbit/util/orbit-util.h>
-#include <orbit/orbit-config.h>
+/* #include <orbit/util/orbit-util.h> */
+/* #include <orbit/orbit-config.h> */
typedef struct _OIDL_Marshal_Context OIDL_Marshal_Context;