home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / DVD!FX17.LHA / FrexxEd / fpl / FrexxEdMain.FPL < prev    next >
Encoding:
Text File  |  1995-02-01  |  1.4 KB  |  44 lines

  1. export int MySearch(int flag)    /* 0=forward, 1=backward */
  2. {
  3.   int ret;
  4.   if (flag==0)
  5.     SearchSet("f+");
  6.   else
  7.     SearchSet("f-");
  8.   ret=Search();
  9.   if (ret<0) {
  10.     ReturnStatus(GetReturnMsg(ret));    /* Some error occured */
  11.     DisplayBeep();
  12.   }
  13. }
  14.  
  15. export int Home()   { GotoLine(ReadInfo("line")); }
  16. export int End()    { GotoLine(ReadInfo("line"), ReadInfo("line_length")); }
  17. export int Top()    { GotoLine(1); }
  18. export int Bottom() { GotoLine(-1); }
  19.  
  20. /*************************************************************
  21.  *
  22.  * While FrexxEd has a minimum of key assigns, we'll have to 
  23.  * assign some keys that we like ourself.
  24.  *
  25.  ****/
  26.     /* Cursor movements key */
  27. AssignKey("Home();", "Shift 'Left'");
  28. AssignKey("End();", "Shift 'Right'");
  29. AssignKey("Top();", "Control 'Up'");
  30. AssignKey("Bottom();", "Control 'Down'");
  31. AssignKey("PlaceCursor();", "MouseLeft");
  32. AssignKey("PlaceCursor();", "MouseLeftDrag");
  33. AssignKey("BlockMark();", "MouseLeftDouble");
  34.  
  35. AssignKey("ResizeView(ReadInfo(\"view_lines\")-2);", "CTRL Shift 'Up'");
  36. AssignKey("ResizeView(ReadInfo(\"view_lines\")+2);", "CTRL Shift 'Down'");
  37.  
  38. AssignKey("{ int ret; SearchSet(\"f-\"); if ((ret=SearchSet())>=0) { if (Search()<0) DisplayBeep(); } else ReturnStatus(GetReturnMsg(ret)); }", "Amiga A");
  39.  
  40.     /* Set the height on the current view to the half */
  41. AssignKey("ResizeView(ReadInfo(\"view_lines\")/2);", "Amiga 2");
  42.  
  43. Hook("Sprintf", "Request(\"Replace Sprintf() calls with sprintf()!!!\");");
  44.