1-- 2-- Copyright (c) 2014-15 John Marino <draco@marino.st> 3-- 4-- Permission to use, copy, modify, and distribute this software for any 5-- purpose with or without fee is hereby granted, provided that the above 6-- copyright notice and this permission notice appear in all copies. 7-- 8-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15-- 16 17 18with DragonFly.HAMMER.History; 19with Terminal_Interface.Curses; 20 21package Transactions is 22 23 package DHH renames DragonFly.HAMMER.History; 24 package TIC renames Terminal_Interface.Curses; 25 26 ScanData : DHH.scan_result; 27 app_width : TIC.Column_Count := 80; 28 comwindow : TIC.Window; 29 viewport : TIC.Window; 30 inpwindow : TIC.Window; 31 viewheight : TIC.Line_Count; 32 c_green : TIC.Color_Pair; 33 c_path : TIC.Color_Pair; 34 c_cyan : TIC.Color_Pair; 35 c_white : TIC.Color_Pair; 36 c_black : TIC.Color_Pair; 37 c_red : TIC.Color_Pair; 38 c_yellow : TIC.Color_Pair; 39 c_magenta : TIC.Color_Pair; 40 Key_Num1 : constant TIC.Key_Code := Character'Pos ('1'); 41 Key_Num2 : constant TIC.Key_Code := Character'Pos ('2'); 42 Key_Num3 : constant TIC.Key_Code := Character'Pos ('3'); 43 Key_Num4 : constant TIC.Key_Code := Character'Pos ('4'); 44 bright : constant TIC.Character_Attribute_Set := ( 45 Bold_Character => True, 46 others => False); 47 restored : constant String := ".restored"; 48 bust : constant String := " undetected "; 49 nocolor : constant String := " monochrome "; 50 msg_mono1 : constant String := "Sorry, this terminal does not support " & 51 "color through curses."; 52 msg_mono2 : constant String := "As color support is currently a " & 53 "requirement, Slider is unable to launch."; 54 55 procedure launch (path, newpath : in String; twoparams : in Boolean); 56 -- entry procedure which launches other routines as needed 57 58 function textfile (path : in String) return Boolean; 59 -- Returns true if there are no null characters in the file 60 61private 62 63 function textfile_private (path : in String; File_Size : in Natural) 64 return Boolean; 65 66end Transactions; 67