Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!CIM-VAX.HONEYWELL.COM!derstad From: derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") Newsgroups: comp.sys.apollo Subject: Re: Detecting SR10 Message-ID: <8908252153.AA16752@umix.cc.umich.edu> Date: 25 Aug 89 22:49:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 48 > Under SR9.7 if you created a file with > the name_$ calls with the name "FOOBAR" > and then tried to read back the name using > the name_$xxx_cc (case correct) calls you > should get "foobar", I think. Testing name > case sensitivity would be the easiest way > I can think of. If the DOWNCASE environment variable is set to FALSE at SR9, this will give an incorrect answer. However, the same person who pointed that out to me also made a related suggestion: Just try creating a file whose leaf is greater than 32 characters. The following function seems to work, for those interested: function sr10 : boolean; %include '/sys/ins/base.ins.pas'; %include '/sys/ins/name.ins.pas'; const file_name = '/tmp/foobarfoobarfoobarfoobarfoobarfoobar'; var is_sr10, is_sr9 : boolean; status : status_$t; begin name_$create_file(file_name, sizeof(file_name), status); is_sr10 := status.all = status_$ok; is_sr9 := status.all = name_$bad_leaf; if not (is_sr10 or is_sr9) then writeln('Abnormal status from SR10 detection function: ', status.modc:8, status.code:8); { cleanup } name_$delete_file(file_name, sizeof(file_name), status); sr10 := is_sr10; end; Dave Erstad Principal Design Automation Engineer Honeywell SSEC DERSTAD@cim-vax.honeywell.com