<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I don't at this time want to write C a parser.<BR>
  (Actually I do, as part of an entire compiler, but...)<BR>
I'd rather run the one I already have -- the C compiler.<BR>
 <BR>
I briefly in the past dreamt that C programmers might start writing "xml" (schema?!) or "idl".<BR>
 <BR>
Oh, and you can't rely on headers being written in an easy to parse C subset.<BR>
There are inlines, #pragmas, compiler-specific extensions, etc.<BR>
Best just to use them as part of compiling C with the intended compiler.<BR>
 <BR>
Well, I have parsed C subsets actually..more than once.<BR>
One didn't really have to be very complete.<BR>
One "lived" with the headers and there was flexibility to fix the headers to suit.<BR>
 <BR>
 - Jay<BR><BR>> To: jay.krell@cornell.edu<BR>> Date: Mon, 12 Jan 2009 02:13:25 -0800<BR>> From: mika@async.caltech.edu<BR>> CC: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] declaring a type's existance but not enough to instantiate it?<BR>> <BR>> <BR>> I think you're misunderstanding me a bit. You don't need C either.<BR>> I would use a Lisp-based language for the "top level" just because<BR>> they are good at handling things like parse trees, if one gets to<BR>> that.<BR>> <BR>> The objectives are:<BR>> <BR>> * A finished system in Pure Modula-3 (no executable C)<BR>> <BR>> * Make it as self-contained as possible<BR>> <BR>> You'd start by simply bundling the existing headers with m3bundle<BR>> and printing them out. Then you'd find duplication (what you've<BR>> been doing) and express that programmatically. Then you might find<BR>> things that might conceivably change in the OS headers and use<BR>> whatever tricks were necessary to figure them out automatically.<BR>> Does this involve C? Maybe on some architecture it does, maybe on<BR>> another it doesn't. On some it might not involve running C but<BR>> merely parsing C headers. Perhaps the program is just hand-written<BR>> and just a way of distilling all the duplication into one place<BR>> where it can be clearly described and documented. Since this is a<BR>> Modula-3 distribution, obviously the program I'm talking about is<BR>> written in Modula-3, not in C or Perl or Python.<BR>> <BR>> Mika<BR>> <BR>> Jay writes:<BR>> >--_2e194b09-14b6-4301-9116-a9e4d1e522b4_<BR>> >Content-Type: text/plain; charset="iso-8859-1"<BR>> >Content-Transfer-Encoding: quoted-printable<BR>> ><BR>> ><BR>> >Yes=2C generating the headers is viable.<BR>> >I thought I mentioned that a few times.<BR>> >They could be generated in any build "that can". i.e. a native build=2C th=<BR>> >at has a working C development system and checked against the checked in o=<BR>> >nes.<BR>> > So then porting is: copy the generator to new system=2C run it=2C copy r=<BR>> >esults back=2C proceed=20<BR>> > Maybe a good compromise. Not good for "embedded systems"=2C but heck=2C i=<BR>> >s there any such thing any longer? Doesn't everything have megs of RAM and=<BR>> > gigs of persistant storage? :)<BR>> >You don't need Scheme.<BR>> >Just Quake + compiling and running C code.<BR>> >Assuming a native build system.<BR>> >I've done stuff in cross build systems like:<BR>> >typedef struct foo_t {int i=3B int j=3B } foo_t=3B<BR>> >extern const int xi =3D offsetof(foo_t=2C i)=3B<BR>> >=20<BR>> >compile that=2C and read the value of xi out of the .obj file.<BR>> >=20<BR>> > The .obj file reader was written in Perl. :)=20<BR>> > (Python not available.)<BR>> > but to do that here=2C I'd have to support multiple .obj file formats.<BR>> >=20<BR>> > - Jay> To: jay.krell@cornell.edu> Date: Mon=2C 12 Jan 2009 01:34:24 -0800>=<BR>> > From: mika@async.caltech.edu> CC: m3devel@elegosoft.com> Subject: Re: [M3d=<BR>> >evel] declaring a type's existance but not enough to instantiate it?> > > Y=<BR>> >ou present it as a true tragic Dilemma.> > But isn't there a Third Way---to=<BR>> > wit=2C can't you "Ask the Computer"> to do the work for you?> > Generate t=<BR>> >he code somehow... Parsing the C headers is an obvious> way but there may b=<BR>> >e others that are simpler=2C such as writing a> Modula-3 program to generat=<BR>> >e the cloned M3 headers=2C sorry=2C interfaces.> > If I had to do this I wo=<BR>> >uld use my Scheme interpreter that's coded> in Modula-3 to write a Scheme p=<BR>> >rogram to generate the headers. This> program could pull whatever tricks ar=<BR>> >e deemed necessary and suitable=2C> down to the point of generating and com=<BR>> >piling and running C programs> as necessary (or parsing C code=2C or readin=<BR>> >g tea leaves). But the> end result would be a set of interfaces written in =<BR>> >"Pure Modula-3".> The process of running the header generator would also ha=<BR>> >ve very> few dependencies on anything outside the M3 distribution.> > Mika>=<BR>> > > Jay writes:> >--_6117a048-9185-4c03-badb-ef8f93402268_> >Content-Type: t=<BR>> >ext/plain=3B charset=3D"iso-8859-1"> >Content-Transfer-Encoding: quoted-pri=<BR>> >ntable> >> >> >This is what you "have to" chose between.> >Header cloning o=<BR>> >r C code (and C headers).> >=3D20> >CONST or VAR (or functions?)> >=3D20> >=<BR>> >I'm going to likely make the Uerror change tonight.> >You can still veto it=<BR>> > (er=3D2C vote against it :) )> >=3D20> >Possibly some convuluted C (enum/#=<BR>> >undef)=3D2C or splitting the Modula-3> >at boundaries that weren't previous=<BR>> >ly believed "natural".> >(See how SetupHandlers is ~two lines in Modula-3 a=<BR>> >nd the rest in C=3D3B> >this is partly out of ignorance. I don't know how t=<BR>> >o write those> >two lines in C=3D3B and laziness=3D2C I didn't look into ho=<BR>> >w).> >=3D20> >=3D20> >=3D20> >Remember I'm still staying away from mainstre=<BR>> >am platforms=3D2C> >so the value isn't what it might appear to be=3D2C but =<BR>> >it is "stage setting"=3D> >=3D2C> >and the show might go on. :)> >=3D20> >=<BR>> >=3D20> >Also=3D2C the dilemna does get more difficult now=3D2C with the lit=<BR>> >tle C header=3D> > cloning that remains.> >=3D20> >For example=3D2C look at=<BR>> > Upthreads.i3.> >Mainly=3D2C look at function prototypes.> >Constants and t=<BR>> >ypes are "known problems".> >Prototypes are gray. They actually tend to be =<BR>> >portable.> >=3D20> >For example:> >=3D20> >TYPE pid_t =3D3D INTEGER=3D3B> >=<BR>> ><*EXTERNAL "m3_getpid*> PROCEDURE getpid():pid_t=3D3B> >=3D20> >or leave it=<BR>> > alone?> >getpid is probably the worst example.> >It is so very portable de=<BR>> >clared in Modula-3.> >But still=3D2C imagine pid_t might be 16bits or 32 or=<BR>> > 64.> >Writing a wrapper is more portable -- as long as the pid isn't stuff=<BR>> > into s=3D> >ome record that the system defines.> >=3D20> >=3D20> >Again=3D=<BR>> >2C Upthreads.i3.> >Would you like to see it reduced=3D2C or left alone?> >O=<BR>> >nly deal with the types and initializers=3D2C or also the prototypes?> >You=<BR>> > know=3D2C I could write a little portable layer=3D2C where all the types a=<BR>> >r=3D> >e pointers=3D2C always null initialized.> >It would buy /some/ porta=<BR>> >bility=3D2C and cost some.> >=3D20> >=3D20> >Do you like the sem_t change? =<BR>> >Partly? Not at all?> >There is one sem_t in the system. So I moved it to be=<BR>> > in C code.> >Or=3D2C as I had it before=3D2C declared as the max size/alig=<BR>> >n of all the platf=3D> >orms -- getting that right is the same work as gett=<BR>> >ing it right "the old wa=3D> >y"=3D2C except if you make a mistake=3D2C odd=<BR>> >s are still good of it being ok.> >=3D20> >=3D20> >Should the line be drawn=<BR>> > at generating the remaining headers=3D2C rather than=3D> > eliminating the=<BR>> >m?> >Uerror.i3 is easily generated. Good enough?> >=3D20> >Upthread.i3's ty=<BR>> >pes can be generated generally as records with opaque array=3D> >s with the=<BR>> > right size and alignment.> >=3D20> >Other stuff can be generated or at lea=<BR>> >st checked.> >e.g. to check that getpid is declared correctly=3D2C you can =<BR>> >assign it to a f=3D> >unction pointer and see if that compiles.> >=3D20> >P=<BR>> >erf on Uerror arguably doesn't matter.> >Is it only error handling code?Or =<BR>> >do sockets often go down "error" paths=3D2C=3D> > because they are slow and=<BR>> > you are waiting for more data?> >=3D20> >Anyway=3D2C point is=3D2C I agree=<BR>> > for sure this is valuable=3D2C but I might be h=3D> >itting the "tail" of =<BR>> >the approach and should switch=3D2C I'm not sure. I keep=3D> > saying that =<BR>> >though=3D2C and then press further.> >=3D20> >=3D20> > - Jay> >> >> >> >Fro=<BR>> >m: hosking@cs.purdue.eduTo: jay.krell@cornell.eduDate: Mon=3D2C 12 Jan 200=<BR>> >=3D> >9 19:24:50 +1100CC: m3devel@elegosoft.comSubject: Re: [M3devel] decla=<BR>> >ring a=3D> > type's existance but not enough to instantiate it?> >> >> >Poi=<BR>> >nt taken. We live in a C universe and so need to interact. I do think =3D> =<BR>> >>your work with the headers is useful=3D2C and I want it to continue. Espec=<BR>> >ia=3D> >lly in simplifying ports.> >> >> >On 12 Jan 2009=3D2C at 19:18=3D2C=<BR>> > Jay wrote:> >> >I don't think a development system without C headers is in=<BR>> >teresting.. Is it=3D> > really? The transform I apply at times is wherever =<BR>> >there is interaction wi=3D> >th C code that is described by system-dependen=<BR>> >t headers=3D2C or perhaps even =3D> >fairly system-independent headers outs=<BR>> >ide the Modula-3 tree=3D2C either write=3D> > wrapper functions for the fun=<BR>> >ctionality in the headers (e.g. stat=3D2C waitp=3D> >id)=3D2C which can be =<BR>> >done in a system-independent way=3D2C or move the Modula-=3D> >3<->C transi=<BR>> >tion higher=3D2C which is also usually system-independent=3D2C e.g.=3D> > T=<BR>> >hreadPThreadC_SetupHandlers. It is either that or clone the headers=3D2C wh=<BR>> >=3D> >ich seems like the worse evil. There is always going to be a Modula-3=<BR>> ><->C t=3D> >ransition=3D2C it is just a matter of where it occurs. - Jay> >=<BR>> >> >CC: m3devel@elegosoft.comFrom: hosking@cs.purdue.eduTo: jay.krell@cornel=<BR>> >l.e=3D> >duSubject: Re: [M3devel] declaring a type's existance but not enou=<BR>> >gh to ins=3D> >tantiate it?Date: Mon=3D2C 12 Jan 2009 12:32:15 +1100> >> >>=<BR>> > >Jay=3D2C I really think you are bending over backwards too far just to be=<BR>> > abl=3D> >e to shoe-horn things into C. I *like* having the transpar of C h=<BR>> >eader fil=3D> >es expressed in Modula-3=3D2C *particularly* for system call=<BR>> >s=3D2C where you mi=3D> >ght even be trying to build on a system that does =<BR>> >not have the C header fil=3D> >es installed=3D2C even though the libraries =<BR>> >exist and can be linked to. Fund=3D> >amentally=3D2C I think anytime the Mo=<BR>> >dula-3 code is made less transparent you=3D> > should think hard about what=<BR>> > you are doing. The same with the change of c=3D> >onstants to variables.> =<BR>> >>> >I am getting very nervous that the changes you are making are destroyin=<BR>> >g th=3D> >e clarity of the Modula-3 run-time code.> >> >In this particular =<BR>> >case=3D2C you are wanting to use a Modula-3 parameter pass=3D> >ing mechani=<BR>> >sm on something that is not declared in Modula-3. Seems kind of=3D> > dubio=<BR>> >us to me. Also=3D2C I really don't like the idea of accessing external=3D> =<BR>> >> variables in C.> >> >-- Tony> >> >On 12 Jan 2009=3D2C at 11:55=3D2C Jay w=<BR>> >rote:> >> >I considered ADDRESS.However I think it still doesn't satisfy. I=<BR>> > want to be=3D> > able to do this: TYPE Foo_t =3D3D something=3D3B<* EXTERN=<BR>> >AL *> VAR Foo1=3D2C Foo=3D> >2:Foo_t=3D3B<* EXTERNAL *> PROCEDURE UseFoo(RE=<BR>> >ADONLY (* or VAR *) foo:Foo_t)=3D> >=3D3B (* Modula-3=3D2C not external *)P=<BR>> >ROCEDURE x()=3D3DBEGIN UseFoo(Foo1)=3D3B U=3D> >seFoo(Foo2)=3D3BEND x=3D3B =<BR>> >AND I want any use of:VAR Foo3:Foo3_t=3D3B (* Modula-3=3D> >=3D2C not exter=<BR>> >nal *)to error. This is sem_t and sigset_t in particular. Poss=3D> >ibly re=<BR>> >naming is the thing.They used to be declared in Modula-3=3D2C system-d=3D> =<BR>> >>ependently=3D2C butI moved them to portable C. I could remove the types en=<BR>> >tir=3D> >ely and change UseFoo to take an address=3D2Cand declare mask and =<BR>> >ackSem to b=3D> >e integers or I guess.<*EXTERNAL> VAR ackSem : RECORD END=<BR>> >=3D3B That would sat=3D> >isfy but I thought it might be nicer to still pro=<BR>> >vide the namedtypes to ref=3D> >er to the external variables. - Jay> >> >Fr=<BR>> >om: hosking@cs.purdue.eduTo: jay.krell@cornell.eduDate: Mon=3D2C 12 Jan 200=<BR>> >=3D> >9 11:13:00 +1100CC: m3devel@elegosoft.comSubject: Re: [M3devel] decla=<BR>> >ring a=3D> > type's existance but not enough to instantiate it?What's wrong=<BR>> > with using =3D> >ADDRESS for references to opaque values? If sigset_t is n=<BR>> >ever instantiated=3D> > in Modula-3=3D2C then why do you need it declared t=<BR>> >here?> >> >> >> >Antony Hosking | Associate Professor | Computer Science | =<BR>> >Purdue University> >305 N. University Street | West Lafayette | IN 47907 | =<BR>> >USA> >Office +1 765 494 6001 | Mobile +1 765 427 5484> >> >> >On 12 Jan 200=<BR>> >9=3D2C at 01:44=3D2C Jay wrote:> >> >Is there a way in Modula-3 to declare =<BR>> >that a type exists=3D2C and there are <=3D> >*external*> instances of it=3D=<BR>> >2C without "fully" declaring it=3D2C so that no M=3D> >odula-3 can instanti=<BR>> >ate it? I have done this for sigset_t and sem_t=3D2C but =3D> >they could e=<BR>> >rroneously be instantiated by Modula-3 and I'd like to remove t=3D> >hat ab=<BR>> >ility to mess up so easily. (* This type is not declared correctly. I=3D> >=<BR>> >t is only instantiated in C code. *) sigset_t =3D3D RECORD END=3D3B(* This =<BR>> >typ=3D> >e is not declared correctly. It is only instantiated in C code. *)=<BR>> > sem_t =3D> >=3D3D RECORD END=3D3BIn C I believe you can do this=3D2C like:=<BR>> > typedef struct fo=3D> >o foo_t=3D3B extern foo_t foo=3D3B void UseFoo(foo_=<BR>> >t*)=3D3B foo_t* GetFoo=3D> >(void)=3D3B Thanks=3D2C - Jay=3D> >> >--_6117a0=<BR>> >48-9185-4c03-badb-ef8f93402268_> >Content-Type: text/html=3B charset=3D"iso=<BR>> >-8859-1"> >Content-Transfer-Encoding: quoted-printable> >> ><html>> ><head>=<BR>> >> ><style>> >.hmmessage P> >{> >margin:0px=3D3B> >padding:0px> >}> >body.hm=<BR>> >message> >{> >font-size: 10pt=3D3B> >font-family:Verdana> >}> ></style>> ><=<BR>> >/head>> ><body class=3D3D'hmmessage'>> >This is what you "have to" chose be=<BR>> >tween.<BR>> >Header cloning or C code (and C headers).<BR>> >&nbsp=3D3B<BR>=<BR>> >> >CONST or VAR (or functions?)<BR>> >&nbsp=3D3B<BR>> >I'm going to likely =<BR>> >make the Uerror change tonight.<BR>> >You can still veto it (er=3D2C vote a=<BR>> >gainst it :) )<BR>> >&nbsp=3D3B<BR>> >Possibly some convuluted C (enum/#und=<BR>> >ef)=3D2C or splitting the Modula-3<BR>> >at boundaries that weren't previou=<BR>> >sly believed "natural".<BR>> >(See how SetupHandlers is ~two lines in Modul=<BR>> >a-3 and the rest in C=3D3B<BR>> >this is partly out of ignorance. I don't k=<BR>> >now how to write those<BR>> >two lines in C=3D3B and laziness=3D2C I didn't=<BR>> > look into how).<BR>> >&nbsp=3D3B<BR>> >&nbsp=3D3B<BR>> >&nbsp=3D3B<BR>> >R=<BR>> >emember I'm still staying away from mainstream platforms=3D2C<BR>> >so the =<BR>> >value isn't what it might appear to be=3D2C but it is "stage setting"=3D> >=<BR>> >=3D2C<BR>> >and the show might go on. :)<BR>> >&nbsp=3D3B<BR>> >&nbsp=3D3B<=<BR>> >BR>> >Also=3D2C the dilemna does get more difficult now=3D2C with the littl=<BR>> >e C header=3D> > cloning that remains.<BR>> >&nbsp=3D3B<BR>> >For example=<BR>> >=3D2C look at Upthreads.i3.<BR>> >Mainly=3D2C look at function prototypes.<=<BR>> >BR>> >Constants and types are "known problems".<BR>> >Prototypes are gray. =<BR>> >They actually tend to be portable.<BR>> >&nbsp=3D3B<BR>> >For example:<BR>>=<BR>> > >&nbsp=3D3B<BR>> >TYPE pid_t =3D3D INTEGER=3D3B<BR>> >&lt=3D3B*EXTERNAL "m=<BR>> >3_getpid*&gt=3D3B PROCEDURE getpid():pid_t=3D3B<BR>> >&nbsp=3D3B<BR>> >or l=<BR>> >eave it alone?<BR>> >getpid is probably the worst example.<BR>> >It is so v=<BR>> >ery portable declared in Modula-3.<BR>> >But still=3D2C imagine pid_t might=<BR>> > be 16bits or 32 or 64.<BR>> >Writing a wrapper is more portable -- as long=<BR>> > as the pid isn't stuff into s=3D> >ome record that the system defines.<BR>=<BR>> >> >&nbsp=3D3B<BR>> >&nbsp=3D3B<BR>> >Again=3D2C Upthreads.i3.<BR>> >Would y=<BR>> >ou like to see it reduced=3D2C or left alone?<BR>> >Only deal with the type=<BR>> >s and initializers=3D2C or also the prototypes?<BR>> >You know=3D2C I could=<BR>> > write a little portable layer=3D2C where all the types ar=3D> >e pointers=<BR>> >=3D2C always null initialized.<BR>> >It would buy /some/ portability=3D2C a=<BR>> >nd cost some.<BR>> >&nbsp=3D3B<BR>> >&nbsp=3D3B<BR>> >Do you like the sem_t=<BR>> > change? Partly? Not at all?<BR>> >There is one sem_t in the system. So I m=<BR>> >oved it to be in C code.<BR>> >Or=3D2C as I had it before=3D2C declared as =<BR>> >the max size/align of all the platf=3D> >orms -- getting that right is the =<BR>> >same work as getting it right "the old wa=3D> >y"=3D2C except if you make a=<BR>> > mistake=3D2C odds are still good of it being ok.<B=3D> >R>> >&nbsp=3D3B<BR=<BR>> >>> >&nbsp=3D3B<BR>> >Should the line be drawn at generating the remaining h=<BR>> >eaders=3D2C rather than=3D> > eliminating them?<BR>> >Uerror.i3 is easily g=<BR>> >enerated. Good enough?<BR>> >&nbsp=3D3B<BR>> >Upthread.i3's types can be ge=<BR>> >nerated generally as records with opaque array=3D> >s with the right size a=<BR>> >nd alignment.<BR>> >&nbsp=3D3B<BR>> >Other stuff can be generated or at lea=<BR>> >st checked.<BR>> >e.g. to check that getpid is declared correctly=3D2C you =<BR>> >can assign it to a f=3D> >unction pointer and see if that compiles.<BR>> >&=<BR>> >nbsp=3D3B<BR>> >Perf on Uerror arguably doesn't matter.<BR>> >Is it only er=<BR>> >ror handling code?<BR>Or do sockets often go down "error" path=3D> >s=3D2C =<BR>> >because they are slow and you are waiting for more data?<BR>> >&nbsp=3D3B<B=<BR>> >R>> >Anyway=3D2C point is=3D2C I agree for sure this is valuable=3D2C but I=<BR>> > might be h=3D> >itting the "tail" of the approach and should switch=3D2C I=<BR>> >'m not sure. I keep=3D> > saying that though=3D2C and then press further.<B=<BR>> >R>> >&nbsp=3D3B<BR>> >&nbsp=3D3B<BR>> >&nbsp=3D3B- Jay<BR><BR>> >> ><HR id=<BR>> >=3D3DstopSpelling>> <BR>> >From: hosking@cs.purdue.edu<BR>To: jay.krell@cor=<BR>> >nell.edu<BR>Date: Mon=3D2C 12=3D> > Jan 2009 19:24:50 +1100<BR>CC: m3devel@=<BR>> >elegosoft.com<BR>Subject: Re: [M3de=3D> >vel] declaring a type's existance =<BR>> >but not enough to instantiate it?<BR><BR>=3D> ><BR>> ><DIV><SPAN class=3D3D=<BR>> >EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: =3D> >12px Helv=<BR>> >etica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-IN=<BR>> >D=3D> >ENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B B=<BR>> >ORDER-COLLAPS=3D> >E: separate">> ><DIV style=3D3D"WORD-WRAP: break-word"><=<BR>> >SPAN class=3D3DEC_Apple-style-span styl=3D> >e=3D3D"WORD-SPACING: 0px=3D3B =<BR>> >FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B C=3D> >OLOR: rgb(0=3D2C=<BR>> >0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-S=3D> >=<BR>> >PACING: normal=3D3B BORDER-COLLAPSE: separate"><SPAN class=3D3DEC_Apple-sty=<BR>> >le-s=3D> >pan style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B T=<BR>> >EXT-TRANSFORM: n=3D> >one=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: =<BR>> >0px=3D3B WHITE-SPACE: normal=3D3B =3D> >LETTER-SPACING: normal=3D3B BORDER-=<BR>> >COLLAPSE: separate"><SPAN class=3D3DEC_Apple=3D> >-style-span style=3D3D"WO=<BR>> >RD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRAN=3D> >SFORM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: no=<BR>> >=3D> >rmal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate"><SPA=<BR>> >N class=3D3D=3D> >EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FON=<BR>> >T: 12px Helvetica=3D3B T=3D> >EXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=<BR>> >=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-S=3D> >PACE: normal=3D3B LETTER-SP=<BR>> >ACING: normal=3D3B BORDER-COLLAPSE: separate"><SPAN =3D> >class=3D3DEC_Appl=<BR>> >e-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvet=3D> >ica=<BR>> >=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT:=<BR>> > 0px=3D3B=3D> > WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER=<BR>> >-COLLAPSE: separate=3D> >"><SPAN class=3D3DEC_Apple-style-span style=3D3D"W=<BR>> >ORD-SPACING: 0px=3D3B FONT: 12p=3D> >x Helvetica=3D3B TEXT-TRANSFORM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT=3D> >: 0px=3D3B WHITE-SPAC=<BR>> >E: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: =3D> >separate"=<BR>> >><SPAN class=3D3DEC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B F=3D=<BR>> >> >ONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D=<BR>> >2C0)=3D3B TEX=3D> >T-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACI=<BR>> >NG: normal=3D3B BORDER-CO=3D> >LLAPSE: separate"><SPAN class=3D3DEC_Apple-s=<BR>> >tyle-span style=3D3D"WORD-SPACING: =3D> >0px=3D3B FONT: 12px Helvetica=3D3B=<BR>> > TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0=3D> >)=3D3B TEXT-INDENT=<BR>> >: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B B=3D> >ORDE=<BR>> >R-COLLAPSE: separate">> ><DIV>Point taken. &nbsp=3D3BWe live in a C univers=<BR>> >e and so need to interact. =3D> >&nbsp=3D3BI do think your work with the he=<BR>> >aders is useful=3D2C and I want it to=3D> > continue. &nbsp=3D3BEspecially =<BR>> >in simplifying ports.</DIV>> ><DIV><BR></DIV></SPAN></SPAN></SPAN></SPAN></=<BR>> >SPAN></SPAN></SPAN></SPAN></DI=3D> >V></SPAN></DIV>> ><DIV>> ><DIV>On 12 Ja=<BR>> >n 2009=3D2C at 19:18=3D2C Jay wrote:</DIV><BR class=3D3DEC_Apple-int=3D> >e=<BR>> >rchange-newline>> ><BLOCKQUOTE><SPAN class=3D3DEC_Apple-style-span style=3D=<BR>> >3D"WORD-SPACING: 0px=3D3B=3D> > FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: n=<BR>> >one=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B T=3D> >EXT-INDENT: 0px=3D3B WHITE-S=<BR>> >PACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-=3D> >COLLAPSE: separa=<BR>> >te">> ><DIV class=3D3DEC_hmmessage style=3D3D"FONT-SIZE: 10pt=3D3B FONT-FAM=<BR>> >ILY: Verdana"=3D> >>I don't think a development system without C headers is=<BR>> > interesting.. Is i=3D> >t really?<BR>&nbsp=3D3B<BR>The transform I apply a=<BR>> >t times is wherever there i=3D> >s interaction with C code that is describe=<BR>> >d by system-dependent headers=3D2C =3D> >or perhaps even fairly system-inde=<BR>> >pendent headers outside the Modula-3 tree=3D> >=3D2C either write wrapper f=<BR>> >unctions for the functionality in the headers (e.=3D> >g. stat=3D2C waitpid=<BR>> >)=3D2C which&nbsp=3D3Bcan be done in a system-independent way=3D> >=3D2C&nb=<BR>> >sp=3D3Bor move the Modula-3&lt=3D3B-&gt=3D3BC transition higher=3D2C which =<BR>> >is=3D> > also usually system-independent=3D2C e.g. ThreadPThreadC_SetupHand=<BR>> >lers.<BR>&=3D> >nbsp=3D3B<BR>It is either that or clone the headers=3D2C wh=<BR>> >ich seems like the w=3D> >orse evil.<BR>&nbsp=3D3B<BR>There is always going=<BR>> > to be a Modula-3&lt=3D3B-&gt=3D> >=3D3BC transition=3D2C it is just a matt=<BR>> >er of where it occurs.<BR>&nbsp=3D3B<BR>&=3D> >nbsp=3D3B- Jay<BR><BR>> ><HR=<BR>> > id=3D3DEC_stopSpelling>> ><BR>CC:<SPAN class=3D3DEC_Apple-converted-space>=<BR>> >&nbsp=3D3B</SPAN><A href=3D3D"mai=3D> >lto:m3devel@elegosoft.com">m3devel@e=<BR>> >legosoft.com</A><BR>From:<SPAN class=3D3D=3D> >EC_Apple-converted-space>&nb=<BR>> >sp=3D3B</SPAN><A href=3D3D"mailto:hosking@cs.purdue=3D> >.edu">hosking@cs.p=<BR>> >urdue.edu</A><BR>To:<SPAN class=3D3DEC_Apple-converted-spac=3D> >e>&nbsp=3D=<BR>> >3B</SPAN><A href=3D3D"mailto:jay.krell@cornell.edu">jay.krell@cornell=3D> >=<BR>> >.edu</A><BR>Subject: Re: [M3devel] declaring a type's existance but not eno=<BR>> >=3D> >ugh to instantiate it?<BR>Date: Mon=3D2C 12 Jan 2009 12:32:15 +1100<B=<BR>> >R><BR><B=3D> >R>> <DIV><SPAN class=3D3DEC_EC_Apple-style-span style=3D3D"WO=<BR>> >RD-SPACING: 0px=3D3B FON=3D> >T: 12px Helvetica=3D3B TEXT-TRANSFORM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-=3D> >INDENT: 0px=3D3B WHITE-SPAC=<BR>> >E: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLL=3D> >APSE: separate"=<BR>> >>> ><DIV style=3D3D"WORD-WRAP: break-word"><SPAN class=3D3DEC_EC_Apple-styl=<BR>> >e-span s=3D> >tyle=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TE=<BR>> >XT-TRANSFORM: none=3D> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0=<BR>> >px=3D3B WHITE-SPACE: normal=3D3B LET=3D> >TER-SPACING: normal=3D3B BORDER-C=<BR>> >OLLAPSE: separate"><SPAN class=3D3DEC_EC_Apple=3D> >-style-span style=3D3D"=<BR>> >WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRAN=3D> >SFORM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: no=<BR>> >=3D> >rmal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate"><SPA=<BR>> >N class=3D3D=3D> >EC_EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B =<BR>> >FONT: 12px Helvetica=3D> >=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C=<BR>> >0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WH=3D> >ITE-SPACE: normal=3D3B LETTER-S=<BR>> >PACING: normal=3D3B BORDER-COLLAPSE: separate"><=3D> >SPAN class=3D3DEC_EC_=<BR>> >Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12p=3D> >x Helveti=<BR>> >ca=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDEN=<BR>> >T=3D> >: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORD=<BR>> >ER-COLLAPSE: =3D> >separate"><SPAN class=3D3DEC_EC_Apple-style-span style=<BR>> >=3D3D"WORD-SPACING: 0px=3D> >=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM=<BR>> >: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D> >=3D3B TEXT-INDENT: 0px=3D3B WHIT=<BR>> >E-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BO=3D> >RDER-COLLAPSE: sep=<BR>> >arate"><SPAN class=3D3DEC_EC_Apple-style-span style=3D3D"WORD=3D> >-SPACING=<BR>> >: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb=<BR>> >=3D> >(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B L=<BR>> >ETTER-SPACING: n=3D> >ormal=3D3B BORDER-COLLAPSE: separate"><SPAN class=3D3=<BR>> >DEC_EC_Apple-style-span st=3D> >yle=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px =<BR>> >Helvetica=3D3B TEXT-TRANSFORM: none=3D3B=3D> > COLOR: rgb(0=3D2C0=3D2C0)=3D=<BR>> >3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER=3D> >-SPACING: nor=<BR>> >mal=3D3B BORDER-COLLAPSE: separate"><SPAN class=3D3DEC_EC_Apple-st=3D> >yle=<BR>> >-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRAN=<BR>> >SFO=3D> >RM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B=<BR>> > WHITE-SPACE: norma=3D> >l=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE=<BR>> >: separate">> ><DIV>Jay=3D2C I really think you are bending over backwards =<BR>> >too far just to b=3D> >e able to shoe-horn things into C. &nbsp=3D3BI *like=<BR>> >* having the transpar of =3D> >C header files expressed in Modula-3=3D2C *p=<BR>> >articularly* for system calls=3D2C =3D> >where you might even be trying to =<BR>> >build on a system that does not have the =3D> >C header files installed=3D2=<BR>> >C even though the libraries exist and can be link=3D> >ed to. &nbsp=3D3BFun=<BR>> >damentally=3D2C I think anytime the Modula-3 code is made l=3D> >ess transp=<BR>> >arent you should think hard about what you are doing. &nbsp=3D3BThe=3D> > s=<BR>> >ame with the change of constants to variables.</DIV>> ><DIV><BR></DIV>> ><D=<BR>> >IV>I am getting very nervous that the changes you are making are destroyi=<BR>> >=3D> >ng the clarity of the Modula-3 run-time code.</DIV>> ><DIV><BR></DIV>=<BR>> >> ><DIV>In this particular case=3D2C you are wanting to use a Modula-3 para=<BR>> >meter=3D> > passing mechanism on something that is not declared in Modula-3=<BR>> >. &nbsp=3D3BS=3D> >eems kind of dubious to me. &nbsp=3D3BAlso=3D2C I really=<BR>> > don't like the idea of=3D> > accessing external variables in C.</DIV>> ><D=<BR>> >IV><BR></DIV>> ><DIV>-- Tony</DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN=<BR>> >></SPAN></SPAN><=3D> >/DIV></SPAN></DIV><BR>> ><DIV>> ><DIV>On 12 Jan 2009=<BR>> >=3D2C at 11:55=3D2C Jay wrote:</DIV><BR class=3D3DEC_EC_Apple-=3D> >interch=<BR>> >ange-newline>> ><BLOCKQUOTE><SPAN class=3D3DEC_EC_Apple-style-span style=3D=<BR>> >3D"WORD-SPACING: 0px=3D> >=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: n=<BR>> >one=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D> >=3D3B TEXT-INDENT: 0px=3D3B WHITE-S=<BR>> >PACE: normal=3D3B LETTER-SPACING: normal=3D3B BO=3D> >RDER-COLLAPSE: separa=<BR>> >te">> ><DIV class=3D3DEC_EC_hmmessage style=3D3D"FONT-SIZE: 10pt=3D3B FONT-=<BR>> >FAMILY: Verda=3D> >na">I considered ADDRESS.<BR>However I think it still do=<BR>> >esn't satisfy.<BR>&=3D> >nbsp=3D3B<BR>I want to be able to do this:<BR>&nbs=<BR>> >p=3D3B<BR>TYPE&nbsp=3D3BFoo_t =3D> >=3D3D something=3D3B<BR>&lt=3D3B* EXTER=<BR>> >NAL *&gt=3D3B VAR Foo1=3D2C Foo2:Foo_t=3D3B<BR>&=3D> >lt=3D3B* EXTERNAL *&g=<BR>> >t=3D3B PROCEDURE&nbsp=3D3BUseFoo(READONLY (* or VAR *) foo:F=3D> >oo_t)=3D3=<BR>> >B<BR>&nbsp=3D3B<BR>(* Modula-3=3D2C not external *)<BR>PROCEDURE x()=3D3D<=<BR>> >=3D> >BR>BEGIN<BR>&nbsp=3D3B UseFoo(Foo1)=3D3B<BR>&nbsp=3D3B UseFoo(Foo2)=<BR>> >=3D3B<BR>END x=3D> >=3D3B<BR>&nbsp=3D3B<BR>AND I want any use of:<BR>VAR Fo=<BR>> >o3:Foo3_t=3D3B (* Modula-3=3D> >=3D2C not external *)<BR><BR>to error. This=<BR>> > is sem_t and sigset_t in particul=3D> >ar.<BR>&nbsp=3D3B<BR>Possibly renam=<BR>> >ing is the thing.<BR>They used to be decla=3D> >red in Modula-3=3D2C system=<BR>> >-dependently=3D2C but<BR>I moved them to portable C.=3D> ><BR>&nbsp=3D3B<BR=<BR>> >>I could remove the types entirely and change UseFoo to take=3D> > an addre=<BR>> >ss=3D2C<BR>and declare mask and ackSem to be integers or I guess.<BR=3D> >>=<BR>> >&lt=3D3B*EXTERNAL&gt=3D3B VAR ackSem&nbsp=3D3B: RECORD END=3D3B<BR>&nbsp=3D=<BR>> >3B<BR>Tha=3D> >t would satisfy but I thought it might be nicer to still pro=<BR>> >vide the named<=3D> >BR>types to refer to the external variables.<BR>&nbsp=<BR>> >=3D3B<BR>&nbsp=3D3B- Jay<B=3D> >R><BR>> ><HR id=3D3DEC_EC_stopSpelling>> ><=<BR>> >BR>From:<SPAN class=3D3DEC_EC_Apple-converted-space>&nbsp=3D3B</SPAN><A hre=<BR>> >f=3D> >=3D3D"mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>To:=<BR>> ><SPAN cla=3D> >ss=3D3DEC_EC_Apple-converted-space>&nbsp=3D3B</SPAN><A href=<BR>> >=3D3D"mailto:jay.krell=3D> >@cornell.edu">jay.krell@cornell.edu</A><BR>Date=<BR>> >: Mon=3D2C 12 Jan 2009 11:13:0=3D> >0 +1100<BR>CC:<SPAN class=3D3DEC_EC_App=<BR>> >le-converted-space>&nbsp=3D3B</SPAN><A h=3D> >ref=3D3D"mailto:m3devel@elego=<BR>> >soft.com">m3devel@elegosoft.com</A><BR>Subject: =3D> >Re: [M3devel] declari=<BR>> >ng a type's existance but not enough to instantiate it=3D> >?<BR><BR>What's=<BR>> > wrong with using ADDRESS for references to opaque values? &=3D> >nbsp=3D3B=<BR>> >If sigset_t is never instantiated in Modula-3=3D2C then why do you nee=3D> =<BR>> >>d it declared there?<BR>> ><DIV><BR>> ><DIV><SPAN class=3D3DEC_EC_EC_Apple=<BR>> >-style-span style=3D3D"WORD-SPACING: 0px=3D3B =3D> >FONT: 12px Helvetica=3D=<BR>> >3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TE=3D> >XT-INDE=<BR>> >NT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-C=<BR>> >=3D> >OLLAPSE: separate">> ><DIV style=3D3D"WORD-WRAP: break-word"><SPAN cl=<BR>> >ass=3D3DEC_EC_EC_Apple-style-spa=3D> >n style=3D3D"WORD-SPACING: 0px=3D3B F=<BR>> >ONT: 12px Helvetica=3D3B TEXT-TRANSFORM: non=3D> >e=3D3B COLOR: rgb(0=3D2C0=<BR>> >=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LE=3D> >TTER-SP=<BR>> >ACING: normal=3D3B BORDER-COLLAPSE: separate"><SPAN class=3D3DEC_EC_EC_A=3D=<BR>> >> >pple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=<BR>> >=3D3B TEXT-=3D> >TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-I=<BR>> >NDENT: 0px=3D3B WHITE-SPACE=3D> >: normal=3D3B LETTER-SPACING: normal=3D3B =<BR>> >BORDER-COLLAPSE: separate"><SPAN clas=3D> >s=3D3DEC_EC_EC_Apple-style-span =<BR>> >style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helv=3D> >etica=3D3B TEXT-TRAN=<BR>> >SFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D> >=3D3B=<BR>> > WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: sepa=<BR>> >r=3D> >ate"><SPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACI=<BR>> >NG: 0px=3D3B =3D> >FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLO=<BR>> >R: rgb(0=3D2C0=3D2C0)=3D3B TE=3D> >XT-INDENT: 0px=3D3B WHITE-SPACE: normal=<BR>> >=3D3B LETTER-SPACING: normal=3D3B BORDER-C=3D> >OLLAPSE: separate"><SPAN cl=<BR>> >ass=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SP=3D> >ACING: 0px=3D3B F=<BR>> >ONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D> >=3D2C0=<BR>> >=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING:=<BR>> > nor=3D> >mal=3D3B BORDER-COLLAPSE: separate"><SPAN class=3D3DEC_EC_EC_Appl=<BR>> >e-style-span s=3D> >tyle=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=<BR>> >=3D3B TEXT-TRANSFORM: none=3D> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-I=<BR>> >NDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LET=3D> >TER-SPACING: normal=3D3B =<BR>> >BORDER-COLLAPSE: separate"><SPAN class=3D3DEC_EC_EC_Ap=3D> >ple-style-span =<BR>> >style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-T=3D> >RAN=<BR>> >SFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE=<BR>> >-SPACE:=3D> > normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: sepa=<BR>> >rate"><SPAN class=3D> >=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACI=<BR>> >NG: 0px=3D3B FONT: 12px Helve=3D> >tica=3D3B TEXT-TRANSFORM: none=3D3B COLO=<BR>> >R: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D> >=3D3B WHITE-SPACE: normal=<BR>> >=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separ=3D> >ate">> ><DIV>=<BR>> ><FONT class=3D3DEC_EC_EC_Apple-style-span color=3D3D#0000ff><FONT class=3D3=<BR>> >D=3D> >EC_EC_EC_Apple-style-span face=3D3D"Gill Sans"><SPAN class=3D3DEC_EC=<BR>> >_EC_Apple-s=3D> >tyle-span style=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=3D3B FONT=<BR>> >-FAMILY: 'Gill Sans'"><SP=3D> >AN class=3D3DEC_EC_EC_Apple-style-span style=<BR>> >=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=3D3B FO=3D> >NT-FAMILY: 'Gill Sans'">Anto=<BR>> >ny Hosking</SPAN></SPAN></FONT></FONT><FONT cla=3D> >ss=3D3DEC_EC_EC_Apple-=<BR>> >style-span face=3D3D"Gill Sans"><SPAN class=3D3DEC_EC_EC_Ap=3D> >ple-style-=<BR>> >span style=3D3D"FONT-FAMILY: 'Gill Sans'"><SPAN class=3D3DEC_EC_EC_Ap=3D> >=<BR>> >ple-style-span style=3D3D"FONT-FAMILY: 'Gill Sans'"><SPAN class=3D3DEC_EC_A=<BR>> >pple=3D> >-converted-space>&nbsp=3D3B</SPAN>|<SPAN class=3D3DEC_EC_Apple-co=<BR>> >nverted-space>=3D> >&nbsp=3D3B</SPAN></SPAN></SPAN><SPAN class=3D3DEC_EC_EC=<BR>> >_Apple-style-span style=3D> >=3D3D"FONT-FAMILY: 'Gill Sans'"><SPAN class=3D=<BR>> >3DEC_EC_EC_Apple-style-span style=3D> >=3D3D"FONT-FAMILY: 'Gill Sans'">Asso=<BR>> >ciate Professor</SPAN></SPAN><SPAN class=3D> >=3D3DEC_EC_EC_Apple-style-spa=<BR>> >n style=3D3D"FONT-FAMILY: 'Gill Sans'"><SPAN class=3D> >=3D3DEC_EC_EC_Apple=<BR>> >-style-span style=3D3D"FONT-FAMILY: 'Gill Sans'">&nbsp=3D3B| C=3D> >omputer=<BR>> > Science | Purdue University</SPAN></SPAN></FONT></DIV>> ><DIV><FONT class=<BR>> >=3D3DEC_EC_EC_Apple-style-span face=3D3DGillSans-Light><SPAN cl=3D> >ass=3D=<BR>> >3DEC_EC_EC_Apple-style-span style=3D3D"FONT-FAMILY: GillSans-Light">305 N=<BR>> >=3D> >. University Street | West Lafayette | IN 47907 | USA</SPAN></FONT></=<BR>> >DIV>> ><DIV><FONT class=3D3DEC_EC_EC_Apple-style-span face=3D3D"Gill Sans" =<BR>> >color=3D3D#00=3D> >00ff><SPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3=<BR>> >D"COLOR: rgb(0=3D2C0=3D2C25=3D> >5)=3D3B FONT-FAMILY: 'Gill Sans'"><SPAN cl=<BR>> >ass=3D3DEC_EC_EC_Apple-style-span sty=3D> >le=3D3D"COLOR: rgb(0=3D2C0=3D2C2=<BR>> >55)=3D3B FONT-FAMILY: 'Gill Sans'">Office</SPAN></S=3D> >PAN></FONT><FONT c=<BR>> >lass=3D3DEC_EC_EC_Apple-style-span face=3D3DGillSans-Light><S=3D> >PAN clas=<BR>> >s=3D3DEC_EC_EC_Apple-style-span style=3D3D"FONT-FAMILY: GillSans-Light"=3D>=<BR>> > >><SPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"FONT-FAMILY: GillSa=<BR>> >ns-Lig=3D> >ht">&nbsp=3D3B+1 765 494 6001 |<SPAN class=3D3DEC_EC_Apple-conv=<BR>> >erted-space>&nbs=3D> >p=3D3B</SPAN></SPAN></SPAN></FONT><FONT class=3D3DEC_=<BR>> >EC_EC_Apple-style-span fac=3D> >e=3D3D"Gill Sans" color=3D3D#0000ff><SPAN c=<BR>> >lass=3D3DEC_EC_EC_Apple-style-span sty=3D> >le=3D3D"COLOR: rgb(0=3D2C0=3D2C=<BR>> >255)=3D3B FONT-FAMILY: 'Gill Sans'"><SPAN class=3D3DEC=3D> >_EC_EC_Apple-st=<BR>> >yle-span style=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=3D3B FONT-FAMILY: 'G=3D> >i=<BR>> >ll Sans'">Mobile</SPAN></SPAN></FONT><FONT class=3D3DEC_EC_EC_Apple-style-s=<BR>> >p=3D> >an face=3D3DGillSans-Light><SPAN class=3D3DEC_EC_EC_Apple-style-span=<BR>> > style=3D3D"F=3D> >ONT-FAMILY: GillSans-Light"><SPAN class=3D3DEC_EC_EC_App=<BR>> >le-style-span style=3D> >=3D3D"FONT-FAMILY: GillSans-Light"><SPAN class=3D3=<BR>> >DEC_EC_Apple-converted-space>=3D> >&nbsp=3D3B</SPAN>+1 765 427 5484</SPAN><=<BR>> >/SPAN></FONT></DIV>> ><DIV><FONT class=3D3DEC_EC_EC_Apple-style-span face=<BR>> >=3D3DGillSans-Light><BR clas=3D> >s=3D3DEC_EC_EC_khtml-block-placeholder></=<BR>> >FONT></DIV></SPAN></SPAN></SPAN></SP=3D> >AN></SPAN></SPAN></SPAN><BR class=<BR>> >=3D3DEC_EC_EC_Apple-interchange-newline></SP=3D> >AN></DIV></SPAN></DIV><BR=<BR>> >>> ><DIV>> ><DIV>On 12 Jan 2009=3D2C at 01:44=3D2C Jay wrote:</DIV><BR clas=<BR>> >s=3D3DEC_EC_EC_App=3D> >le-interchange-newline>> ><BLOCKQUOTE><SPAN class=<BR>> >=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACING: =3D> >0px=3D3B FONT=<BR>> >: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0=3D=<BR>> >> >)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: no=<BR>> >rmal=3D3B B=3D> >ORDER-COLLAPSE: separate">> ><DIV class=3D3DEC_EC_EC_hmmes=<BR>> >sage style=3D3D"FONT-SIZE: 10pt=3D3B FONT-FAMILY: Ve=3D> >rdana">Is there a=<BR>> > way in Modula-3 to declare that&nbsp=3D3Ba type exists=3D2C a=3D> >nd ther=<BR>> >e are &lt=3D3B*external*&gt=3D3B instances of it=3D2C without "fully" decl=<BR>> >=3D> >aring it=3D2C so that no Modula-3 can instantiate it?<BR>&nbsp=3D3B<B=<BR>> >R>I have d=3D> >one this for sigset_t and sem_t=3D2C but they could erroneo=<BR>> >usly be instantiat=3D> >ed by Modula-3 and I'd like to remove that ability =<BR>> >to mess up so easily.<BR=3D> >>&nbsp=3D3B<BR>(* This type is not declared c=<BR>> >orrectly. It is only instantiate=3D> >d in C code. *)<BR>&nbsp=3D3B sigset_=<BR>> >t =3D3D RECORD END=3D3B<BR><BR>(* This type =3D> >is not declared correctly=<BR>> >. It is only instantiated in C code. *)<BR>&nbsp=3D> >=3D3B sem_t =3D3D REC=<BR>> >ORD END=3D3B<BR><BR>In C I believe you can do this=3D2C like:<=3D> >BR>&nbs=<BR>> >p=3D3B&nbsp=3D3Btypedef struct foo foo_t=3D3B&nbsp=3D3B<SPAN class=3D3DEC_E=<BR>> >C_E=3D> >C_Apple-converted-space>&nbsp=3D3B</SPAN><BR>&nbsp=3D3B&nbsp=3D3Be=<BR>> >xtern foo_t foo=3D> >=3D3B&nbsp=3D3B<SPAN class=3D3DEC_EC_EC_Apple-converte=<BR>> >d-space>&nbsp=3D3B</SPAN><BR>=3D> >&nbsp=3D3B<BR>&nbsp=3D3Bvoid UseFoo(foo_=<BR>> >t*)=3D3B<SPAN class=3D3DEC_EC_EC_Apple-conv=3D> >erted-space>&nbsp=3D3B</SP=<BR>> >AN><BR>&nbsp=3D3B foo_t* GetFoo(void)=3D3B<SPAN class=3D> >=3D3DEC_EC_EC_Ap=<BR>> >ple-converted-space>&nbsp=3D3B</SPAN><BR>&nbsp=3D3B<BR>Thanks=3D2C<=3D> >BR=<BR>> >>&nbsp=3D3B- Jay<BR><BR><BR><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR></DIV><=<BR>> >=3D> >/DIV></SPAN><BR class=3D3DEC_EC_Apple-interchange-newline></BLOCKQUOT=<BR>> >E></DIV>=3D> ><BR></DIV></SPAN><BR class=3D3DEC_Apple-interchange-newline><=<BR>> >/BLOCKQUOTE></DI=3D> >V><BR></body>> ></html>=3D> >> >--_6117a048-9185-4c03=<BR>> >-badb-ef8f93402268_--=<BR>> ><BR>> >--_2e194b09-14b6-4301-9116-a9e4d1e522b4_<BR>> >Content-Type: text/html; charset="iso-8859-1"<BR>> >Content-Transfer-Encoding: quoted-printable<BR>> ><BR>> ><html><BR>> ><head><BR>> ><style><BR>> >.hmmessage P<BR>> >{<BR>> >margin:0px=3B<BR>> >padding:0px<BR>> >}<BR>> >body.hmmessage<BR>> >{<BR>> >font-size: 10pt=3B<BR>> >font-family:Verdana<BR>> >}<BR>> ></style><BR>> ></head><BR>> ><body class=3D'hmmessage'><BR>> >Yes=2C generating the headers is viable.<BR><BR>> >I thought I mentioned that a few times.<BR><BR>> They could be generated in any build "that can".<BR>&nbsp=3B i.e. a native =<BR>> >build=2C that has a working C development system<BR>&nbsp=3B and checked ag=<BR>> >ainst the checked in ones.<BR><BR>> >&nbsp=3BSo then porting is: <BR>&nbsp=3B copy the generator to new system=<BR>> >=2C run it=2C copy results back=2C proceed <BR><BR>> ><BR>&nbsp=3BMaybe a good compromise. <BR>&nbsp=3BNot good for "embedded sys=<BR>> >tems"=2C but heck=2C is there any such thing<BR>&nbsp=3B any longer? Doesn'=<BR>> >t everything have megs of RAM and gigs of persistant storage? :)<BR><BR>> ><BR>You don't need&nbsp=3BScheme.<BR><BR>> >Just Quake&nbsp=3B+ compiling and running C code.<BR><BR>> >Assuming a native build system.<BR><BR>> >I've done stuff in cross build systems like:<BR><BR>> >typedef struct foo_t {int i=3B int j=3B } foo_t=3B<BR><BR>> >extern const int xi =3D offsetof(foo_t=2C i)=3B<BR><BR>> >&nbsp=3B<BR><BR>> >compile that=2C and read the value of xi out of the .obj file.<BR><BR>> >&nbsp=3B<BR><BR>> >&nbsp=3BThe .obj file reader was written in Perl. :) <BR><BR>> >&nbsp=3B (Python not available.)<BR><BR>> >&nbsp=3Bbut to do that here=2C I'd have to support multiple .obj file forma=<BR>> >ts.<BR><BR>> >&nbsp=3B<BR><BR>> >&nbsp=3B- Jay<BR><BR>&gt=3B To: jay.krell@cornell.edu<BR>&gt=3B Date: Mon=<BR>> >=2C 12 Jan 2009 01:34:24 -0800<BR>&gt=3B From: mika@async.caltech.edu<BR>&g=<BR>> >t=3B CC: m3devel@elegosoft.com<BR>&gt=3B Subject: Re: [M3devel] declaring a=<BR>> > type's existance but not enough to instantiate it?<BR>&gt=3B <BR>&gt=3B <B=<BR>> >R>&gt=3B You present it as a true tragic Dilemma.<BR>&gt=3B <BR>&gt=3B But =<BR>> >isn't there a Third Way---to wit=2C can't you "Ask the Computer"<BR>&gt=3B =<BR>> >to do the work for you?<BR>&gt=3B <BR>&gt=3B Generate the code somehow... P=<BR>> >arsing the C headers is an obvious<BR>&gt=3B way but there may be others th=<BR>> >at are simpler=2C such as writing a<BR>&gt=3B Modula-3 program to generate =<BR>> >the cloned M3 headers=2C sorry=2C interfaces.<BR>&gt=3B <BR>&gt=3B If I had=<BR>> > to do this I would use my Scheme interpreter that's coded<BR>&gt=3B in Mod=<BR>> >ula-3 to write a Scheme program to generate the headers. This<BR>&gt=3B pro=<BR>> >gram could pull whatever tricks are deemed necessary and suitable=2C<BR>&gt=<BR>> >=3B down to the point of generating and compiling and running C programs<BR=<BR>> >>&gt=3B as necessary (or parsing C code=2C or reading tea leaves). But the<=<BR>> >BR>&gt=3B end result would be a set of interfaces written in "Pure Modula-3=<BR>> >".<BR>&gt=3B The process of running the header generator would also have ve=<BR>> >ry<BR>&gt=3B few dependencies on anything outside the M3 distribution.<BR>&=<BR>> >gt=3B <BR>&gt=3B Mika<BR>&gt=3B <BR>&gt=3B Jay writes:<BR>&gt=3B &gt=3B--_6=<BR>> >117a048-9185-4c03-badb-ef8f93402268_<BR>&gt=3B &gt=3BContent-Type: text/pla=<BR>> >in=3B charset=3D"iso-8859-1"<BR>&gt=3B &gt=3BContent-Transfer-Encoding: quo=<BR>> >ted-printable<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BThis is wha=<BR>> >t you "have to" chose between.<BR>&gt=3B &gt=3BHeader cloning or C code (an=<BR>> >d C headers).<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BCONST or VAR (or functi=<BR>> >ons?)<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BI'm going to likely make the Ue=<BR>> >rror change tonight.<BR>&gt=3B &gt=3BYou can still veto it (er=3D2C vote ag=<BR>> >ainst it :) )<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BPossibly some convulute=<BR>> >d C (enum/#undef)=3D2C or splitting the Modula-3<BR>&gt=3B &gt=3Bat boundar=<BR>> >ies that weren't previously believed "natural".<BR>&gt=3B &gt=3B(See how Se=<BR>> >tupHandlers is ~two lines in Modula-3 and the rest in C=3D3B<BR>&gt=3B &gt=<BR>> >=3Bthis is partly out of ignorance. I don't know how to write those<BR>&gt=<BR>> >=3B &gt=3Btwo lines in C=3D3B and laziness=3D2C I didn't look into how).<BR=<BR>> >>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &=<BR>> >gt=3BRemember I'm still staying away from mainstream platforms=3D2C<BR>&gt=<BR>> >=3B &gt=3Bso the value isn't what it might appear to be=3D2C but it is "sta=<BR>> >ge setting"=3D<BR>&gt=3B &gt=3B=3D2C<BR>&gt=3B &gt=3Band the show might go =<BR>> >on. :)<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BAlso=3D2=<BR>> >C the dilemna does get more difficult now=3D2C with the little C header=3D<=<BR>> >BR>&gt=3B &gt=3B cloning that remains.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=<BR>> >=3BFor example=3D2C look at Upthreads.i3.<BR>&gt=3B &gt=3BMainly=3D2C look =<BR>> >at function prototypes.<BR>&gt=3B &gt=3BConstants and types are "known prob=<BR>> >lems".<BR>&gt=3B &gt=3BPrototypes are gray. They actually tend to be portab=<BR>> >le.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BFor example:<BR>&gt=3B &gt=3B=3D2=<BR>> >0<BR>&gt=3B &gt=3BTYPE pid_t =3D3D INTEGER=3D3B<BR>&gt=3B &gt=3B&lt=3B*EXTE=<BR>> >RNAL "m3_getpid*&gt=3B PROCEDURE getpid():pid_t=3D3B<BR>&gt=3B &gt=3B=3D20<=<BR>> >BR>&gt=3B &gt=3Bor leave it alone?<BR>&gt=3B &gt=3Bgetpid is probably the w=<BR>> >orst example.<BR>&gt=3B &gt=3BIt is so very portable declared in Modula-3.<=<BR>> >BR>&gt=3B &gt=3BBut still=3D2C imagine pid_t might be 16bits or 32 or 64.<B=<BR>> >R>&gt=3B &gt=3BWriting a wrapper is more portable -- as long as the pid isn=<BR>> >'t stuff into s=3D<BR>&gt=3B &gt=3Bome record that the system defines.<BR>&=<BR>> >gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BAgain=3D2C Upthread=<BR>> >s.i3.<BR>&gt=3B &gt=3BWould you like to see it reduced=3D2C or left alone?<=<BR>> >BR>&gt=3B &gt=3BOnly deal with the types and initializers=3D2C or also the =<BR>> >prototypes?<BR>&gt=3B &gt=3BYou know=3D2C I could write a little portable l=<BR>> >ayer=3D2C where all the types ar=3D<BR>&gt=3B &gt=3Be pointers=3D2C always =<BR>> >null initialized.<BR>&gt=3B &gt=3BIt would buy /some/ portability=3D2C and =<BR>> >cost some.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BDo y=<BR>> >ou like the sem_t change? Partly? Not at all?<BR>&gt=3B &gt=3BThere is one =<BR>> >sem_t in the system. So I moved it to be in C code.<BR>&gt=3B &gt=3BOr=3D2C=<BR>> > as I had it before=3D2C declared as the max size/align of all the platf=3D=<BR>> ><BR>&gt=3B &gt=3Borms -- getting that right is the same work as getting it =<BR>> >right "the old wa=3D<BR>&gt=3B &gt=3By"=3D2C except if you make a mistake=<BR>> >=3D2C odds are still good of it being ok.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &=<BR>> >gt=3B=3D20<BR>&gt=3B &gt=3BShould the line be drawn at generating the remai=<BR>> >ning headers=3D2C rather than=3D<BR>&gt=3B &gt=3B eliminating them?<BR>&gt=<BR>> >=3B &gt=3BUerror.i3 is easily generated. Good enough?<BR>&gt=3B &gt=3B=3D20=<BR>> ><BR>&gt=3B &gt=3BUpthread.i3's types can be generated generally as records =<BR>> >with opaque array=3D<BR>&gt=3B &gt=3Bs with the right size and alignment.<B=<BR>> >R>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BOther stuff can be generated or at lea=<BR>> >st checked.<BR>&gt=3B &gt=3Be.g. to check that getpid is declared correctly=<BR>> >=3D2C you can assign it to a f=3D<BR>&gt=3B &gt=3Bunction pointer and see i=<BR>> >f that compiles.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3BPerf on Uerror argua=<BR>> >bly doesn't matter.<BR>&gt=3B &gt=3BIs it only error handling code?Or do so=<BR>> >ckets often go down "error" paths=3D2C=3D<BR>&gt=3B &gt=3B because they are=<BR>> > slow and you are waiting for more data?<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &g=<BR>> >t=3BAnyway=3D2C point is=3D2C I agree for sure this is valuable=3D2C but I =<BR>> >might be h=3D<BR>&gt=3B &gt=3Bitting the "tail" of the approach and should =<BR>> >switch=3D2C I'm not sure. I keep=3D<BR>&gt=3B &gt=3B saying that though=3D2=<BR>> >C and then press further.<BR>&gt=3B &gt=3B=3D20<BR>&gt=3B &gt=3B=3D20<BR>&g=<BR>> >t=3B &gt=3B - Jay<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=<BR>> >=3B &gt=3BFrom: hosking@cs.purdue.eduTo: jay.krell@cornell.eduDate: Mon=3D2=<BR>> >C 12 Jan 200=3D<BR>&gt=3B &gt=3B9 19:24:50 +1100CC: m3devel@elegosoft.comSu=<BR>> >bject: Re: [M3devel] declaring a=3D<BR>&gt=3B &gt=3B type's existance but n=<BR>> >ot enough to instantiate it?<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &g=<BR>> >t=3BPoint taken. We live in a C universe and so need to interact. I do thin=<BR>> >k =3D<BR>&gt=3B &gt=3Byour work with the headers is useful=3D2C and I want =<BR>> >it to continue. Especia=3D<BR>&gt=3B &gt=3Blly in simplifying ports.<BR>&gt=<BR>> >=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BOn 12 Jan 2009=3D2C at 19:18=3D=<BR>> >2C Jay wrote:<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BI don't think a development =<BR>> >system without C headers is interesting.. Is it=3D<BR>&gt=3B &gt=3B really?=<BR>> > The transform I apply at times is wherever there is interaction wi=3D<BR>&=<BR>> >gt=3B &gt=3Bth C code that is described by system-dependent headers=3D2C or=<BR>> > perhaps even =3D<BR>&gt=3B &gt=3Bfairly system-independent headers outside=<BR>> > the Modula-3 tree=3D2C either write=3D<BR>&gt=3B &gt=3B wrapper functions =<BR>> >for the functionality in the headers (e.g. stat=3D2C waitp=3D<BR>&gt=3B &gt=<BR>> >=3Bid)=3D2C which can be done in a system-independent way=3D2C or move the =<BR>> >Modula-=3D<BR>&gt=3B &gt=3B3&lt=3B-&gt=3BC transition higher=3D2C which is =<BR>> >also usually system-independent=3D2C e.g.=3D<BR>&gt=3B &gt=3B ThreadPThread=<BR>> >C_SetupHandlers. It is either that or clone the headers=3D2C wh=3D<BR>&gt=<BR>> >=3B &gt=3Bich seems like the worse evil. There is always going to be a Modu=<BR>> >la-3&lt=3B-&gt=3BC t=3D<BR>&gt=3B &gt=3Bransition=3D2C it is just a matter =<BR>> >of where it occurs. - Jay<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BCC: m3devel@eleg=<BR>> >osoft.comFrom: hosking@cs.purdue.eduTo: jay.krell@cornell.e=3D<BR>&gt=3B &g=<BR>> >t=3BduSubject: Re: [M3devel] declaring a type's existance but not enough to=<BR>> > ins=3D<BR>&gt=3B &gt=3Btantiate it?Date: Mon=3D2C 12 Jan 2009 12:32:15 +11=<BR>> >00<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BJay=3D2C I really thin=<BR>> >k you are bending over backwards too far just to be abl=3D<BR>&gt=3B &gt=3B=<BR>> >e to shoe-horn things into C. I *like* having the transpar of C header fil=<BR>> >=3D<BR>&gt=3B &gt=3Bes expressed in Modula-3=3D2C *particularly* for system=<BR>> > calls=3D2C where you mi=3D<BR>&gt=3B &gt=3Bght even be trying to build on =<BR>> >a system that does not have the C header fil=3D<BR>&gt=3B &gt=3Bes installe=<BR>> >d=3D2C even though the libraries exist and can be linked to. Fund=3D<BR>&gt=<BR>> >=3B &gt=3Bamentally=3D2C I think anytime the Modula-3 code is made less tra=<BR>> >nsparent you=3D<BR>&gt=3B &gt=3B should think hard about what you are doing=<BR>> >. The same with the change of c=3D<BR>&gt=3B &gt=3Bonstants to variables.<B=<BR>> >R>&gt=3B &gt=3B<BR>&gt=3B &gt=3BI am getting very nervous that the changes =<BR>> >you are making are destroying th=3D<BR>&gt=3B &gt=3Be clarity of the Modula=<BR>> >-3 run-time code.<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BIn this particular case=<BR>> >=3D2C you are wanting to use a Modula-3 parameter pass=3D<BR>&gt=3B &gt=3Bi=<BR>> >ng mechanism on something that is not declared in Modula-3. Seems kind of=<BR>> >=3D<BR>&gt=3B &gt=3B dubious to me. Also=3D2C I really don't like the idea =<BR>> >of accessing external=3D<BR>&gt=3B &gt=3B variables in C.<BR>&gt=3B &gt=3B<=<BR>> >BR>&gt=3B &gt=3B-- Tony<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BOn 12 Jan 2009=3D2=<BR>> >C at 11:55=3D2C Jay wrote:<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BI considered AD=<BR>> >DRESS.However I think it still doesn't satisfy. I want to be=3D<BR>&gt=3B &=<BR>> >gt=3B able to do this: TYPE Foo_t =3D3D something=3D3B&lt=3B* EXTERNAL *&gt=<BR>> >=3B VAR Foo1=3D2C Foo=3D<BR>&gt=3B &gt=3B2:Foo_t=3D3B&lt=3B* EXTERNAL *&gt=<BR>> >=3B PROCEDURE UseFoo(READONLY (* or VAR *) foo:Foo_t)=3D<BR>&gt=3B &gt=3B=<BR>> >=3D3B (* Modula-3=3D2C not external *)PROCEDURE x()=3D3DBEGIN UseFoo(Foo1)=<BR>> >=3D3B U=3D<BR>&gt=3B &gt=3BseFoo(Foo2)=3D3BEND x=3D3B AND I want any use of=<BR>> >:VAR Foo3:Foo3_t=3D3B (* Modula-3=3D<BR>&gt=3B &gt=3B=3D2C not external *)t=<BR>> >o error. This is sem_t and sigset_t in particular. Poss=3D<BR>&gt=3B &gt=3B=<BR>> >ibly renaming is the thing.They used to be declared in Modula-3=3D2C system=<BR>> >-d=3D<BR>&gt=3B &gt=3Bependently=3D2C butI moved them to portable C. I coul=<BR>> >d remove the types entir=3D<BR>&gt=3B &gt=3Bely and change UseFoo to take a=<BR>> >n address=3D2Cand declare mask and ackSem to b=3D<BR>&gt=3B &gt=3Be integer=<BR>> >s or I guess.&lt=3B*EXTERNAL&gt=3B VAR ackSem : RECORD END=3D3B That would =<BR>> >sat=3D<BR>&gt=3B &gt=3Bisfy but I thought it might be nicer to still provid=<BR>> >e the namedtypes to ref=3D<BR>&gt=3B &gt=3Ber to the external variables. - =<BR>> >Jay<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BFrom: hosking@cs.purdue.eduTo: jay.kre=<BR>> >ll@cornell.eduDate: Mon=3D2C 12 Jan 200=3D<BR>&gt=3B &gt=3B9 11:13:00 +1100=<BR>> >CC: m3devel@elegosoft.comSubject: Re: [M3devel] declaring a=3D<BR>&gt=3B &g=<BR>> >t=3B type's existance but not enough to instantiate it?What's wrong with us=<BR>> >ing =3D<BR>&gt=3B &gt=3BADDRESS for references to opaque values? If sigset_=<BR>> >t is never instantiated=3D<BR>&gt=3B &gt=3B in Modula-3=3D2C then why do yo=<BR>> >u need it declared there?<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=<BR>> >=3B<BR>&gt=3B &gt=3BAntony Hosking | Associate Professor | Computer Science=<BR>> > | Purdue University<BR>&gt=3B &gt=3B305 N. University Street | West Lafaye=<BR>> >tte | IN 47907 | USA<BR>&gt=3B &gt=3BOffice +1 765 494 6001 | Mobile +1 765=<BR>> > 427 5484<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BOn 12 Jan 2009=<BR>> >=3D2C at 01:44=3D2C Jay wrote:<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3BIs there a =<BR>> >way in Modula-3 to declare that a type exists=3D2C and there are &lt=3B=3D<=<BR>> >BR>&gt=3B &gt=3B*external*&gt=3B instances of it=3D2C without "fully" decla=<BR>> >ring it=3D2C so that no M=3D<BR>&gt=3B &gt=3Bodula-3 can instantiate it? I =<BR>> >have done this for sigset_t and sem_t=3D2C but =3D<BR>&gt=3B &gt=3Bthey cou=<BR>> >ld erroneously be instantiated by Modula-3 and I'd like to remove t=3D<BR>&=<BR>> >gt=3B &gt=3Bhat ability to mess up so easily. (* This type is not declared =<BR>> >correctly. I=3D<BR>&gt=3B &gt=3Bt is only instantiated in C code. *) sigset=<BR>> >_t =3D3D RECORD END=3D3B(* This typ=3D<BR>&gt=3B &gt=3Be is not declared co=<BR>> >rrectly. It is only instantiated in C code. *) sem_t =3D<BR>&gt=3B &gt=3B=<BR>> >=3D3D RECORD END=3D3BIn C I believe you can do this=3D2C like: typedef stru=<BR>> >ct fo=3D<BR>&gt=3B &gt=3Bo foo_t=3D3B extern foo_t foo=3D3B void UseFoo(foo=<BR>> >_t*)=3D3B foo_t* GetFoo=3D<BR>&gt=3B &gt=3B(void)=3D3B Thanks=3D2C - Jay=3D=<BR>> ><BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B--_6117a048-9185-4c03-badb-ef8f93402268_<=<BR>> >BR>&gt=3B &gt=3BContent-Type: text/html=3B charset=3D"iso-8859-1"<BR>&gt=3B=<BR>> > &gt=3BContent-Transfer-Encoding: quoted-printable<BR>&gt=3B &gt=3B<BR>&gt=<BR>> >=3B &gt=3B&lt=3Bhtml&gt=3B<BR>&gt=3B &gt=3B&lt=3Bhead&gt=3B<BR>&gt=3B &gt=<BR>> >=3B&lt=3Bstyle&gt=3B<BR>&gt=3B &gt=3B.hmmessage P<BR>&gt=3B &gt=3B{<BR>&gt=<BR>> >=3B &gt=3Bmargin:0px=3D3B<BR>&gt=3B &gt=3Bpadding:0px<BR>&gt=3B &gt=3B}<BR>=<BR>> >&gt=3B &gt=3Bbody.hmmessage<BR>&gt=3B &gt=3B{<BR>&gt=3B &gt=3Bfont-size: 10=<BR>> >pt=3D3B<BR>&gt=3B &gt=3Bfont-family:Verdana<BR>&gt=3B &gt=3B}<BR>&gt=3B &gt=<BR>> >=3B&lt=3B/style&gt=3B<BR>&gt=3B &gt=3B&lt=3B/head&gt=3B<BR>&gt=3B &gt=3B&lt=<BR>> >=3Bbody class=3D3D'hmmessage'&gt=3B<BR>&gt=3B &gt=3BThis is what you "have =<BR>> >to" chose between.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BHeader cloning or C code (=<BR>> >and C headers).&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=<BR>> >=3B<BR>&gt=3B &gt=3BCONST or VAR (or functions?)&lt=3BBR&gt=3B<BR>&gt=3B &g=<BR>> >t=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BI'm going to likely make=<BR>> > the Uerror change tonight.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BYou can still vet=<BR>> >o it (er=3D2C vote against it :) )&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbs=<BR>> >p=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BPossibly some convuluted C (enum/#unde=<BR>> >f)=3D2C or splitting the Modula-3&lt=3BBR&gt=3B<BR>&gt=3B &gt=3Bat boundari=<BR>> >es that weren't previously believed "natural".&lt=3BBR&gt=3B<BR>&gt=3B &gt=<BR>> >=3B(See how SetupHandlers is ~two lines in Modula-3 and the rest in C=3D3B&=<BR>> >lt=3BBR&gt=3B<BR>&gt=3B &gt=3Bthis is partly out of ignorance. I don't know=<BR>> > how to write those&lt=3BBR&gt=3B<BR>&gt=3B &gt=3Btwo lines in C=3D3B and l=<BR>> >aziness=3D2C I didn't look into how).&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3B=<BR>> >nbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&=<BR>> >gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BRemember I'm sti=<BR>> >ll staying away from mainstream platforms=3D2C&lt=3BBR&gt=3B<BR>&gt=3B &gt=<BR>> >=3Bso the value isn't what it might appear to be=3D2C but it is "stage sett=<BR>> >ing"=3D<BR>&gt=3B &gt=3B=3D2C&lt=3BBR&gt=3B<BR>&gt=3B &gt=3Band the show mi=<BR>> >ght go on. :)&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<=<BR>> >BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BAlso=3D2C th=<BR>> >e dilemna does get more difficult now=3D2C with the little C header=3D<BR>&=<BR>> >gt=3B &gt=3B cloning that remains.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbs=<BR>> >p=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BFor example=3D2C look at Upthreads.i3.=<BR>> >&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BMainly=3D2C look at function prototypes.&lt=<BR>> >=3BBR&gt=3B<BR>&gt=3B &gt=3BConstants and types are "known problems".&lt=3B=<BR>> >BR&gt=3B<BR>&gt=3B &gt=3BPrototypes are gray. They actually tend to be port=<BR>> >able.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3BFor example:&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3B=<BR>> >BR&gt=3B<BR>&gt=3B &gt=3BTYPE pid_t =3D3D INTEGER=3D3B&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3B&amp=3Blt=3D3B*EXTERNAL "m3_getpid*&amp=3Bgt=3D3B PROCEDURE getpi=<BR>> >d():pid_t=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B=<BR>> ><BR>&gt=3B &gt=3Bor leave it alone?&lt=3BBR&gt=3B<BR>&gt=3B &gt=3Bgetpid is=<BR>> > probably the worst example.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BIt is so very po=<BR>> >rtable declared in Modula-3.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BBut still=3D2C i=<BR>> >magine pid_t might be 16bits or 32 or 64.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BWri=<BR>> >ting a wrapper is more portable -- as long as the pid isn't stuff into s=3D=<BR>> ><BR>&gt=3B &gt=3Bome record that the system defines.&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&l=<BR>> >t=3BBR&gt=3B<BR>&gt=3B &gt=3BAgain=3D2C Upthreads.i3.&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3BWould you like to see it reduced=3D2C or left alone?&lt=3BBR&gt=<BR>> >=3B<BR>&gt=3B &gt=3BOnly deal with the types and initializers=3D2C or also =<BR>> >the prototypes?&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BYou know=3D2C I could write a=<BR>> > little portable layer=3D2C where all the types ar=3D<BR>&gt=3B &gt=3Be poi=<BR>> >nters=3D2C always null initialized.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BIt would =<BR>> >buy /some/ portability=3D2C and cost some.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&a=<BR>> >mp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B=<BR>> ><BR>&gt=3B &gt=3BDo you like the sem_t change? Partly? Not at all?&lt=3BBR&=<BR>> >gt=3B<BR>&gt=3B &gt=3BThere is one sem_t in the system. So I moved it to be=<BR>> > in C code.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BOr=3D2C as I had it before=3D2C d=<BR>> >eclared as the max size/align of all the platf=3D<BR>&gt=3B &gt=3Borms -- g=<BR>> >etting that right is the same work as getting it right "the old wa=3D<BR>&g=<BR>> >t=3B &gt=3By"=3D2C except if you make a mistake=3D2C odds are still good of=<BR>> > it being ok.&lt=3BB=3D<BR>&gt=3B &gt=3BR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=<BR>> >=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3BShould the line be drawn at generating the remaining headers=3D2C=<BR>> > rather than=3D<BR>&gt=3B &gt=3B eliminating them?&lt=3BBR&gt=3B<BR>&gt=3B =<BR>> >&gt=3BUerror.i3 is easily generated. Good enough?&lt=3BBR&gt=3B<BR>&gt=3B &=<BR>> >gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BUpthread.i3's types can=<BR>> > be generated generally as records with opaque array=3D<BR>&gt=3B &gt=3Bs w=<BR>> >ith the right size and alignment.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=<BR>> >=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BOther stuff can be generated or at leas=<BR>> >t checked.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3Be.g. to check that getpid is decla=<BR>> >red correctly=3D2C you can assign it to a f=3D<BR>&gt=3B &gt=3Bunction poin=<BR>> >ter and see if that compiles.&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3=<BR>> >B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BPerf on Uerror arguably doesn't matter.&lt=<BR>> >=3BBR&gt=3B<BR>&gt=3B &gt=3BIs it only error handling code?&lt=3BBR&gt=3BOr=<BR>> > do sockets often go down "error" path=3D<BR>&gt=3B &gt=3Bs=3D2C because th=<BR>> >ey are slow and you are waiting for more data?&lt=3BBR&gt=3B<BR>&gt=3B &gt=<BR>> >=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3BAnyway=3D2C point is=3D2C=<BR>> > I agree for sure this is valuable=3D2C but I might be h=3D<BR>&gt=3B &gt=<BR>> >=3Bitting the "tail" of the approach and should switch=3D2C I'm not sure. I=<BR>> > keep=3D<BR>&gt=3B &gt=3B saying that though=3D2C and then press further.&l=<BR>> >t=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=<BR>> >=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B- Jay&lt=<BR>> >=3BBR&gt=3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B&lt=3BHR id=3D3D=<BR>> >stopSpelling&gt=3B<BR>&gt=3B &lt=3BBR&gt=3B<BR>&gt=3B &gt=3BFrom: hosking@c=<BR>> >s.purdue.edu&lt=3BBR&gt=3BTo: jay.krell@cornell.edu&lt=3BBR&gt=3BDate: Mon=<BR>> >=3D2C 12=3D<BR>&gt=3B &gt=3B Jan 2009 19:24:50 +1100&lt=3BBR&gt=3BCC: m3dev=<BR>> >el@elegosoft.com&lt=3BBR&gt=3BSubject: Re: [M3de=3D<BR>&gt=3B &gt=3Bvel] de=<BR>> >claring a type's existance but not enough to instantiate it?&lt=3BBR&gt=3B&=<BR>> >lt=3BBR&gt=3B=3D<BR>&gt=3B &gt=3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&g=<BR>> >t=3B&lt=3BSPAN class=3D3DEC_Apple-style-span style=3D3D"WORD-SPACING: 0px=<BR>> >=3D3B FONT: =3D<BR>&gt=3B &gt=3B12px Helvetica=3D3B TEXT-TRANSFORM: none=3D=<BR>> >3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-IND=3D<BR>&gt=3B &gt=3BENT: 0px=3D3B=<BR>> > WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPS=3D<BR>=<BR>> >&gt=3B &gt=3BE: separate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV style=3D3D"WORD-W=<BR>> RAP: break-word"&gt=3B&lt=3BSPAN class=3D3DEC_Apple-style-span styl=3D<BR>&=<BR>> >gt=3B &gt=3Be=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TR=<BR>> >ANSFORM: none=3D3B C=3D<BR>&gt=3B &gt=3BOLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-=<BR>> >INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-S=3D<BR>&gt=3B &gt=3BPACIN=<BR>> >G: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D3DEC_Appl=<BR>> >e-style-s=3D<BR>&gt=3B &gt=3Bpan style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12=<BR>> >px Helvetica=3D3B TEXT-TRANSFORM: n=3D<BR>&gt=3B &gt=3Bone=3D3B COLOR: rgb(=<BR>> >0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B =3D<BR>&=<BR>> >gt=3B &gt=3BLETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=<BR>> >=3BSPAN class=3D3DEC_Apple=3D<BR>&gt=3B &gt=3B-style-span style=3D3D"WORD-S=<BR>> >PACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRAN=3D<BR>&gt=3B &gt=3BSFO=<BR>> >RM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SP=<BR>> >ACE: no=3D<BR>&gt=3B &gt=3Brmal=3D3B LETTER-SPACING: normal=3D3B BORDER-COL=<BR>> >LAPSE: separate"&gt=3B&lt=3BSPAN class=3D3D=3D<BR>&gt=3B &gt=3BEC_Apple-sty=<BR>> >le-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B T=3D<BR=<BR>> >>&gt=3B &gt=3BEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-=<BR>> >INDENT: 0px=3D3B WHITE-S=3D<BR>&gt=3B &gt=3BPACE: normal=3D3B LETTER-SPACIN=<BR>> >G: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN =3D<BR>&gt=3B &gt=<BR>> >=3Bclass=3D3DEC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12=<BR>> >px Helvet=3D<BR>&gt=3B &gt=3Bica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(=<BR>> >0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B=3D<BR>&gt=3B &gt=3B WHITE-SPACE: =<BR>> >normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate=3D<BR>&gt=<BR>> >=3B &gt=3B"&gt=3B&lt=3BSPAN class=3D3DEC_Apple-style-span style=3D3D"WORD-S=<BR>> >PACING: 0px=3D3B FONT: 12p=3D<BR>&gt=3B &gt=3Bx Helvetica=3D3B TEXT-TRANSFO=<BR>> >RM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT=3D<BR>&gt=3B &gt=<BR>> >=3B: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-C=<BR>> >OLLAPSE: =3D<BR>&gt=3B &gt=3Bseparate"&gt=3B&lt=3BSPAN class=3D3DEC_Apple-s=<BR>> >tyle-span style=3D3D"WORD-SPACING: 0px=3D3B F=3D<BR>&gt=3B &gt=3BONT: 12px =<BR>> >Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEX=<BR>> >=3D<BR>&gt=3B &gt=3BT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPAC=<BR>> >ING: normal=3D3B BORDER-CO=3D<BR>&gt=3B &gt=3BLLAPSE: separate"&gt=3B&lt=3B=<BR>> >SPAN class=3D3DEC_Apple-style-span style=3D3D"WORD-SPACING: =3D<BR>&gt=3B &=<BR>> >gt=3B0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rg=<BR>> >b(0=3D2C0=3D2C0=3D<BR>&gt=3B &gt=3B)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE=<BR>> >: normal=3D3B LETTER-SPACING: normal=3D3B B=3D<BR>&gt=3B &gt=3BORDER-COLLAP=<BR>> >SE: separate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3BPoint taken. &amp=3Bnbsp=<BR>> >=3D3BWe live in a C universe and so need to interact. =3D<BR>&gt=3B &gt=3B&=<BR>> >amp=3Bnbsp=3D3BI do think your work with the headers is useful=3D2C and I w=<BR>> >ant it to=3D<BR>&gt=3B &gt=3B continue. &amp=3Bnbsp=3D3BEspecially in simpl=<BR>> >ifying ports.&lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BBR&gt=3B=<BR>> >&lt=3B/DIV&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/S=<BR>> >PAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=<BR>> >=3B&lt=3B/DI=3D<BR>&gt=3B &gt=3BV&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/DIV&gt=3B<BR=<BR>> >>&gt=3B &gt=3B&lt=3BDIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3BOn 12 Jan 2009=<BR>> >=3D2C at 19:18=3D2C Jay wrote:&lt=3B/DIV&gt=3B&lt=3BBR class=3D3DEC_Apple-i=<BR>> >nt=3D<BR>&gt=3B &gt=3Berchange-newline&gt=3B<BR>&gt=3B &gt=3B&lt=3BBLOCKQUO=<BR>> >TE&gt=3B&lt=3BSPAN class=3D3DEC_Apple-style-span style=3D3D"WORD-SPACING: 0=<BR>> >px=3D3B=3D<BR>&gt=3B &gt=3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B T=3D<BR>&gt=3B &gt=3BEXT-INDENT: 0px=<BR>> >=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-=3D<BR>&g=<BR>> >t=3B &gt=3BCOLLAPSE: separate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV class=3D3DEC=<BR>> >_hmmessage style=3D3D"FONT-SIZE: 10pt=3D3B FONT-FAMILY: Verdana"=3D<BR>&gt=<BR>> >=3B &gt=3B&gt=3BI don't think a development system without C headers is int=<BR>> >eresting.. Is i=3D<BR>&gt=3B &gt=3Bt really?&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&=<BR>> >lt=3BBR&gt=3BThe transform I apply at times is wherever there i=3D<BR>&gt=<BR>> >=3B &gt=3Bs interaction with C code that is described by system-dependent h=<BR>> >eaders=3D2C =3D<BR>&gt=3B &gt=3Bor perhaps even fairly system-independent h=<BR>> >eaders outside the Modula-3 tree=3D<BR>&gt=3B &gt=3B=3D2C either write wrap=<BR>> >per functions for the functionality in the headers (e.=3D<BR>&gt=3B &gt=3Bg=<BR>> >. stat=3D2C waitpid)=3D2C which&amp=3Bnbsp=3D3Bcan be done in a system-inde=<BR>> >pendent way=3D<BR>&gt=3B &gt=3B=3D2C&amp=3Bnbsp=3D3Bor move the Modula-3&am=<BR>> >p=3Blt=3D3B-&amp=3Bgt=3D3BC transition higher=3D2C which is=3D<BR>&gt=3B &g=<BR>> >t=3B also usually system-independent=3D2C e.g. ThreadPThreadC_SetupHandlers=<BR>> >.&lt=3BBR&gt=3B&amp=3B=3D<BR>&gt=3B &gt=3Bnbsp=3D3B&lt=3BBR&gt=3BIt is eith=<BR>> >er that or clone the headers=3D2C which seems like the w=3D<BR>&gt=3B &gt=<BR>> >=3Borse evil.&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3BThere is always go=<BR>> >ing to be a Modula-3&amp=3Blt=3D3B-&amp=3Bgt=3D<BR>&gt=3B &gt=3B=3D3BC tran=<BR>> >sition=3D2C it is just a matter of where it occurs.&lt=3BBR&gt=3B&amp=3Bnbs=<BR>> >p=3D3B&lt=3BBR&gt=3B&amp=3B=3D<BR>&gt=3B &gt=3Bnbsp=3D3B- Jay&lt=3BBR&gt=3B=<BR>> >&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&lt=3BHR id=3D3DEC_stopSpelling&gt=3B<BR>&gt=<BR>> >=3B &gt=3B&lt=3BBR&gt=3BCC:&lt=3BSPAN class=3D3DEC_Apple-converted-space&gt=<BR>> >=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BA href=3D3D"mai=3D<BR>&gt=3B &gt=<BR>> >=3Blto:m3devel@elegosoft.com"&gt=3Bm3devel@elegosoft.com&lt=3B/A&gt=3B&lt=<BR>> >=3BBR&gt=3BFrom:&lt=3BSPAN class=3D3D=3D<BR>&gt=3B &gt=3BEC_Apple-converted=<BR>> >-space&gt=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BA href=3D3D"mailto:hoski=<BR>> >ng@cs.purdue=3D<BR>&gt=3B &gt=3B.edu"&gt=3Bhosking@cs.purdue.edu&lt=3B/A&gt=<BR>> >=3B&lt=3BBR&gt=3BTo:&lt=3BSPAN class=3D3DEC_Apple-converted-spac=3D<BR>&gt=<BR>> >=3B &gt=3Be&gt=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BA href=3D3D"mailto:=<BR>> >jay.krell@cornell.edu"&gt=3Bjay.krell@cornell=3D<BR>&gt=3B &gt=3B.edu&lt=3B=<BR>> >/A&gt=3B&lt=3BBR&gt=3BSubject: Re: [M3devel] declaring a type's existance b=<BR>> >ut not eno=3D<BR>&gt=3B &gt=3Bugh to instantiate it?&lt=3BBR&gt=3BDate: Mon=<BR>> >=3D2C 12 Jan 2009 12:32:15 +1100&lt=3BBR&gt=3B&lt=3BBR&gt=3B&lt=3BB=3D<BR>&=<BR>> >gt=3B &gt=3BR&gt=3B<BR>&gt=3B &lt=3BDIV&gt=3B&lt=3BSPAN class=3D3DEC_EC_App=<BR>> >le-style-span style=3D3D"WORD-SPACING: 0px=3D3B FON=3D<BR>&gt=3B &gt=3BT: 1=<BR>> >2px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B=<BR>> > TEXT-=3D<BR>&gt=3B &gt=3BINDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-=<BR>> >SPACING: normal=3D3B BORDER-COLL=3D<BR>&gt=3B &gt=3BAPSE: separate"&gt=3B<B=<BR>> >R>&gt=3B &gt=3B&lt=3BDIV style=3D3D"WORD-WRAP: break-word"&gt=3B&lt=3BSPAN =<BR>> >class=3D3DEC_EC_Apple-style-span s=3D<BR>&gt=3B &gt=3Btyle=3D3D"WORD-SPACIN=<BR>> >G: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D<BR>&gt=3B &gt=<BR>> >=3B=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: =<BR>> >normal=3D3B LET=3D<BR>&gt=3B &gt=3BTER-SPACING: normal=3D3B BORDER-COLLAPSE=<BR>> >: separate"&gt=3B&lt=3BSPAN class=3D3DEC_EC_Apple=3D<BR>&gt=3B &gt=3B-style=<BR>> >-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRAN=<BR>> >=3D<BR>&gt=3B &gt=3BSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-IN=<BR>> >DENT: 0px=3D3B WHITE-SPACE: no=3D<BR>&gt=3B &gt=3Brmal=3D3B LETTER-SPACING:=<BR>> > normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D3D=3D<BR>&g=<BR>> >t=3B &gt=3BEC_EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 1=<BR>> >2px Helvetica=3D<BR>&gt=3B &gt=3B=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb=<BR>> >(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WH=3D<BR>&gt=3B &gt=3BITE-SPACE:=<BR>> > normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&l=<BR>> >t=3B=3D<BR>&gt=3B &gt=3BSPAN class=3D3DEC_EC_Apple-style-span style=3D3D"WO=<BR>> >RD-SPACING: 0px=3D3B FONT: 12p=3D<BR>&gt=3B &gt=3Bx Helvetica=3D3B TEXT-TRA=<BR>> >NSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT=3D<BR>&gt=3B &=<BR>> >gt=3B: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER=<BR>> >-COLLAPSE: =3D<BR>&gt=3B &gt=3Bseparate"&gt=3B&lt=3BSPAN class=3D3DEC_EC_Ap=<BR>> >ple-style-span style=3D3D"WORD-SPACING: 0px=3D<BR>&gt=3B &gt=3B=3D3B FONT: =<BR>> >12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D<=<BR>> >BR>&gt=3B &gt=3B=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER=<BR>> >-SPACING: normal=3D3B BO=3D<BR>&gt=3B &gt=3BRDER-COLLAPSE: separate"&gt=3B&=<BR>> >lt=3BSPAN class=3D3DEC_EC_Apple-style-span style=3D3D"WORD=3D<BR>&gt=3B &gt=<BR>> >=3B-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B C=<BR>> >OLOR: rgb=3D<BR>&gt=3B &gt=3B(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHI=<BR>> >TE-SPACE: normal=3D3B LETTER-SPACING: n=3D<BR>&gt=3B &gt=3Bormal=3D3B BORDE=<BR>> >R-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D3DEC_EC_Apple-style-span st=<BR>> >=3D<BR>&gt=3B &gt=3Byle=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D=<BR>> >3B TEXT-TRANSFORM: none=3D3B=3D<BR>&gt=3B &gt=3B COLOR: rgb(0=3D2C0=3D2C0)=<BR>> >=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER=3D<BR>&gt=3B &g=<BR>> >t=3B-SPACING: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=<BR>> >=3D3DEC_EC_Apple-st=3D<BR>&gt=3B &gt=3Byle-span style=3D3D"WORD-SPACING: 0p=<BR>> >x=3D3B FONT: 12px Helvetica=3D3B TEXT-TRANSFO=3D<BR>&gt=3B &gt=3BRM: none=<BR>> >=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: nor=<BR>> >ma=3D<BR>&gt=3B &gt=3Bl=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: s=<BR>> >eparate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3BJay=3D2C I really think you a=<BR>> >re bending over backwards too far just to b=3D<BR>&gt=3B &gt=3Be able to sh=<BR>> >oe-horn things into C. &amp=3Bnbsp=3D3BI *like* having the transpar of =3D<=<BR>> >BR>&gt=3B &gt=3BC header files expressed in Modula-3=3D2C *particularly* fo=<BR>> >r system calls=3D2C =3D<BR>&gt=3B &gt=3Bwhere you might even be trying to b=<BR>> >uild on a system that does not have the =3D<BR>&gt=3B &gt=3BC header files =<BR>> >installed=3D2C even though the libraries exist and can be link=3D<BR>&gt=3B=<BR>> > &gt=3Bed to. &amp=3Bnbsp=3D3BFundamentally=3D2C I think anytime the Modula=<BR>> >-3 code is made l=3D<BR>&gt=3B &gt=3Bess transparent you should think hard =<BR>> >about what you are doing. &amp=3Bnbsp=3D3BThe=3D<BR>&gt=3B &gt=3B same with=<BR>> > the change of constants to variables.&lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B&lt=<BR>> >=3BDIV&gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3BI=<BR>> > am getting very nervous that the changes you are making are destroyi=3D<BR=<BR>> >>&gt=3B &gt=3Bng the clarity of the Modula-3 run-time code.&lt=3B/DIV&gt=3B=<BR>> ><BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&gt=3B<BR>&gt=3B &g=<BR>> >t=3B&lt=3BDIV&gt=3BIn this particular case=3D2C you are wanting to use a Mo=<BR>> >dula-3 parameter=3D<BR>&gt=3B &gt=3B passing mechanism on something that is=<BR>> > not declared in Modula-3. &amp=3Bnbsp=3D3BS=3D<BR>&gt=3B &gt=3Beems kind o=<BR>> >f dubious to me. &amp=3Bnbsp=3D3BAlso=3D2C I really don't like the idea of=<BR>> >=3D<BR>&gt=3B &gt=3B accessing external variables in C.&lt=3B/DIV&gt=3B<BR>=<BR>> >&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B=<BR>> >&lt=3BDIV&gt=3B-- Tony&lt=3B/DIV&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=<BR>> >=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPA=<BR>> >N&gt=3B&lt=3B/SPAN&gt=3B&lt=3B=3D<BR>&gt=3B &gt=3B/DIV&gt=3B&lt=3B/SPAN&gt=<BR>> >=3B&lt=3B/DIV&gt=3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B<BR>&gt=3B=<BR>> > &gt=3B&lt=3BDIV&gt=3BOn 12 Jan 2009=3D2C at 11:55=3D2C Jay wrote:&lt=3B/DI=<BR>> >V&gt=3B&lt=3BBR class=3D3DEC_EC_Apple-=3D<BR>&gt=3B &gt=3Binterchange-newli=<BR>> >ne&gt=3B<BR>&gt=3B &gt=3B&lt=3BBLOCKQUOTE&gt=3B&lt=3BSPAN class=3D3DEC_EC_A=<BR>> >pple-style-span style=3D3D"WORD-SPACING: 0px=3D<BR>&gt=3B &gt=3B=3D3B FONT:=<BR>> > 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D=<BR>> ><BR>&gt=3B &gt=3B=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTE=<BR>> >R-SPACING: normal=3D3B BO=3D<BR>&gt=3B &gt=3BRDER-COLLAPSE: separate"&gt=3B=<BR>> ><BR>&gt=3B &gt=3B&lt=3BDIV class=3D3DEC_EC_hmmessage style=3D3D"FONT-SIZE: =<BR>> >10pt=3D3B FONT-FAMILY: Verda=3D<BR>&gt=3B &gt=3Bna"&gt=3BI considered ADDRE=<BR>> >SS.&lt=3BBR&gt=3BHowever I think it still doesn't satisfy.&lt=3BBR&gt=3B&am=<BR>> >p=3B=3D<BR>&gt=3B &gt=3Bnbsp=3D3B&lt=3BBR&gt=3BI want to be able to do this=<BR>> >:&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3BTYPE&amp=3Bnbsp=3D3BFoo_t =3D<=<BR>> >BR>&gt=3B &gt=3B=3D3D something=3D3B&lt=3BBR&gt=3B&amp=3Blt=3D3B* EXTERNAL =<BR>> >*&amp=3Bgt=3D3B VAR Foo1=3D2C Foo2:Foo_t=3D3B&lt=3BBR&gt=3B&amp=3B=3D<BR>&g=<BR>> >t=3B &gt=3Blt=3D3B* EXTERNAL *&amp=3Bgt=3D3B PROCEDURE&amp=3Bnbsp=3D3BUseFo=<BR>> >o(READONLY (* or VAR *) foo:F=3D<BR>&gt=3B &gt=3Boo_t)=3D3B&lt=3BBR&gt=3B&a=<BR>> >mp=3Bnbsp=3D3B&lt=3BBR&gt=3B(* Modula-3=3D2C not external *)&lt=3BBR&gt=3BP=<BR>> >ROCEDURE x()=3D3D&lt=3B=3D<BR>&gt=3B &gt=3BBR&gt=3BBEGIN&lt=3BBR&gt=3B&amp=<BR>> >=3Bnbsp=3D3B UseFoo(Foo1)=3D3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B UseFoo(Foo2)=<BR>> >=3D3B&lt=3BBR&gt=3BEND x=3D<BR>&gt=3B &gt=3B=3D3B&lt=3BBR&gt=3B&amp=3Bnbsp=<BR>> >=3D3B&lt=3BBR&gt=3BAND I want any use of:&lt=3BBR&gt=3BVAR Foo3:Foo3_t=3D3B=<BR>> > (* Modula-3=3D<BR>&gt=3B &gt=3B=3D2C not external *)&lt=3BBR&gt=3B&lt=3BBR=<BR>> >&gt=3Bto error. This is sem_t and sigset_t in particul=3D<BR>&gt=3B &gt=3Ba=<BR>> >r.&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3BPossibly renaming is the thin=<BR>> >g.&lt=3BBR&gt=3BThey used to be decla=3D<BR>&gt=3B &gt=3Bred in Modula-3=3D=<BR>> >2C system-dependently=3D2C but&lt=3BBR&gt=3BI moved them to portable C.=3D<=<BR>> >BR>&gt=3B &gt=3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3BI could remove =<BR>> >the types entirely and change UseFoo to take=3D<BR>&gt=3B &gt=3B an address=<BR>> >=3D2C&lt=3BBR&gt=3Band declare mask and ackSem to be integers or I guess.&l=<BR>> >t=3BBR=3D<BR>&gt=3B &gt=3B&gt=3B&amp=3Blt=3D3B*EXTERNAL&amp=3Bgt=3D3B VAR a=<BR>> >ckSem&amp=3Bnbsp=3D3B: RECORD END=3D3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BB=<BR>> >R&gt=3BTha=3D<BR>&gt=3B &gt=3Bt would satisfy but I thought it might be nic=<BR>> >er to still provide the named&lt=3B=3D<BR>&gt=3B &gt=3BBR&gt=3Btypes to ref=<BR>> >er to the external variables.&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3B&a=<BR>> >mp=3Bnbsp=3D3B- Jay&lt=3BB=3D<BR>&gt=3B &gt=3BR&gt=3B&lt=3BBR&gt=3B<BR>&gt=<BR>> >=3B &gt=3B&lt=3BHR id=3D3DEC_EC_stopSpelling&gt=3B<BR>&gt=3B &gt=3B&lt=3BBR=<BR>> >&gt=3BFrom:&lt=3BSPAN class=3D3DEC_EC_Apple-converted-space&gt=3B&amp=3Bnbs=<BR>> >p=3D3B&lt=3B/SPAN&gt=3B&lt=3BA href=3D<BR>&gt=3B &gt=3B=3D3D"mailto:hosking=<BR>> >@cs.purdue.edu"&gt=3Bhosking@cs.purdue.edu&lt=3B/A&gt=3B&lt=3BBR&gt=3BTo:&l=<BR>> >t=3BSPAN cla=3D<BR>&gt=3B &gt=3Bss=3D3DEC_EC_Apple-converted-space&gt=3B&am=<BR>> >p=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BA href=3D3D"mailto:jay.krell=3D<BR>&gt=<BR>> >=3B &gt=3B@cornell.edu"&gt=3Bjay.krell@cornell.edu&lt=3B/A&gt=3B&lt=3BBR&gt=<BR>> >=3BDate: Mon=3D2C 12 Jan 2009 11:13:0=3D<BR>&gt=3B &gt=3B0 +1100&lt=3BBR&gt=<BR>> >=3BCC:&lt=3BSPAN class=3D3DEC_EC_Apple-converted-space&gt=3B&amp=3Bnbsp=3D3=<BR>> >B&lt=3B/SPAN&gt=3B&lt=3BA h=3D<BR>&gt=3B &gt=3Bref=3D3D"mailto:m3devel@eleg=<BR>> >osoft.com"&gt=3Bm3devel@elegosoft.com&lt=3B/A&gt=3B&lt=3BBR&gt=3BSubject: =<BR>> >=3D<BR>&gt=3B &gt=3BRe: [M3devel] declaring a type's existance but not enou=<BR>> >gh to instantiate it=3D<BR>&gt=3B &gt=3B?&lt=3BBR&gt=3B&lt=3BBR&gt=3BWhat's=<BR>> > wrong with using ADDRESS for references to opaque values? &amp=3B=3D<BR>&g=<BR>> >t=3B &gt=3Bnbsp=3D3BIf sigset_t is never instantiated in Modula-3=3D2C then=<BR>> > why do you nee=3D<BR>&gt=3B &gt=3Bd it declared there?&lt=3BBR&gt=3B<BR>&g=<BR>> >t=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BBR&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=<BR>> >=3BSPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D=<BR>> >3B =3D<BR>&gt=3B &gt=3BFONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B =<BR>> >COLOR: rgb(0=3D2C0=3D2C0)=3D3B TE=3D<BR>&gt=3B &gt=3BXT-INDENT: 0px=3D3B WH=<BR>> >ITE-SPACE: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-C=3D<BR>&gt=3B &g=<BR>> >t=3BOLLAPSE: separate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV style=3D3D"WORD-WRAP=<BR>> >: break-word"&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-spa=3D<BR>&gt=<BR>> >=3B &gt=3Bn style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEX=<BR>> >T-TRANSFORM: non=3D<BR>&gt=3B &gt=3Be=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B T=<BR>> >EXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LE=3D<BR>&gt=3B &gt=3BTTER-SP=<BR>> >ACING: normal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D3DEC_=<BR>> >EC_EC_A=3D<BR>&gt=3B &gt=3Bpple-style-span style=3D3D"WORD-SPACING: 0px=3D3=<BR>> >B FONT: 12px Helvetica=3D3B TEXT-=3D<BR>&gt=3B &gt=3BTRANSFORM: none=3D3B C=<BR>> >OLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE=3D<BR>&gt=<BR>> >=3B &gt=3B: normal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separa=<BR>> >te"&gt=3B&lt=3BSPAN clas=3D<BR>&gt=3B &gt=3Bs=3D3DEC_EC_EC_Apple-style-span=<BR>> > style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helv=3D<BR>&gt=3B &gt=3Betica=<BR>> >=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT:=<BR>> > 0px=3D<BR>&gt=3B &gt=3B=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: norm=<BR>> >al=3D3B BORDER-COLLAPSE: separ=3D<BR>&gt=3B &gt=3Bate"&gt=3B&lt=3BSPAN clas=<BR>> >s=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B =3D<BR>&g=<BR>> >t=3B &gt=3BFONT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=<BR>> >=3D2C0=3D2C0)=3D3B TE=3D<BR>&gt=3B &gt=3BXT-INDENT: 0px=3D3B WHITE-SPACE: n=<BR>> >ormal=3D3B LETTER-SPACING: normal=3D3B BORDER-C=3D<BR>&gt=3B &gt=3BOLLAPSE:=<BR>> > separate"&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"W=<BR>> >ORD-SP=3D<BR>&gt=3B &gt=3BACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-TR=<BR>> >ANSFORM: none=3D3B COLOR: rgb(0=3D<BR>&gt=3B &gt=3B=3D2C0=3D2C0)=3D3B TEXT-=<BR>> >INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: nor=3D<BR>&gt=3B =<BR>> >&gt=3Bmal=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D3DEC_EC_E=<BR>> >C_Apple-style-span s=3D<BR>&gt=3B &gt=3Btyle=3D3D"WORD-SPACING: 0px=3D3B FO=<BR>> >NT: 12px Helvetica=3D3B TEXT-TRANSFORM: none=3D<BR>&gt=3B &gt=3B=3D3B COLOR=<BR>> >: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LE=<BR>> >T=3D<BR>&gt=3B &gt=3BTER-SPACING: normal=3D3B BORDER-COLLAPSE: separate"&gt=<BR>> >=3B&lt=3BSPAN class=3D3DEC_EC_EC_Ap=3D<BR>&gt=3B &gt=3Bple-style-span style=<BR>> >=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px Helvetica=3D3B TEXT-T=3D<BR>&gt=3B =<BR>> >&gt=3BRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=<BR>> >=3D3B WHITE-SPACE:=3D<BR>&gt=3B &gt=3B normal=3D3B LETTER-SPACING: normal=<BR>> >=3D3B BORDER-COLLAPSE: separate"&gt=3B&lt=3BSPAN class=3D<BR>&gt=3B &gt=3B=<BR>> >=3D3DEC_EC_EC_Apple-style-span style=3D3D"WORD-SPACING: 0px=3D3B FONT: 12px=<BR>> > Helve=3D<BR>&gt=3B &gt=3Btica=3D3B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=<BR>> >=3D2C0=3D2C0)=3D3B TEXT-INDENT: 0px=3D<BR>&gt=3B &gt=3B=3D3B WHITE-SPACE: n=<BR>> >ormal=3D3B LETTER-SPACING: normal=3D3B BORDER-COLLAPSE: separ=3D<BR>&gt=3B =<BR>> >&gt=3Bate"&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BFONT class=3D3DEC_EC_=<BR>> >EC_Apple-style-span color=3D3D#0000ff&gt=3B&lt=3BFONT class=3D3D=3D<BR>&gt=<BR>> >=3B &gt=3BEC_EC_EC_Apple-style-span face=3D3D"Gill Sans"&gt=3B&lt=3BSPAN cl=<BR>> >ass=3D3DEC_EC_EC_Apple-s=3D<BR>&gt=3B &gt=3Btyle-span style=3D3D"COLOR: rgb=<BR>> >(0=3D2C0=3D2C255)=3D3B FONT-FAMILY: 'Gill Sans'"&gt=3B&lt=3BSP=3D<BR>&gt=3B=<BR>> > &gt=3BAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"COLOR: rgb(0=3D2C0=<BR>> >=3D2C255)=3D3B FO=3D<BR>&gt=3B &gt=3BNT-FAMILY: 'Gill Sans'"&gt=3BAntony Ho=<BR>> >sking&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/FONT&gt=3B&lt=3B/FONT&gt=3B&l=<BR>> >t=3BFONT cla=3D<BR>&gt=3B &gt=3Bss=3D3DEC_EC_EC_Apple-style-span face=3D3D"=<BR>> >Gill Sans"&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Ap=3D<BR>&gt=3B &gt=3Bple-sty=<BR>> >le-span style=3D3D"FONT-FAMILY: 'Gill Sans'"&gt=3B&lt=3BSPAN class=3D3DEC_E=<BR>> >C_EC_Ap=3D<BR>&gt=3B &gt=3Bple-style-span style=3D3D"FONT-FAMILY: 'Gill San=<BR>> >s'"&gt=3B&lt=3BSPAN class=3D3DEC_EC_Apple=3D<BR>&gt=3B &gt=3B-converted-spa=<BR>> >ce&gt=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B|&lt=3BSPAN class=3D3DEC_EC_Apple-=<BR>> >converted-space&gt=3B=3D<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&=<BR>> >lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-=<BR>> >span style=3D<BR>&gt=3B &gt=3B=3D3D"FONT-FAMILY: 'Gill Sans'"&gt=3B&lt=3BSP=<BR>> >AN class=3D3DEC_EC_EC_Apple-style-span style=3D<BR>&gt=3B &gt=3B=3D3D"FONT-=<BR>> >FAMILY: 'Gill Sans'"&gt=3BAssociate Professor&lt=3B/SPAN&gt=3B&lt=3B/SPAN&g=<BR>> >t=3B&lt=3BSPAN class=3D<BR>&gt=3B &gt=3B=3D3DEC_EC_EC_Apple-style-span styl=<BR>> >e=3D3D"FONT-FAMILY: 'Gill Sans'"&gt=3B&lt=3BSPAN class=3D<BR>&gt=3B &gt=3B=<BR>> >=3D3DEC_EC_EC_Apple-style-span style=3D3D"FONT-FAMILY: 'Gill Sans'"&gt=3B&a=<BR>> >mp=3Bnbsp=3D3B| C=3D<BR>&gt=3B &gt=3Bomputer Science | Purdue University&lt=<BR>> >=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/FONT&gt=3B&lt=3B/DIV&gt=3B<BR>&gt=3B =<BR>> >&gt=3B&lt=3BDIV&gt=3B&lt=3BFONT class=3D3DEC_EC_EC_Apple-style-span face=3D=<BR>> >3DGillSans-Light&gt=3B&lt=3BSPAN cl=3D<BR>&gt=3B &gt=3Bass=3D3DEC_EC_EC_App=<BR>> >le-style-span style=3D3D"FONT-FAMILY: GillSans-Light"&gt=3B305 N=3D<BR>&gt=<BR>> >=3B &gt=3B. University Street | West Lafayette | IN 47907 | USA&lt=3B/SPAN&=<BR>> >gt=3B&lt=3B/FONT&gt=3B&lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=<BR>> >=3BFONT class=3D3DEC_EC_EC_Apple-style-span face=3D3D"Gill Sans" color=3D3D=<BR>> >#00=3D<BR>&gt=3B &gt=3B00ff&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-=<BR>> >span style=3D3D"COLOR: rgb(0=3D2C0=3D2C25=3D<BR>&gt=3B &gt=3B5)=3D3B FONT-F=<BR>> >AMILY: 'Gill Sans'"&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-span sty=<BR>> >=3D<BR>&gt=3B &gt=3Ble=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=3D3B FONT-FAMILY: '=<BR>> >Gill Sans'"&gt=3BOffice&lt=3B/SPAN&gt=3B&lt=3B/S=3D<BR>&gt=3B &gt=3BPAN&gt=<BR>> >=3B&lt=3B/FONT&gt=3B&lt=3BFONT class=3D3DEC_EC_EC_Apple-style-span face=3D3=<BR>> >DGillSans-Light&gt=3B&lt=3BS=3D<BR>&gt=3B &gt=3BPAN class=3D3DEC_EC_EC_Appl=<BR>> >e-style-span style=3D3D"FONT-FAMILY: GillSans-Light"=3D<BR>&gt=3B &gt=3B&gt=<BR>> >=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-span style=3D3D"FONT-FAMILY: G=<BR>> >illSans-Lig=3D<BR>&gt=3B &gt=3Bht"&gt=3B&amp=3Bnbsp=3D3B+1 765 494 6001 |&l=<BR>> >t=3BSPAN class=3D3DEC_EC_Apple-converted-space&gt=3B&amp=3Bnbs=3D<BR>&gt=3B=<BR>> > &gt=3Bp=3D3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/FONT=<BR>> >&gt=3B&lt=3BFONT class=3D3DEC_EC_EC_Apple-style-span fac=3D<BR>&gt=3B &gt=<BR>> >=3Be=3D3D"Gill Sans" color=3D3D#0000ff&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_A=<BR>> >pple-style-span sty=3D<BR>&gt=3B &gt=3Ble=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=<BR>> >=3D3B FONT-FAMILY: 'Gill Sans'"&gt=3B&lt=3BSPAN class=3D3DEC=3D<BR>&gt=3B &=<BR>> >gt=3B_EC_EC_Apple-style-span style=3D3D"COLOR: rgb(0=3D2C0=3D2C255)=3D3B FO=<BR>> >NT-FAMILY: 'G=3D<BR>&gt=3B &gt=3Bill Sans'"&gt=3BMobile&lt=3B/SPAN&gt=3B&lt=<BR>> >=3B/SPAN&gt=3B&lt=3B/FONT&gt=3B&lt=3BFONT class=3D3DEC_EC_EC_Apple-style-sp=<BR>> >=3D<BR>&gt=3B &gt=3Ban face=3D3DGillSans-Light&gt=3B&lt=3BSPAN class=3D3DEC=<BR>> >_EC_EC_Apple-style-span style=3D3D"F=3D<BR>&gt=3B &gt=3BONT-FAMILY: GillSan=<BR>> >s-Light"&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-span style=3D<BR>&g=<BR>> >t=3B &gt=3B=3D3D"FONT-FAMILY: GillSans-Light"&gt=3B&lt=3BSPAN class=3D3DEC_=<BR>> >EC_Apple-converted-space&gt=3B=3D<BR>&gt=3B &gt=3B&amp=3Bnbsp=3D3B&lt=3B/SP=<BR>> >AN&gt=3B+1 765 427 5484&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/FONT&gt=3B&=<BR>> >lt=3B/DIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B&lt=3BFONT class=3D3DEC_EC_E=<BR>> >C_Apple-style-span face=3D3DGillSans-Light&gt=3B&lt=3BBR clas=3D<BR>&gt=3B =<BR>> >&gt=3Bs=3D3DEC_EC_EC_khtml-block-placeholder&gt=3B&lt=3B/FONT&gt=3B&lt=3B/D=<BR>> >IV&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SP=3D<BR>=<BR>> >&gt=3B &gt=3BAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/SPAN&gt=3B&lt=<BR>> >=3BBR class=3D3DEC_EC_EC_Apple-interchange-newline&gt=3B&lt=3B/SP=3D<BR>&gt=<BR>> >=3B &gt=3BAN&gt=3B&lt=3B/DIV&gt=3B&lt=3B/SPAN&gt=3B&lt=3B/DIV&gt=3B&lt=3BBR=<BR>> >&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3B<BR>&gt=3B &gt=3B&lt=3BDIV&gt=3BOn 12=<BR>> > Jan 2009=3D2C at 01:44=3D2C Jay wrote:&lt=3B/DIV&gt=3B&lt=3BBR class=3D3DE=<BR>> >C_EC_EC_App=3D<BR>&gt=3B &gt=3Ble-interchange-newline&gt=3B<BR>&gt=3B &gt=<BR>> >=3B&lt=3BBLOCKQUOTE&gt=3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-style-span sty=<BR>> >le=3D3D"WORD-SPACING: =3D<BR>&gt=3B &gt=3B0px=3D3B FONT: 12px Helvetica=3D3=<BR>> >B TEXT-TRANSFORM: none=3D3B COLOR: rgb(0=3D2C0=3D2C0=3D<BR>&gt=3B &gt=3B)=<BR>> >=3D3B TEXT-INDENT: 0px=3D3B WHITE-SPACE: normal=3D3B LETTER-SPACING: normal=<BR>> >=3D3B B=3D<BR>&gt=3B &gt=3BORDER-COLLAPSE: separate"&gt=3B<BR>&gt=3B &gt=3B=<BR>> >&lt=3BDIV class=3D3DEC_EC_EC_hmmessage style=3D3D"FONT-SIZE: 10pt=3D3B FONT=<BR>> >-FAMILY: Ve=3D<BR>&gt=3B &gt=3Brdana"&gt=3BIs there a way in Modula-3 to de=<BR>> >clare that&amp=3Bnbsp=3D3Ba type exists=3D2C a=3D<BR>&gt=3B &gt=3Bnd there =<BR>> >are &amp=3Blt=3D3B*external*&amp=3Bgt=3D3B instances of it=3D2C without "fu=<BR>> >lly" decl=3D<BR>&gt=3B &gt=3Baring it=3D2C so that no Modula-3 can instanti=<BR>> >ate it?&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR&gt=3BI have d=3D<BR>&gt=3B &g=<BR>> >t=3Bone this for sigset_t and sem_t=3D2C but they could erroneously be inst=<BR>> >antiat=3D<BR>&gt=3B &gt=3Bed by Modula-3 and I'd like to remove that abilit=<BR>> >y to mess up so easily.&lt=3BBR=3D<BR>&gt=3B &gt=3B&gt=3B&amp=3Bnbsp=3D3B&l=<BR>> >t=3BBR&gt=3B(* This type is not declared correctly. It is only instantiate=<BR>> >=3D<BR>&gt=3B &gt=3Bd in C code. *)&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B sigset_t =<BR>> >=3D3D RECORD END=3D3B&lt=3BBR&gt=3B&lt=3BBR&gt=3B(* This type =3D<BR>&gt=3B=<BR>> > &gt=3Bis not declared correctly. It is only instantiated in C code. *)&lt=<BR>> >=3BBR&gt=3B&amp=3Bnbsp=3D<BR>&gt=3B &gt=3B=3D3B sem_t =3D3D RECORD END=3D3B=<BR>> >&lt=3BBR&gt=3B&lt=3BBR&gt=3BIn C I believe you can do this=3D2C like:&lt=3B=<BR>> >=3D<BR>&gt=3B &gt=3BBR&gt=3B&amp=3Bnbsp=3D3B&amp=3Bnbsp=3D3Btypedef struct =<BR>> >foo foo_t=3D3B&amp=3Bnbsp=3D3B&lt=3BSPAN class=3D3DEC_EC_E=3D<BR>&gt=3B &gt=<BR>> >=3BC_Apple-converted-space&gt=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BBR&g=<BR>> >t=3B&amp=3Bnbsp=3D3B&amp=3Bnbsp=3D3Bextern foo_t foo=3D<BR>&gt=3B &gt=3B=3D=<BR>> >3B&amp=3Bnbsp=3D3B&lt=3BSPAN class=3D3DEC_EC_EC_Apple-converted-space&gt=3B=<BR>> >&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BBR&gt=3B=3D<BR>&gt=3B &gt=3B&amp=3Bn=<BR>> >bsp=3D3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3Bvoid UseFoo(foo_t*)=3D3B&lt=3BSPAN cl=<BR>> >ass=3D3DEC_EC_EC_Apple-conv=3D<BR>&gt=3B &gt=3Berted-space&gt=3B&amp=3Bnbsp=<BR>> >=3D3B&lt=3B/SPAN&gt=3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B foo_t* GetFoo(void)=3D=<BR>> >3B&lt=3BSPAN class=3D<BR>&gt=3B &gt=3B=3D3DEC_EC_EC_Apple-converted-space&g=<BR>> >t=3B&amp=3Bnbsp=3D3B&lt=3B/SPAN&gt=3B&lt=3BBR&gt=3B&amp=3Bnbsp=3D3B&lt=3BBR=<BR>> >&gt=3BThanks=3D2C&lt=3B=3D<BR>&gt=3B &gt=3BBR&gt=3B&amp=3Bnbsp=3D3B- Jay&lt=<BR>> >=3BBR&gt=3B&lt=3BBR&gt=3B&lt=3BBR&gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&gt=3B&lt=3B=<BR>> >/SPAN&gt=3B&lt=3B/BLOCKQUOTE&gt=3B&lt=3B/DIV&gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&=<BR>> >gt=3B&lt=3B=3D<BR>&gt=3B &gt=3B/DIV&gt=3B&lt=3B/SPAN&gt=3B&lt=3BBR class=3D=<BR>> >3DEC_EC_Apple-interchange-newline&gt=3B&lt=3B/BLOCKQUOTE&gt=3B&lt=3B/DIV&gt=<BR>> >=3B=3D<BR>&gt=3B &gt=3B&lt=3BBR&gt=3B&lt=3B/DIV&gt=3B&lt=3B/SPAN&gt=3B&lt=<BR>> >=3BBR class=3D3DEC_Apple-interchange-newline&gt=3B&lt=3B/BLOCKQUOTE&gt=3B&l=<BR>> >t=3B/DI=3D<BR>&gt=3B &gt=3BV&gt=3B&lt=3BBR&gt=3B&lt=3B/body&gt=3B<BR>&gt=3B=<BR>> > &gt=3B&lt=3B/html&gt=3B=3D<BR>&gt=3B &gt=3B<BR>&gt=3B &gt=3B--_6117a048-91=<BR>> >85-4c03-badb-ef8f93402268_--<BR><BR></body><BR>> ></html>=<BR>> ><BR>> >--_2e194b09-14b6-4301-9116-a9e4d1e522b4_--<BR><BR></body>
</html>