home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1065.dms / 1065.adf / TextPlus / SrcE.lzh / SrcE / fsdata.c < prev    next >
C/C++ Source or Header  |  1990-08-06  |  15KB  |  440 lines

  1. /* --------------------------------------------------------------------
  2.  * FSDATA.C - PathMaster(tm) Super File Selector structure data.
  3.  * Copyright © 1987-1989 by Justin V. McCormick.  All Rights Reserved.
  4.  * -------------------------------------------------------------------- */
  5.  
  6. #include <exec/types.h>
  7. #include <exec/nodes.h>
  8. #include <exec/lists.h>
  9. #include <exec/memory.h>
  10. #include <exec/ports.h>
  11. #include <exec/io.h>
  12. #include <exec/semaphores.h>
  13. #include <graphics/gfx.h>
  14. #include <graphics/view.h>
  15. #include <graphics/rastport.h>
  16. #include <graphics/layers.h>
  17. #include <graphics/text.h>
  18. #include <intuition/intuition.h>
  19. #include <libraries/dos.h>
  20.  
  21. #include "fs.h"
  22.  
  23. /* Buffers for string gadgets */
  24. BYTE FileUndoBuffer[PATHSTRSIZE];    /* StringInfo undo buffer    */
  25. BYTE FileUndoName[FILESTRSIZE];        /* StringInfo undo for filename */
  26. BYTE FSIgnorePat[FILESTRSIZE];        /* Pattern to avoid buffer    */
  27. BYTE fspathbuf1[PATHSTRSIZE];
  28. BYTE fspathbuf2[PATHSTRSIZE];
  29. BYTE FSPatternUndoBuffer[MATCHSTRSIZE];    /* FSPatternInfo undo        */
  30. BYTE FSWinTitleStr[80];            /* Global window title buffer    */
  31. BYTE FSwstr[PATHSTRSIZE*2];        /* General purpose work buffer    */
  32.  
  33. /* Strings for IntuiText */
  34. UBYTE DevLabelStr0[8]        = "";
  35. UBYTE DevLabelStr1[8]        = "";
  36. UBYTE DevLabelStr2[8]        = "";
  37. UBYTE DevLabelStr3[8]        = "";
  38. UBYTE FSPathLabelStr[]        = "PATH";
  39. UBYTE FSFileLabelStr[]        = "FILE";
  40. UBYTE EmptyStr[]        = "";
  41. UBYTE FSPatternLabelStr[]    = "PATTERN";
  42. UBYTE FSDevSortLabelStr[]    = "DEVICE      SORT";
  43. UBYTE ParentLabelStr[]        = "Parent";
  44. UBYTE RootLabelStr[]        = "Root";
  45. UBYTE FSUndoLabelStr[]        = "Last Dir";
  46. UBYTE AlphaLabelStr[]        = "Alpha";
  47. UBYTE SizeLabelStr[]        = "Size";
  48. UBYTE TimeLabelStr[]        = "Date";
  49.  
  50. /* Other strings used for formatting and comparisons */
  51. UBYTE fsdayspermonth[12] = 
  52. {
  53.   31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
  54. };
  55. BYTE fsdatefmtstr[] = "%02ld-%02ld-%02ld %02ld:%02ld:%02ld";
  56. BYTE fsbaddatestr[] = "00-00-00 00:00:00";
  57. BYTE fstempdate[40];
  58. BYTE FSSizeFmtStr[]        = "%8ld ";
  59. BYTE FSDirFmtStr[]        = "     DIR ";
  60. BYTE SlashStr[]            = "/";
  61. BYTE ColonStr[]            = ":";
  62. BYTE SplatStr[]            = "*";
  63. BYTE RamDirNameStr[]        = "RAM:";
  64.  
  65. #ifdef BENCHMARK
  66. BYTE timermsg1[]        = "Elapsed";
  67. #endif
  68.  
  69. /* Damn long chunk of error messages */
  70. BYTE fserrmsg0[]     = "File in use";
  71. BYTE fserrmsg1[]     = "File already exists";
  72. BYTE fserrmsg2[]     = "Directory not found!";
  73. BYTE fserrmsg3[]     = "Path not found!";
  74. BYTE fserrmsg4[]     = "Unknown DOS packet";
  75. BYTE fserrmsg5[]     = "Invalid stream name";
  76. BYTE fserrmsg6[]     = "Invalid file lock";
  77. BYTE fserrmsg7[]     = "File not of required type";
  78. BYTE fserrmsg8[]     = "Disk not validated";
  79. BYTE fserrmsg9[]     = "Disk write protected!";
  80. BYTE fserrmsg10[]     = "Rename across devices";
  81. BYTE fserrmsg11[]     = "Directory not empty";
  82. BYTE fserrmsg12[]     = "Too many subdirectories!";
  83. BYTE fserrmsg13[]     = "Volume not available!";
  84. BYTE fserrmsg14[]     = "Seek error!";
  85. BYTE fserrmsg15[]     = "Comment too long";
  86. BYTE fserrmsg16[]     = "Disk full!";
  87. BYTE fserrmsg17[]     = "File delete protected!";
  88. BYTE fserrmsg18[]     = "File write protected!";
  89. BYTE fserrmsg19[]     = "File read protected?";
  90. BYTE fserrmsg20[]     = "Not a DOS disk!";
  91. BYTE fserrmsg21[]     = "No disk in drive!";
  92. BYTE fserrmsg22[]     = "Empty Directory!";
  93. BYTE fserrmsg23[]     = "No Directory!";
  94. BYTE fserrmsg24[]     = "Nothing matched PATTERN";
  95. BYTE fserrmsg25[]     = "Unknown Error!";
  96. BYTE fserrmsg26[]     = "No RAM?!";
  97. BYTE fserrmsg27[]    = "Reading...";
  98. BYTE fserrmsg28[]    = "Sorting...";
  99. BYTE fserrmsg29[]     = "Select Filename:";
  100.  
  101. BYTE *fserrmsgs[] =
  102. {
  103.   fserrmsg0,
  104.   fserrmsg1,
  105.   fserrmsg2,
  106.   fserrmsg3,
  107.   fserrmsg4,
  108.   fserrmsg5,
  109.   fserrmsg6,
  110.   fserrmsg7,
  111.   fserrmsg8,
  112.   fserrmsg9,
  113.   fserrmsg10,
  114.   fserrmsg11,
  115.   fserrmsg12,
  116.   fserrmsg13,
  117.   fserrmsg14,
  118.   fserrmsg15,
  119.   fserrmsg16,
  120.   fserrmsg17,
  121.   fserrmsg18,
  122.   fserrmsg19,
  123.   fserrmsg20,
  124.   fserrmsg21,
  125.   fserrmsg22,
  126.   fserrmsg23,
  127.   fserrmsg24,
  128.   fserrmsg25,
  129.   fserrmsg26,
  130.   fserrmsg27,
  131.   fserrmsg28,
  132.   fserrmsg29
  133. };
  134.  
  135. #ifdef STANDALONE
  136. struct TextFont *FSTextFont;        /* TextFont pointer for Text    */
  137. struct TextAttr Def8Text =
  138. {
  139.   (UBYTE *)"topaz.font",    /* Font Name   */
  140.   8,                /* Font Height */
  141.   FS_NORMAL,            /* Style       */
  142.   FPF_ROMFONT            /* Preferences */
  143. };
  144. BYTE TimerName[]        = "timer.device";
  145. #else
  146. extern struct TextAttr Def8Text;
  147. #endif
  148.  
  149. /* IntuiText for Path and File labels */
  150. struct IntuiText FSDevSortTxt   = { LABELFPEN, LABELBPEN, JAM2, 350,  0, &Def8Text, FSDevSortLabelStr, 0L };
  151. struct IntuiText FSPatternTxt = { LABELFPEN, LABELBPEN, JAM2,   0, 24, &Def8Text, FSPatternLabelStr, &FSDevSortTxt };
  152. struct IntuiText FSFileTxt    = { LABELFPEN, LABELBPEN, JAM2,   0, 12, &Def8Text, FSFileLabelStr, &FSPatternTxt };
  153. struct IntuiText FSPathTxt    = { LABELFPEN, LABELBPEN, JAM2,   0,  0, &Def8Text, FSPathLabelStr, &FSFileTxt };
  154.  
  155. /* Gadgets ------------------------------------------------------------ */
  156. /* The File Gadgets */
  157. WORD FSGBox2[] =
  158. {
  159.   4,11, 461,11, 461,22, 4,22, 4,33, 461,33, 461,44, 4,44, 4,55, 461,55,
  160.   461,66, 4,66, 4,77, 461,77, 461,88, 4,88, 4,99, 461,99, 461,110, 4,110,
  161.   4,121, 461,121, 461,11, 4,11, 4,121
  162. };
  163. struct Border FSFileGadBorder = { -5, -12, SBORDFPEN, SBORDBPEN, JAM1, 25, FSGBox2, 0L };
  164. struct Gadget FSFileGad0 =
  165. {
  166.   0L, 5, 12, 456, 109, GADGHNONE, GADGIMMEDIATE, BOOLGADGET,
  167.   (APTR)&FSFileGadBorder, 0L, 0L, 0L, 0L, 50, 0L
  168. };
  169.  
  170. /* Arrow stuff */
  171. WORD FSSlideBData[] = { 0,-1, 26,-1, 26,85, 0,85, 0,-1 };
  172. WORD FSABox2[] = { 0,0, 13,0, 13,10, 0,10, 0,0 };
  173. WORD FSABox1[] = { 0,0, 26,0, 26,10, 0,10, 0,0 };
  174. WORD FSUpArrowData[] = { 14, 2, 14, 8, 13, 8, 13, 2, 12, 3, 15, 3, 16, 4, 11, 4, 10, 5, 17, 5 };
  175. struct Border FSSlideBorder = {  0, -87, SBORDFPEN, 0, JAM1,  5, FSSlideBData, 0L };
  176. struct Border FSUpArrow2    = { -7, 0, ARROWFPEN, 0, JAM1, 10, FSUpArrowData, 0L };
  177. struct Border FSUpBorder2   = {  0, 0, ARROWBPEN, 0, JAM1,  5, FSABox2, &FSUpArrow2 };
  178. struct Border FSUpArrow     = {  0, 0, ARROWFPEN, 0, JAM1, 10, FSUpArrowData, &FSSlideBorder };
  179. struct Border FSUpBorder    = {  0, 0, ARROWBPEN, 0, JAM1,  5, FSABox1, &FSUpArrow };
  180.  
  181. WORD FSDownArrowData[] = { 14, 8, 14, 2, 13, 2, 13, 8, 12, 7, 15, 7, 16, 6, 11, 6, 10, 5, 17, 5 };
  182. struct Border FSDownArrow2  = { -7, 0, ARROWFPEN, 0, JAM1, 10, FSDownArrowData, 0L };
  183. struct Border FSDownBorder2 = {  0, 0, ARROWBPEN, 0, JAM1,  5, FSABox2, &FSDownArrow2 };
  184. struct Border FSDownArrow   = {  0, 0, ARROWFPEN, 0, JAM1, 10, FSDownArrowData, 0L };
  185. struct Border FSDownBorder  = {  0, 0, ARROWBPEN, 0, JAM1,  5, FSABox1, &FSDownArrow };
  186.  
  187. struct Gadget FSNextDevs = 
  188. {
  189.   &FSFileGad0,
  190.   308, 146, 14, 11, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, BOOLGADGET,
  191.   (APTR)&FSUpBorder2, 0L, 0L, 0L, 0L, 43, 0L
  192. };
  193. struct Gadget FSPrevDevs =
  194. {
  195.   &FSNextDevs,
  196.   308, 158, 14, 11, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, BOOLGADGET,
  197.   (APTR)&FSDownBorder2, 0L, 0L, 0L, 0L, 42, 0L
  198. };
  199.  
  200. struct Gadget FSDownGad =
  201. {
  202.   &FSPrevDevs,
  203.   464, 111, 27, 11, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, BOOLGADGET,
  204.   (APTR)&FSDownBorder, 0L, 0L, 0L, 0L, 41, 0L
  205. };
  206. struct Gadget FSUpGad =
  207. {
  208.   &FSDownGad,
  209.   464, 99, 27, 11, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, BOOLGADGET,
  210.   (APTR)&FSUpBorder, 0L, 0L, 0L, 0L, 40, 0L
  211. };
  212.  
  213. /* Our Slide gadget */
  214. struct Image FSSlideKnob;
  215. struct PropInfo FSSlideProp = { AUTOKNOB|FREEVERT|PROPBORDERLESS, 0, 0, 0xffff, 0xffff, 0, 0, 0, 0, 0, 0 };
  216. struct Gadget FSSlideGad =
  217. {
  218.   &FSUpGad,
  219.   467, 13, 21, 83, GADGHNONE|GADGIMAGE, GADGIMMEDIATE|RELVERIFY, PROPGADGET,
  220.   (APTR)&FSSlideKnob, 0L, 0L, 0L, (APTR)&FSSlideProp, 33, 0L
  221. };
  222.  
  223. /* The three string gadgets */
  224. WORD FSGBox4[] = { 0, 0, 238, 0, 238, 11, 0, 11, 0, 0 };
  225. struct Border FSStringBord2 = { -3, -2, SBORDFPEN, SBORDBPEN, JAM1, 5, FSGBox4, 0L };
  226. WORD FSGBox3[] = { 0, 0, 262, 0, 262, 11, 0, 11, 0, 0 };
  227. struct Border FSStringBord  = { -3, -2, SBORDFPEN, SBORDBPEN, JAM1, 5, FSGBox3, 0L };
  228.  
  229. struct StringInfo FSPathInfo = { 0L, (UBYTE *)FileUndoBuffer, 0, PATHSTRSIZE-1, 0, 0, 0, 0, 0, 0, 0L, 0L, 0L };
  230. struct Gadget FSPathGad =
  231. {
  232.   &FSSlideGad, 42, 125, 260, 10, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, STRGADGET,
  233.   (APTR)&FSStringBord, 0L, 0L, 0L, (APTR)&FSPathInfo, 32, 0L
  234. };
  235.  
  236. struct StringInfo FSFileInfo = { 0L, (UBYTE *)FileUndoName, 0, FILESTRSIZE-1, 0, 0, 0, 0, 0, 0, 0L, 0L, 0L };
  237. struct Gadget FSFileGad =
  238. {
  239.   &FSPathGad, 42, 136, 260, 10, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, STRGADGET,
  240.   (APTR)&FSStringBord, 0L, 0L, 0L, (APTR)&FSFileInfo, 31, 0L
  241. };
  242.  
  243. struct StringInfo FSPatternInfo = { 0L, (UBYTE *)FSPatternUndoBuffer, 0, FILESTRSIZE-1, 0, 0, 0, 0, 0, 0, 0L, 0L, 0L };
  244. struct Gadget FSPatternGad =
  245. {
  246.   &FSFileGad, 66, 147, 236, 10, GADGHCOMP, GADGIMMEDIATE|RELVERIFY, STRGADGET,
  247.   (APTR)&FSStringBord2, 0L, 0L, 0L, (APTR)&FSPatternInfo, 30, 0L
  248. };
  249.  
  250. /* The directory gadgets */
  251. struct Image FSDirImg2 = { 1,1, 51,9, 0, 0L, 0,  GADFILLPEN, 0L };
  252. struct Image FSDirImg1 = { 0,0, 53,11, 0, 0L, 0, GADBORDPEN, &FSDirImg2 };
  253.  
  254. struct IntuiText ParentTxt = { GADTFPEN, GADTBPEN, JAM2, 3, 2, &Def8Text, ParentLabelStr, 0L };
  255. struct Gadget ParentGad =
  256. {
  257.   &FSPatternGad,
  258.   324, 134, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  259.   (APTR)&FSDirImg1, 0L, &ParentTxt, 0L, 0L, 25, 0L
  260. };
  261.  
  262. struct IntuiText RootTxt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, RootLabelStr, 0L };
  263. struct Gadget RootGad =
  264. {
  265.   &ParentGad,
  266.   379, 134, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  267.   (APTR)&FSDirImg1, 0L, &RootTxt, 0L, 0L, 24, 0L
  268. };
  269.  
  270. struct IntuiText RAMTxt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, DevLabelStr0, 0L };
  271. struct Gadget RAMGad =
  272. {
  273.   &RootGad,
  274.   324, 146, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  275.   (APTR)&FSDirImg1, 0L, &RAMTxt, 0L, 0L, 23, 0L
  276. };
  277.  
  278. struct IntuiText DF0Txt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, DevLabelStr1, 0L };
  279. struct Gadget DF0Gad =
  280. {
  281.   &RAMGad,
  282.   379, 146, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  283.   (APTR)&FSDirImg1, 0L, &DF0Txt, 0L, 0L, 22, 0L
  284. };
  285.  
  286. struct IntuiText NIL1Txt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, DevLabelStr2, 0L };
  287. struct Gadget NIL1Gad =
  288. {
  289.   &DF0Gad,
  290.   324, 158, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  291.   (APTR)&FSDirImg1, 0L, &NIL1Txt, 0L, 0L, 21, 0L
  292. };
  293.  
  294. struct IntuiText NIL2Txt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, DevLabelStr3, 0L };
  295. struct Gadget NIL2Gad =
  296. {
  297.   &NIL1Gad,
  298.   379, 158, 53, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  299.   (APTR)&FSDirImg1, 0L, &NIL2Txt, 0L, 0L, 20, 0L
  300. };
  301.  
  302. /* Sort gadgets */
  303. struct IntuiText TimeTxt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, TimeLabelStr, 0L };
  304. struct Gadget TimeGad =
  305. {
  306.   &NIL2Gad,
  307.   438, 158, 53, 11, GADGHCOMP|GADGIMAGE, TOGGLESELECT|GADGIMMEDIATE, BOOLGADGET,
  308.   (APTR)&FSDirImg1, 0L, &TimeTxt, 0L, 0L, 12, 0L
  309. };
  310.  
  311. struct IntuiText SizeTxt = { GADTFPEN, GADTBPEN, JAM2, 11, 2, &Def8Text, SizeLabelStr, 0L };
  312. struct Gadget SizeGad =
  313. {
  314.   &TimeGad,
  315.   438, 146, 53, 11, GADGHCOMP|GADGIMAGE, TOGGLESELECT|GADGIMMEDIATE, BOOLGADGET,
  316.   (APTR)&FSDirImg1, 0L, &SizeTxt, 0L, 0L, 11, 0L
  317. };
  318.  
  319. struct IntuiText AlphaTxt = { GADTFPEN, GADTBPEN, JAM2, 6, 2, &Def8Text, AlphaLabelStr, 0L };
  320. struct Gadget AlphaGad =
  321. {
  322.   &SizeGad,
  323.   438, 134, 53, 11, SELECTED|GADGHCOMP|GADGIMAGE, TOGGLESELECT|GADGIMMEDIATE, BOOLGADGET,
  324.   (APTR)&FSDirImg1, 0L, &AlphaTxt, 0L, 0L, 10, 0L
  325. };
  326.  
  327. /* Cancel, select and undo gadgets */
  328. struct Image FSOptImg2 = { 1,1, 72,9, 0, 0L,  0, GADFILLPEN, 0L };
  329. struct Image FSOptImg1 = { 0,0, 74,11, 0, 0L, 0, GADBORDPEN, &FSOptImg2 };
  330.  
  331. struct IntuiText FSUndoTxt = { GADTFPEN, GADTBPEN, JAM2, 6, 2, &Def8Text, FSUndoLabelStr, 0L };
  332. struct Gadget FSUndoGad =
  333. {
  334.   &AlphaGad,
  335.   228, 158, 74, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  336.   (APTR)&FSOptImg1, 0L, &FSUndoTxt, 0L, 0L, 3, 0L
  337. };
  338.  
  339. struct IntuiText FSCancelTxt = { GADTFPEN, GADTBPEN, JAM2, 10, 2, &Def8Text, EmptyStr, 0L };
  340. struct Gadget FSCancelGad =
  341. {
  342.   &FSUndoGad,
  343.   146, 158, 74, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  344.   (APTR)&FSOptImg1, 0L, &FSCancelTxt, 0L, 0L, 2, 0L
  345. };
  346.  
  347. struct IntuiText FSSelectTxt = { GADTFPEN, GADTBPEN, JAM2, 13, 2, &Def8Text, EmptyStr, 0L };
  348. struct Gadget FSSelectGad =
  349. {
  350.   &FSCancelGad,
  351.   64, 158, 74, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  352.   (APTR)&FSOptImg1, 0L, &FSSelectTxt, 0L, 0L, 1, 0L
  353. };
  354.  
  355. struct IntuiText FSUserTxt = { GADTFPEN, GADTBPEN, JAM2, 13, 2, &Def8Text, EmptyStr, 0L };
  356. struct Gadget FSUserGad =
  357. {
  358.   &FSSelectGad,
  359.   64, 158, 74, 11, GADGHCOMP|GADGIMAGE, RELVERIFY, BOOLGADGET,
  360.   (APTR)&FSOptImg1, 0L, &FSUserTxt, 0L, 0L, 0, 0L
  361. };
  362.  
  363. /* Array of currently visible "gadget" text */
  364. struct file_node *FSFileNodes[10];
  365.  
  366. /* Array of pointers to device name Gadgets */
  367. struct Gadget *DevGads[4] =
  368. {
  369.   &RAMGad,
  370.   &DF0Gad,
  371.   &NIL1Gad,
  372.   &NIL2Gad
  373. };
  374.  
  375. /* Array of pointers to device name IntuiText strings */
  376. struct IntuiText *DevTxts[4] =
  377. {
  378.   &RAMTxt,
  379.   &DF0Txt,
  380.   &NIL1Txt,
  381.   &NIL2Txt
  382. };
  383.  
  384. /* Array of pointers to currently visible device names */
  385. UBYTE *CurDevNames[4];
  386.  
  387. /* AreaFill Pattern */
  388. UWORD EmptyPattern[2] = { 0x8888, 0x2222 };
  389.  
  390. /* Window Stuff ------------------------------------------------------- */
  391. struct NewWindow FSnw =
  392. {
  393.   0, 11, 495, 171, 0, 1,
  394.   GADGETUP|GADGETDOWN|MOUSEBUTTONS|RAWKEY|DISKINSERTED|DISKREMOVED|INTUITICKS,
  395.   WINDOWDRAG|WINDOWDEPTH|SMART_REFRESH|NOCAREREFRESH|ACTIVATE|RMBTRAP,
  396.   0L, 0L, 0L, 0L, 0L, 0, 0, 0, 0, WBENCHSCREEN
  397. };
  398. struct DateStamp FSdirstamp;        /* DateStamp of last dir locked    */
  399.  
  400. /* Assorted uninitialized Variables */
  401. struct List *devList;            /* List of available devices    */
  402. struct dev_node *lastdev;        /* Last visible disk name    */
  403.  
  404. struct List *fnList;            /* Head node of dir list    */
  405. struct file_node *topfin;        /* Top visible node        */
  406.  
  407. BPTR FSLock;                /* FileLock pointer        */
  408. struct FileInfoBlock *FSFib;         /* General purpose Fib pointer    */
  409. struct FSRequest *FSReq;         /* Global pointer to currentreq */
  410. struct InfoData *FSInfo;        /* InfoData pointer        */
  411. struct MsgPort *FSTimerPort;        /* Timer reply port        */
  412. struct RastPort *FSRPort;        /* RastPort copy for Text    */
  413. struct timerequest *FSDelayReq;        /* Timer IO request        */
  414. struct Window *FSWin = 0L;
  415.  
  416. ULONG fscurmicros;
  417. ULONG fscursecs;            /* New time value        */
  418. ULONG fsoldmicros;
  419. ULONG fsoldsecs;            /* Time storage for doubleclick */
  420. ULONG FSSignalMask;            /* Wait signal mask        */
  421. ULONG FSSignal;                /* FS IDCMP signal bit        */
  422. ULONG FSUserSignal;            /* UserIDCMP signal bit        */
  423. UWORD fsflags;                /* Copy of FSReq->flags        */
  424. UWORD fsvheight;            /* Slide Prop height        */
  425. UWORD fsvposition;            /* Slide Prop position        */
  426. WORD FSCountDown;            /* IntuiTick counter        */
  427. WORD fsdirlocked;            /* Set if Lock()ed a dir    */
  428. WORD FSDone;                /* Global exit flag        */
  429. WORD fsnumentries;            /* Total count of entries    */
  430. WORD fsprevgadid;            /* Last FileGad selected    */
  431. WORD fsstartedstr;            /* Started a string entry flag    */
  432. WORD fstitlelength;            /* Initial length of title     */
  433. WORD fsneedshow;            /* 0=current, 1=needs refresh    */
  434.  
  435. /* Initialized variables */
  436. BYTE *OldFSPathBuf = fspathbuf2;    /* Last path storage        */
  437. BYTE *FSPathBuf = fspathbuf1;        /* Current path            */
  438. WORD fsvirgindir = 1;            /* New directory flag        */
  439. WORD fstitstatus = 27;            /* Current title message #    */
  440.