C-------------------------------------------------------------------C C Directory Management January 1983 C C Written by John C. Hayre, Texas Instruments C C Send suggestions and/or complaints to: C C C C Texas Instruments C C P.O. Box 225012, MS 3618 C C Dallas, Texas 75265 C C (Attention John Hayre) C C C C Phone: 214-995-3575 C C-------------------------------------------------------------------C C***************************************************************************** C C Revisions (Version 6.x) July, 1986 C Dale E. Coy C Los Alamos National Laboratory C (505) 667-7159 C C***************************************************************************** C C Common areas for 'Directory Management': C C-------------------------------------------------------------------C Integer*4 Max_Tags, Max_Stack, Files_Display_Width, 1 Attributes_Display_Width C NOTE: Files_Display structure includes 2 leading spaces, C The maximum length of a file name (39 + '.' = 40), the C maximum length of the extension (39 + ';' = 40), and C the maximum length of a version (5). Total of 87. Parameter (Max_Tags = 200) Parameter (Max_Stack = 42) Parameter (Files_Display_Width = 87) Parameter (Attributes_Display_Width = 49) C-------------------------------------------------------------------C Byte Size Logical*1 ReLoad, Do_DCL, DM_Exit !NOTE: These control action in DM.FOR C on return from subroutines. Logical*1 Line23_Dirty, Line23_Later, Line24_Dirty Logical*1 Forward, Have_More, Have_Broadcast Logical*1 FStack(Max_Stack) Logical*1 Itsa_Dir !Local Definition - Not in Common Logical*1 Spare_Logical_1 Logical*1 Spare_Logical_2 Integer*2 Wildcard_Length Integer*2 LkUic1, LkUic2, First_Free, TTCh1, Terminator, 1 CStack(Max_Stack), TStack(Max_Stack), Menustack(Max_Stack), 2 IncluLines(Max_Tags) Integer*4 LkDate(2),LkProt,Derror, 1 FirstUsed, StkIndex, SrchSize, 2 IncluCount, NumFiles, NumDirs, FileLine, 3 TopLine, LastLine, Menu, Total_Blks, File_Siz, Version, 4 Normal_Mode, Info_Mode, More_Mode, Not_Set, File_Attr_Pos, 5 First_Dir, Last_Dir, First_File, Last_File, Current_Line, 6 Name_Pos, Flag_Pos, Spare_Integer C-------------------------------------------------------------------C c Menu has the values 0 when no file info is provided c 1 when file info is provided for one file c 2 when file info is provided for all files C-------------------------------------------------------------------C Character*1 CMD, Escape, Tag_Char Character*2 SvTerminal, ReTerminal, CSI, Application_Keypad Character*2 Forward_Index, Reverse_Index Character*3 Graph, ASCII, Top_Half, Bottom_Half Character*4 Bright, Dull, Blinking, UnderLine, Revideo, Epage Character*4 Erase_To_Cursor, Erase_Line, Erase_To_EOL Character*5 AutoWrap_Off, Normal_I,Not_Under,Not_Blink, Positive Character*6 Cursor_Off, Cursor_On Character*7 SmallScreen, LargeScreen, VT200_7Bit Character*20 Wildcard Character*54 CmdLine1, CmdLine2 Character*80 Editor, Viewer, Print_Command, Broadcast_Msg Character*80 Current_Device, Original_Device Character*80 Search Character*(Files_Display_Width) This_Directory_Line, 1 Directories_Line,Files_Line Character*128 NHold, LdHold, Blanks Character*255 Exit_Com, HoldName, TempName, 1 Current_Dir_FileName, Current_Dir, Original_Dir, 2 DName2, RealName2 Character*512 BigRec C------------------------------------------------------------------C Common /DMICom/Size, 1 SrchSize,IncluCount, 2 NumFiles,NumDirs,FileLine,TopLine, 3 LastLine,Menu,Total_Blks,IncluLines,FirstUsed, 4 Version, file_attr_pos, 5 First_Dir,Last_Dir,First_File,Last_File,Current_Line, 6 Spare_Integer, Terminator, ReLoad, Do_DCL, 7 Line23_Dirty, Line23_Later, Line24_Dirty, Forward, 8 Have_More, Have_Broadcast, DM_Exit, 9 Spare_Logical_1, Spare_Logical_2 C-------------------------------------------------------------------C Common /DMCCom/ CMD, Search, Nhold, LdHold, Editor, Viewer, 1 Print_Command, Broadcast_Msg, Current_Device, Original_Device, 2 Exit_Com, HoldName, TempName, Current_Dir_FileName, 3 Current_Dir, Original_Dir, 4 DName2, RealName2, BigRec C-------------------------------------------------------------------C Common /DCLCom/ CmdLine1,CmdLine2 C-------------------------------------------------------------------C Common /DMStack/ StkIndex,CStack,FStack,TStack,MenuStack C-------------------------------------------------------------------C Common /wild/ wildcard,wildcard_length !RTG C-------------------------------------------------------------------C COMMON /TTCH/ TTCH1 C-------------------------------------------------------------------C Common /LDate/LkDate ! Shared with ASM routine Common /Lprot/LkProt ! Shared with ASM routine Common /Luic1/LkUic1 ! Shared with ASM routine Common /Luic2/LkUic2 ! Shared with ASM routine Common /Derr/Derror ! Shared with ASM routine Common /File_Size/File_Siz ! Shared with ASM routine Common /Frst_Free/First_Free ! Shared with ASM routine C-------------------------------------------------------------------C Parameter (Normal_Mode = 0) Parameter (Info_Mode = 1) Parameter (More_Mode = 2) Parameter (Not_Set = 9) Parameter (Name_Pos = 3) Parameter (Flag_Pos = 1) Parameter (Blanks = ' ') Parameter (Escape = Char(27) ) Parameter (CSI = Escape//'[') Parameter (Dull = CSI//'0m') !Really "All Attributes Off" Parameter (Bright = CSI//'1m') Parameter (Underline = CSI//'4m') Parameter (Blinking = CSI//'5m') Parameter (Revideo = CSI//'7m') Parameter (Normal_I = CSI//'22m') Parameter (Not_Under = CSI//'24m') Parameter (Not_Blink = CSI//'25m') Parameter (Positive = CSI//'27m') Parameter (Top_Half = Escape//'#3') Parameter (Bottom_Half = Escape//'#4') Parameter (SvTerminal = Escape//'7') Parameter (ReTerminal = Escape//'8') Parameter (Graph = Escape//'(0') Parameter (ASCII = Escape//'(B') Parameter (Reverse_Index = Escape//'M') Parameter (Forward_Index = Escape//'D') Parameter (SmallScreen = CSI//'1;22r') Parameter (LargeScreen = CSI//'1;24r') Parameter (Epage = CSI//'2J') Parameter (Erase_To_Cursor = CSI//'1J') Parameter (Erase_Line = CSI//'2K') Parameter (Erase_To_EOL = CSI//'0K') Parameter (AutoWrap_Off = CSI//'?7l') Parameter (VT200_7Bit = CSI//'62;1"') Parameter (Application_Keypad = Escape//'=') Parameter (Cursor_Off = CSI//'?25l') Parameter (Cursor_On = CSI//'?25h') Parameter (Tag_Char = '#') Parameter (This_Directory_Line = - ' This Directory:') Parameter (Directories_Line = - ' Directories: Total of') Parameter (Files_Line = - ' Files: Total of') C------------------------------------------------------------------C C Definitions for SMG C------------------------------------------------------------------C Include '($SMGDEF)' Integer*4 Pasteboard_ID, PB_Rows, PB_Columns, 1 Files_Display, Attributes_Display, 2 Current_Display_Length,Current_Files_Width, 3 Line23_Display, Directory_Display, Dir_Display_Pos, 4 Blocks_Display,Purge_Display,Line23MSG_Display, 5 Line24_Display, Less_Display, Empty_Display, 6 Line24MSG_Display,Line24BBMSG_Display,Working_Display, 7 Window1_Display,Window2_Display Integer*4 Keyboard_ID Logical*1 Line23MSG_On, Line24MSG_On, Line24BBMSG_On, 1 Blocks_On, Purge_On, Window1_On, Window2_On Common /SMG_Stuff/Pasteboard_ID, PB_Rows, PB_Columns, 1 Files_Display, Attributes_Display, 2 Current_Display_Length,Current_Files_Width, 3 Line23_Display, Directory_Display, Dir_Display_Pos, 4 Blocks_Display,Purge_Display,Line23MSG_Display, 5 Line24_Display, Less_Display, Empty_Display, 6 Line24MSG_Display,Line24BBMSG_Display,Working_Display, 7 Window1_Display,Window2_Display,Keyboard_ID, 8 Line23MSG_On, Line24MSG_On, Line24BBMSG_On, 9 Blocks_On, Purge_On, Window1_On, Window2_On Integer*4 RU_Mask, BB_Mask, BR_Mask, BRB_Mask, RRB_Mask, 1 Initial_Display_Length, Display_Length_Increment, 2 Initial_Files_Width Parameter (RU_Mask = SMG$M_Reverse .OR. SMG$M_Underline) Parameter (BB_Mask = SMG$M_Bold .OR. SMG$M_Blink ) Parameter (BR_Mask = SMG$M_Bold .OR. SMG$M_Reverse ) Parameter (BRB_Mask = BR_Mask .OR. SMG$M_Blink ) Parameter (RRB_Mask = SMG$M_Reverse .OR. SMG$M_Blink ) Parameter (Initial_Display_Length = 60) Parameter (Display_Length_Increment = 100) Parameter (Initial_Files_Width = 31) C------------------------------------------------------------------C C Definitions for DCL SubProcess C------------------------------------------------------------------C Real Wait_Time Integer*4 Mbx_Lun, SubProcess_ID Integer*2 Channel Logical*1 Have_SubProcess, Have_DCL_Setup, Doing_Command Character*11 Mbx_Name Common /DCL_Stuff/ Wait_Time, Mbx_Lun, SubProcess_ID, 1 Channel, Have_SubProcess, Have_DCL_Setup, 2 Doing_Command Parameter (Mbx_Name = 'DM_MAIL_BOX') C------------------------------------------------------------------C C Definitions for Delete Subroutines C------------------------------------------------------------------C Logical Have_Delete_Windows, 1 Quit_Delete, Confirm_Delete, All_Delete, 2 Remainder_Delete, Files_Only_Delete Integer*4 Delete_Op_Underlay_Display, Delete_Operation_Display, 1 Delete_File_Display, 2 Delete_Menu1_Display, Delete_Menu2_Display, 3 Delete_Menu_Underlay_Display, Delete_Spare_Display C-------------------------------------------------------------------C Common /DMDelete_Windows/ Have_Delete_Windows, 1 Quit_Delete, Confirm_Delete, All_Delete, 2 Remainder_Delete, Files_Only_Delete, 3 Delete_Op_Underlay_Display, Delete_Operation_Display, 4 Delete_File_Display, 5 Delete_Menu1_Display, Delete_Menu2_Display, 6 Delete_Menu_Underlay_Display, Delete_Spare_Display