home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Pascal / Snippets / PNL Libraries / MyGlue.p < prev    next >
Encoding:
Text File  |  1996-06-01  |  1.5 KB  |  67 lines  |  [TEXT/CWIE]

  1. unit MyGlue;
  2.  
  3. interface
  4.  
  5. implementation
  6.  
  7. {$Z+}
  8.  
  9.     procedure UpperString (var theString: Str255; diacSensitive: BOOLEAN);
  10.     begin
  11.         UprString(theString, diacSensitive);
  12.     end;
  13.  
  14.     procedure DialogCut (theDialog: DialogPtr);
  15.     begin
  16.         DlgCut(theDialog);
  17.     end;
  18.  
  19.     procedure DialogPaste (theDialog: DialogPtr);
  20.     begin
  21.         DlgPaste(theDialog);
  22.     end;
  23.  
  24.     procedure DialogCopy (theDialog: DialogPtr);
  25.     begin
  26.         DlgCopy(theDialog);
  27.     end;
  28.  
  29.     procedure DialogDelete (theDialog: DialogPtr);
  30.     begin
  31.         DlgDelete(theDialog);
  32.     end;
  33.  
  34.     function RawFindFolder (vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; var foundVRefNum: INTEGER; var foundDirID: LONGINT): OSErr;
  35.     inline
  36.         $7000, $A823;
  37.  
  38.     function FindFolder (vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; var foundVRefNum: INTEGER; var foundDirID: LONGINT): OSErr;
  39.         var
  40.             oe: OSErr;
  41.             gv: longint;
  42.             sysenv: sysEnvRec;
  43.             procID: longint;
  44.     begin
  45.         if (Gestalt(gestaltFindFolderAttr, gv) = noErr) & BTST(gv, gestaltFindFolderPresent) then begin
  46.             oe := RawFindFolder(vRefNum, folderType, createFolder, foundVRefNum, foundDirID);
  47.         end
  48.         else begin
  49.             oe := SysEnvirons(1, sysEnv);
  50.             if oe = noErr then begin
  51.                 oe := GetWDInfo(sysEnv.sysVRefNum, foundVRefNum, foundDirID, procID);
  52.             end;
  53.         end;
  54.         FindFolder := oe;
  55.     end;
  56.  
  57.     procedure DateToSeconds (var d: DateTimeRec; var secs: LONGINT);
  58.     begin
  59.         Date2Secs(d, secs);
  60.     end;
  61.  
  62.     procedure TESetWordBreak (wBrkProc: ProcPtr; hTE: TEHandle);
  63.     begin
  64.         SetWordBreak(wBrkProc, hTE);
  65.     end;
  66.  
  67. end.