$ ! $ !P1 - Input *.MSG file $ $ mess /lis /obj 'P1' $ $ open/read lis 'P1'.lis $ open/write inc 'P1'.h $ prefix = "" $loop: $ read/end=quit/err=quit lis sts $ sts = f$edit(sts,"COMPRESS") $ cod = f$element(1," ",sts) $ name= f$element(3," ",sts) $ len = f$length(sts) $ if f$locate("/prefix=",sts).lt.len $ then $ prefix = f$edit(f$element(1,"=",sts),"COLLAPSE,UPCASE") $ endif $! if f$locate("<",sts).lt.len .and. f$locate(">",sts).lt.len $ if f$locate("<",sts).lt.len $ then $ comments = f$element(1,"<",sts) $! comments = f$element(0,">",comments) $ cod = f$int(%x0'cod') $ write inc "#define ''prefix'''name' ''cod' /*''comments'*/" $ endif $ goto loop $ $quit: $ close lis $ close inc $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $ ws := write fout $ open/read finp 'P1'.msg $ open/write fout 'P1'.msghlp $ $ $readloop: $ read/end=quit0/err=quit0 finp sts $readloop0: $ if "!".eqs.f$extr(0,1,sts) then $goto readloop $ if ".".eqs.f$extr(0,1,sts) then $goto readloop $ if "".eqs.f$edit(sts,"COLLAPSE") then $goto readloop $ $ gosub getmsg $ ws "" $ goto readloop0 $quit0: $ close finp $ close fout $ $ help/mess/insert='P1'.msghlp/libr='P1'.msghlp$data $ $ goto sdml $getmsg: $ sts = f$edit(sts,"COMPRESS") $ MSG_CODE = f$elem(0," ",sts) $ MSG_TEXT = f$elem(1," ",sts) $ MSG_TEXT = f$elem(0,">",f$elem(1,"<",sts)) $ RADMOD = f$elem(0,":",MSG_TEXT) $ ws "1''MSG_CODE', ''MSG_TEXT'" $ ws "2RADIUS-VMS, RADIUS Server for OpenVMS,module ''RADMOD'." $ $getmsgloop: $ read/end=quit0/err=quit0 finp sts $ if "!".nes.f$extr(0,1,sts) then $return $ sts = f$edit(sts,"COMPRESS") $ $ if "!.explanation".eqs.f$elem(0," ",sts) $ then $ preffix = 3 $ sts = f$extract(12,128,sts) $ endif $ $ if "!.user_action".eqs.f$elem(0," ",sts) $ then $ preffix = 4 $ sts = f$extract(12,128,sts) $ endif $ $ sts = f$extract(2,128,sts) $ $ ws "''preffix'''sts'" $ goto getmsgloop $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $sdml: $ open/read finp 'P1'.msg $ open/write fout 'P1'.sdml $ ws "" $ $readloop1: $ read/end=quit10/err=quit10 finp sts $readloop10: $ if "!".eqs.f$extr(0,1,sts) then $goto readloop1 $ if ".".eqs.f$extr(0,1,sts) then $goto readloop1 $ if "".eqs.f$edit(sts,"COLLAPSE") then $goto readloop1 $ $ gosub getmsg1 $ ws "" $ goto readloop10 $quit10: $ ws "" $ close finp $ close fout $ $ exit $getmsg1: $ sts = f$edit(sts,"COMPRESS") $ MSG_CODE = f$elem(0," ",sts) $ MSG_TEXT = f$elem(1," ",sts) $ MSG_TEXT = f$elem(0,">",f$elem(1,"<",sts)) $ RADMOD = f$elem(0,":",MSG_TEXT) $ ws "(TEXTIDENT)" $ ws "(''MSG_CODE'\''MSG_TEXT')" $ $getmsgloop1: $ read/end=quit10/err=quit10 finp sts $ if "!".nes.f$extr(0,1,sts) then $return $ sts = f$edit(sts,"COMPRESS") $ $ if "!.explanation".eqs.f$elem(0," ",sts) $ then $ ws "" $ sts = f$extract(12,128,sts) $ endif $ $ if "!.user_action".eqs.f$elem(0," ",sts) $ then $ ws "(User Action)" $ sts = f$extract(12,128,sts) $ endif $ $ sts = f$extract(2,128,sts) $ $ ws sts $ goto getmsgloop1