C+ C NAME: C T3D_marker_num C CALLING SEQUENCE: subroutine T3D_marker_num(iMode, cFile, iNum) C INCLUDE: include 'filparts.h' include 'str2str_inc.h' C CALLS: C iSetFileSpec, iGetFileSpec, iPutFileSpec, Str2Flt, Int2StrSet, Int2Str C MODIFICATION HISTORY: C FEB-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer iMode character cFile*(*) integer iNum character cStr*120 real rVec(3) I = iSetFileSpec(cFile) if (iMode .eq. 0) then I = iGetFileSpec(FIL__NAME,FIL__NAME,cStr) I = 3 call Str2Flt(cStr, I, rVec) iRot = nint(rVec(I)) ! Integer rotation number I = iGetFileSpec(FIL__TYPE,FIL__TYPE,cStr) I = 3 call Str2Flt(cStr(2:), I, rVec) ! Skip past the '.' of the file type iFrac = nint(rVec(1)) ! Fractional rotation iNum = iRot*10000+iFrac else if (iMode .eq. 1) then iRot = iNum/10000 iFrac = mod(iNum,10000) I = iGetFileSpec(FIL__NAME,FIL__NAME,cStr) I = I-4 L = Int2StrSet(STR__ZERORIGHTADJUST) I = I+Int2Str(iRot ,cStr(I+1:I+4)) L = Int2StrSet(L) I = iPutFileSpec(FIL__NAME,FIL__NAME,cStr) I = iGetFileSpec(FIL__TYPE,FIL__TYPE,cStr) I = 1 L = Int2StrSet(STR__ZERORIGHTADJUST) I = I+Int2Str(iFrac,cStr(I+1:I+4)) L = Int2StrSet(L) I = iPutFileSpec(FIL__TYPE,FIL__TYPE,cStr) I = iGetFileSpec(0,0,cFile) endif return end