% cd /usr/local/ilu/src % patch -p < /usr/local/ilu/src/this-patch [...various output from the patch program...] %
--- orig Sat Feb 8 13:05:29 1997 +++ imake/config.guess Wed Feb 12 17:39:14 1997 @@ -334,11 +334,13 @@ echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) + # Set LINUX_RELEASE to UNAME_RELEASE if it is not unknown. + test "${UNAME_RELEASE}" = "unknown" || LINUX_RELEASE="${UNAME_RELEASE}" # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 + echo "${UNAME_MACHINE}-unknown-linux${LINUX_RELEASE}" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then --- orig Sat Feb 8 12:57:33 1997 +++ stubbers/parser/Imakefile Wed Feb 12 16:02:53 1997 @@ -73,9 +73,9 @@ dist:: make genregs - -rm -f ../../runtime/kernel/regtypes.c - ./genregs "../../runtime/kernel/regtypes.c" - -rm -f genregs *.o *.a + -rm -f ../../runtime/kernel/regtypes.c + ./genregs "../../runtime/kernel/regtypes.c" + -rm -f genregs *.o *.a genregs: version.h genregs.o libilu-parser.a $(ANSI_C_COMPILER) -o genregs $(CFLAGS) genregs.c libilu-parser.a
*** orig Fri Feb 7 18:02:10 1997 --- runtime/python/iluPrmodule.c Mon Feb 17 11:05:34 1997 *************** *** 833,847 **** CALL_KERNEL(ilupython_threaded_operation, stat = ilu_ReceiveRequest(&call, &initted, conn, &kclass, &meth, &serialNo, &err)); - if (stat == ilu_RcvReqStat_request) - { - callSkeleton(&call, kclass, meth); - } - else if (initted) - { - CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (&call, &err)); - ILU_HANDLED(err); - } if (ILU_ERRNOK(err)) { fprintf (stderr, "Error parsing or serving request on connection %p: %s", --- 833,838 ---- *************** *** 851,874 **** serialNo, kclass->cl_name, meth->me_name); else fprintf (stderr, " (no reliable info about the request is available)\n"); } ! if (single_threaded) { ! if (stat == ilu_RcvReqStat_noop) ! /* call skeleton does this for ilu_RcvReqStat_request case */ ! enableRequestsOnConn(conn, &err); ! else if (stat == ilu_RcvReqStat_quit) { ! ilu_DoneServingConnection(conn, &err); ! ILU_MUST_BE_SUCCESS(err); } ! } ! if (stat != ilu_RcvReqStat_quit) { ! ilu_SetConnectionInputHandler (conn, singleThreadedReadServiceRequest, rock, &err); ! if (ILU_ERRNOK(err)) { ! fprintf(stderr, "Can't set connection input handler, error %s\n", ILU_ERR_NAME(err)); ILU_HANDLED(err); } ! } ! return (stat == ilu_RcvReqStat_quit ? ilu_TRUE : ilu_FALSE); } /* after: new connection registered */ --- 842,877 ---- serialNo, kclass->cl_name, meth->me_name); else fprintf (stderr, " (no reliable info about the request is available)\n"); + ILU_HANDLED(err); } ! ! if (stat == ilu_RcvReqStat_request) ! { ! callSkeleton(&call, kclass, meth); ! return ilu_FALSE; } ! else if (initted) ! { ! CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (&call, &err)); ILU_HANDLED(err); } ! ! if (stat == ilu_RcvReqStat_quit) { ! if (!ilu_ConnectionServingP(conn)) { ! ilu_DoneServingConnection(conn, &err); ! if (ILU_ERRNOK(err)) { ! ILU_ERRPRINTF("Warning: Error from ilu_DoneServingConnection ignored at line %d of %s\n", __LINE__, __FILE__); ! ILU_HANDLED(err); ! } ! } ! return ilu_TRUE; ! } ! ! /* stat must be ilu_RcvReqStat_noop */ ! if (single_threaded) ! /* call skeleton does this for ilu_RcvReqStat_request case */ ! enableRequestsOnConn(conn, &err); ! return ilu_FALSE; } /* after: new connection registered */
*** 1.111 1997/02/10 23:13:41 --- runtime/kernel/iiop.c 1997/02/17 22:33:43 *************** *** 3353,3358 **** --- 3353,3359 ---- _cdr_put_u8(pk, arm->values[j].value.boolean_val, err); break; case ilu_byte_tk: + case ilu_shortcharacter_tk: _cdr_put_u8(pk, arm->values[j].value.byte_val, err); break; case ilu_integer_tk: *************** *** 3368,3374 **** _cdr_put_u16(pk, arm->values[j].value.shortcardinal_val, err); break; case ilu_enumeration_tk: ! _cdr_put_u16(pk, enum_code(arm->values[j].value.enumeration_val, type_desc(t).Union.discriminant), err); break; }; --- 3369,3375 ---- _cdr_put_u16(pk, arm->values[j].value.shortcardinal_val, err); break; case ilu_enumeration_tk: ! _cdr_put_u32(pk, enum_code(arm->values[j].value.enumeration_val, type_desc(t).Union.discriminant), err); break; }; *************** *** 3919,3925 **** ilu_cardinal n_arms, junk, i; ilu_UnionArm_s *arms; ilu_UnionArm_s *arm; ! ilu_shortcardinal enumcode; type_kind(t) = ilu_union_tk; if (!GetHeader(pk, t, err)) break; --- 3920,3926 ---- ilu_cardinal n_arms, junk, i; ilu_UnionArm_s *arms; ilu_UnionArm_s *arm; ! ilu_cardinal enumcode; type_kind(t) = ilu_union_tk; if (!GetHeader(pk, t, err)) break; *************** *** 3949,3954 **** --- 3950,3956 ---- } break; case ilu_byte_tk: + case ilu_shortcharacter_tk: _cdr_get_u8(pk, &arm->values[0].value.byte_val, err); break; case ilu_integer_tk: *************** *** 3964,3972 **** _cdr_get_u16(pk, &arm->values[0].value.shortcardinal_val, err); break; case ilu_enumeration_tk: ! _cdr_get_u16(pk, &enumcode, err); if (ILU_ERRNOK(*err)) break; ! arm->values[0].value.enumeration_val = FigureEnumVal(enumcode, type_desc(t).Union.discriminant, err); break; } if (ILU_ERRNOK(*err)) break; --- 3966,3975 ---- _cdr_get_u16(pk, &arm->values[0].value.shortcardinal_val, err); break; case ilu_enumeration_tk: ! _cdr_get_u32(pk, &enumcode, err); if (ILU_ERRNOK(*err)) break; ! arm->values[0].value.enumeration_val = FigureEnumVal((ilu_shortcardinal) enumcode, ! type_desc(t).Union.discriminant, err); break; } if (ILU_ERRNOK(*err)) break; *************** *** 4436,4441 **** --- 4439,4445 ---- { case ilu_boolean_tk: case ilu_byte_tk: + case ilu_shortcharacter_tk: return 1; case ilu_shortinteger_tk: case ilu_shortcardinal_tk:
*** 1.114 1997/02/17 22:33:40 --- runtime/kernel/iiop.c 1997/02/17 22:55:55 *************** *** 2647,2653 **** "_IIOP_InputObjectID: instance", ih, sid)); ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_inst_nf, NIL); ilu_ExitServer(server, static_type); ! } } ilu_free(key); if (ILU_ERRNOK(*err)) { --- 2647,2654 ---- "_IIOP_InputObjectID: instance", ih, sid)); ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_inst_nf, NIL); ilu_ExitServer(server, static_type); ! } else ! ILU_CLER(*err); } ilu_free(key); if (ILU_ERRNOK(*err)) {
*** 20a9 Fri Feb 7 18:02:10 1997 --- runtime/python/iluPrmodule.c Mon Feb 17 16:01:14 1997 *************** *** 472,478 **** PyObject * superclassTuple; PyObject * result; ! if (!PyArg_Parse(args, "(ssszbbzOO)", &name, &brand, &uniqueId, &singleton, &collectible, &optional, &authentication, &methodTuple, &superclassTuple)) return 0; --- 472,478 ---- PyObject * superclassTuple; PyObject * result; ! if (!PyArg_Parse(args, "(szszbbzOO)", &name, &brand, &uniqueId, &singleton, &collectible, &optional, &authentication, &methodTuple, &superclassTuple)) return 0; *** 20a9 Fri Feb 7 18:02:07 1997 --- runtime/python/iluRt.py Mon Feb 17 16:02:04 1997 *************** *** 299,305 **** class CORBA_Object(IluObjSurr): _IluClass = FormClassRecord(\ 'ilu.CORBA-Object',\ ! '',\ 'IDL:omg.org/CORBA/Object:1.0',\ None,\ FALSE,\ --- 299,305 ---- class CORBA_Object(IluObjSurr): _IluClass = FormClassRecord(\ 'ilu.CORBA-Object',\ ! None,\ 'IDL:omg.org/CORBA/Object:1.0',\ None,\ FALSE,\
*** 1.25 1997/01/16 22:35:58 --- runtime/kernel/httpprot.c 1997/02/19 00:16:08 *************** *** 4387,4394 **** return; } ! /* write out the length (+ 1 for termination) */ ! _http_output_cardinal(p_call, card_length + 1, p_error); if (ILU_ERRNOK(*p_error)) return; --- 4387,4394 ---- return; } ! /* write out the length */ ! _http_output_cardinal(p_call, card_length, p_error); if (ILU_ERRNOK(*p_error)) return; *************** *** 4426,4432 **** *p_card_length = card_size; /* get right amount of space */ ! *p_string = (ilu_wstring) ilu_MallocE(((*p_card_length) * sizeof(ilu_wstring)), p_error); if (*p_string == NIL) { *p_card_length = 0; --- 4426,4432 ---- *p_card_length = card_size; /* get right amount of space */ ! *p_string = (ilu_wstring) ilu_MallocE((((*p_card_length) + 1) * sizeof(ilu_character)), p_error); if (*p_string == NIL) { *p_card_length = 0;
*** 2.0alpha9 Fri Feb 7 18:14:45 1997 --- stubbers/parser/iluparse.c.dist Tue Feb 18 16:01:57 1997 *************** *** 306,311 **** --- 306,312 ---- return ((strcmp(type_name(type), name->name) == 0) AND (((name->interface == NULL) && (type->importInterfaceName == NULL)) OR (name->interface != NULL AND type->interface != NULL AND + type->importInterfaceName == NULL AND strcmp(name->interface, name_base_name(type->interface->name)) == 0))); }
*** 2.0alpha9 Fri Feb 7 17:59:30 1997 --- stubbers/java/util.c Wed Feb 19 10:15:58 1997 *************** *** 183,190 **** case int32_Type: case card16_Type: case card32_Type: - case enumeration_Type: return "0"; case int64_Type: case card64_Type: return "0L"; --- 183,191 ---- case int32_Type: case card16_Type: case card32_Type: return "0"; + case enumeration_Type: + return "null"; case int64_Type: case card64_Type: return "0L";
*** orig Mon Feb 17 16:08:43 1997 --- runtime/python/iluPrmodule.c Fri Feb 21 10:26:20 1997 *************** *** 857,863 **** } if (stat == ilu_RcvReqStat_quit) { ! if (!ilu_ConnectionServingP(conn)) { ilu_DoneServingConnection(conn, &err); if (ILU_ERRNOK(err)) { ILU_ERRPRINTF("Warning: Error from ilu_DoneServingConnection ignored at line %d of %s\n", __LINE__, __FILE__); --- 857,865 ---- } if (stat == ilu_RcvReqStat_quit) { ! /* note we don't call ilu_DoneServingConnection if we're threaded since it ! will be called inside runConnection due ro our returning ilu_TRUE here */ ! if (single_threaded && !ilu_ConnectionServingP(conn)) { ilu_DoneServingConnection(conn, &err); if (ILU_ERRNOK(err)) { ILU_ERRPRINTF("Warning: Error from ilu_DoneServingConnection ignored at line %d of %s\n", __LINE__, __FILE__); *************** *** 7620,7628 **** FINISHED_THREAD_EXIT; ! if (call_stack != ILU_NIL) ilu_DoneServingConnection(conn, &err); ! ILU_MUST_BE_SUCCESS(err); exit_thread(); } --- 7622,7634 ---- FINISHED_THREAD_EXIT; ! if (call_stack != ILU_NIL) { ilu_DoneServingConnection(conn, &err); ! if (ILU_ERRNOK(err)) { ! ILU_ERRPRINTF("Warning: Error from ilu_DoneServingConnection ignored at line %d of %s\n", __LINE__, __FILE__); ! ILU_HANDLED(err); ! } ! } exit_thread(); }
*** 1.21 1997/02/13 21:35:00 --- runtime/python/iluclobject.c 1997/02/22 01:39:40 *************** *** 365,371 **** &methods); fprintf(fp, "<ilu_Class at 0x%p\n", cl); fprintf(fp, " name: '%s'\n", name); ! fprintf(fp, " brand: '%s'\n", brand); fprintf(fp, " unique_id: '%s'\n", id); fprintf(fp, " singleton: "); --- 365,372 ---- &methods); fprintf(fp, "<ilu_Class at 0x%p\n", cl); fprintf(fp, " name: '%s'\n", name); ! if (brand != ILU_NIL) ! fprintf(fp, " brand: '%s'\n", brand); fprintf(fp, " unique_id: '%s'\n", id); fprintf(fp, " singleton: ");
*** 1.70 1997/02/13 04:32:17 --- runtime/kernel/type.c 1997/02/25 02:24:34 *************** *** 286,292 **** if (ans == NIL) return ILU_ERR_CONS1(no_memory, err, nbytes, sizeof(*ans), NIL); ans->cl_name = _ilu_Strdup(cl_name); ! ans->cl_brand = _ilu_Strdup(cl_brand); ans->cl_unique_id = _ilu_Strdup(cl_unique_id); ans->cl_singleton = _ilu_Strdup(cl_singleton); ans->cl_collectible = cl_collectible; --- 286,295 ---- if (ans == NIL) return ILU_ERR_CONS1(no_memory, err, nbytes, sizeof(*ans), NIL); ans->cl_name = _ilu_Strdup(cl_name); ! if (cl_brand != NIL && cl_brand[0] == 0) ! ans->cl_brand = NIL; ! else ! ans->cl_brand = _ilu_Strdup(cl_brand); ans->cl_unique_id = _ilu_Strdup(cl_unique_id); ans->cl_singleton = _ilu_Strdup(cl_singleton); ans->cl_collectible = cl_collectible;
*** 2.0alpha9 Fri Feb 7 17:59:34 1997 --- stubbers/java/genobj.c Tue Feb 25 08:52:06 1997 *************** *** 561,567 **** printf(" _ec = _call.startReadReply();\n"); printf(" if (_ec == 0) {\n"); if (returnType) { ! printf(" _r = %s%;\n", ioInPiece(returnType)); } LOOP_BEGIN(m->arguments, Argument, a, t5) char *arg; --- 561,567 ---- printf(" _ec = _call.startReadReply();\n"); printf(" if (_ec == 0) {\n"); if (returnType) { ! printf(" _r = %s;\n", ioInPiece(returnType)); } LOOP_BEGIN(m->arguments, Argument, a, t5) char *arg; *************** *** 652,658 **** /* defines the skeleton class in the current stub java file */ { ! Type t; Class c = class_object(t); printf("class _%s_skeletonClass ", objShortName(t)); --- 652,658 ---- /* defines the skeleton class in the current stub java file */ { ! Type t = rock->t; Class c = class_object(t); printf("class _%s_skeletonClass ", objShortName(t));
*** 2.0alpha9 Fri Feb 7 18:01:30 1997 --- runtime/java/IluJava_IluRT0.c Fri Feb 28 09:46:29 1997 *************** *** 237,243 **** struct Hxerox_ilu_IluOInt * joi; ilu_Object cIluObject; ilu_Error err = ILU_INIT_NO_ERR; ! char * cSBH = makeCString(jSBH); /* subject to GC*/ cIluObject = ilu_ObjectOfSBH( cSBH, --- 237,245 ---- struct Hxerox_ilu_IluOInt * joi; ilu_Object cIluObject; ilu_Error err = ILU_INIT_NO_ERR; ! char * cSBH; ! if ((jSBH == 0) || (jClassRep == 0)) return 0; ! cSBH = makeCString(jSBH); /* subject to GC*/ cIluObject = ilu_ObjectOfSBH( cSBH,
*** 2.0alpha9 Fri Feb 7 17:59:34 1997 --- stubbers/java/genobj.c Fri Feb 28 13:31:42 1997 *************** *** 112,121 **** argumentName(a), htn); } else { ! printf(" %s %s = new %s[1];\n", htn, argumentName(a), ! typeDeclarator(a->type) ); } } --- 112,121 ---- argumentName(a), htn); } else { ! printf(" %s %s = new %s;\n", htn, argumentName(a), ! setDimension(htn, "1") ); } }
*** 2.0alpha9 Fri Feb 28 14:19:38 1997 --- runtime/kernel/regtypes.c Fri Feb 28 14:20:02 1997 *************** *** 12,19 **** #include "iluntrnl.h" - void _ilu_RegisterBuiltInTypes() { ilu_Error lerr; --- 12,19 ---- #include "iluntrnl.h" + #ifdef ADD_VARIANT_SUPPORT void _ilu_RegisterBuiltInTypes() { ilu_Error lerr; *************** *** 121,126 **** --- 121,128 ---- _ilu_Assert(0, "Bad registration of primitive ILU types\n"); } + #endif /* ADD_VARIANT_SUPPORT */ + const char ilu_TypeID_ilu_CORBA_Object[] = "IDL:omg.org/CORBA/Object:1.0"; const char ilu_TypeID_ilu_ProtocolErrorDetail[] = "ilu:dpOOBY47inKh55fvpKZOxQvfFme";
*** 1.34 1997/01/16 23:19:04 --- runtime/c/orb.c 1997/02/28 22:30:09 *************** *** 165,171 **** { CORBA_Object h; ! if (o != ILU_C_ORB || (h = ILU_C_SBHToObject (sbh, ILU_NIL, ILU_NIL)) == ILU_NIL) { SYS_EX(ex_CORBA_INV_OBJREF,CORBA_COMPLETED_NO) return (ILU_NIL); --- 165,171 ---- { CORBA_Object h; ! if (o != ILU_C_ORB || (h = ILU_C_SBHToObject (sbh, ilu_rootClass, s)) == ILU_NIL) { SYS_EX(ex_CORBA_INV_OBJREF,CORBA_COMPLETED_NO) return (ILU_NIL);
*** 1.133 1997/02/13 04:27:21 --- stubbers/c/code.c 1997/02/26 00:50:36 *************** *** 1279,1285 **** fprintf(f, " cl = ilu_DefineObjectType(\"%s.%s\",\t/*name*/\n", name_base_name(context->interface->name), name_base_name(class->name)); ! fprintf(f, "\t\"%s\",\t/*brand*/\n", o->brand == NULL ? "" : o->brand); fprintf(f, "\t\"%s\",\t/*uid*/\n", class->uid); if (o->singleton == NULL) fprintf(f, "\tNULL,\t/*singleton*/\n"); --- 1279,1288 ---- fprintf(f, " cl = ilu_DefineObjectType(\"%s.%s\",\t/*name*/\n", name_base_name(context->interface->name), name_base_name(class->name)); ! if (o->brand == NULL) ! fprintf(f, "\tNULL,\t/*no brand*/\n"); ! else ! fprintf(f, "\t\"%s\",\t/*brand*/\n", o->brand); fprintf(f, "\t\"%s\",\t/*uid*/\n", class->uid); if (o->singleton == NULL) fprintf(f, "\tNULL,\t/*singleton*/\n");
*** 1.135 1997/02/26 00:50:36 --- stubbers/c/code.c 1997/02/28 22:42:58 *************** *** 1028,1038 **** fprintf(context->file, " /* frees allocated storage inside _val (if any), but does not free(_val) */\n"); ! if (t == record_Type) list_enumerate(type_description(type)->structuredDes.record, FreeRecordField, context); ! ! else if (t == union_Type) { struct double_s s; s.c = context; --- 1028,1038 ---- fprintf(context->file, " /* frees allocated storage inside _val (if any), but does not free(_val) */\n"); ! if (t == record_Type) { ! fprintf(context->file, " if (_val == ILU_NIL) return;\n"); list_enumerate(type_description(type)->structuredDes.record, FreeRecordField, context); ! } else if (t == union_Type) { struct double_s s; s.c = context; *************** *** 1040,1045 **** --- 1040,1046 ---- s.id = 0; s.default_arm = d->structuredDes.uniond.default_arm; + fprintf(context->file, " if (_val == ILU_NIL) return;\n"); fprintf(context->file, " switch (_val->_d) {\n"); list_enumerate(d->structuredDes.uniond.types, (void (*) (void *, void *)) FreeUnionField, &s); *************** *** 1057,1062 **** --- 1058,1064 ---- } else if (t == sequence_Type) { Type st = ur_type(d->structuredDes.sequence.type); TypeKind t2 = type_basic_type(st); + fprintf(context->file, " if (_val == ILU_NIL) return;\n"); if (t2 == shortcharacter_Type || t2 == character_Type) { fprintf(context->file, " if (*_val != ILU_NIL)\n"); fprintf(context->file, " ilu_free(*_val);\n"); *************** *** 1098,1114 **** st = ur_type(type_description(st)->structuredDes.optional); indo = !TypeIsPointer(st); fprintf(context->file, " /* subtype is %s */\n", c_type_name(st)); ! fprintf(context->file, " if (*_val != ILU_NIL) {\n"); FreeValue(st, (indo ? "**_val" : "*_val"), role_Val, context, 4); if (indo) fprintf(context->file, " ilu_free(*_val);\n"); fprintf(context->file, " }\n"); } else if (t == object_Type) { fprintf(context->file, " CORBA_Environment env = {0};\n"); fprintf(context->file, " CORBA_Object_release(*_val, &env);\n"); fprintf(context->file, " *_val = 0;\n"); } else if (t == pickle_Type) { ! fprintf(context->file, " CORBA_any__Free (_val);\n"); } else { fprintf(stderr, "Bad type %s passed to generateFreeCode\n", c_type_name(type)); --- 1100,1117 ---- st = ur_type(type_description(st)->structuredDes.optional); indo = !TypeIsPointer(st); fprintf(context->file, " /* subtype is %s */\n", c_type_name(st)); ! fprintf(context->file, " if ((_val != ILU_NIL) && (*_val != ILU_NIL)) {\n"); FreeValue(st, (indo ? "**_val" : "*_val"), role_Val, context, 4); if (indo) fprintf(context->file, " ilu_free(*_val);\n"); fprintf(context->file, " }\n"); } else if (t == object_Type) { fprintf(context->file, " CORBA_Environment env = {0};\n"); + fprintf(context->file, " if ((_val == ILU_NIL) || (*_val == ILU_NIL)) return;\n"); fprintf(context->file, " CORBA_Object_release(*_val, &env);\n"); fprintf(context->file, " *_val = 0;\n"); } else if (t == pickle_Type) { ! fprintf(context->file, " if (_val != ILU_NIL) CORBA_any__Free (_val);\n"); } else { fprintf(stderr, "Bad type %s passed to generateFreeCode\n", c_type_name(type));
*** 1.98 1997/01/24 21:50:42 --- stubbers/c/cheaders.c 1997/02/28 23:31:02 *************** *** 1080,1091 **** fprintf (file, "extern void %s__InitializeServer(void);\n\n\n", c_interface_name(interface)); - if (list_size(interface->constants) > 0) - { fprintf (file, "/*======================================================================*/\n"); - fprintf (file, "/*=========================== constants ================================*/\n\n"); - list_enumerate (interface->constants, (iluparser_EnumProc) declareConstant, &context); - fprintf (file, "\n\n"); - } if (list_size(interface->classes) > 0) { fprintf (file, "/*======================================================================*/\n"); fprintf (file, "/*=================== object type declarations =========================*/\n\n"); --- 1080,1085 ---- *************** *** 1110,1115 **** --- 1104,1116 ---- list_enumerate (sorted, (iluparser_EnumProc) declareType, &context); fprintf (file, "\n\n"); } + + if (list_size(interface->constants) > 0) + { fprintf (file, "/*======================================================================*/\n"); + fprintf (file, "/*=========================== constants ================================*/\n\n"); + list_enumerate (interface->constants, (iluparser_EnumProc) declareConstant, &context); + fprintf (file, "\n\n"); + } if (list_size(interface->exceptions) > 0) { fprintf (file, "/*======================================================================*/\n");
*** 1.66 1997/01/07 00:47:01 --- stubbers/c/common.c 1997/03/01 00:26:08 *************** *** 188,199 **** TypeKind t = type_ur_kind(type); - /* typedefs don't have free routines; - * use the original type's instead. - */ - if (type->importInterfaceName != NULL) - return FALSE; - /* none of the primitive types have free routines; * check the constructed types. */ --- 188,193 ---- *************** *** 208,213 **** --- 202,208 ---- else if (t == array_Type) return NeedsFree(type_description(type)->structuredDes.array.type); else + /* primitive types don't have allocated values */ return FALSE; }
*** 1.37 1997/02/12 04:07:28 --- runtime/python/iluRt.py 1997/02/13 21:22:03 *************** *** 85,95 **** --- 85,107 ---- class IluRecord: + def __len__(self): + return len(self.__dict__) + def __getitem__(self, key): return self.__dict__[key] def __setitem__(self, key, val): self.__dict__[key] = val + + def keys(self): + return self.__dict__.keys() + + def values(self): + return self.__dict__.values() + + def items(self): + return self.__dict__.items() def __str__(self): return '<%s:%s>' % (self.__ilu_type_name__, self.__dict__)
*** 1.68 1996/07/02 03:48:36 --- runtime/kernel/type.c 1997/03/01 02:12:32 *************** *** 129,141 **** * for id to be registered. */ - static HashTable ifcErrors = NIL; - /* ifc name -> error table */ - - static HashTable corbaErrors = NIL; - /* corba rep -> NIL */ - static void _ilu_RegisterClass(ilu_Class class) { --- 138,144 ---- *************** *** 321,360 **** } ilu_Exception ! ilu_DefineException(char *i, char *e, ILU_ERRS((internal, no_memory)) * err) { - HashTable errtab; ilu_Exception ans; ! if (ifcErrors == NIL) ! ifcErrors = _ilu_hash_MakeNewTable(CLASS_HASHTABLESIZE, ! _ilu_hash_HashString, ! _ilu_hash_StringCompare); ! if (corbaErrors == NIL) ! corbaErrors = _ilu_hash_MakeNewTable(CLASS_HASHTABLESIZE, ! _ilu_hash_HashString, ! _ilu_hash_StringCompare); if (i == NIL) ! errtab = corbaErrors; else { ! errtab = (HashTable) _ilu_hash_FindInTable(ifcErrors, i); ! if (errtab == NIL) { ! errtab = _ilu_hash_MakeNewTable(CLASS_HASHTABLESIZE, ! _ilu_hash_HashString, ! _ilu_hash_StringCompare); ! _ilu_Assert((int) _ilu_hash_AddToTable(ifcErrors, i, errtab), ! "ifcErrors"); ! } } ! ans = (ilu_Exception) _ilu_hash_FindInTable(errtab, e); if (ans == NIL) { ! if (i == NIL) ! ans = _ilu_Strdup(e); ! else ! ans = _ilu_Strcat5("ilu:", i, ".", e, ""); ! _ilu_Assert((int) _ilu_hash_AddToTable(errtab, e, ans), "errtab"); } ILU_CLER(*err); return ans; } --- 326,367 ---- } ilu_Exception ! ilu_DefineException(char *i, char *e, ILU_ERRS((internal, no_memory)) * err) { ilu_Exception ans; ! char buf[1024]; ! char *key; ! ilu_cardinal keylen; ! static HashTable exceptions = NIL; /* exception_id_string => C ptr */ ! if (i == NIL) ! key = e; else { ! keylen = strlen(i) + strlen(e) + 7; ! if (keylen > sizeof(buf)) { ! key = ilu_MallocE(keylen, err); ! if (ILU_ERRNOK(*err)) return NIL; ! } else ! key = buf; ! sprintf (key, "ilu:%s.%s", i, e); } ! ! if (exceptions == NIL) ! exceptions = _ilu_hash_MakeNewTable(CLASS_HASHTABLESIZE, ! _ilu_hash_HashString, ! _ilu_hash_StringCompare); ! ! ans = (ilu_Exception) _ilu_hash_FindInTable(exceptions, key); if (ans == NIL) { ! ans = ilu_must_malloc(strlen(key) + 1); ! strcpy (ans, key); ! ! _ilu_Assert((int) _ilu_hash_AddToTable(exceptions, ans, ans), "errtab"); } ILU_CLER(*err); + if ((key != e) && (key != buf)) + ilu_free(key); return ans; }
*** 2.13 1997/02/03 22:41:25 --- stubbers/idl2isl/isl_be/be_gen_isl.cc 1997/03/04 00:21:56 *************** *** 81,86 **** --- 81,95 ---- } } + static + char * + be_strdup(char * s) { + char *n; + if (s == 0) return 0; + n = new char[strlen(s) + 1]; + strcpy(n, s); + return n; + } ////////////////////////////////////////////////////////////////////////////// *************** *** 397,403 **** for (; !iter.is_done(); iter.next()) { char *pragLine = iter.item()->get_string(); if (myCopy) delete myCopy; ! myCopy = strdup(pragLine); #if 0 o << "### need to do pragma for "; dcl->name()->dump(o); o << endl; #endif --- 406,412 ---- for (; !iter.is_done(); iter.next()) { char *pragLine = iter.item()->get_string(); if (myCopy) delete myCopy; ! myCopy = be_strdup(pragLine); #if 0 o << "### need to do pragma for "; dcl->name()->dump(o); o << endl; #endif *************** *** 441,447 **** char *pragLine = iter.item()->get_string(); if (!pragLine) continue; if (myCopy) delete myCopy; ! myCopy = strdup(pragLine); parsePragma(myCopy,&key, &val0, &val1); if (strcmp(key,"PREFIX_USE") == 0) { #if 0 --- 450,456 ---- char *pragLine = iter.item()->get_string(); if (!pragLine) continue; if (myCopy) delete myCopy; ! myCopy = be_strdup(pragLine); parsePragma(myCopy,&key, &val0, &val1); if (strcmp(key,"PREFIX_USE") == 0) { #if 0 *************** *** 495,501 **** char *pragLine = iter.item()->get_string(); if (!pragLine) continue; if (myCopy) delete myCopy; ! myCopy = strdup(pragLine); parsePragma(myCopy,&key, &val0, &val1); if (strcmp(key,"ID_USE") == 0) { o << " TYPEID \""; --- 504,510 ---- char *pragLine = iter.item()->get_string(); if (!pragLine) continue; if (myCopy) delete myCopy; ! myCopy = be_strdup(pragLine); parsePragma(myCopy,&key, &val0, &val1); if (strcmp(key,"ID_USE") == 0) { o << " TYPEID \""; *************** *** 2122,2127 **** --- 2131,2138 ---- // empty } + static AST_ConcreteType *union_discriminant = 0; + void be_union::gen_isl(ostream &o) { *************** *** 2131,2137 **** --- 2142,2150 ---- printTypeHeaderForDecl(o, this); genTypeNameForType(disc_type(), o); o << " UNION"; + union_discriminant = disc_type(); genIslForScope(this, this, o, "\n\t", ",\n\t"); + union_discriminant = 0; o << "\n\tEND"; if (needs_others_clause()) o << " OTHERS"; *************** *** 2228,2252 **** void be_union_branch::gen_isl(ostream &o) { ! printSimpleDeclName(o, this); ! o << " : "; ! genTypeNameForType(field_type(), o); ! o << " = "; ! if (labels()->contains_default_label()) ! o << "DEFAULT"; ! else ! { ! const long nLabels = labels()->cardinality(); ! ! for (int i = 0; i < nLabels; i++) ! { ! printConstantValue(o, ! labels()->get_element(i)->label_val()); ! if (i + 1 < nLabels) ! o << ", "; ! } ! o << " END"; } } void --- 2241,2272 ---- void be_union_branch::gen_isl(ostream &o) { ! printSimpleDeclName(o, this); ! o << " : "; ! genTypeNameForType(field_type(), o); ! o << " = "; ! if (labels()->contains_default_label()) ! o << "DEFAULT"; ! else ! { ! const long nLabels = labels()->cardinality(); ! ! for (int i = 0; i < nLabels; i++) ! { ! if (union_discriminant->node_type() == NT_enum) { ! char *name; ! name = be_strdup(labels()->get_element(i)->label_val()->n()->last_component()->get_string()); ! name = translatedName(name); ! o << name; ! delete name; ! } else { ! printConstantValue(o, labels()->get_element(i)->label_val()); ! } ! if (i + 1 < nLabels) ! o << ", "; } + o << " END"; + } } void
*** 1.99 1997/02/28 23:31:01 --- stubbers/c/cheaders.c 1997/03/08 00:39:54 *************** *** 691,725 **** fprintf (context->file, "typedef %s %s;\n", c_type_name(ur_type(t)), c_type_name(t)); } - static void typecodeType (Type t, Context context) - { - if (t->builtIn) - return; - if (t->importInterfaceName != NULL) - return; - - if (TypeIsJustAlias(t)) { - fprintf(context->file, "#define _%s__TypeCode _%s__TypeCode\n", - c_type_name(t), c_type_name(ur_type(t))); - fprintf (context->file, "#define TC_%s (& _%s__TypeCode )\n\n", - c_type_name(t), c_type_name(ur_type(t))); - } else if (TypeIsString(t)) { - fprintf(context->file, "#define _%s__TypeCode _ilu_CString__TypeCode\n", - c_type_name(t)); - fprintf (context->file, "#define TC_%s (& _ilu_CString__TypeCode )\n\n", - c_type_name(t)); - } else if (type_kind(t) == pickle_Type) { - fprintf(context->file, "#define _%s__TypeCode _CORBA_any__TypeCode\n", - c_type_name(t)); - fprintf (context->file, "#define TC_%s (& _CORBA_any__TypeCode )\n\n", - c_type_name(t)); - } else { - fprintf (context->file, "extern struct _ILU_C_TypeCode_s _%s__TypeCode;\n", c_type_name(t)); - fprintf (context->file, "#define TC_%s (& _%s__TypeCode )\n\n", - c_type_name(t), c_type_name(t)); - } - } - static void generateVariantTypedef (Type t, Context c) { if (type_kind(t) == pickle_Type) --- 691,696 ---- *************** *** 912,917 **** --- 883,891 ---- else fprintf (c->file, "extern struct _ILU_C_IoFnsRegistration_s _%s__IoFns;\n", c_type_name(t)); + + fprintf (c->file, "#define TC_%s (& _%s__IoFns)\n", + c_type_name(t), c_type_name(t)); } static void generateTypeIoProto (Type type, Context context) *************** *** 1138,1153 **** fprintf (file, "\n"); list_enumerate (interface->types, (iluparser_EnumProc) generateTypeIoProto, &context); list_enumerate (interface->classes, (iluparser_EnumProc) declareCClassJunk, &context); - - #ifdef ADD_VARIANT_SUPPORT - - fprintf (file, "/*======================================================================*/\n"); - fprintf (file, "/*========================= CORBA TypeCodes ============================*/\n\n"); - list_enumerate (sorted, (iluparser_EnumProc) typecodeType, &context); - fprintf (file, "\n\n"); - - #endif /* ADD_VARIANT_SUPPORT */ - fprintf (file, "\n"); fprintf (file, "extern void _%s__GeneralInitialization(void);\n\n", c_interface_name(interface)); fprintf (file, "#endif /* ifndef __%s_h_ */\n", c_interface_name(interface)); --- 1112,1117 ----
*** 2.0alpha9 Mon Mar 3 16:48:09 1997 --- stubbers/java/util.c Thu Mar 20 11:45:44 1997 *************** *** 197,203 **** return "null"; case char16_Type: case char8_Type: ! return "'\x00'"; case boolean_Type: return "false"; case object_Type: --- 197,203 ---- return "null"; case char16_Type: case char8_Type: ! return "\'\\u0000\'"; case boolean_Type: return "false"; case object_Type:
*** ilu-2.0alpha9 Fri Feb 7 17:59:36 1997 --- stubbers/java/genenum.c Thu Mar 20 11:46:46 1997 *************** *** 84,102 **** PUBLIC char * enm_ioSzPiece(Type t, const char *arg) { t = enm_assert(t); ! return cat3("_call.szInt32(", arg, ".__toInt())"); } PUBLIC char * enm_ioOutPiece(Type t, const char *arg) { t = enm_assert(t); ! return cat3("_call.outInt32(", arg, ".__toInt())"); } PUBLIC char * enm_ioInPiece(Type t) { t = enm_assert(t); ! return cat2(enmName(t), ".__fromInt(_call.inInt32())"); } --- 84,102 ---- PUBLIC char * enm_ioSzPiece(Type t, const char *arg) { t = enm_assert(t); ! return cat3("_call.szEnum(", arg, ".__toInt())"); } PUBLIC char * enm_ioOutPiece(Type t, const char *arg) { t = enm_assert(t); ! return cat3("_call.outEnum(", arg, ".__toInt())"); } PUBLIC char * enm_ioInPiece(Type t) { t = enm_assert(t); ! return cat2(enmName(t), ".__fromInt(_call.inEnum())"); }
*** 2.0alpha9 Fri Feb 7 18:01:29 1997 --- runtime/java/IluJava_IluClassRep.c Thu Mar 25 15:46:53 1997 *************** *** 93,99 **** if (_ilujava_definitionsFlag>0) { ilu_DebugPrintf("$ DefineClass %s sccnt: %d\n", className, sccnt); } ! cSuperClassArray = ilu_must_malloc(sccnt * sizeof(ilu_string)); for (sx = 0; sx < sccnt; sx++) { ilu_string sClassId; --- 93,99 ---- if (_ilujava_definitionsFlag>0) { ilu_DebugPrintf("$ DefineClass %s sccnt: %d\n", className, sccnt); } ! cSuperClassArray = ilu_must_malloc(sccnt * sizeof(ilu_string) + 1); for (sx = 0; sx < sccnt; sx++) { ilu_string sClassId; *************** *** 153,159 **** if (jExceptions) { exceptCnt = obj_length(jExceptions); cExceptionVec = ! ilu_must_malloc(exceptCnt * sizeof(ilu_Exception)); for (ex = 0; ex < exceptCnt; ex = ex+1) { struct Hxerox_ilu_IluExceptionRep* jExc; --- 153,159 ---- if (jExceptions) { exceptCnt = obj_length(jExceptions); cExceptionVec = ! ilu_must_malloc(exceptCnt * sizeof(ilu_Exception) + 1); for (ex = 0; ex < exceptCnt; ex = ex+1) { struct Hxerox_ilu_IluExceptionRep* jExc;
*** 2.0alpha9 Mon Mar 3 16:48:09 1997 --- stubbers/java/genobj.c Thu Mar 27 13:45:02 1997 *************** *** 960,966 **** printf("class _%s_Factory extends xerox.ilu.IluFactory {\n", otName); printf(" _%s_Factory() { };\n", otName); ! printf(" xerox.ilu.IluObject createSurrogateObject(Object _arg) {\n"); printf(" return new %s%s(_arg);\n", otName, ih->stubSuffix); printf(" }\n"); printf("} // _%s_Factory\n\n", otName); --- 960,966 ---- printf("class _%s_Factory extends xerox.ilu.IluFactory {\n", otName); printf(" _%s_Factory() { };\n", otName); ! printf(" public xerox.ilu.IluObject createSurrogateObject(Object _arg) {\n"); printf(" return new %s%s(_arg);\n", otName, ih->stubSuffix); printf(" }\n"); printf("} // _%s_Factory\n\n", otName);
*** 2.0alpha9 Fri Feb 7 18:01:27 1997 --- runtime/java/IluFactory.java Thu Mar 27 13:43:01 1997 *************** *** 29,33 **** */ public abstract class IluFactory { protected IluFactory(){}; ! abstract xerox.ilu.IluObject createSurrogateObject(Object arg); } --- 29,33 ---- */ public abstract class IluFactory { protected IluFactory(){}; ! public abstract xerox.ilu.IluObject createSurrogateObject(Object arg); }