File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p Extra lines in 1st before 371 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 371; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ371) 366 WindowSize: LongInt; 367 WindowRect: rect; 368 WhichWindow: WindowPtr; 369 kind, ignore: integer; 370 HidingPasteControl: boolean; -------------------------------------------------------------------------------- 371 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 372 begin 373 WhichWindow := FrontWindow; 374 if WhichWindow = nil then 375 exit(CopyWindow); 376 WindowRect := WhichWindow^.PortRect; Extra lines in 1st before 410 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 411:414; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ410) 406 DrawLUT; 407 ToolKind: 408 DrawTools; 409 end; {case} 410 end; -------------------------------------------------------------------------------- 411 UserKind: begin 412 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 413 DoUserWindow(UserInfo, UserInfo^^.UserCopy); 414 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 415 otherwise 416 end; {case} 417 if NoUndo then begin 418 WhatsOnClip := NothingOnClip; 419 exit(CopyWindow) Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 593; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 588) 588 end;{with} 589 end; 590 591 592 procedure ConvertSystemClipboard; -------------------------------------------------------------------------------- 593 {Converts system scrap to local scrap.} 588 {Converts system scrape to local scrape.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 594 var 595 phandle: handle; 596 offset, length, size: LongInt; 597 pframe: rect; 598 width, height: integer; Extra lines in 1st before 1580 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1585; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1580) 1580 NewSize: LongInt; 1581 trect, WinRect, SizeRect: rect; 1582 kind: integer; 1583 WasDigitizing: boolean; 1584 ZoomCenterH, ZoomCenterV, width, height: extended; -------------------------------------------------------------------------------- 1585 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1586 begin 1587 kind := WindowPeek(WhichWindow)^.WindowKind; 1588 if (kind = PicKind) and (info^.PictureType = ScionType) then 1589 exit(DoGrow); 1590 if kind = PicKind then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1672; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 1666) 1667 SetPort(PlotWindow); 1668 SizeWindow(PlotWindow, PlotWidth, Plotheight, true); 1669 InvalRect(PlotWindow^.PortRect); 1670 exit(DoGrow) 1671 end; -------------------------------------------------------------------------------- 1672 if kind = TextKind then begin 1666 if (kind = TextKind) then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1673 TextInfo := TextInfoPtr(WindowPeek(WhichWindow)^.RefCon); 1674 GrowTextWindow(NewSize); 1675 exit(DoGrow) 1676 end; Extra lines in 1st before 1671 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1677:1684; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1671) 1673 TextInfo := TextInfoPtr(WindowPeek(WhichWindow)^.RefCon); 1674 GrowTextWindow(NewSize); 1675 exit(DoGrow) 1676 end; -------------------------------------------------------------------------------- 1677 if kind = UserKind then begin 1678 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1679 with UserInfo^^ do begin 1680 UserNewSize := NewSize; 1681 doUserWindow(UserInfo, UserGrow); 1682 end; 1683 exit(DoGrow) 1684 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1685 if WhichWindow = ResultsWindow then begin 1686 ResultsWidth := LoWord(NewSize); 1687 ResultsHeight := hiWord(NewSize); 1688 SetPort(ResultsWindow); 1689 with ResultsWindow^.PortRect do Extra lines in 1st before 1772 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1786:1792; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1772) 1781 ShowRoi; 1782 end; {with} 1783 end; 1784 1785 -------------------------------------------------------------------------------- 1786 { what about ScaleToFitWindow?} 1787 {Bug notice: create two new windows, resize one of them, e.g. make it wide and short} 1788 {Paint a circle in each one. Then hold option space bar and scroll in the larger window.} 1789 {The circle becomes a short and wide oval in the second window. Fix the magnification} 1790 {by using option mag glass tool, and then scroll in small window. Circle in big} 1791 {window becomes tall and narrow. } 1792 {Problem is SrcRect has been copied without consideration of wrect.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1793 procedure SynchScroll; 1794 var 1795 n: integer; 1796 TempInfo, SaveInfo: InfoPtr; 1797 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1868; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 1847) 1863 end; {with info^} 1864 end; 1865 1866 1867 procedure ConvertClipboard; -------------------------------------------------------------------------------- 1868 {Converts local scrap to system scrap when quitting or} 1847 {Converts local scrape to system scrape when quitting or} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1869 {switching to other programs or DAs . } 1870 var 1871 PicH: PicHandle; 1872 frect: rect; 1873 err: LongInt; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p Extra lines in 1st before 371 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 371; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ371) 366 WindowSize: LongInt; 367 WindowRect: rect; 368 WhichWindow: WindowPtr; 369 kind, ignore: integer; 370 HidingPasteControl: boolean; -------------------------------------------------------------------------------- 371 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 372 begin 373 WhichWindow := FrontWindow; 374 if WhichWindow = nil then 375 exit(CopyWindow); 376 WindowRect := WhichWindow^.PortRect; Extra lines in 1st before 410 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 411:414; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ410) 406 DrawLUT; 407 ToolKind: 408 DrawTools; 409 end; {case} 410 end; -------------------------------------------------------------------------------- 411 UserKind: begin 412 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 413 DoUserWindow(UserInfo, UserInfo^^.UserCopy); 414 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 415 otherwise 416 end; {case} 417 if NoUndo then begin 418 WhatsOnClip := NothingOnClip; 419 exit(CopyWindow) Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 593; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 588) 588 end;{with} 589 end; 590 591 592 procedure ConvertSystemClipboard; -------------------------------------------------------------------------------- 593 {Converts system scrap to local scrap.} 588 {Converts system scrape to local scrape.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 594 var 595 phandle: handle; 596 offset, length, size: LongInt; 597 pframe: rect; 598 width, height: integer; Extra lines in 1st before 1580 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1585; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1580) 1580 NewSize: LongInt; 1581 trect, WinRect, SizeRect: rect; 1582 kind: integer; 1583 WasDigitizing: boolean; 1584 ZoomCenterH, ZoomCenterV, width, height: extended; -------------------------------------------------------------------------------- 1585 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1586 begin 1587 kind := WindowPeek(WhichWindow)^.WindowKind; 1588 if (kind = PicKind) and (info^.PictureType = ScionType) then 1589 exit(DoGrow); 1590 if kind = PicKind then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1672; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 1666) 1667 SetPort(PlotWindow); 1668 SizeWindow(PlotWindow, PlotWidth, Plotheight, true); 1669 InvalRect(PlotWindow^.PortRect); 1670 exit(DoGrow) 1671 end; -------------------------------------------------------------------------------- 1672 if kind = TextKind then begin 1666 if (kind = TextKind) then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1673 TextInfo := TextInfoPtr(WindowPeek(WhichWindow)^.RefCon); 1674 GrowTextWindow(NewSize); 1675 exit(DoGrow) 1676 end; Extra lines in 1st before 1671 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1677:1684; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1671) 1673 TextInfo := TextInfoPtr(WindowPeek(WhichWindow)^.RefCon); 1674 GrowTextWindow(NewSize); 1675 exit(DoGrow) 1676 end; -------------------------------------------------------------------------------- 1677 if kind = UserKind then begin 1678 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1679 with UserInfo^^ do begin 1680 UserNewSize := NewSize; 1681 doUserWindow(UserInfo, UserGrow); 1682 end; 1683 exit(DoGrow) 1684 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1685 if WhichWindow = ResultsWindow then begin 1686 ResultsWidth := LoWord(NewSize); 1687 ResultsHeight := hiWord(NewSize); 1688 SetPort(ResultsWindow); 1689 with ResultsWindow^.PortRect do Extra lines in 1st before 1772 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1786:1792; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line Æ1772) 1781 ShowRoi; 1782 end; {with} 1783 end; 1784 1785 -------------------------------------------------------------------------------- 1786 { what about ScaleToFitWindow?} 1787 {Bug notice: create two new windows, resize one of them, e.g. make it wide and short} 1788 {Paint a circle in each one. Then hold option space bar and scroll in the larger window.} 1789 {The circle becomes a short and wide oval in the second window. Fix the magnification} 1790 {by using option mag glass tool, and then scroll in small window. Circle in big} 1791 {window becomes tall and narrow. } 1792 {Problem is SrcRect has been copied without consideration of wrect.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1793 procedure SynchScroll; 1794 var 1795 n: integer; 1796 TempInfo, SaveInfo: InfoPtr; 1797 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Edit.p"; Line 1868; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Edit.p"; Line 1847) 1863 end; {with info^} 1864 end; 1865 1866 1867 procedure ConvertClipboard; -------------------------------------------------------------------------------- 1868 {Converts local scrap to system scrap when quitting or} 1847 {Converts local scrape to system scrape when quitting or} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1869 {switching to other programs or DAs . } 1870 var 1871 PicH: PicHandle; 1872 frect: rect; 1873 err: LongInt; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p Extra lines in 1st before 1271 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1271:1283; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1271) 1266 else 1267 SaveChanges := ok; 1268 end; 1269 1270 -------------------------------------------------------------------------------- 1271 procedure WarnUserWindows; 1272 var 1273 UserInfo, NextUI: UserInfoHandle; 1274 begin 1275 UserInfo := UserInfoList; 1276 while UserInfo <> nil do begin 1277 NextUI := UserInfo^^.Link; 1278 doUserWindow(UserInfo, UserInfo^^.UserCloseWarning); {might call DisposeUserWindow} 1279 UserInfo := NextUI; 1280 end; 1281 end; 1282 1283 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1284 function CloseAWindow (WhichWindow: WindowPtr): integer; 1285 var 1286 i, kind, n: integer; 1287 TempInfo: InfoPtr; 1288 TempTextInfo: TextInfoPtr; Extra lines in 1st before 1279 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1292; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1279) 1287 TempInfo: InfoPtr; 1288 TempTextInfo: TextInfoPtr; 1289 SizeStr, str: str255; 1290 wp: ^WindowPtr; 1291 pcrect: rect; -------------------------------------------------------------------------------- 1292 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1293 begin 1294 if WhichWindow = nil then 1295 exit(CloseAWindow); 1296 kind := WindowPeek(WhichWindow)^.WindowKind; 1297 CloseAWindow := ok; Extra lines in 1st before 1301 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1315; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1301) 1310 end; 1311 if SaveChanges = cancel then begin 1312 CloseAWindow := cancel; 1313 exit(CloseAWindow) 1314 end; -------------------------------------------------------------------------------- 1315 WarnUserWindows; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1316 DelMenuItem(WindowsMenuH, PicNum + WindowsMenuItems + nTextWindows); 1317 for i := PicNum to nPics - 1 do begin 1318 PicWindow[i] := PicWindow[i + 1]; 1319 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1320 TempInfo^.PicNum := i Extra lines in 1st before 1386 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1401:1404; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1386) 1396 DisposeWindow(PasteControl); 1397 PasteControl := nil; 1398 wp := pointer(GhostWindow); 1399 wp^ := nil; 1400 end; -------------------------------------------------------------------------------- 1401 UserKind: begin 1402 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1403 doUserWindow(UserInfo, UserInfo^^.UserClose); 1404 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1405 otherwise 1406 ; 1407 end; {case} 1408 end; 1409 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1425; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line 1406) 1420 DisposDialog(VideoControl); 1421 VideoControl := nil; 1422 exit(DoClose); 1423 end; 1424 kind := WindowPeek(fwptr)^.WindowKind; -------------------------------------------------------------------------------- 1425 if (kind = PicKind) or (kind = ProfilePlotKind) or (kind = CalibrationPlotKind) or (kind = HistoKind) or (Kind = PasteControlKind) or (Kind = ResultsKind) or (Kind = TextKind) or (Kind = UserKind) then 1406 if (kind = PicKind) or (kind = ProfilePlotKind) or (kind = CalibrationPlotKind) or (kind = HistoKind) or (Kind = PasteControlKind) or (Kind = ResultsKind) or (Kind = TextKind) then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1426 ignore := CloseAWindow(fwptr); 1427 end; 1428 end; 1429 1430 *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p Extra lines in 1st before 1271 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1271:1283; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1271) 1266 else 1267 SaveChanges := ok; 1268 end; 1269 1270 -------------------------------------------------------------------------------- 1271 procedure WarnUserWindows; 1272 var 1273 UserInfo, NextUI: UserInfoHandle; 1274 begin 1275 UserInfo := UserInfoList; 1276 while UserInfo <> nil do begin 1277 NextUI := UserInfo^^.Link; 1278 doUserWindow(UserInfo, UserInfo^^.UserCloseWarning); {might call DisposeUserWindow} 1279 UserInfo := NextUI; 1280 end; 1281 end; 1282 1283 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1284 function CloseAWindow (WhichWindow: WindowPtr): integer; 1285 var 1286 i, kind, n: integer; 1287 TempInfo: InfoPtr; 1288 TempTextInfo: TextInfoPtr; Extra lines in 1st before 1279 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1292; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1279) 1287 TempInfo: InfoPtr; 1288 TempTextInfo: TextInfoPtr; 1289 SizeStr, str: str255; 1290 wp: ^WindowPtr; 1291 pcrect: rect; -------------------------------------------------------------------------------- 1292 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1293 begin 1294 if WhichWindow = nil then 1295 exit(CloseAWindow); 1296 kind := WindowPeek(WhichWindow)^.WindowKind; 1297 CloseAWindow := ok; Extra lines in 1st before 1301 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1315; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1301) 1310 end; 1311 if SaveChanges = cancel then begin 1312 CloseAWindow := cancel; 1313 exit(CloseAWindow) 1314 end; -------------------------------------------------------------------------------- 1315 WarnUserWindows; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1316 DelMenuItem(WindowsMenuH, PicNum + WindowsMenuItems + nTextWindows); 1317 for i := PicNum to nPics - 1 do begin 1318 PicWindow[i] := PicWindow[i + 1]; 1319 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1320 TempInfo^.PicNum := i Extra lines in 1st before 1386 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1401:1404; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line Æ1386) 1396 DisposeWindow(PasteControl); 1397 PasteControl := nil; 1398 wp := pointer(GhostWindow); 1399 wp^ := nil; 1400 end; -------------------------------------------------------------------------------- 1401 UserKind: begin 1402 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1403 doUserWindow(UserInfo, UserInfo^^.UserClose); 1404 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1405 otherwise 1406 ; 1407 end; {case} 1408 end; 1409 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File1.p"; Line 1425; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File1.p"; Line 1406) 1420 DisposDialog(VideoControl); 1421 VideoControl := nil; 1422 exit(DoClose); 1423 end; 1424 kind := WindowPeek(fwptr)^.WindowKind; -------------------------------------------------------------------------------- 1425 if (kind = PicKind) or (kind = ProfilePlotKind) or (kind = CalibrationPlotKind) or (kind = HistoKind) or (Kind = PasteControlKind) or (Kind = ResultsKind) or (Kind = TextKind) or (Kind = UserKind) then 1406 if (kind = PicKind) or (kind = ProfilePlotKind) or (kind = CalibrationPlotKind) or (kind = HistoKind) or (Kind = PasteControlKind) or (Kind = ResultsKind) or (Kind = TextKind) then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1426 ignore := CloseAWindow(fwptr); 1427 end; 1428 end; 1429 1430 *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:File2.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:File2.p Extra lines in 1st before 907 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File2.p"; Line 907:908; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File2.p"; Line Æ907) 902 case err of 903 -34: 904 Message := 'Disk Full'; 905 -36: 906 Message := 'I/O Error'; -------------------------------------------------------------------------------- 907 -39: 908 Message := 'File too short'; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 909 -49: 910 Message := 'File in Use'; 911 -61: 912 Message := 'Write Permission Error'; 913 end; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:File2.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:File2.p Extra lines in 1st before 907 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:File2.p"; Line 907:908; File "PGL6R:Huff6R:NIHI:M:V1.55Source:File2.p"; Line Æ907) 902 case err of 903 -34: 904 Message := 'Disk Full'; 905 -36: 906 Message := 'I/O Error'; -------------------------------------------------------------------------------- 907 -39: 908 Message := 'File too short'; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 909 -49: 910 Message := 'File in Use'; 911 -61: 912 Message := 'Write Permission Error'; 913 end; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Filters.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Filters.p *** Files match *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Filters.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Filters.p *** Files match *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p Extra lines in 1st before 205 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 205:207; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ205) 200 SelectPlotItem = 11; 201 SelectResultsItem = 12; 202 203 UserMenu = 139; 204 -------------------------------------------------------------------------------- 205 FirstMacroMenu = 142; {menus created as directed by macro name strings in macro file} 206 LastMacroMenu = 160; 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 208 TransferModeMenu = 200; {Popup Menu in Paste Control window} 209 CopyModeItem = 1; 210 AndItem = 2; 211 OrItem = 3; 212 XorItem = 4; Extra lines in 1st before 286 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 289; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ286) 284 InfoKind = 94; 285 CalibrationPlotKind = 95; 286 PasteControlKind = 96; 287 ResultsKind = 97; 288 TextKind = 98; -------------------------------------------------------------------------------- 289 UserKind = 99; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 290 IOErrorID = 400; 291 AboutID = 256; 292 VersItem = 2; 293 MemItem = 3; 294 StackSize = 40000; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 387:390; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 383:387) 382 hPicOffset = 8; 383 vPicOffset = 16; 384 fgRowBytes = 1024; 385 FunctionKey = 16; 386 -------------------------------------------------------------------------------- 387 {MaxMacroSize = 15000;} 388 MaxSymbols = 1000; {was 500, increased for UMX} 389 MaxMacroStackSize = 200; {was 150} 390 MaxMacros = 4094; {32768 / sizeof(MacroItemsRec) - 2} 383 MaxMacroSize = 15000; 384 MaxMacroFileSize = 30000; 385 MaxSymbols = 500; 386 MaxMacroStackSize = 150; 387 MaxMacros = 100; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 391 SymbolSize = 12; 392 BlankSymbol = ' '; 393 StackOverflow = 'Stack overflow'; 394 395 MaxPicSize = 16383; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 418; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 415) 413 GraysID = 1007; 414 MaxColor = 15000; 415 MaxCoordinates = 10000; 416 DefaultLG3DacLow = 50; {0.39V} 417 DefaultLG3DacHigh = 150; {1.18V} -------------------------------------------------------------------------------- 418 MaxTextWindows = 100; {was 10} 415 MaxTextWindows = 10; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 419 420 421 type 422 UnsignedByte = 0..255; 423 LineType = packed array[0..MaxLine] of UnsignedByte; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 678:679; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 675) 673 SetCustomC, nPicsC, SelectPicC, SetPicNameC, ApplyLutC, SetSizeC, SaveC, SaveAllC, SaveAsC, CopyResultsC, CloseC, {} 674 DisposeC, DisposeAllC, DupC, GetInfoC, PrintC, GetLineC, xCoordinatesC, yCoordinatesC, nCoordinatesC, GetStringC, {} 675 OpenSerialC, GetSerialC, PutSerialC, ChrC, OrdC, SetCursorC, TickCountC, ConcatC, SetVideoC, StringToNumC, AcquireC,{} 676 UndoSizeC, ScionC, FilterC, PhotoModeC, RGBToIndexedC, SurfacePlotC, SelectWindowC, NewTextWindowC, CaptureColorC,{} 677 GetThresholdC, AverageSlicesC, BitAndC, BitOrC, PidNumC, SortPaletteC, ProjectC, WindowTitleC, ScaleConvolutionsC,{} -------------------------------------------------------------------------------- 678 ImageMathC, PasteLiveC, PidExistsC, PosC, DeleteC, LengthC, GetScaleC, AutoOutlineC,{} 679 LoadMacrosC, ConcatZFC); 675 ImageMathC, PasteLiveC, PidExistsC, PosC, DeleteC, LengthC, GetScaleC, AutoOutlineC); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 680 SymbolType = packed array[1..SymbolSize] of char; 681 VarType = (IntVar, RealVar, BooleanVar, StringVar); 682 SymTabRec = record 683 Symbol: SymbolType; 684 tType: TokenType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 686; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 682) 681 VarType = (IntVar, RealVar, BooleanVar, StringVar); 682 SymTabRec = record 683 Symbol: SymbolType; 684 tType: TokenType; 685 cType: CommandType; -------------------------------------------------------------------------------- 686 loc: LongInt; 682 loc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 687 end; 688 str255P = ^str255; 689 str255H = ^str255P; 690 StackRec = record 691 SymbolTableIndex: integer; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 697; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 693) 692 Value: extended; 693 vType: VarType; 694 StringH: str255H; 695 end; 696 MacrosRec = record -------------------------------------------------------------------------------- 697 {Macros: packed array[0..MaxMacroSize] of char;} 693 Macros: packed array[0..MaxMacroSize] of char; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 698 SymbolTable: array[1..MaxSymbols] of SymTabRec; 699 stack: array[1..MaxMacroStackSize] of StackRec; 700 aLine: LineType; 701 end; 702 MacrosPtr = ^MacrosRec; Extra lines in 1st before 699 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 703:711; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ699) 698 SymbolTable: array[1..MaxSymbols] of SymTabRec; 699 stack: array[1..MaxMacroStackSize] of StackRec; 700 aLine: LineType; 701 end; 702 MacrosPtr = ^MacrosRec; -------------------------------------------------------------------------------- 703 MacroItemsRec = packed record 704 MacroStart: Longint; 705 MMitem: integer; 706 MMenuID: 0..255; 707 MacroKey: char; 708 end; 709 MacroItemsArray = array[0..MaxMacros] of MacroItemsRec; 710 MacroItemsPtr = ^MacroItemsArray; 711 MacroItemsHandle = ^MacroItemsPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 712 rsMethodType = (Bilinear, NearestNeighbor); 713 TiffColorMapType = array[1..3] of array[0..255] of integer; 714 StackIFDType = record 715 nEntries: integer; {2} 716 TiffDir: array[1..6] of TiffEntry; {72} Extra lines in 1st before 828 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 841; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ828) 836 TextTE: TEHandle; 837 TextTitle: string[31]; 838 TextRefNum: integer; 839 Changes, TooBig: boolean; 840 WindowNum: integer; -------------------------------------------------------------------------------- 841 TxWidNum: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 842 end; 843 TextInfoPtr = ^TextInfoRec; 844 845 packedUnsigned = packed record 846 u: 0..255 Extra lines in 1st before 835 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 849:884; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ835) 844 845 packedUnsigned = packed record 846 u: 0..255 847 end; 848 pup = ^packedUnsigned; -------------------------------------------------------------------------------- 849 packedChar = packed record 850 c: char; 851 end; 852 pcp = ^packedChar; 853 LongIntPtr = ^LongInt; 854 855 UserInfoHandle = ^UserInfoPtr; 856 UserInfoPtr = ^UserInfoRec; 857 UserInfoRec = record 858 Link: UserInfoHandle; 859 UserWindowPtr: WindowPtr; 860 UserPicBaseHandle: Handle; 861 UserOsPort: CGrafPtr; 862 UserData: Handle; {user's data area} 863 UserUnlockHandles: ProcPtr; 864 UserLockHandles: ProcPtr; 865 UserDispose: ProcPtr; 866 UserActivate: ProcPtr; 867 UserUpdate: ProcPtr; 868 UserGrow: ProcPtr; 869 UserDrag: ProcPtr; 870 UserClose: ProcPtr; 871 UserZoom: ProcPtr; 872 UserMouseDown: ProcPtr; 873 UserCursor: ProcPtr; 874 UserUndo: ProcPtr; 875 UserCut: ProcPtr; 876 UserCopy: ProcPtr; 877 UserPaste: ProcPtr; 878 UserClear: ProcPtr; 879 UserCloseWarning: ProcPtr; 880 UserNewSize: LongInt; 881 UserLoc: Point; 882 UKind: Integer; {field value constants xxxUKind defined in UMacroDef.p} 883 UserActivating: Boolean; 884 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 885 886 var 887 TraceInfo: str4; 888 finished: boolean; 889 trect, gmrect, MapRect1, MapRect2, crect, HistoRect: rect; Extra lines in 1st before 850 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 900; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ850) 895 ScreenPort: GrafPtr; 896 CScreenPort: cGrafPtr; 897 ticks: LongInt; 898 MonoFunction: ClutTable; 899 Info: InfoPtr; -------------------------------------------------------------------------------- 900 UserInfoList: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 901 ToolCursor: array[ToolType] of Cursor; 902 AnimatedWatch: array[1..8] of Cursor; 903 WatchIndex: integer; 904 PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor, watch, WandPlusCursor, WandMinusCursor: Cursor; 905 CurrentTool, PreviousTool, FirstTool, LastTool: ToolType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 908; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 857) 903 WatchIndex: integer; 904 PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor, watch, WandPlusCursor, WandMinusCursor: Cursor; 905 CurrentTool, PreviousTool, FirstTool, LastTool: ToolType; 906 ToolRect: array[ToolType] of rect; 907 ToolTime, LutTime: longInt; -------------------------------------------------------------------------------- 908 nPics, nextPid, nextTxWid: integer; 857 nPics, nextPid: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 909 PicWindow: array[1..MaxPics] of WindowPtr; 910 ScreenWidth, ScreenHeight: integer; 911 ScreenBase: ptr; 912 ScreenRowBytes: LongInt; 913 ScreenPixMap: PixMapHandle; Extra lines in 1st before 963 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1014; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ963) 1009 HalftoneDotFunction: boolean; 1010 AppleMenuH, FileMenuH, AcquireMenuH, ExportMenuH, EditMenuH, OptionsMenuH, ColorTablesMenuH, {} 1011 PropagateMenuH, EnhanceMenuH, FilterMenuH, BinaryMenuH, ArithmeticMenuH, BackgroundMenuH, {} 1012 AnalyzeMenuH, SpecialMenuH, StacksMenuH, SortPaletteMenuH, FontMenuH, SizeMenuH, StyleMenuH, {} 1013 WindowsMenuH, UserMenuH, TransferModeMenuH, LineToolMenuH, ImageMathOpsMenuH, ImageListMenuH, UnitsMenuH: MenuHandle; -------------------------------------------------------------------------------- 1014 MacroMenusH: array[FirstMacroMenu..LastMacroMenu] of MenuHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1015 rleft, rtop: integer; 1016 ListDone: boolean; 1017 ResultsWindow: WindowPtr; 1018 hScrollBar, vScrollBar: ControlHandle; 1019 ListTE: TEHandle; Extra lines in 1st before 1022 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1074:1076; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ1022) 1069 FieldWidth: integer; 1070 Precision: integer; {Digits to right of decimal point} 1071 MeasurementToRedo: integer; 1072 Has32BitQuickDraw: boolean; 1073 DefaultRefNum, KernelsRefNum, MacrosRefNum: integer; -------------------------------------------------------------------------------- 1074 nSaves: integer; 1075 MacroLoadRequest: Boolean; 1076 MacroLoadHandle: Handle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1077 LaunchVRefNum, PlugInsVRefNum: integer; 1078 LaunchDirID, PlugInsDirID: LongInt; 1079 DefaultFileName: string[63]; 1080 rsHScale, rsVScale, rsAngle: real; {Rotate and Scale Parameters} 1081 rsMethod: rsMethodType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1088:1089; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 1033:1034) 1083 rsInteractive: boolean; 1084 TextEol, TextEof: boolean; 1085 Textf, TextIndex: integer; 1086 TextFileSize: LongInt; 1087 nMacros, nSymbols: integer; -------------------------------------------------------------------------------- 1088 TopOfStack, CurrentX, CurrentY: integer; 1089 nProcedures, TokenStackLoc, nGlobals, SymbolTableLoc: integer; 1033 pcStart, TopOfStack, CurrentX, CurrentY, EndMacros: integer; 1034 nProcedures, TokenLoc, TokenStackLoc, SavePC, nGlobals, SymbolTableLoc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1090 LegalWithoutImage: set of CommandType; 1091 MacroTicks: LongInt; 1092 SaveForeground: integer; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1093:1098; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 1038:1041) 1090 LegalWithoutImage: set of CommandType; 1091 MacroTicks: LongInt; 1092 SaveForeground: integer; -------------------------------------------------------------------------------- 1093 PC: LongInt; {"program counter" used by macro interpreter} 1094 pcStart, EndMacros, SavePC, TokenLoc: LongInt; 1095 MacroLineNumber: integer; 1096 MacroItems: MacroItemsHandle; 1097 {MacroStart: array[0..MaxMacros] of LongInt;} 1098 {MacroKey: packed array[1..MaxMacros] of char;} 1038 PC: integer; {"program counter" used by macro interpreter} 1039 MacroLineNumber: integer; 1040 MacroStart: array[1..MaxMacros] of integer; 1041 MacroKey: packed array[1..MaxMacros] of char; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1099 Token, SaveToken: TokenType; 1100 TokenStr: str255; 1101 TokenSymbol, MacroOrProcName: SymbolType; 1102 TokenValue: extended; 1103 Macro: boolean; {True if macro is running.} Extra lines in 1st before 1047 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1104; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ1047) 1099 Token, SaveToken: TokenType; 1100 TokenStr: str255; 1101 TokenSymbol, MacroOrProcName: SymbolType; 1102 TokenValue: extended; 1103 Macro: boolean; {True if macro is running.} -------------------------------------------------------------------------------- 1104 Macros: LongIntPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1105 MacrosP: MacrosPtr; 1106 MacroCommand: CommandType; 1107 SerialIn, SerialOut: integer; 1108 SerialBufferP: ptr; 1109 ImportAutoScale: boolean; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p Extra lines in 1st before 205 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 205:207; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ205) 200 SelectPlotItem = 11; 201 SelectResultsItem = 12; 202 203 UserMenu = 139; 204 -------------------------------------------------------------------------------- 205 FirstMacroMenu = 142; {menus created as directed by macro name strings in macro file} 206 LastMacroMenu = 160; 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 208 TransferModeMenu = 200; {Popup Menu in Paste Control window} 209 CopyModeItem = 1; 210 AndItem = 2; 211 OrItem = 3; 212 XorItem = 4; Extra lines in 1st before 286 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 289; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ286) 284 InfoKind = 94; 285 CalibrationPlotKind = 95; 286 PasteControlKind = 96; 287 ResultsKind = 97; 288 TextKind = 98; -------------------------------------------------------------------------------- 289 UserKind = 99; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 290 IOErrorID = 400; 291 AboutID = 256; 292 VersItem = 2; 293 MemItem = 3; 294 StackSize = 40000; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 387:390; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 383:387) 382 hPicOffset = 8; 383 vPicOffset = 16; 384 fgRowBytes = 1024; 385 FunctionKey = 16; 386 -------------------------------------------------------------------------------- 387 {MaxMacroSize = 15000;} 388 MaxSymbols = 1000; {was 500, increased for UMX} 389 MaxMacroStackSize = 200; {was 150} 390 MaxMacros = 4094; {32768 / sizeof(MacroItemsRec) - 2} 383 MaxMacroSize = 15000; 384 MaxMacroFileSize = 30000; 385 MaxSymbols = 500; 386 MaxMacroStackSize = 150; 387 MaxMacros = 100; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 391 SymbolSize = 12; 392 BlankSymbol = ' '; 393 StackOverflow = 'Stack overflow'; 394 395 MaxPicSize = 16383; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 418; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 415) 413 GraysID = 1007; 414 MaxColor = 15000; 415 MaxCoordinates = 10000; 416 DefaultLG3DacLow = 50; {0.39V} 417 DefaultLG3DacHigh = 150; {1.18V} -------------------------------------------------------------------------------- 418 MaxTextWindows = 100; {was 10} 415 MaxTextWindows = 10; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 419 420 421 type 422 UnsignedByte = 0..255; 423 LineType = packed array[0..MaxLine] of UnsignedByte; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 678:679; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 675) 673 SetCustomC, nPicsC, SelectPicC, SetPicNameC, ApplyLutC, SetSizeC, SaveC, SaveAllC, SaveAsC, CopyResultsC, CloseC, {} 674 DisposeC, DisposeAllC, DupC, GetInfoC, PrintC, GetLineC, xCoordinatesC, yCoordinatesC, nCoordinatesC, GetStringC, {} 675 OpenSerialC, GetSerialC, PutSerialC, ChrC, OrdC, SetCursorC, TickCountC, ConcatC, SetVideoC, StringToNumC, AcquireC,{} 676 UndoSizeC, ScionC, FilterC, PhotoModeC, RGBToIndexedC, SurfacePlotC, SelectWindowC, NewTextWindowC, CaptureColorC,{} 677 GetThresholdC, AverageSlicesC, BitAndC, BitOrC, PidNumC, SortPaletteC, ProjectC, WindowTitleC, ScaleConvolutionsC,{} -------------------------------------------------------------------------------- 678 ImageMathC, PasteLiveC, PidExistsC, PosC, DeleteC, LengthC, GetScaleC, AutoOutlineC,{} 679 LoadMacrosC, ConcatZFC); 675 ImageMathC, PasteLiveC, PidExistsC, PosC, DeleteC, LengthC, GetScaleC, AutoOutlineC); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 680 SymbolType = packed array[1..SymbolSize] of char; 681 VarType = (IntVar, RealVar, BooleanVar, StringVar); 682 SymTabRec = record 683 Symbol: SymbolType; 684 tType: TokenType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 686; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 682) 681 VarType = (IntVar, RealVar, BooleanVar, StringVar); 682 SymTabRec = record 683 Symbol: SymbolType; 684 tType: TokenType; 685 cType: CommandType; -------------------------------------------------------------------------------- 686 loc: LongInt; 682 loc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 687 end; 688 str255P = ^str255; 689 str255H = ^str255P; 690 StackRec = record 691 SymbolTableIndex: integer; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 697; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 693) 692 Value: extended; 693 vType: VarType; 694 StringH: str255H; 695 end; 696 MacrosRec = record -------------------------------------------------------------------------------- 697 {Macros: packed array[0..MaxMacroSize] of char;} 693 Macros: packed array[0..MaxMacroSize] of char; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 698 SymbolTable: array[1..MaxSymbols] of SymTabRec; 699 stack: array[1..MaxMacroStackSize] of StackRec; 700 aLine: LineType; 701 end; 702 MacrosPtr = ^MacrosRec; Extra lines in 1st before 699 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 703:711; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ699) 698 SymbolTable: array[1..MaxSymbols] of SymTabRec; 699 stack: array[1..MaxMacroStackSize] of StackRec; 700 aLine: LineType; 701 end; 702 MacrosPtr = ^MacrosRec; -------------------------------------------------------------------------------- 703 MacroItemsRec = packed record 704 MacroStart: Longint; 705 MMitem: integer; 706 MMenuID: 0..255; 707 MacroKey: char; 708 end; 709 MacroItemsArray = array[0..MaxMacros] of MacroItemsRec; 710 MacroItemsPtr = ^MacroItemsArray; 711 MacroItemsHandle = ^MacroItemsPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 712 rsMethodType = (Bilinear, NearestNeighbor); 713 TiffColorMapType = array[1..3] of array[0..255] of integer; 714 StackIFDType = record 715 nEntries: integer; {2} 716 TiffDir: array[1..6] of TiffEntry; {72} Extra lines in 1st before 828 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 841; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ828) 836 TextTE: TEHandle; 837 TextTitle: string[31]; 838 TextRefNum: integer; 839 Changes, TooBig: boolean; 840 WindowNum: integer; -------------------------------------------------------------------------------- 841 TxWidNum: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 842 end; 843 TextInfoPtr = ^TextInfoRec; 844 845 packedUnsigned = packed record 846 u: 0..255 Extra lines in 1st before 835 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 849:884; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ835) 844 845 packedUnsigned = packed record 846 u: 0..255 847 end; 848 pup = ^packedUnsigned; -------------------------------------------------------------------------------- 849 packedChar = packed record 850 c: char; 851 end; 852 pcp = ^packedChar; 853 LongIntPtr = ^LongInt; 854 855 UserInfoHandle = ^UserInfoPtr; 856 UserInfoPtr = ^UserInfoRec; 857 UserInfoRec = record 858 Link: UserInfoHandle; 859 UserWindowPtr: WindowPtr; 860 UserPicBaseHandle: Handle; 861 UserOsPort: CGrafPtr; 862 UserData: Handle; {user's data area} 863 UserUnlockHandles: ProcPtr; 864 UserLockHandles: ProcPtr; 865 UserDispose: ProcPtr; 866 UserActivate: ProcPtr; 867 UserUpdate: ProcPtr; 868 UserGrow: ProcPtr; 869 UserDrag: ProcPtr; 870 UserClose: ProcPtr; 871 UserZoom: ProcPtr; 872 UserMouseDown: ProcPtr; 873 UserCursor: ProcPtr; 874 UserUndo: ProcPtr; 875 UserCut: ProcPtr; 876 UserCopy: ProcPtr; 877 UserPaste: ProcPtr; 878 UserClear: ProcPtr; 879 UserCloseWarning: ProcPtr; 880 UserNewSize: LongInt; 881 UserLoc: Point; 882 UKind: Integer; {field value constants xxxUKind defined in UMacroDef.p} 883 UserActivating: Boolean; 884 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 885 886 var 887 TraceInfo: str4; 888 finished: boolean; 889 trect, gmrect, MapRect1, MapRect2, crect, HistoRect: rect; Extra lines in 1st before 850 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 900; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ850) 895 ScreenPort: GrafPtr; 896 CScreenPort: cGrafPtr; 897 ticks: LongInt; 898 MonoFunction: ClutTable; 899 Info: InfoPtr; -------------------------------------------------------------------------------- 900 UserInfoList: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 901 ToolCursor: array[ToolType] of Cursor; 902 AnimatedWatch: array[1..8] of Cursor; 903 WatchIndex: integer; 904 PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor, watch, WandPlusCursor, WandMinusCursor: Cursor; 905 CurrentTool, PreviousTool, FirstTool, LastTool: ToolType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 908; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 857) 903 WatchIndex: integer; 904 PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor, watch, WandPlusCursor, WandMinusCursor: Cursor; 905 CurrentTool, PreviousTool, FirstTool, LastTool: ToolType; 906 ToolRect: array[ToolType] of rect; 907 ToolTime, LutTime: longInt; -------------------------------------------------------------------------------- 908 nPics, nextPid, nextTxWid: integer; 857 nPics, nextPid: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 909 PicWindow: array[1..MaxPics] of WindowPtr; 910 ScreenWidth, ScreenHeight: integer; 911 ScreenBase: ptr; 912 ScreenRowBytes: LongInt; 913 ScreenPixMap: PixMapHandle; Extra lines in 1st before 963 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1014; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ963) 1009 HalftoneDotFunction: boolean; 1010 AppleMenuH, FileMenuH, AcquireMenuH, ExportMenuH, EditMenuH, OptionsMenuH, ColorTablesMenuH, {} 1011 PropagateMenuH, EnhanceMenuH, FilterMenuH, BinaryMenuH, ArithmeticMenuH, BackgroundMenuH, {} 1012 AnalyzeMenuH, SpecialMenuH, StacksMenuH, SortPaletteMenuH, FontMenuH, SizeMenuH, StyleMenuH, {} 1013 WindowsMenuH, UserMenuH, TransferModeMenuH, LineToolMenuH, ImageMathOpsMenuH, ImageListMenuH, UnitsMenuH: MenuHandle; -------------------------------------------------------------------------------- 1014 MacroMenusH: array[FirstMacroMenu..LastMacroMenu] of MenuHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1015 rleft, rtop: integer; 1016 ListDone: boolean; 1017 ResultsWindow: WindowPtr; 1018 hScrollBar, vScrollBar: ControlHandle; 1019 ListTE: TEHandle; Extra lines in 1st before 1022 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1074:1076; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ1022) 1069 FieldWidth: integer; 1070 Precision: integer; {Digits to right of decimal point} 1071 MeasurementToRedo: integer; 1072 Has32BitQuickDraw: boolean; 1073 DefaultRefNum, KernelsRefNum, MacrosRefNum: integer; -------------------------------------------------------------------------------- 1074 nSaves: integer; 1075 MacroLoadRequest: Boolean; 1076 MacroLoadHandle: Handle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1077 LaunchVRefNum, PlugInsVRefNum: integer; 1078 LaunchDirID, PlugInsDirID: LongInt; 1079 DefaultFileName: string[63]; 1080 rsHScale, rsVScale, rsAngle: real; {Rotate and Scale Parameters} 1081 rsMethod: rsMethodType; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1088:1089; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 1033:1034) 1083 rsInteractive: boolean; 1084 TextEol, TextEof: boolean; 1085 Textf, TextIndex: integer; 1086 TextFileSize: LongInt; 1087 nMacros, nSymbols: integer; -------------------------------------------------------------------------------- 1088 TopOfStack, CurrentX, CurrentY: integer; 1089 nProcedures, TokenStackLoc, nGlobals, SymbolTableLoc: integer; 1033 pcStart, TopOfStack, CurrentX, CurrentY, EndMacros: integer; 1034 nProcedures, TokenLoc, TokenStackLoc, SavePC, nGlobals, SymbolTableLoc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1090 LegalWithoutImage: set of CommandType; 1091 MacroTicks: LongInt; 1092 SaveForeground: integer; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1093:1098; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line 1038:1041) 1090 LegalWithoutImage: set of CommandType; 1091 MacroTicks: LongInt; 1092 SaveForeground: integer; -------------------------------------------------------------------------------- 1093 PC: LongInt; {"program counter" used by macro interpreter} 1094 pcStart, EndMacros, SavePC, TokenLoc: LongInt; 1095 MacroLineNumber: integer; 1096 MacroItems: MacroItemsHandle; 1097 {MacroStart: array[0..MaxMacros] of LongInt;} 1098 {MacroKey: packed array[1..MaxMacros] of char;} 1038 PC: integer; {"program counter" used by macro interpreter} 1039 MacroLineNumber: integer; 1040 MacroStart: array[1..MaxMacros] of integer; 1041 MacroKey: packed array[1..MaxMacros] of char; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1099 Token, SaveToken: TokenType; 1100 TokenStr: str255; 1101 TokenSymbol, MacroOrProcName: SymbolType; 1102 TokenValue: extended; 1103 Macro: boolean; {True if macro is running.} Extra lines in 1st before 1047 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Globals.p"; Line 1104; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Globals.p"; Line Æ1047) 1099 Token, SaveToken: TokenType; 1100 TokenStr: str255; 1101 TokenSymbol, MacroOrProcName: SymbolType; 1102 TokenValue: extended; 1103 Macro: boolean; {True if macro is running.} -------------------------------------------------------------------------------- 1104 Macros: LongIntPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1105 MacrosP: MacrosPtr; 1106 MacroCommand: CommandType; 1107 SerialIn, SerialOut: integer; 1108 SerialBufferP: ptr; 1109 ImportAutoScale: boolean; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 218; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line 218) 213 DrawPlot; 214 DrawMyGrowIcon(PlotWindow); 215 end; 216 217 -------------------------------------------------------------------------------- 218 procedure MakePlotWindow (PlotLeft, PlotTop, PlotWidth, PlotHeight: integer); 218 procedure MakePlotWindow; {(PlotLeft, PlotTop, PlotWidth, PlotHeight: integer)} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 219 var 220 PLotRect, pwrect, dwrect, srect: rect; 221 overlapping: boolean; 222 begin 223 if PlotWindow = nil then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 1615:1619; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line 1615:1620) 1610 HideControl(vScrollBar); 1611 end; 1612 end; 1613 1614 -------------------------------------------------------------------------------- 1615 procedure myTEScroll (dh, dv: Integer; hTE: TEHandle); 1616 begin 1617 {required per tech note #22} 1618 if (dh <> 0) or (dv <> 0) then 1619 TEScroll(dh, dv, hTE); 1615 procedure ScrollResultsText; 1616 var 1617 value: INTEGER; 1618 begin 1619 with ListTE^^ do 1620 TEScroll((viewRect.left - destRect.left) - GetCtlValue(hScrollBar), (viewRect.top - destRect.top) - (GetCtlValue(vScrollBar) * LineHeight), ListTE); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1620 end; 1621 1622 Extra lines in 1st before 1624 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 1623:1631; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line Æ1624) 1620 end; 1621 1622 -------------------------------------------------------------------------------- 1623 procedure ScrollResultsText; 1624 var 1625 value: INTEGER; 1626 begin 1627 with ListTE^^ do 1628 myTEScroll((viewRect.left - destRect.left) - GetCtlValue(hScrollBar), (viewRect.top - destRect.top) - (GetCtlValue(vScrollBar) * LineHeight), ListTE); 1629 end; 1630 1631 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1632 procedure UpdateResultsScrollBars; 1633 var 1634 vMax, vValue, hMax, hValue: integer; 1635 begin 1636 with ListTE^^, ListTE^^.viewRect do begin *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 218; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line 218) 213 DrawPlot; 214 DrawMyGrowIcon(PlotWindow); 215 end; 216 217 -------------------------------------------------------------------------------- 218 procedure MakePlotWindow (PlotLeft, PlotTop, PlotWidth, PlotHeight: integer); 218 procedure MakePlotWindow; {(PlotLeft, PlotTop, PlotWidth, PlotHeight: integer)} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 219 var 220 PLotRect, pwrect, dwrect, srect: rect; 221 overlapping: boolean; 222 begin 223 if PlotWindow = nil then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 1615:1619; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line 1615:1620) 1610 HideControl(vScrollBar); 1611 end; 1612 end; 1613 1614 -------------------------------------------------------------------------------- 1615 procedure myTEScroll (dh, dv: Integer; hTE: TEHandle); 1616 begin 1617 {required per tech note #22} 1618 if (dh <> 0) or (dv <> 0) then 1619 TEScroll(dh, dv, hTE); 1615 procedure ScrollResultsText; 1616 var 1617 value: INTEGER; 1618 begin 1619 with ListTE^^ do 1620 TEScroll((viewRect.left - destRect.left) - GetCtlValue(hScrollBar), (viewRect.top - destRect.top) - (GetCtlValue(vScrollBar) * LineHeight), ListTE); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1620 end; 1621 1622 Extra lines in 1st before 1624 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Graphics.p"; Line 1623:1631; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Graphics.p"; Line Æ1624) 1620 end; 1621 1622 -------------------------------------------------------------------------------- 1623 procedure ScrollResultsText; 1624 var 1625 value: INTEGER; 1626 begin 1627 with ListTE^^ do 1628 myTEScroll((viewRect.left - destRect.left) - GetCtlValue(hScrollBar), (viewRect.top - destRect.top) - (GetCtlValue(vScrollBar) * LineHeight), ListTE); 1629 end; 1630 1631 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1632 procedure UpdateResultsScrollBars; 1633 var 1634 vMax, vValue, hMax, hValue: integer; 1635 begin 1636 with ListTE^^, ListTE^^.viewRect do begin *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 25; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 25:26) 20 {Phone: 301-496-4957} 21 22 23 uses 24 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Initialization, File1, File2, Analysis, Graphics, {} -------------------------------------------------------------------------------- 25 Edit, Filters, Camera, User, Macros1, Macros2, Stacks, Background, UMacroDef, UMacroRun, Lut, Projection, Plugins, Text, Math, Registration; 25 Edit, Filters, Camera, User, Macros1, Macros2, Stacks, Background, {,UMacroDef, UMacroRun} 26 Lut, Projection, Plugins, Text, Math, Registration; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 27 28 {Turn off automatic toolbox initialization.} 29 {$I-} 30 Extra lines in 2nd before 38 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line Æ38; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 39) 33 34 35 procedure UpdateOptionsMenu; 36 var 37 CheckIt: boolean; -------------------------------------------------------------------------------- 39 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 38 begin 39 with info^ do begin 40 CheckItem(OptionsMenuH, GrayscaleItem, (LutMode = Grayscale) or (LutMode = CustomGrayscale)); 41 if LutMode <> PseudoColor then 42 ColorTable := CustomTable; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 217; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 219) 212 SwitchingID = 11; 213 HighlightID = 12; 214 CreatorID = 14; 215 var 216 mylog: DialogPtr; -------------------------------------------------------------------------------- 217 item: integer; 219 item, i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 218 SaveScale, SaveLW6, SaveScaleC: boolean; 219 SaveInvertValues, SaveInvertY: boolean; 220 SaveBufferSize: LongInt; 221 SaveCreator: packed array[1..4] of char; 222 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 450; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 452) 445 end; 446 447 448 procedure DoMenuEvent (MenuChoice: LongInt); 449 var -------------------------------------------------------------------------------- 450 MenuID, MenuItem, ignore: integer; 452 MenuID, MenuItem, i, ignore: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 451 name, str: str255; 452 dna, RefNum: integer; 453 ItemName: str255; 454 FontName: str255; 455 ok, isSelection: boolean; Extra lines in 1st before 567 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 565:567; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ567) 560 SetupOperation(MenuItem); 561 DrawScaleItem: 562 DrawScale; 563 {-} 564 SelectAllItem: -------------------------------------------------------------------------------- 565 if CurrentWindow = TextKind then 566 DoTextSelectAll 567 else ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 568 with info^ do 569 if RoiShowing and EqualRect(RoiRect, PicRect) then 570 KillRoi 571 else 572 SelectAll(true); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 817:818; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 816) 812 SelectWindow(VideoControl); 813 PhotoModeItem: 814 PhotoMode; 815 LoadMacrosItem: begin 816 LoadMacros; -------------------------------------------------------------------------------- 817 UnloadSeg(@LoadMacros); 818 RunMacro(0); 816 UnloadSeg(@LoadMacros) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 819 end; 820 otherwise 821 if MenuItem >= FirstMacroItem then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 822; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 820) 819 end; 820 otherwise 821 if MenuItem >= FirstMacroItem then -------------------------------------------------------------------------------- 822 RunMenuMacro(SpecialMenu, MenuItem); 820 RunMacro(MenuItem - FirstMacroItem + 1); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 823 end; 824 end; 825 826 StacksMenu: begin 827 StopDigitizing; Extra lines in 1st before 913 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 915:917; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ913) 910 end; 911 912 UserMenu: 913 DoUserMenuEvent(MenuItem); 914 otherwise -------------------------------------------------------------------------------- 915 if FirstMacroMenu <= MenuID then 916 if MenuID <= LastMacroMenu then 917 RunMenuMacro(MenuID, MenuItem); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 918 end; 919 HiliteMenu(0); 920 RoiUpdateTime := 0; 921 end; 922 Extra lines in 1st before 1411 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1416; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1411) 1411 1412 procedure DoDrag (WhichWindow: WindowPtr; loc: point); 1413 var 1414 WinRect, DragBounds, trect: rect; 1415 kind: integer; -------------------------------------------------------------------------------- 1416 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1417 begin 1418 kind := WindowPeek(WhichWindow)^.WindowKind; 1419 if kind = PicKind then begin 1420 if info^.PictureType = ScionType then 1421 exit(DoDrag); Extra lines in 1st before 1432 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1438:1442; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1432) 1433 GetWindowRect(WhichWindow, trect); 1434 MoveWindow(WhichWindow, band(trect.left, $fffc), trect.top, true); 1435 end; 1436 if WhichWindow = InfoWindow then 1437 ShowInfo; -------------------------------------------------------------------------------- 1438 if kind = UserKind then begin 1439 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1440 with UserInfo^^ do 1441 doUserWindow(UserInfo, UserDrag); 1442 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1443 if WhichWindow = ResultsWindow then begin 1444 GetWindowRect(WhichWindow, trect); 1445 ResultsTop := trect.top; 1446 ResultsLeft := trect.left; 1447 end; Extra lines in 1st before 1476 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1487; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1476) 1482 procedure DoMouseDown (event: EventRecord); 1483 var 1484 WhichWindow: WindowPtr; 1485 ThePart, ignore, kind: integer; 1486 trect: rect; -------------------------------------------------------------------------------- 1487 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1488 begin 1489 ThePart := FindWindow(event.where, WhichWindow); 1490 kind := WindowPeek(WhichWindow)^.WindowKind; 1491 case ThePart of 1492 InDesk: Extra lines in 1st before 1520 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1532:1539; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1520) 1527 end; 1528 if kind = TextKind then begin 1529 DoMouseDownInText(Event, WhichWindow); 1530 exit(DoMouseDown) 1531 end; -------------------------------------------------------------------------------- 1532 if kind = UserKind then begin 1533 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1534 with UserInfo^^ do begin 1535 UserLoc := event.where; 1536 doUserWindow(UserInfo, UserMouseDown); 1537 end; 1538 exit(DoMouseDown) 1539 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1540 if WhichWindow <> FrontWindow then 1541 SelectWindow(WhichWindow) 1542 else 1543 DoMouseDownInWindow(Event, WhichWindow); 1544 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1730:1733; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 1710:1712) 1725 1726 1727 procedure DoActivate (event: EventRecord); 1728 var 1729 WhichWindow: WindowPtr; -------------------------------------------------------------------------------- 1730 Activating, SwitchingWindows: boolean; 1731 kind: integer; 1732 NewInfo: InfoPtr; 1733 UserInfo: UserInfoHandle; 1710 Activating, SwitchingWindows, isOK: boolean; 1711 I, kind: integer; 1712 NewInfo: InfoPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1734 begin 1735 WhichWindow := WindowPtr(event.message); 1736 kind := WindowPeek(WhichWindow)^.WindowKind; 1737 Activating := odd(event.modifiers); 1738 case kind of Extra lines in 1st before 1748 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1769:1777; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1748) 1764 end; 1765 ResultsKind: 1766 UpdateResultsWindow; 1767 TextKind: 1768 ActivateTextWindow(WhichWindow, Activating); -------------------------------------------------------------------------------- 1769 UserKind: begin 1770 if Info <> NoInfo then 1771 StopDigitizing; 1772 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1773 with UserInfo^^ do begin 1774 UserActivating := Activating; 1775 doUserWindow(UserInfo, UserActivate); 1776 end; 1777 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1778 otherwise 1779 end; {case} 1780 if not activating then begin 1781 WhichWindow := FrontWindow; 1782 if WhichWindow <> nil then begin Extra lines in 1st before 1766 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1796; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1766) 1791 procedure DoUpdate (event: EventRecord); 1792 var 1793 WhichWindow: WindowPtr; 1794 SaveInfo: InfoPtr; 1795 kind: integer; -------------------------------------------------------------------------------- 1796 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1797 begin 1798 WhichWindow := WindowPtr(event.message); 1799 kind := WindowPeek(WhichWindow)^.WindowKind; 1800 BeginUpdate(WhichWindow); 1801 case kind of Extra lines in 1st before 1801 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1832:1836; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1801) 1827 UpdateResultsWindow; 1828 PasteControlKind: 1829 DrawPasteControl; 1830 TextKind: 1831 UpdateTextWindow(WhichWindow); -------------------------------------------------------------------------------- 1832 UserKind: begin 1833 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1834 with UserInfo^^ do 1835 doUserWindow(UserInfo, UserUpdate); 1836 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1837 end; 1838 EndUpdate(WhichWindow); 1839 end; 1840 1841 Extra lines in 1st before 2292 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2328; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2292) 2323 fwptr: WindowPtr; 2324 CalValue: extended; 2325 RoiStretchHandle, LeftHandle, MiddleHandle, RightHandle: rect; 2326 MovingRoi: boolean; 2327 pvalue: integer; -------------------------------------------------------------------------------- 2328 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2329 begin 2330 if PasteControl <> nil then begin 2331 fwptr := FrontWindow; 2332 if fwptr <> nil then 2333 if WindowPeek(fwptr)^.WindowKind <> PasteControlKind then Extra lines in 1st before 2478 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2515:2521; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2478) 2510 else 2511 InitCursor; 2512 end; 2513 end; 2514 end; -------------------------------------------------------------------------------- 2515 UserKind: begin 2516 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 2517 with UserInfo^^ do begin 2518 UserLoc := gloc; 2519 doUserWindow(UserInfo, UserCursor); 2520 end; 2521 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2522 otherwise 2523 InitCursor; 2524 end; {case} 2525 end; 2526 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2530; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2486) 2525 end; 2526 2527 2528 procedure CloseAll; 2529 var -------------------------------------------------------------------------------- 2530 j, result: integer; 2486 i, j, result: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2531 WPeek, NextWPeek: WindowPeek; 2532 ignore: boolean; 2533 begin 2534 InitCursor; 2535 WPeek := WindowPeek(FrontWindow); Extra lines in 1st before 2499 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2543:2544; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2499) 2538 NextWPeek := WPeek^.NextWindow; 2539 case wPeek^.WindowKind of 2540 PicKind: begin 2541 Info := pointer(WPeek^.RefCon); 2542 result := CloseAWindow(info^.wptr); -------------------------------------------------------------------------------- 2543 {CloseAWindow might close NextWPeek too} 2544 NextWPeek := WindowPeek(FrontWindow); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2545 if not CommandPeriod then 2546 for j := 1 to 2 do 2547 ignore := HandleEvents; 2548 if result = cancel then begin 2549 ActivateWindow; Extra lines in 1st before 2510 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2556:2557; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2510) 2551 exit(CloseAll) 2552 end; 2553 end; 2554 TextKind: begin 2555 result := CloseAWindow(WindowPtr(wPeek)); -------------------------------------------------------------------------------- 2556 {CloseAWindow might close NextWPeek too} 2557 NextWPeek := WindowPeek(FrontWindow); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2558 if result = cancel then begin 2559 finished := false; 2560 exit(CloseAll) 2561 end; 2562 end; Extra lines in 1st before 2641 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2689; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2641) 2684 if err = noerr then 2685 err := GetFInfo('Image Macros', LaunchRefNum, FinderInfo); 2686 if err = NoErr then begin 2687 LoadMacrosFromFile('Image Macros', LaunchRefNum); 2688 UnloadSeg(@LoadMacros); -------------------------------------------------------------------------------- 2689 RunMacro(0); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2690 end; 2691 end; 2692 2693 2694 procedure Shutdown; Extra lines in 1st before 2662 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2711:2712; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2662) 2706 CloseAll; 2707 if finished then 2708 ConvertClipboard; 2709 end; 2710 -------------------------------------------------------------------------------- 2711 var 2712 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2713 2714 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2715:2721; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2664:2665) 2713 2714 begin -------------------------------------------------------------------------------- 2715 {MaxApplZone and MoreMasters should be called from main segment, and not from init segment} 2716 SetApplLimit(ptr(LongInt(GetApplLimit) - StackSize)); 2717 MaxApplZone; 2718 for i := 1 to 10 do 2719 MoreMasters; 2720 Init; 2721 InitUserMacros; 2664 Init; 2665 {InitUserMacros;} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2722 SetupMenus; 2723 GetSettings; 2724 AllocateBuffers; 2725 AllocateArrays; 2726 ConvertSystemClipboard; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2749:2750; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2693) 2744 Shutdown; 2745 until finished; 2746 CloseSerialPorts; 2747 isOK := LoadCLUTResource(AppleDefaultCLUT); 2748 RestoreScreen; {Force Finder to redraw color icons} -------------------------------------------------------------------------------- 2749 FinalUserMacros; 2750 end. 2693 end. *** EOF on both files *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 25; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 25:26) 20 {Phone: 301-496-4957} 21 22 23 uses 24 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Initialization, File1, File2, Analysis, Graphics, {} -------------------------------------------------------------------------------- 25 Edit, Filters, Camera, User, Macros1, Macros2, Stacks, Background, UMacroDef, UMacroRun, Lut, Projection, Plugins, Text, Math, Registration; 25 Edit, Filters, Camera, User, Macros1, Macros2, Stacks, Background, {,UMacroDef, UMacroRun} 26 Lut, Projection, Plugins, Text, Math, Registration; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 27 28 {Turn off automatic toolbox initialization.} 29 {$I-} 30 Extra lines in 2nd before 38 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line Æ38; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 39) 33 34 35 procedure UpdateOptionsMenu; 36 var 37 CheckIt: boolean; -------------------------------------------------------------------------------- 39 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 38 begin 39 with info^ do begin 40 CheckItem(OptionsMenuH, GrayscaleItem, (LutMode = Grayscale) or (LutMode = CustomGrayscale)); 41 if LutMode <> PseudoColor then 42 ColorTable := CustomTable; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 217; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 219) 212 SwitchingID = 11; 213 HighlightID = 12; 214 CreatorID = 14; 215 var 216 mylog: DialogPtr; -------------------------------------------------------------------------------- 217 item: integer; 219 item, i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 218 SaveScale, SaveLW6, SaveScaleC: boolean; 219 SaveInvertValues, SaveInvertY: boolean; 220 SaveBufferSize: LongInt; 221 SaveCreator: packed array[1..4] of char; 222 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 450; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 452) 445 end; 446 447 448 procedure DoMenuEvent (MenuChoice: LongInt); 449 var -------------------------------------------------------------------------------- 450 MenuID, MenuItem, ignore: integer; 452 MenuID, MenuItem, i, ignore: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 451 name, str: str255; 452 dna, RefNum: integer; 453 ItemName: str255; 454 FontName: str255; 455 ok, isSelection: boolean; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 565:572; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 567:571) 560 SetupOperation(MenuItem); 561 DrawScaleItem: 562 DrawScale; 563 {-} 564 SelectAllItem: -------------------------------------------------------------------------------- 565 if CurrentWindow = TextKind then 566 DoTextSelectAll 567 else 568 with info^ do 569 if RoiShowing and EqualRect(RoiRect, PicRect) then 570 KillRoi 571 else 572 SelectAll(true); 567 with info^ do 568 if RoiShowing and EqualRect(RoiRect, PicRect) then 569 KillRoi 570 else 571 SelectAll(true); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 573 ScaleAndRotateItem: 574 ScaleAndRotate; 575 {-} 576 RotateLeftItem: 577 Rotate(RotateLeft); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 817:818; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 816) 812 SelectWindow(VideoControl); 813 PhotoModeItem: 814 PhotoMode; 815 LoadMacrosItem: begin 816 LoadMacros; -------------------------------------------------------------------------------- 817 UnloadSeg(@LoadMacros); 818 RunMacro(0); 816 UnloadSeg(@LoadMacros) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 819 end; 820 otherwise 821 if MenuItem >= FirstMacroItem then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 822; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 820) 819 end; 820 otherwise 821 if MenuItem >= FirstMacroItem then -------------------------------------------------------------------------------- 822 RunMenuMacro(SpecialMenu, MenuItem); 820 RunMacro(MenuItem - FirstMacroItem + 1); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 823 end; 824 end; 825 826 StacksMenu: begin 827 StopDigitizing; Extra lines in 1st before 913 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 915:917; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ913) 910 end; 911 912 UserMenu: 913 DoUserMenuEvent(MenuItem); 914 otherwise -------------------------------------------------------------------------------- 915 if FirstMacroMenu <= MenuID then 916 if MenuID <= LastMacroMenu then 917 RunMenuMacro(MenuID, MenuItem); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 918 end; 919 HiliteMenu(0); 920 RoiUpdateTime := 0; 921 end; 922 Extra lines in 1st before 1411 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1416; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1411) 1411 1412 procedure DoDrag (WhichWindow: WindowPtr; loc: point); 1413 var 1414 WinRect, DragBounds, trect: rect; 1415 kind: integer; -------------------------------------------------------------------------------- 1416 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1417 begin 1418 kind := WindowPeek(WhichWindow)^.WindowKind; 1419 if kind = PicKind then begin 1420 if info^.PictureType = ScionType then 1421 exit(DoDrag); Extra lines in 1st before 1432 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1438:1442; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1432) 1433 GetWindowRect(WhichWindow, trect); 1434 MoveWindow(WhichWindow, band(trect.left, $fffc), trect.top, true); 1435 end; 1436 if WhichWindow = InfoWindow then 1437 ShowInfo; -------------------------------------------------------------------------------- 1438 if kind = UserKind then begin 1439 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1440 with UserInfo^^ do 1441 doUserWindow(UserInfo, UserDrag); 1442 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1443 if WhichWindow = ResultsWindow then begin 1444 GetWindowRect(WhichWindow, trect); 1445 ResultsTop := trect.top; 1446 ResultsLeft := trect.left; 1447 end; Extra lines in 1st before 1476 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1487; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1476) 1482 procedure DoMouseDown (event: EventRecord); 1483 var 1484 WhichWindow: WindowPtr; 1485 ThePart, ignore, kind: integer; 1486 trect: rect; -------------------------------------------------------------------------------- 1487 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1488 begin 1489 ThePart := FindWindow(event.where, WhichWindow); 1490 kind := WindowPeek(WhichWindow)^.WindowKind; 1491 case ThePart of 1492 InDesk: Extra lines in 1st before 1520 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1532:1539; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1520) 1527 end; 1528 if kind = TextKind then begin 1529 DoMouseDownInText(Event, WhichWindow); 1530 exit(DoMouseDown) 1531 end; -------------------------------------------------------------------------------- 1532 if kind = UserKind then begin 1533 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1534 with UserInfo^^ do begin 1535 UserLoc := event.where; 1536 doUserWindow(UserInfo, UserMouseDown); 1537 end; 1538 exit(DoMouseDown) 1539 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1540 if WhichWindow <> FrontWindow then 1541 SelectWindow(WhichWindow) 1542 else 1543 DoMouseDownInWindow(Event, WhichWindow); 1544 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1730:1733; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 1710:1712) 1725 1726 1727 procedure DoActivate (event: EventRecord); 1728 var 1729 WhichWindow: WindowPtr; -------------------------------------------------------------------------------- 1730 Activating, SwitchingWindows: boolean; 1731 kind: integer; 1732 NewInfo: InfoPtr; 1733 UserInfo: UserInfoHandle; 1710 Activating, SwitchingWindows, isOK: boolean; 1711 I, kind: integer; 1712 NewInfo: InfoPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1734 begin 1735 WhichWindow := WindowPtr(event.message); 1736 kind := WindowPeek(WhichWindow)^.WindowKind; 1737 Activating := odd(event.modifiers); 1738 case kind of Extra lines in 1st before 1748 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1769:1777; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1748) 1764 end; 1765 ResultsKind: 1766 UpdateResultsWindow; 1767 TextKind: 1768 ActivateTextWindow(WhichWindow, Activating); -------------------------------------------------------------------------------- 1769 UserKind: begin 1770 if Info <> NoInfo then 1771 StopDigitizing; 1772 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1773 with UserInfo^^ do begin 1774 UserActivating := Activating; 1775 doUserWindow(UserInfo, UserActivate); 1776 end; 1777 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1778 otherwise 1779 end; {case} 1780 if not activating then begin 1781 WhichWindow := FrontWindow; 1782 if WhichWindow <> nil then begin Extra lines in 1st before 1766 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1796; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1766) 1791 procedure DoUpdate (event: EventRecord); 1792 var 1793 WhichWindow: WindowPtr; 1794 SaveInfo: InfoPtr; 1795 kind: integer; -------------------------------------------------------------------------------- 1796 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1797 begin 1798 WhichWindow := WindowPtr(event.message); 1799 kind := WindowPeek(WhichWindow)^.WindowKind; 1800 BeginUpdate(WhichWindow); 1801 case kind of Extra lines in 1st before 1801 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 1832:1836; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ1801) 1827 UpdateResultsWindow; 1828 PasteControlKind: 1829 DrawPasteControl; 1830 TextKind: 1831 UpdateTextWindow(WhichWindow); -------------------------------------------------------------------------------- 1832 UserKind: begin 1833 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 1834 with UserInfo^^ do 1835 doUserWindow(UserInfo, UserUpdate); 1836 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1837 end; 1838 EndUpdate(WhichWindow); 1839 end; 1840 1841 Extra lines in 1st before 2292 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2328; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2292) 2323 fwptr: WindowPtr; 2324 CalValue: extended; 2325 RoiStretchHandle, LeftHandle, MiddleHandle, RightHandle: rect; 2326 MovingRoi: boolean; 2327 pvalue: integer; -------------------------------------------------------------------------------- 2328 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2329 begin 2330 if PasteControl <> nil then begin 2331 fwptr := FrontWindow; 2332 if fwptr <> nil then 2333 if WindowPeek(fwptr)^.WindowKind <> PasteControlKind then Extra lines in 1st before 2478 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2515:2521; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2478) 2510 else 2511 InitCursor; 2512 end; 2513 end; 2514 end; -------------------------------------------------------------------------------- 2515 UserKind: begin 2516 UserInfo := UserInfoHandle(WindowPeek(WhichWindow)^.RefCon); 2517 with UserInfo^^ do begin 2518 UserLoc := gloc; 2519 doUserWindow(UserInfo, UserCursor); 2520 end; 2521 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2522 otherwise 2523 InitCursor; 2524 end; {case} 2525 end; 2526 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2530; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2486) 2525 end; 2526 2527 2528 procedure CloseAll; 2529 var -------------------------------------------------------------------------------- 2530 j, result: integer; 2486 i, j, result: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2531 WPeek, NextWPeek: WindowPeek; 2532 ignore: boolean; 2533 begin 2534 InitCursor; 2535 WPeek := WindowPeek(FrontWindow); Extra lines in 1st before 2499 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2543:2544; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2499) 2538 NextWPeek := WPeek^.NextWindow; 2539 case wPeek^.WindowKind of 2540 PicKind: begin 2541 Info := pointer(WPeek^.RefCon); 2542 result := CloseAWindow(info^.wptr); -------------------------------------------------------------------------------- 2543 {CloseAWindow might close NextWPeek too} 2544 NextWPeek := WindowPeek(FrontWindow); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2545 if not CommandPeriod then 2546 for j := 1 to 2 do 2547 ignore := HandleEvents; 2548 if result = cancel then begin 2549 ActivateWindow; Extra lines in 1st before 2510 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2556:2557; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2510) 2551 exit(CloseAll) 2552 end; 2553 end; 2554 TextKind: begin 2555 result := CloseAWindow(WindowPtr(wPeek)); -------------------------------------------------------------------------------- 2556 {CloseAWindow might close NextWPeek too} 2557 NextWPeek := WindowPeek(FrontWindow); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2558 if result = cancel then begin 2559 finished := false; 2560 exit(CloseAll) 2561 end; 2562 end; Extra lines in 1st before 2641 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2689; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2641) 2684 if err = noerr then 2685 err := GetFInfo('Image Macros', LaunchRefNum, FinderInfo); 2686 if err = NoErr then begin 2687 LoadMacrosFromFile('Image Macros', LaunchRefNum); 2688 UnloadSeg(@LoadMacros); -------------------------------------------------------------------------------- 2689 RunMacro(0); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2690 end; 2691 end; 2692 2693 2694 procedure Shutdown; Extra lines in 1st before 2662 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2711:2712; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line Æ2662) 2706 CloseAll; 2707 if finished then 2708 ConvertClipboard; 2709 end; 2710 -------------------------------------------------------------------------------- 2711 var 2712 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2713 2714 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2715:2721; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2664:2665) 2713 2714 begin -------------------------------------------------------------------------------- 2715 {MaxApplZone and MoreMasters should be called from main segment, and not from init segment} 2716 SetApplLimit(ptr(LongInt(GetApplLimit) - StackSize)); 2717 MaxApplZone; 2718 for i := 1 to 10 do 2719 MoreMasters; 2720 Init; 2721 InitUserMacros; 2664 Init; 2665 {InitUserMacros;} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2722 SetupMenus; 2723 GetSettings; 2724 AllocateBuffers; 2725 AllocateArrays; 2726 ConvertSystemClipboard; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Image.p"; Line 2749:2750; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Image.p"; Line 2693) 2744 Shutdown; 2745 until finished; 2746 CloseSerialPorts; 2747 isOK := LoadCLUTResource(AppleDefaultCLUT); 2748 RestoreScreen; {Force Finder to redraw color icons} -------------------------------------------------------------------------------- 2749 FinalUserMacros; 2750 end. 2693 end. *** EOF on both files *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p Extra lines in 2nd before 1145 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line Æ1145; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1145:1146) 1140 p: SyspPtr; 1141 mbhp: ^integer; 1142 str: str255; 1143 err: OSErr; 1144 begin -------------------------------------------------------------------------------- 1145 SetApplLimit(ptr(LongInt(GetApplLimit) - StackSize)); 1146 MaxApplZone; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1145 InitGraf(@ThePort); 1146 InitFonts; 1147 InitWindows; 1148 InitCursor; 1149 TEInit; Extra lines in 2nd before 1253 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line Æ1253; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1255:1256) 1248 CScreenPort := CGrafPtr(NewPtr(SizeOf(CGrafPort))); 1249 OpenCPort(CScreenPort); 1250 SetPalette(WindowPtr(CScreenPort), ExplicitPalette, false); 1251 finished := false; 1252 FlushEvents(EveryEvent, 0); -------------------------------------------------------------------------------- 1255 for i := 1 to 10 do 1256 MoreMasters; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1253 mbhp := pointer(MBarHeight); 1254 MenuBarHeight := mbhp^; 1255 SetRect(trect, tleft, ttop, tleft + twidth, ttop + theight); 1256 ToolWindow := NewCWindow(nil, trect, 'Tools', true, NoGrowDocProc, nil, false, 0); 1257 SetPalette(ToolWindow, ExplicitPalette, false); Extra lines in 1st before 1312 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1308; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1312) 1303 BuggyWatch := GetCursor(WatchCursor); 1304 InitTools; 1305 MakeCursors; 1306 nPics := 0; 1307 nextPid := -1; -------------------------------------------------------------------------------- 1308 nextTxWid := -1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1309 HistoWindow := nil; 1310 PlotWindow := nil; 1311 IsInsertionPoint := false; 1312 MaskRgn := NewRgn; 1313 PlotPICT := nil; Extra lines in 1st before 1369 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1366:1371; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1369) 1361 if TextBufP = nil then 1362 ExitToShell; 1363 MacrosP := MacrosPtr(NewPtr(SizeOf(MacrosRec))); 1364 if MacrosP = nil then 1365 ExitToShell; -------------------------------------------------------------------------------- 1366 Macros := LongIntPtr(NewHandle(100)); 1367 if Handle(Macros) = nil then 1368 ExitToShell; 1369 MacroItems := MacroItemsHandle(NewHandle(100)); 1370 if Handle(MacroItems) = nil then 1371 ExitToShell; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1372 mCount := 0; 1373 mCount2 := 0; 1374 nPoints := 0; 1375 nLengths := 0; 1376 nAngles := 0; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1540; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1537) 1535 green := -1; 1536 blue := 0; 1537 end; 1538 HighlightMode := false; 1539 LegalWithoutImage := [UpdateLutC, StartC, ShowResultsC, GetPicSizeC, PutMsgC, ExitC, CaptureC, MoveToC, BeepC, MakeNewC, SetPaletteC, SetBackC, GetRoiC, OpenC, ImportC, SetImportC, SetMinMaxC, SetCustomC, nPicsC, WaitC, SetSizeC, TriggerC, AverageFr ames -------------------------------------------------------------------------------- 1540 LegalWithoutImage := LegalWithoutImage + [DisposeAllC, GetTimeC, SetForeC, SetBackC, GetStringC, OpenSerialC, GetSerialC, PutSerialC, SetCursorC, TickCountC, ConcatC, ConcatZFC, SetVideoC, StringToNumC, ChannelC, AcquireC, UndoSizeC, FilterC, PhotoM odeC 1537 LegalWithoutImage := LegalWithoutImage + [DisposeAllC, GetTimeC, SetForeC, SetBackC, GetStringC, OpenSerialC, GetSerialC, PutSerialC, SetCursorC, TickCountC, ConcatC, SetVideoC, StringToNumC, ChannelC, AcquireC, UndoSizeC, FilterC, PhotoModeC, DrawT extC ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1541 LegalWithoutImage := LegalWithoutImage + [SaveC, SaveAsC, CloseC, DisposeC, PosC, DeleteC, LengthC]; 1542 TopOfStack := 0; 1543 SerialBufferP := nil; 1544 MacroTicks := 0; 1545 OpeningPlugInWindow := false; Extra lines in 1st before 1573 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1576:1580; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1573) 1571 FiducialMethod := OnScreen; 1572 ConfirmFidClicks := false; 1573 WatchIndex := 1; 1574 WireframeSurfacePlots := true; 1575 GrayscaleSurfacePlots := false; -------------------------------------------------------------------------------- 1576 UserInfoList := nil; 1577 MacroLoadHandle := nil; 1578 MacroLoadRequest := false; 1579 for i := FirstMacroMenu to LastMacroMenu do 1580 MacroMenusH[i] := nil; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1581 end; 1582 1583 1584 end. *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p Extra lines in 2nd before 1145 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line Æ1145; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1145:1146) 1140 p: SyspPtr; 1141 mbhp: ^integer; 1142 str: str255; 1143 err: OSErr; 1144 begin -------------------------------------------------------------------------------- 1145 SetApplLimit(ptr(LongInt(GetApplLimit) - StackSize)); 1146 MaxApplZone; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1145 InitGraf(@ThePort); 1146 InitFonts; 1147 InitWindows; 1148 InitCursor; 1149 TEInit; Extra lines in 2nd before 1253 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line Æ1253; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1255:1256) 1248 CScreenPort := CGrafPtr(NewPtr(SizeOf(CGrafPort))); 1249 OpenCPort(CScreenPort); 1250 SetPalette(WindowPtr(CScreenPort), ExplicitPalette, false); 1251 finished := false; 1252 FlushEvents(EveryEvent, 0); -------------------------------------------------------------------------------- 1255 for i := 1 to 10 do 1256 MoreMasters; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1253 mbhp := pointer(MBarHeight); 1254 MenuBarHeight := mbhp^; 1255 SetRect(trect, tleft, ttop, tleft + twidth, ttop + theight); 1256 ToolWindow := NewCWindow(nil, trect, 'Tools', true, NoGrowDocProc, nil, false, 0); 1257 SetPalette(ToolWindow, ExplicitPalette, false); Extra lines in 1st before 1312 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1308; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1312) 1303 BuggyWatch := GetCursor(WatchCursor); 1304 InitTools; 1305 MakeCursors; 1306 nPics := 0; 1307 nextPid := -1; -------------------------------------------------------------------------------- 1308 nextTxWid := -1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1309 HistoWindow := nil; 1310 PlotWindow := nil; 1311 IsInsertionPoint := false; 1312 MaskRgn := NewRgn; 1313 PlotPICT := nil; Extra lines in 1st before 1369 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1366:1371; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1369) 1361 if TextBufP = nil then 1362 ExitToShell; 1363 MacrosP := MacrosPtr(NewPtr(SizeOf(MacrosRec))); 1364 if MacrosP = nil then 1365 ExitToShell; -------------------------------------------------------------------------------- 1366 Macros := LongIntPtr(NewHandle(100)); 1367 if Handle(Macros) = nil then 1368 ExitToShell; 1369 MacroItems := MacroItemsHandle(NewHandle(100)); 1370 if Handle(MacroItems) = nil then 1371 ExitToShell; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1372 mCount := 0; 1373 mCount2 := 0; 1374 nPoints := 0; 1375 nLengths := 0; 1376 nAngles := 0; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1540; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line 1537) 1535 green := -1; 1536 blue := 0; 1537 end; 1538 HighlightMode := false; 1539 LegalWithoutImage := [UpdateLutC, StartC, ShowResultsC, GetPicSizeC, PutMsgC, ExitC, CaptureC, MoveToC, BeepC, MakeNewC, SetPaletteC, SetBackC, GetRoiC, OpenC, ImportC, SetImportC, SetMinMaxC, SetCustomC, nPicsC, WaitC, SetSizeC, TriggerC, Averag eFram -------------------------------------------------------------------------------- 1540 LegalWithoutImage := LegalWithoutImage + [DisposeAllC, GetTimeC, SetForeC, SetBackC, GetStringC, OpenSerialC, GetSerialC, PutSerialC, SetCursorC, TickCountC, ConcatC, ConcatZFC, SetVideoC, StringToNumC, ChannelC, AcquireC, UndoSizeC, FilterC, Pho toMod 1537 LegalWithoutImage := LegalWithoutImage + [DisposeAllC, GetTimeC, SetForeC, SetBackC, GetStringC, OpenSerialC, GetSerialC, PutSerialC, SetCursorC, TickCountC, ConcatC, SetVideoC, StringToNumC, ChannelC, AcquireC, UndoSizeC, FilterC, PhotoModeC, Dr awTex ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1541 LegalWithoutImage := LegalWithoutImage + [SaveC, SaveAsC, CloseC, DisposeC, PosC, DeleteC, LengthC]; 1542 TopOfStack := 0; 1543 SerialBufferP := nil; 1544 MacroTicks := 0; 1545 OpeningPlugInWindow := false; Extra lines in 1st before 1573 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Init.p"; Line 1576:1580; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Init.p"; Line Æ1573) 1571 FiducialMethod := OnScreen; 1572 ConfirmFidClicks := false; 1573 WatchIndex := 1; 1574 WireframeSurfacePlots := true; 1575 GrayscaleSurfacePlots := false; -------------------------------------------------------------------------------- 1576 UserInfoList := nil; 1577 MacroLoadHandle := nil; 1578 MacroLoadRequest := false; 1579 for i := FirstMacroMenu to LastMacroMenu do 1580 MacroMenusH[i] := nil; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1581 end; 1582 1583 1584 end. *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Lut.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Lut.p Extra lines in 1st before 1500 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Lut.p"; Line 1500; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Lut.p"; Line Æ1500) 1495 begin 1496 if not DensitySlicing then begin 1497 SetupLutUndo; 1498 DrawDensitySlice(false); 1499 DensitySlicing := true; -------------------------------------------------------------------------------- 1500 if not macro then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1501 SelectLUTTool; 1502 end; 1503 end; 1504 1505 *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Lut.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Lut.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Lut.p"; Line 1500:1501; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Lut.p"; Line 1500) 1495 begin 1496 if not DensitySlicing then begin 1497 SetupLutUndo; 1498 DrawDensitySlice(false); 1499 DensitySlicing := true; -------------------------------------------------------------------------------- 1500 if not macro then 1501 SelectLUTTool; 1500 SelectLUTTool; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1502 end; 1503 end; 1504 1505 1506 procedure DoImportLut (fname: str255; vnum: integer); *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 14; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 14) 9 interface 10 11 uses 12 QuickDraw, Palettes, Picker, PrintTraps, Globals, Utilities, Graphics, Edit, {} 13 Analysis, Camera, File1, File2, Filters, Macros2, Stacks, Lut, Background, {} -------------------------------------------------------------------------------- 14 User, Serial, PlugIns, Text, projection, math, UMacroDef, UMacroRun; 14 User, Serial, PlugIns, Text, projection, math; {,UMacroDef, UMacroRun} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 15 16 17 procedure RunMacro (nMacro: integer); 18 procedure RunKeyMacro (ch: char; KeyCode: integer); 19 procedure CloseSerialPorts; Extra lines in 1st before 20 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 20; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ20) 15 16 17 procedure RunMacro (nMacro: integer); 18 procedure RunKeyMacro (ch: char; KeyCode: integer); 19 procedure CloseSerialPorts; -------------------------------------------------------------------------------- 20 procedure RunMenuMacro (menuID, menuItem: integer); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 22 23 implementation 24 25 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 36; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 35) 31 RightParenExpected = '")" expected'; 32 NoImageOpen = 'No Image open'; 33 MaxArgs = 25; 34 35 var -------------------------------------------------------------------------------- 36 ErrorPC, LineStartPC: LongInt; 35 nSaves, ErrorPC, LineStartPC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 37 DoOption: boolean; 38 SaveBackground, SavePicWidth, SavePicHeight: integer; 39 SaveMethod: rsMethodType; 40 SaveCreate, SaveInvertY, SaveScaleArithmetic, SaveScaleConvolutions: boolean; 41 SaveAngle, SaveH, SaveV: real; Extra lines in 1st before 43 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 44; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ43) 39 SaveMethod: rsMethodType; 40 SaveCreate, SaveInvertY, SaveScaleArithmetic, SaveScaleConvolutions: boolean; 41 SaveAngle, SaveH, SaveV: real; 42 MacroOpPending, StringsAllocated, InPhotoMode: boolean; 43 RoutinesCalled: set of CommandType; -------------------------------------------------------------------------------- 44 LastChoosePicInfo: InfoPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 45 46 47 48 function GetExpression: extended; 49 forward; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 141:144; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 139:144) 136 137 function FetchInteger: integer; 138 var 139 temp: integer; 140 begin -------------------------------------------------------------------------------- 141 temp := ord(pcp(Macros^ + pc)^.c); 142 pc := pc + 1; 143 FetchInteger := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 144 pc := pc + 1; 139 with macrosP^ do begin 140 temp := ord(macros[pc]); 141 pc := pc + 1; 142 FetchInteger := bor(bsl(temp, 8), ord(macros[pc])); 143 pc := pc + 1; 144 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 145 end; 146 147 148 procedure LookupProcedure; 149 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 164:172; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 164:174) 159 160 function FetchReal: real; 161 var 162 temp: LongInt; 163 begin -------------------------------------------------------------------------------- 164 temp := ord(pcp(Macros^ + pc)^.c); 165 pc := pc + 1; 166 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 167 pc := pc + 1; 168 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 169 pc := pc + 1; 170 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 171 pc := pc + 1; 172 FetchReal := real(temp); 164 with macrosP^ do begin 165 temp := ord(macros[pc]); 166 pc := pc + 1; 167 temp := bor(bsl(temp, 8), ord(macros[pc])); 168 pc := pc + 1; 169 temp := bor(bsl(temp, 8), ord(macros[pc])); 170 pc := pc + 1; 171 temp := bor(bsl(temp, 8), ord(macros[pc])); 172 pc := pc + 1; 173 FetchReal := real(temp); 174 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 173 end; 174 175 176 procedure GetToken; 177 begin Extra lines in 2nd before 178 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ178; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 180) 173 end; 174 175 176 procedure GetToken; 177 begin -------------------------------------------------------------------------------- 180 with MacrosP^ do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 178 if token = DoneT then 179 exit(GetToken); 180 SavePC := PC; 181 SaveToken := token; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 182; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 185) 178 if token = DoneT then 179 exit(GetToken); 180 SavePC := PC; 181 SaveToken := token; -------------------------------------------------------------------------------- 182 token := TokenType(pcp(Macros^ + pc)^.c); 185 token := TokenType(macros[pc]); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 183 while token = NewLineT do begin 184 MacroLineNumber := MacroLineNumber + 1; 185 pc := pc + 1; 186 LineStartPC := pc; 187 if pc > EndMacros then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 193; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 196) 188 Token := DoneT; 189 exit(GetToken); 190 end; 191 SavePC := PC; 192 SaveToken := token; -------------------------------------------------------------------------------- 193 token := TokenType(pcp(Macros^ + pc)^.c); 196 token := TokenType(macros[pc]); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 194 end; 195 pc := pc + 1; 196 if pc > EndMacros then begin 197 Token := DoneT; 198 exit(GetToken); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 214:215; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 217:218) 209 LookupProcedure; 210 NumericLiteral: 211 TokenValue := FetchReal; 212 StringLiteral: begin 213 TokenStr := ''; -------------------------------------------------------------------------------- 214 while pcp(Macros^ + pc)^.c <> chr(0) do begin 215 TokenStr := concat(TokenStr, pcp(Macros^ + pc)^.c); 217 while macros[pc] <> chr(0) do begin 218 TokenStr := concat(TokenStr, macros[pc]); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 216 pc := pc + 1; 217 end; 218 pc := pc + 1; 219 end; 220 end; {case} Extra lines in 2nd before 221 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ221; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 224) 216 pc := pc + 1; 217 end; 218 pc := pc + 1; 219 end; 220 end; {case} -------------------------------------------------------------------------------- 224 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221 end; 222 223 224 procedure GetMacroName; 225 var Extra lines in 2nd before 228 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ228; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 232) 223 224 procedure GetMacroName; 225 var 226 i, len: integer; 227 begin -------------------------------------------------------------------------------- 232 with MacrosP^ do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 228 pc := PCStart; 229 repeat 230 pc := pc - 1; 231 if pc < 0 then 232 exit(GetMacroName); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 233; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 238) 228 pc := PCStart; 229 repeat 230 pc := pc - 1; 231 if pc < 0 then 232 exit(GetMacroName); -------------------------------------------------------------------------------- 233 until pcp(Macros^ + pc)^.c = chr(ord(MacroT)); 238 until macros[pc] = chr(ord(MacroT)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 234 GetToken; {MacroT} 235 GetToken; {Macro name} 236 if Token = StringLiteral then begin 237 len := length(TokenStr); 238 if len > SymbolSize then Extra lines in 2nd before 244 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ244; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 249) 239 len := SymbolSize; 240 for i := 1 to len do 241 MacroOrProcName[i] := TokenStr[i]; 242 end; 243 end; -------------------------------------------------------------------------------- 249 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 244 245 246 procedure ConvertTokenToString (t: TokenType; var str: str255); 247 var 248 i, j, len: integer; Extra lines in 2nd before 337 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ337; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 343) 332 333 procedure GetErrorLine (var ErrorLine: str255); 334 var 335 str: str255; 336 begin -------------------------------------------------------------------------------- 343 with MacrosP^ do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 337 pc := LineStartPC; 338 ErrorLine := ''; 339 repeat 340 str := ''; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 341; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 348) 337 pc := LineStartPC; 338 ErrorLine := ''; 339 repeat 340 str := ''; -------------------------------------------------------------------------------- 341 if pcp(Macros^ + pc)^.c = chr(ord(NewLineT)) then 348 if macros[pc] = chr(ord(NewLineT)) then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 342 leave; 343 GetToken; 344 ConvertTokenToString(token, str); 345 if SavePC = ErrorPC then 346 str := concat('Ç', str, 'È'); Extra lines in 2nd before 350 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ350; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 357) 345 if SavePC = ErrorPC then 346 str := concat('Ç', str, 'È'); 347 ErrorLine := concat(ErrorLine, ' ', str); 348 until token = DoneT; 349 end; -------------------------------------------------------------------------------- 357 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 350 351 352 procedure GetLineNumber; 353 begin 354 pc := PCStart; Extra lines in 2nd before 367 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ367; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 375) 362 {Report run-time errors} 363 var 364 name, ErrorLine: str255; 365 i, count, ignore: integer; 366 begin -------------------------------------------------------------------------------- 375 with MacrosP^ do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 367 if token = DoneT then 368 exit(MacroError); 369 if TopOfStack > 0 then 370 DeAllocateStrings(nGlobals + 1, TopOfStack); 371 ErrorPC := SavePC; Extra lines in 2nd before 384 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line Æ384; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 393) 379 GetErrorLine(ErrorLine); 380 InitCursor; 381 ParamText(str, long2str(MacroLineNumber), Name, ErrorLine); 382 Ignore := Alert(900, nil); 383 Token := DoneT; -------------------------------------------------------------------------------- 393 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 384 end; 385 386 387 procedure DoDeclaration; 388 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 531:676; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 541:543) 526 str := concat(str, str2); 527 until (token = RightParen) or (token = DoneT); 528 end; 529 530 -------------------------------------------------------------------------------- 531 function GetVar: integer; 532 forward; 533 534 procedure DoUserToken; 535 var 536 uma: UserMacroArgs; 537 i, j, PicN: integer; 538 UserToken: TokenType; 539 saveinfo: InfoPtr; 540 begin 541 with uma, MacrosP^ do begin 542 UserToken := token; 543 UserMacroCommand := UserCommandType(MacroCommand); 544 nArgs := 0; 545 ErrorOccurred := false; 546 LookupUserMacro(uma); {Get information about command arguments} 547 if ErrorOccurred then 548 MacroError(str); 549 if token = DoneT then 550 exit(DoUserToken); 551 {scan the arguments} 552 if nArgs > 0 then begin 553 GetLeftParen; 554 if token = DoneT then 555 exit(DoUserToken); 556 for i := 1 to nArgs do 557 with arg[i] do begin 558 if i <> 1 then 559 GetComma; 560 case atype of 561 UMATinteger: begin 562 ival := GetInteger; 563 end; 564 UMATreal: begin 565 aval := GetExpression; 566 end; 567 UMATstring: begin 568 str := GetString; 569 end; 570 UMATpic: begin 571 PicN := GetInteger; 572 j := 0; 573 while (PicN < 0) and (j < nPics) do begin 574 j := j + 1; 575 if InfoPtr(WindowPeek(PicWindow[j])^.RefCon)^.pidNum = PicN then 576 PicN := j; 577 end; 578 if (PicN < 1) or (PicN > nPics) then 579 MacroError('Specified image does not exist') 580 else begin 581 infop := pointer(WindowPeek(PicWindow[picN])^.RefCon); 582 ival := PicN; 583 with infop^ do begin 584 wasRoi := RoiShowing; 585 if wasRoi then 586 with RoiRect do 587 if roiType <> RectRoi then 588 MacroError('This command requires a rectangular selection') 589 else if (left < 0) or (top < 0) or (right > PixelsPerLine) or (bottom > nlines) then 590 MacroError('This command requires the selection to be entirely within the image') 591 else begin 592 roi.Base := ptr(ord4(PicBaseAddr) + left + LongInt(top) * BytesPerRow); 593 roi.Width := right - left; 594 roi.Height := bottom - top; 595 end 596 else begin 597 roi.Base := PicBaseAddr; 598 roi.Width := PixelsPerLine; 599 roi.Height := nLines; 600 end; 601 roi.Skip := BytesPerRow - roi.Width; 602 end;{with infop^} 603 end;{image exists} 604 end;{UMATpic:} 605 UMATintvar: begin 606 j := GetVar; 607 varIX := j; 608 if j <> 0 then 609 ival := round(stack[j].value); 610 end; 611 UMATrealvar: begin 612 j := GetVar; 613 varIX := j; 614 if j <> 0 then 615 aval := stack[j].value; 616 end; 617 UMATstringvar: begin 618 GetToken; 619 if token <> StringVariable then 620 MacroError('String Variable expected') 621 else begin 622 varIX := TokenStackLoc; 623 str := TokenStr; 624 end; 625 end; 626 end; {case} 627 if token = DoneT then 628 exit(DoUserToken); 629 end;{with arg[i]} 630 GetRightParen; 631 end; 632 if token = DoneT then 633 exit(DoUserToken); 634 saveInfo := info; 635 for i := 1 to nArgs do 636 with arg[i] do 637 if atype = UMATpic then 638 if wasRoi then begin 639 info := infop; 640 KillRoi; 641 end; 642 info := saveInfo; 643 FuncResult := 0.0; 644 DoUserMacro(uma); {Execute the user command / function/ string function} 645 if ErrorOccurred then begin 646 MacroError(str); 647 exit(DoUserToken); 648 end; 649 for i := 1 to nArgs do 650 with arg[i] do begin 651 case atype of 652 UMATintvar: 653 stack[varIX].value := ival; 654 UMATrealvar: 655 stack[varIX].value := aval; 656 UMATstringvar: 657 with stack[varIX] do 658 if StringH <> nil then 659 StringH^^ := str; 660 UMATpic: 661 if wasRoi then 662 with infop^ do begin {restore rectangular ROI} 663 roiType := RectRoi; 664 MakeRegion; 665 SetupUndo; 666 RoiShowing := true; 667 end; 668 otherwise 669 ; 670 end;{case} 671 end;{with arg[i]} 672 if UserToken = UserFuncT then 673 TokenValue := FuncResult 674 else if UserToken = UserStrFuncT then 675 TokenStr := str; 676 end;{with} 541 procedure DoUserToken; 542 begin 543 MacroError('UMX package not installed'); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 677 end; 678 679 680 function DoGetString: str255; {(prompt,default:str255)} 681 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 788; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 655) 783 DoStringFunction := DoGetString; 784 ChrC: 785 DoStringFunction := DoChr; 786 GetSerialC: 787 DoStringFunction := GetSerial; -------------------------------------------------------------------------------- 788 ConcatC, ConcatZFC: begin 655 ConcatC: begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 789 GetArguments(str); 790 DoStringFunction := str; 791 end; 792 WindowTitleC: 793 DoStringFunction := GetWindowTitle; Extra lines in 1st before 918 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 1051; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ918) 1046 GetLeftParen; 1047 pid := GetInteger; 1048 GetRightParen; 1049 if Token <> DoneT then begin 1050 PidExists := false; -------------------------------------------------------------------------------- 1051 if pid < 0 then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1052 for i := 1 to nPics do 1053 if InfoPtr(WindowPeek(PicWindow[i])^.RefCon)^.pidNum = pid then begin 1054 PidExists := true; 1055 leave; 1056 end; Extra lines in 1st before 923 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 1057:1059; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ923) 1052 for i := 1 to nPics do 1053 if InfoPtr(WindowPeek(PicWindow[i])^.RefCon)^.pidNum = pid then begin 1054 PidExists := true; 1055 leave; 1056 end; -------------------------------------------------------------------------------- 1057 end 1058 else if (pid > 0) and (pid <= nPics) then 1059 PidExists := true; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1060 end; 1061 end; 1062 1063 1064 function DoPos: integer; Extra lines in 1st before 1951 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 2088; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ1951) 2083 Info := pointer(WindowPeek(PicWindow[id])^.RefCon); 2084 ActivateWindow; 2085 GenerateValues; 2086 LoadLUT(info^.cTable); 2087 UpdatePicWindow; -------------------------------------------------------------------------------- 2088 LastChoosePicInfo := nil; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2089 end; 2090 2091 2092 procedure SelectPic; {(PicN:integer)} 2093 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 2112:2118; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 1974:1975) 2107 if (PicN < 1) or (PicN > nPics) then 2108 MacroError('Specified image does not exist'); 2109 if Token <> DoneT then begin 2110 if SaveCommand = SelectPicC then 2111 SelectImage(PicN) -------------------------------------------------------------------------------- 2112 else begin 2113 StopDigitizing; 2114 SaveRoi; 2115 DisableDensitySlice; 2116 Info := pointer(WindowPeek(PicWindow[PicN])^.RefCon); 2117 LastChoosePicInfo := Info; 2118 end 1974 else 1975 Info := pointer(WindowPeek(PicWindow[PicN])^.RefCon); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2119 end; 2120 end; 2121 2122 2123 procedure SetPicName; {(name:string)} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 3905:3908; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 3762) 3900 if WhatToCopy = NothingToCopy then 3901 MacroError('Copy failed') 3902 else 3903 DoCopy; 3904 end; -------------------------------------------------------------------------------- 3905 SelectC: 3906 if CurrentWindow = TextKind then 3907 DoTextSelectAll 3908 else begin 3762 SelectC: begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3909 StopDigitizing; 3910 SelectAll(true); 3911 end; 3912 PasteC: 3913 DoPaste; Extra lines in 1st before 3769 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 3915:3921; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ3769) 3910 SelectAll(true); 3911 end; 3912 PasteC: 3913 DoPaste; 3914 ClearC, FillC, InvertC, FrameC: -------------------------------------------------------------------------------- 3915 if CurrentWindow = TextKind then 3916 case MacroCommand of 3917 ClearC: 3918 DoTextClear; 3919 otherwise 3920 end 3921 else ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3922 with info^ do begin 3923 AutoSelectAll := not RoiShowing; 3924 if AutoSelectAll then 3925 SelectAll(true); 3926 case MacroCommand of Extra lines in 1st before 4132 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4285:4288; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ4132) 4280 DoDelete; 4281 GetScaleC: 4282 GetScale; 4283 AutoOutlineC: 4284 DoAutoOutline; -------------------------------------------------------------------------------- 4285 LoadMacrosC: begin 4286 Token := DoneT; 4287 MacroLoadRequest := true; 4288 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4289 end; {case} 4290 OptionKeyWasDown := false; 4291 if not macro then begin 4292 Token := DoneT; 4293 KillRoi; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4359:4360; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4202) 4354 end; 4355 4356 4357 procedure DoFor; 4358 var -------------------------------------------------------------------------------- 4359 SavePC: LongInt; 4360 StackLoc: integer; 4202 SavePC, StackLoc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4361 StartValue, EndValue, i: LongInt; 4362 begin 4363 StackLoc := GetVar; 4364 GetToken; 4365 if token <> AssignOp then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4528; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4370) 4523 4524 4525 procedure DoWhile; 4526 var 4527 isTrue: boolean; -------------------------------------------------------------------------------- 4528 SavePC: LongInt; 4370 SavePC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4529 begin 4530 SavePC := pc; 4531 repeat 4532 pc := SavePC; 4533 isTrue := GetBoolean; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4568; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4410) 4563 4564 4565 procedure DoRepeat; 4566 var 4567 isTrue: boolean; -------------------------------------------------------------------------------- 4568 SavePC: LongInt; 4410 SavePC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4569 begin 4570 SavePC := pc; 4571 isTrue := true; 4572 repeat 4573 pc := SavePC; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4794:4795; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4636) 4789 end; 4790 4791 4792 procedure DoProcedure; 4793 var -------------------------------------------------------------------------------- 4794 SavePC, SavePCStart, NewPCStart: LongInt; 4795 SaveStackLoc, nArgs, i: integer; 4636 SavePC, SavePCStart, NewPCStart, SaveStackLoc, nArgs, i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4796 SaveProcName, NewProcName: SymbolType; 4797 SaveStringsAllocated: boolean; 4798 begin 4799 NewPCStart := TokenLoc; 4800 NewProcName := TokenSymbol; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4916; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4757) 4911 SkipIf; 4912 WhileT: 4913 SkipWhile; 4914 RepeatT: 4915 SkipRepeat; -------------------------------------------------------------------------------- 4916 CommandT, UserCommandT, Variable, StringVariable, ArrayT, ProcedureT: 4757 CommandT, Variable, StringVariable, ArrayT, ProcedureT: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4917 SkipPartialStatement; 4918 DoneT: 4919 ; {Aborting the macro} 4920 SemiColon, EndT, ElseT, UntilT: 4921 PutTokenBack; {These tokens can follow a statement} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4933:4936; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4774:4775) 4928 4929 procedure RunMacro (nMacro: integer); 4930 var 4931 count: integer; 4932 str: str255; -------------------------------------------------------------------------------- 4933 begin 4934 MacroLoadHandle := nil; 4935 repeat 4936 MacroLoadRequest := false; 4774 SaveInfo: InfoPtr; 4775 begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4937 DefaultFileName := ''; 4938 str := ''; 4939 nSaves := 0; 4940 DefaultRefNum := 0; 4941 count := 0; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4942:4945; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4781:4782) 4937 DefaultFileName := ''; 4938 str := ''; 4939 nSaves := 0; 4940 DefaultRefNum := 0; 4941 count := 0; -------------------------------------------------------------------------------- 4942 pcStart := MacroItems^^[nMacro].MacroStart; 4943 pc := pcStart; 4944 if (nMacro = 0) and (pc = 0) then 4945 exit(RunMacro); {no global variables initialization} 4781 pcStart := MacroStart[nMacro]; 4782 pc := pcStart; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4946 SavePC := pcStart; 4947 LineStartPC := pcStart; 4948 token := NullT; 4949 macro := true; 4950 MacroOpPending := false; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4952; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4789) 4947 LineStartPC := pcStart; 4948 token := NullT; 4949 macro := true; 4950 MacroOpPending := false; 4951 DoOption := false; -------------------------------------------------------------------------------- 4952 LastChoosePicInfo := nil; 4789 SaveInfo := info; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4953 TopOfStack := nGlobals; 4954 MacroOrProcName := BlankSymbol; 4955 StringsAllocated := false; 4956 InPhotoMode := false; 4957 RoutinesCalled := []; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4961:4967; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4798:4799) 4956 InPhotoMode := false; 4957 RoutinesCalled := []; 4958 GetToken; 4959 DoDeclarations; 4960 DoCompoundStatement; -------------------------------------------------------------------------------- 4961 if info = LastChoosePicInfo then begin 4962 SelectWindow(info^.wptr); 4963 ActivateWindow; 4964 GenerateValues; 4965 LoadLUT(info^.cTable); 4966 UpdatePicWindow; 4967 end; 4798 if (info <> SaveInfo) and (info <> NoInfo) then 4799 SelectWindow(info^.wptr); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4968 with info^, RoiRect do begin 4969 if ((right - left) <= 0) or ((bottom - top) <= 0) then 4970 KillRoi; 4971 end; 4972 if info^.RoiShowing then begin Extra lines in 1st before 4817 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4985:4990; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ4817) 4980 macro := false; 4981 if StringsAllocated then 4982 DeallocateStrings(nGlobals + 1, TopOfStack); 4983 if InPhotoMode then 4984 RestoreScreen; -------------------------------------------------------------------------------- 4985 if MacroLoadRequest then begin 4986 LoadMacros; 4987 UnloadSeg(@LoadMacros); 4988 nMacro := 0; {initialize globals if requested} 4989 end; 4990 until not MacroLoadRequest; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4991 end; 4992 4993 4994 procedure RunKeyMacro (ch: char; KeyCode: integer); 4995 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 5039; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4865) 5034 113: 5035 ch := 'O'; 5036 otherwise 5037 end; 5038 for i := 1 to nMacros do -------------------------------------------------------------------------------- 5039 if ch = MacroItems^^[i].MacroKey then begin 4865 if ch = MacroKey[i] then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5040 RunMacro(i); 5041 leave; 5042 end; 5043 end; 5044 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 5045:5081; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4871:4873) 5040 RunMacro(i); 5041 leave; 5042 end; 5043 end; 5044 -------------------------------------------------------------------------------- 5045 procedure RunMenuMacro (menuID, menuItem: integer); 5046 var 5047 i: integer; 5048 nonHMenuID: integer; {menu ID of the non-hierarchal version} 5049 MHandle: MenuHandle; 5050 begin 5051 nonHMenuID := menuID; 5052 if menuID <> SpecialMenu then begin 5053 nonHMenuID := ((menuID - FirstMacroMenu) div 2) * 2 + FirstMacroMenu; 5054 if menuItem = 1 then begin 5055 MHandle := MacroMenusH[nonHMenuID]; 5056 if MHandle <> nil then 5057 if menuID = nonHMenuID then begin 5058 {hide this menu} 5059 DeleteMenu(nonHMenuID); 5060 DrawMenuBar; 5061 end 5062 else begin 5063 {show this menu} 5064 InsertMenu(MHandle, 0); 5065 DrawMenuBar; 5066 end; 5067 exit(RunMenuMacro); 5068 end; 5069 end; 5070 for i := 1 to nMacros do 5071 with MacroItems^^[i] do begin 5072 if nonHMenuID = MMenuID then 5073 if menuItem = MMitem then begin 5074 RunMacro(i); 5075 exit(RunMenuMacro); 5076 end 5077 end; 5078 PutMessage('RunMenuMacro error'); 5079 end; 5080 5081 end. 4871 4872 4873 end. *** EOF on both files *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 14; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 14) 9 interface 10 11 uses 12 QuickDraw, Palettes, Picker, PrintTraps, Globals, Utilities, Graphics, Edit, {} 13 Analysis, Camera, File1, File2, Filters, Macros2, Stacks, Lut, Background, {} -------------------------------------------------------------------------------- 14 User, Serial, PlugIns, Text, projection, math, UMacroDef, UMacroRun; 14 User, Serial, PlugIns, Text, projection, math; {,UMacroDef, UMacroRun} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 15 16 17 procedure RunMacro (nMacro: integer); 18 procedure RunKeyMacro (ch: char; KeyCode: integer); 19 procedure CloseSerialPorts; Extra lines in 1st before 20 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 20; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ20) 15 16 17 procedure RunMacro (nMacro: integer); 18 procedure RunKeyMacro (ch: char; KeyCode: integer); 19 procedure CloseSerialPorts; -------------------------------------------------------------------------------- 20 procedure RunMenuMacro (menuID, menuItem: integer); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 22 23 implementation 24 25 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 36; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 35) 31 RightParenExpected = '")" expected'; 32 NoImageOpen = 'No Image open'; 33 MaxArgs = 25; 34 35 var -------------------------------------------------------------------------------- 36 ErrorPC, LineStartPC: LongInt; 35 nSaves, ErrorPC, LineStartPC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 37 DoOption: boolean; 38 SaveBackground, SavePicWidth, SavePicHeight: integer; 39 SaveMethod: rsMethodType; 40 SaveCreate, SaveInvertY, SaveScaleArithmetic, SaveScaleConvolutions: boolean; 41 SaveAngle, SaveH, SaveV: real; Extra lines in 1st before 43 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 44; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ43) 39 SaveMethod: rsMethodType; 40 SaveCreate, SaveInvertY, SaveScaleArithmetic, SaveScaleConvolutions: boolean; 41 SaveAngle, SaveH, SaveV: real; 42 MacroOpPending, StringsAllocated, InPhotoMode: boolean; 43 RoutinesCalled: set of CommandType; -------------------------------------------------------------------------------- 44 LastChoosePicInfo: InfoPtr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 45 46 47 48 function GetExpression: extended; 49 forward; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 141:144; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 139:144) 136 137 function FetchInteger: integer; 138 var 139 temp: integer; 140 begin -------------------------------------------------------------------------------- 141 temp := ord(pcp(Macros^ + pc)^.c); 142 pc := pc + 1; 143 FetchInteger := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 144 pc := pc + 1; 139 with macrosP^ do begin 140 temp := ord(macros[pc]); 141 pc := pc + 1; 142 FetchInteger := bor(bsl(temp, 8), ord(macros[pc])); 143 pc := pc + 1; 144 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 145 end; 146 147 148 procedure LookupProcedure; 149 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 164:172; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 164:174) 159 160 function FetchReal: real; 161 var 162 temp: LongInt; 163 begin -------------------------------------------------------------------------------- 164 temp := ord(pcp(Macros^ + pc)^.c); 165 pc := pc + 1; 166 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 167 pc := pc + 1; 168 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 169 pc := pc + 1; 170 temp := bor(bsl(temp, 8), ord(pcp(Macros^ + pc)^.c)); 171 pc := pc + 1; 172 FetchReal := real(temp); 164 with macrosP^ do begin 165 temp := ord(macros[pc]); 166 pc := pc + 1; 167 temp := bor(bsl(temp, 8), ord(macros[pc])); 168 pc := pc + 1; 169 temp := bor(bsl(temp, 8), ord(macros[pc])); 170 pc := pc + 1; 171 temp := bor(bsl(temp, 8), ord(macros[pc])); 172 pc := pc + 1; 173 FetchReal := real(temp); 174 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 173 end; 174 175 176 procedure GetToken; 177 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 178:186; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 180:198) 173 end; 174 175 176 procedure GetToken; 177 begin -------------------------------------------------------------------------------- 178 if token = DoneT then 179 exit(GetToken); 180 SavePC := PC; 181 SaveToken := token; 182 token := TokenType(pcp(Macros^ + pc)^.c); 183 while token = NewLineT do begin 184 MacroLineNumber := MacroLineNumber + 1; 185 pc := pc + 1; 186 LineStartPC := pc; 180 with MacrosP^ do begin 181 if token = DoneT then 182 exit(GetToken); 183 SavePC := PC; 184 SaveToken := token; 185 token := TokenType(macros[pc]); 186 while token = NewLineT do begin 187 MacroLineNumber := MacroLineNumber + 1; 188 pc := pc + 1; 189 LineStartPC := pc; 190 if pc > EndMacros then begin 191 Token := DoneT; 192 exit(GetToken); 193 end; 194 SavePC := PC; 195 SaveToken := token; 196 token := TokenType(macros[pc]); 197 end; 198 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 187 if pc > EndMacros then begin 188 Token := DoneT; 189 exit(GetToken); 190 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 191:220; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 203:224) 187 if pc > EndMacros then begin 188 Token := DoneT; 189 exit(GetToken); 190 end; -------------------------------------------------------------------------------- 191 SavePC := PC; 192 SaveToken := token; 193 token := TokenType(pcp(Macros^ + pc)^.c); 194 end; 195 pc := pc + 1; 196 if pc > EndMacros then begin 197 Token := DoneT; 198 exit(GetToken); 199 end; 200 case token of 201 CommandT, FunctionT, StringFunctionT, ArrayT, UserCommandT, UserFuncT, UserStrFuncT: 202 MacroCommand := CommandType(FetchInteger); 203 Identifier: begin 204 SymbolTableLoc := FetchInteger; 205 if TopOfStack > 0 then 206 LookupVariable; 207 end; 208 ProcedureT: 209 LookupProcedure; 210 NumericLiteral: 211 TokenValue := FetchReal; 212 StringLiteral: begin 213 TokenStr := ''; 214 while pcp(Macros^ + pc)^.c <> chr(0) do begin 215 TokenStr := concat(TokenStr, pcp(Macros^ + pc)^.c); 216 pc := pc + 1; 217 end; 218 pc := pc + 1; 219 end; 220 end; {case} 203 case token of 204 CommandT, FunctionT, StringFunctionT, ArrayT, UserCommandT, UserFuncT, UserStrFuncT: 205 MacroCommand := CommandType(FetchInteger); 206 Identifier: begin 207 SymbolTableLoc := FetchInteger; 208 if TopOfStack > 0 then 209 LookupVariable; 210 end; 211 ProcedureT: 212 LookupProcedure; 213 NumericLiteral: 214 TokenValue := FetchReal; 215 StringLiteral: begin 216 TokenStr := ''; 217 while macros[pc] <> chr(0) do begin 218 TokenStr := concat(TokenStr, macros[pc]); 219 pc := pc + 1; 220 end; 221 pc := pc + 1; 222 end; 223 end; {case} 224 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221 end; 222 223 224 procedure GetMacroName; 225 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 228:241; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 232:247) 223 224 procedure GetMacroName; 225 var 226 i, len: integer; 227 begin -------------------------------------------------------------------------------- 228 pc := PCStart; 229 repeat 230 pc := pc - 1; 231 if pc < 0 then 232 exit(GetMacroName); 233 until pcp(Macros^ + pc)^.c = chr(ord(MacroT)); 234 GetToken; {MacroT} 235 GetToken; {Macro name} 236 if Token = StringLiteral then begin 237 len := length(TokenStr); 238 if len > SymbolSize then 239 len := SymbolSize; 240 for i := 1 to len do 241 MacroOrProcName[i] := TokenStr[i]; 232 with MacrosP^ do begin 233 pc := PCStart; 234 repeat 235 pc := pc - 1; 236 if pc < 0 then 237 exit(GetMacroName); 238 until macros[pc] = chr(ord(MacroT)); 239 GetToken; {MacroT} 240 GetToken; {Macro name} 241 if Token = StringLiteral then begin 242 len := length(TokenStr); 243 if len > SymbolSize then 244 len := SymbolSize; 245 for i := 1 to len do 246 MacroOrProcName[i] := TokenStr[i]; 247 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 242 end; 243 end; 244 245 246 procedure ConvertTokenToString (t: TokenType; var str: str255); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 337:348; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 343:356) 332 333 procedure GetErrorLine (var ErrorLine: str255); 334 var 335 str: str255; 336 begin -------------------------------------------------------------------------------- 337 pc := LineStartPC; 338 ErrorLine := ''; 339 repeat 340 str := ''; 341 if pcp(Macros^ + pc)^.c = chr(ord(NewLineT)) then 342 leave; 343 GetToken; 344 ConvertTokenToString(token, str); 345 if SavePC = ErrorPC then 346 str := concat('Ç', str, 'È'); 347 ErrorLine := concat(ErrorLine, ' ', str); 348 until token = DoneT; 343 with MacrosP^ do begin 344 pc := LineStartPC; 345 ErrorLine := ''; 346 repeat 347 str := ''; 348 if macros[pc] = chr(ord(NewLineT)) then 349 leave; 350 GetToken; 351 ConvertTokenToString(token, str); 352 if SavePC = ErrorPC then 353 str := concat('Ç', str, 'È'); 354 ErrorLine := concat(ErrorLine, ' ', str); 355 until token = DoneT; 356 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 349 end; 350 351 352 procedure GetLineNumber; 353 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 367:383; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 375:393) 362 {Report run-time errors} 363 var 364 name, ErrorLine: str255; 365 i, count, ignore: integer; 366 begin -------------------------------------------------------------------------------- 367 if token = DoneT then 368 exit(MacroError); 369 if TopOfStack > 0 then 370 DeAllocateStrings(nGlobals + 1, TopOfStack); 371 ErrorPC := SavePC; 372 if MacroOrProcName = BlankSymbol then 373 GetMacroName; 374 if MacroOrProcName[SymbolSize] <> ' ' then 375 MacroOrProcName[SymbolSize] := 'É'; 376 name := MacroOrProcName; 377 TrimString(name); 378 GetLineNumber; 379 GetErrorLine(ErrorLine); 380 InitCursor; 381 ParamText(str, long2str(MacroLineNumber), Name, ErrorLine); 382 Ignore := Alert(900, nil); 383 Token := DoneT; 375 with MacrosP^ do begin 376 if token = DoneT then 377 exit(MacroError); 378 if TopOfStack > 0 then 379 DeAllocateStrings(nGlobals + 1, TopOfStack); 380 ErrorPC := SavePC; 381 if MacroOrProcName = BlankSymbol then 382 GetMacroName; 383 if MacroOrProcName[SymbolSize] <> ' ' then 384 MacroOrProcName[SymbolSize] := 'É'; 385 name := MacroOrProcName; 386 TrimString(name); 387 GetLineNumber; 388 GetErrorLine(ErrorLine); 389 InitCursor; 390 ParamText(str, long2str(MacroLineNumber), Name, ErrorLine); 391 Ignore := Alert(900, nil); 392 Token := DoneT; 393 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 384 end; 385 386 387 procedure DoDeclaration; 388 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 531:676; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 541:543) 526 str := concat(str, str2); 527 until (token = RightParen) or (token = DoneT); 528 end; 529 530 -------------------------------------------------------------------------------- 531 function GetVar: integer; 532 forward; 533 534 procedure DoUserToken; 535 var 536 uma: UserMacroArgs; 537 i, j, PicN: integer; 538 UserToken: TokenType; 539 saveinfo: InfoPtr; 540 begin 541 with uma, MacrosP^ do begin 542 UserToken := token; 543 UserMacroCommand := UserCommandType(MacroCommand); 544 nArgs := 0; 545 ErrorOccurred := false; 546 LookupUserMacro(uma); {Get information about command arguments} 547 if ErrorOccurred then 548 MacroError(str); 549 if token = DoneT then 550 exit(DoUserToken); 551 {scan the arguments} 552 if nArgs > 0 then begin 553 GetLeftParen; 554 if token = DoneT then 555 exit(DoUserToken); 556 for i := 1 to nArgs do 557 with arg[i] do begin 558 if i <> 1 then 559 GetComma; 560 case atype of 561 UMATinteger: begin 562 ival := GetInteger; 563 end; 564 UMATreal: begin 565 aval := GetExpression; 566 end; 567 UMATstring: begin 568 str := GetString; 569 end; 570 UMATpic: begin 571 PicN := GetInteger; 572 j := 0; 573 while (PicN < 0) and (j < nPics) do begin 574 j := j + 1; 575 if InfoPtr(WindowPeek(PicWindow[j])^.RefCon)^.pidNum = PicN then 576 PicN := j; 577 end; 578 if (PicN < 1) or (PicN > nPics) then 579 MacroError('Specified image does not exist') 580 else begin 581 infop := pointer(WindowPeek(PicWindow[picN])^.RefCon); 582 ival := PicN; 583 with infop^ do begin 584 wasRoi := RoiShowing; 585 if wasRoi then 586 with RoiRect do 587 if roiType <> RectRoi then 588 MacroError('This command requires a rectangular selection') 589 else if (left < 0) or (top < 0) or (right > PixelsPerLine) or (bottom > nlines) then 590 MacroError('This command requires the selection to be entirely within the image') 591 else begin 592 roi.Base := ptr(ord4(PicBaseAddr) + left + LongInt(top) * BytesPerRow); 593 roi.Width := right - left; 594 roi.Height := bottom - top; 595 end 596 else begin 597 roi.Base := PicBaseAddr; 598 roi.Width := PixelsPerLine; 599 roi.Height := nLines; 600 end; 601 roi.Skip := BytesPerRow - roi.Width; 602 end;{with infop^} 603 end;{image exists} 604 end;{UMATpic:} 605 UMATintvar: begin 606 j := GetVar; 607 varIX := j; 608 if j <> 0 then 609 ival := round(stack[j].value); 610 end; 611 UMATrealvar: begin 612 j := GetVar; 613 varIX := j; 614 if j <> 0 then 615 aval := stack[j].value; 616 end; 617 UMATstringvar: begin 618 GetToken; 619 if token <> StringVariable then 620 MacroError('String Variable expected') 621 else begin 622 varIX := TokenStackLoc; 623 str := TokenStr; 624 end; 625 end; 626 end; {case} 627 if token = DoneT then 628 exit(DoUserToken); 629 end;{with arg[i]} 630 GetRightParen; 631 end; 632 if token = DoneT then 633 exit(DoUserToken); 634 saveInfo := info; 635 for i := 1 to nArgs do 636 with arg[i] do 637 if atype = UMATpic then 638 if wasRoi then begin 639 info := infop; 640 KillRoi; 641 end; 642 info := saveInfo; 643 FuncResult := 0.0; 644 DoUserMacro(uma); {Execute the user command / function/ string function} 645 if ErrorOccurred then begin 646 MacroError(str); 647 exit(DoUserToken); 648 end; 649 for i := 1 to nArgs do 650 with arg[i] do begin 651 case atype of 652 UMATintvar: 653 stack[varIX].value := ival; 654 UMATrealvar: 655 stack[varIX].value := aval; 656 UMATstringvar: 657 with stack[varIX] do 658 if StringH <> nil then 659 StringH^^ := str; 660 UMATpic: 661 if wasRoi then 662 with infop^ do begin {restore rectangular ROI} 663 roiType := RectRoi; 664 MakeRegion; 665 SetupUndo; 666 RoiShowing := true; 667 end; 668 otherwise 669 ; 670 end;{case} 671 end;{with arg[i]} 672 if UserToken = UserFuncT then 673 TokenValue := FuncResult 674 else if UserToken = UserStrFuncT then 675 TokenStr := str; 676 end;{with} 541 procedure DoUserToken; 542 begin 543 MacroError('UMX package not installed'); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 677 end; 678 679 680 function DoGetString: str255; {(prompt,default:str255)} 681 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 788; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 655) 783 DoStringFunction := DoGetString; 784 ChrC: 785 DoStringFunction := DoChr; 786 GetSerialC: 787 DoStringFunction := GetSerial; -------------------------------------------------------------------------------- 788 ConcatC, ConcatZFC: begin 655 ConcatC: begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 789 GetArguments(str); 790 DoStringFunction := str; 791 end; 792 WindowTitleC: 793 DoStringFunction := GetWindowTitle; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 1051:1059; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 918:922) 1046 GetLeftParen; 1047 pid := GetInteger; 1048 GetRightParen; 1049 if Token <> DoneT then begin 1050 PidExists := false; -------------------------------------------------------------------------------- 1051 if pid < 0 then begin 1052 for i := 1 to nPics do 1053 if InfoPtr(WindowPeek(PicWindow[i])^.RefCon)^.pidNum = pid then begin 1054 PidExists := true; 1055 leave; 1056 end; 1057 end 1058 else if (pid > 0) and (pid <= nPics) then 1059 PidExists := true; 918 for i := 1 to nPics do 919 if InfoPtr(WindowPeek(PicWindow[i])^.RefCon)^.pidNum = pid then begin 920 PidExists := true; 921 leave; 922 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1060 end; 1061 end; 1062 1063 1064 function DoPos: integer; Extra lines in 1st before 1951 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 2088; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ1951) 2083 Info := pointer(WindowPeek(PicWindow[id])^.RefCon); 2084 ActivateWindow; 2085 GenerateValues; 2086 LoadLUT(info^.cTable); 2087 UpdatePicWindow; -------------------------------------------------------------------------------- 2088 LastChoosePicInfo := nil; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2089 end; 2090 2091 2092 procedure SelectPic; {(PicN:integer)} 2093 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 2112:2118; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 1974:1975) 2107 if (PicN < 1) or (PicN > nPics) then 2108 MacroError('Specified image does not exist'); 2109 if Token <> DoneT then begin 2110 if SaveCommand = SelectPicC then 2111 SelectImage(PicN) -------------------------------------------------------------------------------- 2112 else begin 2113 StopDigitizing; 2114 SaveRoi; 2115 DisableDensitySlice; 2116 Info := pointer(WindowPeek(PicWindow[PicN])^.RefCon); 2117 LastChoosePicInfo := Info; 2118 end 1974 else 1975 Info := pointer(WindowPeek(PicWindow[PicN])^.RefCon); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2119 end; 2120 end; 2121 2122 2123 procedure SetPicName; {(name:string)} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 3905:3911; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 3762:3765) 3900 if WhatToCopy = NothingToCopy then 3901 MacroError('Copy failed') 3902 else 3903 DoCopy; 3904 end; -------------------------------------------------------------------------------- 3905 SelectC: 3906 if CurrentWindow = TextKind then 3907 DoTextSelectAll 3908 else begin 3909 StopDigitizing; 3910 SelectAll(true); 3911 end; 3762 SelectC: begin 3763 StopDigitizing; 3764 SelectAll(true); 3765 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3912 PasteC: 3913 DoPaste; 3914 ClearC, FillC, InvertC, FrameC: Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 3915:3941; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 3769:3788) 3912 PasteC: 3913 DoPaste; 3914 ClearC, FillC, InvertC, FrameC: -------------------------------------------------------------------------------- 3915 if CurrentWindow = TextKind then 3916 case MacroCommand of 3917 ClearC: 3918 DoTextClear; 3919 otherwise 3920 end 3921 else 3922 with info^ do begin 3923 AutoSelectAll := not RoiShowing; 3924 if AutoSelectAll then 3925 SelectAll(true); 3926 case MacroCommand of 3927 ClearC: 3928 DoOperation(EraseOp); 3929 FillC: 3930 DoOperation(PaintOp); 3931 InvertC: 3932 DoOperation(InvertOp); 3933 FrameC: 3934 DoOperation(FrameOp); 3935 end; 3936 UpdateScreen(RoiRect); 3937 if AutoSelectAll then 3938 KillRoi 3939 else 3940 MacroOpPending := true; 3941 end; 3769 with info^ do begin 3770 AutoSelectAll := not RoiShowing; 3771 if AutoSelectAll then 3772 SelectAll(true); 3773 case MacroCommand of 3774 ClearC: 3775 DoOperation(EraseOp); 3776 FillC: 3777 DoOperation(PaintOp); 3778 InvertC: 3779 DoOperation(InvertOp); 3780 FrameC: 3781 DoOperation(FrameOp); 3782 end; 3783 UpdateScreen(RoiRect); 3784 if AutoSelectAll then 3785 KillRoi 3786 else 3787 MacroOpPending := true; 3788 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3942 KillC: 3943 KillRoi; 3944 RestoreC: 3945 if NoInfo^.RoiType <> NoRoi then 3946 RestoreRoi; Extra lines in 1st before 4132 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4285:4288; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line Æ4132) 4280 DoDelete; 4281 GetScaleC: 4282 GetScale; 4283 AutoOutlineC: 4284 DoAutoOutline; -------------------------------------------------------------------------------- 4285 LoadMacrosC: begin 4286 Token := DoneT; 4287 MacroLoadRequest := true; 4288 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4289 end; {case} 4290 OptionKeyWasDown := false; 4291 if not macro then begin 4292 Token := DoneT; 4293 KillRoi; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4359:4360; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4202) 4354 end; 4355 4356 4357 procedure DoFor; 4358 var -------------------------------------------------------------------------------- 4359 SavePC: LongInt; 4360 StackLoc: integer; 4202 SavePC, StackLoc: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4361 StartValue, EndValue, i: LongInt; 4362 begin 4363 StackLoc := GetVar; 4364 GetToken; 4365 if token <> AssignOp then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4528; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4370) 4523 4524 4525 procedure DoWhile; 4526 var 4527 isTrue: boolean; -------------------------------------------------------------------------------- 4528 SavePC: LongInt; 4370 SavePC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4529 begin 4530 SavePC := pc; 4531 repeat 4532 pc := SavePC; 4533 isTrue := GetBoolean; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4568; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4410) 4563 4564 4565 procedure DoRepeat; 4566 var 4567 isTrue: boolean; -------------------------------------------------------------------------------- 4568 SavePC: LongInt; 4410 SavePC: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4569 begin 4570 SavePC := pc; 4571 isTrue := true; 4572 repeat 4573 pc := SavePC; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4794:4795; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4636) 4789 end; 4790 4791 4792 procedure DoProcedure; 4793 var -------------------------------------------------------------------------------- 4794 SavePC, SavePCStart, NewPCStart: LongInt; 4795 SaveStackLoc, nArgs, i: integer; 4636 SavePC, SavePCStart, NewPCStart, SaveStackLoc, nArgs, i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4796 SaveProcName, NewProcName: SymbolType; 4797 SaveStringsAllocated: boolean; 4798 begin 4799 NewPCStart := TokenLoc; 4800 NewProcName := TokenSymbol; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4916; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4757) 4911 SkipIf; 4912 WhileT: 4913 SkipWhile; 4914 RepeatT: 4915 SkipRepeat; -------------------------------------------------------------------------------- 4916 CommandT, UserCommandT, Variable, StringVariable, ArrayT, ProcedureT: 4757 CommandT, Variable, StringVariable, ArrayT, ProcedureT: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4917 SkipPartialStatement; 4918 DoneT: 4919 ; {Aborting the macro} 4920 SemiColon, EndT, ElseT, UntilT: 4921 PutTokenBack; {These tokens can follow a statement} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 4933:4990; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4774:4816) 4928 4929 procedure RunMacro (nMacro: integer); 4930 var 4931 count: integer; 4932 str: str255; -------------------------------------------------------------------------------- 4933 begin 4934 MacroLoadHandle := nil; 4935 repeat 4936 MacroLoadRequest := false; 4937 DefaultFileName := ''; 4938 str := ''; 4939 nSaves := 0; 4940 DefaultRefNum := 0; 4941 count := 0; 4942 pcStart := MacroItems^^[nMacro].MacroStart; 4943 pc := pcStart; 4944 if (nMacro = 0) and (pc = 0) then 4945 exit(RunMacro); {no global variables initialization} 4946 SavePC := pcStart; 4947 LineStartPC := pcStart; 4948 token := NullT; 4949 macro := true; 4950 MacroOpPending := false; 4951 DoOption := false; 4952 LastChoosePicInfo := nil; 4953 TopOfStack := nGlobals; 4954 MacroOrProcName := BlankSymbol; 4955 StringsAllocated := false; 4956 InPhotoMode := false; 4957 RoutinesCalled := []; 4958 GetToken; 4959 DoDeclarations; 4960 DoCompoundStatement; 4961 if info = LastChoosePicInfo then begin 4962 SelectWindow(info^.wptr); 4963 ActivateWindow; 4964 GenerateValues; 4965 LoadLUT(info^.cTable); 4966 UpdatePicWindow; 4967 end; 4968 with info^, RoiRect do begin 4969 if ((right - left) <= 0) or ((bottom - top) <= 0) then 4970 KillRoi; 4971 end; 4972 if info^.RoiShowing then begin 4973 if MacroOpPending then begin 4974 KillRoi; 4975 RestoreRoi; 4976 end 4977 else 4978 UpdatePicWindow; 4979 end; 4980 macro := false; 4981 if StringsAllocated then 4982 DeallocateStrings(nGlobals + 1, TopOfStack); 4983 if InPhotoMode then 4984 RestoreScreen; 4985 if MacroLoadRequest then begin 4986 LoadMacros; 4987 UnloadSeg(@LoadMacros); 4988 nMacro := 0; {initialize globals if requested} 4989 end; 4990 until not MacroLoadRequest; 4774 SaveInfo: InfoPtr; 4775 begin 4776 DefaultFileName := ''; 4777 str := ''; 4778 nSaves := 0; 4779 DefaultRefNum := 0; 4780 count := 0; 4781 pcStart := MacroStart[nMacro]; 4782 pc := pcStart; 4783 SavePC := pcStart; 4784 LineStartPC := pcStart; 4785 token := NullT; 4786 macro := true; 4787 MacroOpPending := false; 4788 DoOption := false; 4789 SaveInfo := info; 4790 TopOfStack := nGlobals; 4791 MacroOrProcName := BlankSymbol; 4792 StringsAllocated := false; 4793 InPhotoMode := false; 4794 RoutinesCalled := []; 4795 GetToken; 4796 DoDeclarations; 4797 DoCompoundStatement; 4798 if (info <> SaveInfo) and (info <> NoInfo) then 4799 SelectWindow(info^.wptr); 4800 with info^, RoiRect do begin 4801 if ((right - left) <= 0) or ((bottom - top) <= 0) then 4802 KillRoi; 4803 end; 4804 if info^.RoiShowing then begin 4805 if MacroOpPending then begin 4806 KillRoi; 4807 RestoreRoi; 4808 end 4809 else 4810 UpdatePicWindow; 4811 end; 4812 macro := false; 4813 if StringsAllocated then 4814 DeallocateStrings(nGlobals + 1, TopOfStack); 4815 if InPhotoMode then 4816 RestoreScreen; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4991 end; 4992 4993 4994 procedure RunKeyMacro (ch: char; KeyCode: integer); 4995 const Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 5039; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4865) 5034 113: 5035 ch := 'O'; 5036 otherwise 5037 end; 5038 for i := 1 to nMacros do -------------------------------------------------------------------------------- 5039 if ch = MacroItems^^[i].MacroKey then begin 4865 if ch = MacroKey[i] then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5040 RunMacro(i); 5041 leave; 5042 end; 5043 end; 5044 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros1.p"; Line 5045:5081; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros1.p"; Line 4871:4873) 5040 RunMacro(i); 5041 leave; 5042 end; 5043 end; 5044 -------------------------------------------------------------------------------- 5045 procedure RunMenuMacro (menuID, menuItem: integer); 5046 var 5047 i: integer; 5048 nonHMenuID: integer; {menu ID of the non-hierarchal version} 5049 MHandle: MenuHandle; 5050 begin 5051 nonHMenuID := menuID; 5052 if menuID <> SpecialMenu then begin 5053 nonHMenuID := ((menuID - FirstMacroMenu) div 2) * 2 + FirstMacroMenu; 5054 if menuItem = 1 then begin 5055 MHandle := MacroMenusH[nonHMenuID]; 5056 if MHandle <> nil then 5057 if menuID = nonHMenuID then begin 5058 {hide this menu} 5059 DeleteMenu(nonHMenuID); 5060 DrawMenuBar; 5061 end 5062 else begin 5063 {show this menu} 5064 InsertMenu(MHandle, 0); 5065 DrawMenuBar; 5066 end; 5067 exit(RunMenuMacro); 5068 end; 5069 end; 5070 for i := 1 to nMacros do 5071 with MacroItems^^[i] do begin 5072 if nonHMenuID = MMenuID then 5073 if menuItem = MMitem then begin 5074 RunMacro(i); 5075 exit(RunMenuMacro); 5076 end 5077 end; 5078 PutMessage('RunMenuMacro error'); 5079 end; 5080 5081 end. 4871 4872 4873 end. *** EOF on both files *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 9:10; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 9:10) 4 5 6 interface 7 8 uses -------------------------------------------------------------------------------- 9 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Graphics, File2,{} 10 UMacroDef, UMacroRun; 9 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Graphics, File2;{} 10 {,UMacroDef, UMacroRun;} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 12 procedure LoadMacrosFromFile (fname: str255; RefNum: integer); 13 procedure LoadMacros; 14 15 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 18:29; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 18:25) 13 procedure LoadMacros; 14 15 16 implementation 17 -------------------------------------------------------------------------------- 18 {type} 19 {MacroBufType = packed array[0..MaxMacroFileSize] of char;} 20 {MacroBufPtr = ^MacroBufType;} 21 var 22 PC2, StartOfLine: LongInt; 23 {MacroBufP: MacroBufPtr;} 24 MacroBufH: LongIntPtr; 25 MacroBufPC: pcp; 26 MacrosPC2: pcp; {pcp(Macros^+pc2)} 27 28 needDrawMenuBar: Boolean; 29 18 type 19 MacroBufType = packed array[0..MaxMacroFileSize] of char; 20 MacroBufPtr = ^MacroBufType; 21 var 22 PC2, StartOfLine: integer; 23 MacroBufP: MacroBufPtr; 24 25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 30 procedure InitSymbolTable; 31 var 32 i: integer; 33 begin 34 with MacrosP^ do begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1226:1238; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1222:1224) 1221 with SymbolTable[280] do begin 1222 symbol := 'windowtitle '; 1223 tType := StringFunctionT; 1224 cType := WindowTitleC; 1225 end; -------------------------------------------------------------------------------- 1226 with SymbolTable[281] do begin 1227 symbol := 'loadmacros '; 1228 cType := LoadMacrosC; 1229 end; 1230 with SymbolTable[282] do begin 1231 symbol := 'concatzf '; 1232 tType := StringFunctionT; 1233 cType := ConcatZFC; 1234 end; 1235 end; {with} 1236 nSymbols := 282; {Must be subscript of last predefined symbol} 1237 {Note: there are currently 2 unused entries in the table. Search for 'Unused' to find them.} 1238 AddUserMacros; 1222 end; {with} 1223 nSymbols := 280; {Must be subscript of last predefined symbol} 1224 {Note: there are currently 2 unused entries in the table. Search for 'Unused' to find them.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1239 end; 1240 1241 1242 procedure DeallocateStrings2 (first, last: integer); 1243 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1260; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1246) 1255 1256 1257 function CurrentLine: str255; 1258 var 1259 cLine: str255; -------------------------------------------------------------------------------- 1260 i, count: LongInt; 1246 i, count: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1261 begin 1262 i := StartOfLine; 1263 if (i < 0) or (i > EndMacros) then begin 1264 CurrentLine := ''; 1265 exit(CurrentLine); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1271:1275; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1257:1260) 1266 end; 1267 cLine := ''; 1268 count := 0; 1269 repeat 1270 i := i + 1; -------------------------------------------------------------------------------- 1271 MacroBufPC := pcp(MacroBufH^ + i); 1272 count := count + 1; 1273 if not (MacroBufPC^.c = cr) or (MacroBufPC^.c = '|') then 1274 cLine := concat(cLine, MacroBufPC^.c); 1275 until (i >= EndMacros) or (MacroBufPC^.c = cr) or (MacroBufPC^.c = '|') or (count > 60); 1257 count := count + 1; 1258 if not (MacroBufP^[i] = cr) or (MacroBufP^[i] = '|') then 1259 cLine := concat(cLine, MacroBufP^[i]); 1260 until (i >= EndMacros) or (MacroBufP^[i] = cr) or (MacroBufP^[i] = '|') or (count > 60); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1276 while (length(cLine) > 1) and (cLine[1] = ' ') do 1277 delete(cLine, 1, 1); 1278 CurrentLine := concat(cr, '<<', cLine, '>>'); 1279 end; 1280 Extra lines in 2nd before 1284 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line Æ1284; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1269:1271) 1279 end; 1280 1281 1282 procedure LTMacroError (str: str255); 1283 {Report load-time errors} -------------------------------------------------------------------------------- 1269 var 1270 str2: str255; 1271 i, count: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1284 begin 1285 if token = DoneT then 1286 exit(LTMacroError); 1287 if TopOfStack > 0 then 1288 DeallocateStrings2(1, TopOfStack); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1322:1329; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1310:1314) 1317 begin 1318 if token = DoneT then 1319 exit(GetToken); 1320 SavePC := PC; 1321 SaveToken := token; -------------------------------------------------------------------------------- 1322 MacroBufPC := pcp(MacroBufH^ + pc); 1323 while not (MacroBufPC^.c in ['a'..'z', '0'..'9', '(', ')', ',', '''', '+', '-', '*', '/', ':', ';', '=', '.', '>', '<', '[', ']', '|']) do begin {skip white space} 1324 if MacroBufPC^.c = cr then 1325 MacroBufPC^.c := '|' 1326 else begin 1327 pc := pc + 1; 1328 MacroBufPC := pcp(MacroBufH^ + pc); 1329 end; 1310 while not (MacroBufP^[pc] in ['a'..'z', '0'..'9', '(', ')', ',', '''', '+', '-', '*', '/', ':', ';', '=', '.', '>', '<', '[', ']', '|']) do begin {skip white space} 1311 if MacroBufP^[pc] = cr then 1312 MacroBufP^[pc] := '|' 1313 else 1314 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1330 if pc > EndMacros then begin 1331 Token := DoneT; 1332 exit(GetToken); 1333 end; 1334 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1335; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1320) 1330 if pc > EndMacros then begin 1331 Token := DoneT; 1332 exit(GetToken); 1333 end; 1334 end; -------------------------------------------------------------------------------- 1335 c := MacroBufPC^.c; 1320 c := MacroBufP^[pc]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1336 case c of 1337 'a'..'z': begin 1338 TokenSymbol := BlankSymbol; 1339 SymbolLength := 0; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1340; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1325) 1336 case c of 1337 'a'..'z': begin 1338 TokenSymbol := BlankSymbol; 1339 SymbolLength := 0; -------------------------------------------------------------------------------- 1340 while MacroBufPC^.c in ['a'..'z', '0'..'9'] do begin 1325 while MacroBufP^[pc] in ['a'..'z', '0'..'9'] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1341 SymbolLength := SymbolLength + 1; 1342 if SymbolLength <= SymbolSize then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1343:1345; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1328:1329) 1341 SymbolLength := SymbolLength + 1; 1342 if SymbolLength <= SymbolSize then -------------------------------------------------------------------------------- 1343 TokenSymbol[SymbolLength] := MacroBufPC^.c; 1344 pc := pc + 1; 1345 MacroBufPC := pcp(MacroBufH^ + pc); 1328 TokenSymbol[SymbolLength] := MacroBufP^[pc]; 1329 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1346 if pc > EndMacros then begin 1347 Token := DoneT; 1348 exit(GetToken); 1349 end; 1350 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1357; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1341) 1352 LookupIdentifier; 1353 exit(GetToken); 1354 end; 1355 '0'..'9', '.': begin 1356 TokenStr := ''; -------------------------------------------------------------------------------- 1357 while MacroBufPC^.c in ['0'..'9', '.'] do begin 1341 while MacroBufP^[pc] in ['0'..'9', '.'] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1358 TokenStr := concat(TokenStr, c); 1359 pc := pc + 1; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1360:1361; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1344) 1358 TokenStr := concat(TokenStr, c); 1359 pc := pc + 1; -------------------------------------------------------------------------------- 1360 MacroBufPC := pcp(MacroBufH^ + pc); 1361 c := MacroBufPC^.c; 1344 c := MacroBufP^[pc]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1362 if pc > EndMacros then begin 1363 Token := DoneT; 1364 exit(GetToken); 1365 end; 1366 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1368; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1351) 1363 Token := DoneT; 1364 exit(GetToken); 1365 end; 1366 end; 1367 Token := NumericLiteral; -------------------------------------------------------------------------------- 1368 if MacroBufPC^.c in ['a'..'z'] then 1351 if MacroBufP^[pc] in ['a'..'z'] then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1369 LTMacroError('Operator or delimiter expected'); 1370 exit(GetToken); 1371 end; 1372 '(': begin 1373 Token := LeftParen; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1392:1397; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1375:1378) 1387 end; 1388 ',': begin 1389 Token := comma; 1390 pc := pc + 1; 1391 end; -------------------------------------------------------------------------------- 1392 ':': begin 1393 pc := pc + 1; 1394 MacroBufPC := pcp(MacroBufH^ + pc); 1395 if MacroBufPC^.c = '=' then begin 1396 Token := AssignOp; 1397 pc := pc + 1; 1375 ':': 1376 if MacroBufP^[pc + 1] = '=' then begin 1377 Token := AssignOp; 1378 pc := pc + 2; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1398 end 1399 else begin 1400 Token := colon; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1401; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1382) 1398 end 1399 else begin 1400 Token := colon; -------------------------------------------------------------------------------- 1401 end; 1382 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1402 end; 1403 ';': begin 1404 Token := SemiColon; 1405 pc := pc + 1; 1406 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1426:1430; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1407:1409) 1421 pc := pc + 1; 1422 end; 1423 '''': begin 1424 TokenStr := ''; 1425 pc := pc + 1; -------------------------------------------------------------------------------- 1426 MacroBufPC := pcp(MacroBufH^ + pc); 1427 while MacroBufPC^.c <> '''' do begin 1428 TokenStr := concat(TokenStr, MacroBufPC^.c); 1429 pc := pc + 1; 1430 MacroBufPC := pcp(MacroBufH^ + pc); 1407 while MacroBufP^[pc] <> '''' do begin 1408 TokenStr := concat(TokenStr, MacroBufP^[pc]); 1409 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1431 if pc > EndMacros then begin 1432 Token := DoneT; 1433 exit(GetToken); 1434 end; 1435 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1445:1446; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1424) 1440 Token := eqOp; 1441 pc := pc + 1; 1442 end; 1443 '<': begin 1444 pc := pc + 1; -------------------------------------------------------------------------------- 1445 MacroBufPC := pcp(MacroBufH^ + pc); 1446 if MacroBufPC^.c = '>' then begin 1424 if MacroBufP^[pc] = '>' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1447 token := neOp; 1448 pc := pc + 1; 1449 end Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1450; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1428) 1447 token := neOp; 1448 pc := pc + 1; 1449 end -------------------------------------------------------------------------------- 1450 else if MacroBufPC^.c = '=' then begin 1428 else if MacroBufP^[pc] = '=' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1451 token := leOp; 1452 pc := pc + 1; 1453 end 1454 else 1455 token := ltOp; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1459:1460; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1437) 1454 else 1455 token := ltOp; 1456 end; 1457 '>': begin 1458 pc := pc + 1; -------------------------------------------------------------------------------- 1459 MacroBufPC := pcp(MacroBufH^ + pc); 1460 if MacroBufPC^.c = '=' then begin 1437 if MacroBufP^[pc] = '=' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1461 token := geOp; 1462 pc := pc + 1; 1463 end 1464 else 1465 token := gtOp; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1494; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1471) 1489 LTMacroError('Symbol table overflow'); 1490 exit(AddProcedure); 1491 end; 1492 nSymbols := nSymbols + 1; 1493 nProcedures := nProcedures + 1; -------------------------------------------------------------------------------- 1494 with MacrosP^.SymbolTable[nSymbols] do begin 1471 with MacrosP^, MacrosP^.SymbolTable[nSymbols] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1495 symbol := TokenSymbol; 1496 tType := procedureT; 1497 cType := NullC; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1498; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1475) 1495 symbol := TokenSymbol; 1496 tType := procedureT; 1497 cType := NullC; -------------------------------------------------------------------------------- 1498 if pcp(MacroBufH^ + pc)^.c = ';' then 1475 if MacroBufP^[pc] = ';' then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1499 pc := pc + 1; 1500 loc := pc2 + 1; 1501 end; 1502 end; 1503 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1512; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1489) 1507 if nSymbols >= MaxSymbols then begin 1508 LTMacroError('Symbol table overflow'); 1509 exit(AddIdentifier); 1510 end; 1511 nSymbols := nSymbols + 1; -------------------------------------------------------------------------------- 1512 with MacrosP^.SymbolTable[nSymbols] do begin 1489 with MacrosP^, MacrosP^.SymbolTable[nSymbols] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1513 symbol := TokenSymbol; 1514 tType := Identifier; 1515 cType := NullC; 1516 loc := pc2; 1517 end; Extra lines in 1st before 1578 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1601:1602; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1578) 1596 procedure DoGlobalDeclarations; 1597 begin 1598 GetGDToken; 1599 while ((token = UnknownIdentifier) or (token = Identifier)) and (Token <> DoneT) do 1600 DoGlobalDeclaration; -------------------------------------------------------------------------------- 1601 if token = beginT then 1602 MacroItems^^[0].MacroStart := pc2 + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1603 PutTokenBack2; 1604 end; 1605 1606 1607 function PreScan1: boolean; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1612:1616; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1587:1591) 1607 function PreScan1: boolean; 1608 {Converts the macro file to lowercase and removes comments.} 1609 var 1610 inString, inComment: boolean; 1611 c: char; -------------------------------------------------------------------------------- 1612 i, StartComment: LongInt; 1613 1614 function LineNumber: LongInt; 1615 var 1616 i, n: LongInt; 1587 i, StartComment: integer; 1588 1589 function LineNumber: integer; 1590 var 1591 i, n: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1617 begin 1618 n := 1; 1619 for i := 0 to pc do Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1620; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1595) 1617 begin 1618 n := 1; 1619 for i := 0 to pc do -------------------------------------------------------------------------------- 1620 if pcp(MacroBufH^ + i)^.c = cr then begin 1595 if MacroBufP^[i] = cr then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1621 StartOfLine := i; 1622 n := n + 1; 1623 end; 1624 LineNumber := n; 1625 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1632:1633; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1607) 1627 begin 1628 PreScan1 := false; 1629 inString := false; 1630 inComment := false; 1631 for i := 0 to EndMacros do begin -------------------------------------------------------------------------------- 1632 MacroBufPC := pcp(MacroBufH^ + i); 1633 c := MacroBufPC^.c; 1607 c := MacroBufP^[i]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1634 if inString and (c = cr) then begin 1635 pc := i - 1; 1636 PutMessage(concat('The quoted string in line ', long2str(LineNumber), ' of the macro file is not terminated.', CurrentLine)); 1637 exit(PreScan1); 1638 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1651; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1625) 1646 exit(PreScan1); 1647 end; 1648 if c = '}' then 1649 inComment := false; 1650 if c <> cr then -------------------------------------------------------------------------------- 1651 MacroBufPC^.c := ' '; 1625 MacroBufP^[i] := ' '; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1652 end 1653 else begin 1654 if (c = 'Ô') or (c = '`') then begin 1655 pc := i; 1656 PutMessage(concat('Bad quote("Ô" or "`") in line ', long2str(LineNumber), ' of macro file.', CurrentLine)); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1662; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1636) 1657 exit(PreScan1); 1658 end; 1659 if c = '''' then 1660 inString := not inString; 1661 if (c >= 'A') and (c <= 'Z') and not inString then -------------------------------------------------------------------------------- 1662 MacroBufPC^.c := chr(ord(c) + 32); 1636 MacroBufP^[i] := chr(ord(c) + 32); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1663 end; 1664 end; 1665 if inComment then begin 1666 pc := StartComment; 1667 PutMessage(concat('The comment starting in line ', long2str(LineNumber), ' of the macro file is not terminated.', CurrentLine)) Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1676:1682; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1650:1656) 1671 end; 1672 1673 1674 procedure StoreInteger (i: integer); 1675 begin -------------------------------------------------------------------------------- 1676 pc2 := pc2 + 1; 1677 MacrosPC2 := pcp(Macros^ + pc2); 1678 MacrosPC2^.c := chr(band(bsr(i, 8), $ff)); 1679 pc2 := pc2 + 1; 1680 MacrosPC2 := pcp(Macros^ + pc2); 1681 MacrosPC2^.c := chr(band(i, $ff)); 1682 end; 1650 with macrosP^ do begin 1651 pc2 := pc2 + 1; 1652 macros[pc2] := chr(band(bsr(i, 8), $ff)); 1653 pc2 := pc2 + 1; 1654 macros[pc2] := chr(band(i, $ff)); 1655 end; 1656 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1683 1684 1685 procedure StoreReal (r: real); 1686 var 1687 i: LongInt; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1690:1702; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1664:1674) 1685 procedure StoreReal (r: real); 1686 var 1687 i: LongInt; 1688 begin 1689 i := LongInt(r); -------------------------------------------------------------------------------- 1690 pc2 := pc2 + 1; 1691 MacrosPC2 := pcp(Macros^ + pc2); 1692 MacrosPC2^.c := chr(band(bsr(i, 24), $ff)); 1693 pc2 := pc2 + 1; 1694 MacrosPC2 := pcp(Macros^ + pc2); 1695 MacrosPC2^.c := chr(band(bsr(i, 16), $ff)); 1696 pc2 := pc2 + 1; 1697 MacrosPC2 := pcp(Macros^ + pc2); 1698 MacrosPC2^.c := chr(band(bsr(i, 8), $ff)); 1699 pc2 := pc2 + 1; 1700 MacrosPC2 := pcp(Macros^ + pc2); 1701 MacrosPC2^.c := chr(band(i, $ff)); 1702 end; 1664 with macrosP^ do begin 1665 pc2 := pc2 + 1; 1666 macros[pc2] := chr(band(bsr(i, 24), $ff)); 1667 pc2 := pc2 + 1; 1668 macros[pc2] := chr(band(bsr(i, 16), $ff)); 1669 pc2 := pc2 + 1; 1670 macros[pc2] := chr(band(bsr(i, 8), $ff)); 1671 pc2 := pc2 + 1; 1672 macros[pc2] := chr(band(i, $ff)); 1673 end; 1674 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1703 1704 1705 procedure StoreString; 1706 var 1707 i: integer; Extra lines in 2nd before 1709 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line Æ1709; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1681) 1704 1705 procedure StoreString; 1706 var 1707 i: integer; 1708 begin -------------------------------------------------------------------------------- 1681 with macrosP^ do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1709 for i := 1 to length(TokenStr) do begin 1710 pc2 := pc2 + 1; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1711:1712; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1684) 1709 for i := 1 to length(TokenStr) do begin 1710 pc2 := pc2 + 1; -------------------------------------------------------------------------------- 1711 MacrosPC2 := pcp(Macros^ + pc2); 1712 MacrosPC2^.c := TokenStr[i]; 1684 macros[pc2] := TokenStr[i]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1713 end; 1714 pc2 := pc2 + 1; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1715:1717; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1687:1689) 1713 end; 1714 pc2 := pc2 + 1; -------------------------------------------------------------------------------- 1715 MacrosPC2 := pcp(Macros^ + pc2); 1716 MacrosPC2^.c := chr(0); 1717 end; 1687 macros[pc2] := chr(0); 1688 end; 1689 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1718 1719 1720 procedure AddMenuItem; 1721 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1722:1731; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1694:1700) 1718 1719 1720 procedure AddMenuItem; 1721 var -------------------------------------------------------------------------------- 1722 i, j, k, oc, fkey: integer; 1723 c, key: char; 1724 size: LongInt; 1725 MenuName: Str255; 1726 MHandle: MenuHandle; 1727 begin 1728 GetToken; 1729 pc2 := pc2 + 1; 1730 MacrosPC2 := pcp(Macros^ + pc2); 1731 MacrosPC2^.c := chr(ord(token)); 1694 i, fkey: integer; 1695 c, key: char; 1696 begin 1697 with MacrosP^ do begin 1698 GetToken; 1699 pc2 := pc2 + 1; 1700 macros[pc2] := chr(ord(token)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1732 if token <> StringLiteral then begin 1733 LTMacroError('Macro command name not found'); 1734 exit(AddMenuItem); 1735 end; 1736 StoreString; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1738:1746; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1707:1708) 1733 LTMacroError('Macro command name not found'); 1734 exit(AddMenuItem); 1735 end; 1736 StoreString; 1737 if nMacros < MaxMacros then begin -------------------------------------------------------------------------------- 1738 nMacros := nMacros + 1; 1739 size := (nMacros + 1) * sizeof(MacroItemsRec);{allow for element zero} 1740 if GetHandleSize(Handle(MacroItems)) < size then begin 1741 if mySetHandleSize(Handle(MacroItems), size + 100) <> noErr then begin 1742 nMacros := nMacros - 1; 1743 LTMacroError('Out of memory'); 1744 exit(AddMenuItem); 1745 end 1746 end; 1707 AppendMenu(SpecialMenuH, TokenStr); 1708 nMacros := nMacros + 1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1747 end 1748 else 1749 PutMessage('Too many macros.'); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1750:1819; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1712:1714) 1747 end 1748 else 1749 PutMessage('Too many macros.'); -------------------------------------------------------------------------------- 1750 with MacroItems^^[nMacros] do begin 1751 MacroStart := pc2 + 1; 1752 MacroKey := chr(0); 1753 j := pos('{', TokenStr); 1754 k := pos('}', TokenStr); 1755 MenuName := ''; 1756 if (j > 0) and (j < k) then begin 1757 for i := j + 1 to k - 1 do begin 1758 oc := ord(TokenStr[i]); 1759 if (ord('0') < oc) and (oc < ord('9')) then 1760 else if (ord('A') <= oc) and (oc <= ord('Z')) then 1761 else if (ord('a') <= oc) and (oc <= ord('z')) then 1762 else 1763 oc := ord('_'); {protect against bad menu names} 1764 MenuName := Concat(MenuName, chr(oc)); 1765 end; 1766 delete(TokenStr, j, k); 1767 end; 1768 if length(MenuName) <> 0 then begin 1769 MHandle := nil; 1770 i := FirstMacroMenu; 1771 MMenuID := 0; 1772 while i < LastMacroMenu do begin 1773 MHandle := MacroMenusH[i]; 1774 if MHandle <> nil then begin 1775 with MHandle^^ do 1776 if length(menuData) = length(MenuName) then 1777 if pos(menuData, MenuName) > 0 then begin 1778 AppendMenu(MHandle, TokenStr); 1779 MMenuID := i; 1780 MMitem := CountMitems(MHandle); 1781 end; 1782 if MMenuID <> 0 then begin 1783 {Also append item to hierarchal menu on special menu} 1784 MHandle := MacroMenusH[i + 1]; 1785 if MHandle <> nil then 1786 AppendMenu(MHandle, TokenStr); 1787 leave; 1788 end; 1789 end 1790 else begin 1791 MHandle := NewMenu(i, MenuName); 1792 MacroMenusH[i] := MHandle; 1793 InsertMenu(MHandle, 0); 1794 needDrawMenuBar := true; 1795 AppendMenu(MHandle, 'Hide this menu;(-'); 1796 AppendMenu(MHandle, TokenStr); 1797 MMenuID := i; 1798 MMitem := CountMitems(MHandle); 1799 {Now add a hierarchal menu to the special menu} 1800 MHandle := NewMenu(i + 1, MenuName); 1801 MacroMenusH[i + 1] := MHandle; 1802 InsertMenu(MHandle, -1); {hierarchal menu} 1803 AppendMenu(SpecialMenuH, concat(MenuName, '/', chr(27), '!', chr(i + 1))); 1804 AppendMenu(MHandle, 'Show this menu on menubar;(-'); 1805 AppendMenu(MHandle, TokenStr); 1806 leave; 1807 end; 1808 i := i + 2 1809 end; 1810 if i >= LastMacroMenu then begin 1811 PutMessage('Too many Macro Menus, using Special'); 1812 MenuName := ''; 1813 end; 1814 end; 1815 if length(MenuName) = 0 then begin 1816 AppendMenu(SpecialMenuH, TokenStr); 1817 MMenuID := SpecialMenu; 1818 MMitem := CountMItems(SpecialMenuH); 1819 end; 1712 if macros[pc] = ';' then 1713 pc := pc + 1; 1714 MacroStart[nMacros] := pc2 + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1820 i := pos('[', TokenStr); 1821 if i > 0 then begin {Assign a key to macro?} 1822 i := i + 1; 1823 key := TokenStr[i]; 1824 if (key >= 'A') and (key <= 'Z') then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1826; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1721) 1821 if i > 0 then begin {Assign a key to macro?} 1822 i := i + 1; 1823 key := TokenStr[i]; 1824 if (key >= 'A') and (key <= 'Z') then 1825 key := chr(ord(key) + 32); -------------------------------------------------------------------------------- 1826 MacroKey := key; 1721 MacroKey[nMacros] := key; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1827 if (key = 'f') and (TokenStr[i + 1] in ['1'..'9']) then begin {Function Key?} 1828 fkey := ord(TokenStr[i + 1]) - ord('0'); 1829 if TokenStr[i + 2] in ['0'..'5'] then 1830 fkey := fkey * 10 + ord(TokenStr[i + 2]) - ord('0'); 1831 if (fkey >= 1) and (fkey <= 15) then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1832; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1727) 1827 if (key = 'f') and (TokenStr[i + 1] in ['1'..'9']) then begin {Function Key?} 1828 fkey := ord(TokenStr[i + 1]) - ord('0'); 1829 if TokenStr[i + 2] in ['0'..'5'] then 1830 fkey := fkey * 10 + ord(TokenStr[i + 2]) - ord('0'); 1831 if (fkey >= 1) and (fkey <= 15) then -------------------------------------------------------------------------------- 1832 MacroKey := chr(ord('A') + fkey - 1); 1727 MacroKey[nMacros] := chr(ord('A') + fkey - 1); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1833 end; {Function key?} 1834 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1835; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1730) 1833 end; {Function key?} 1834 end; -------------------------------------------------------------------------------- 1835 end; 1730 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1836 end; 1837 Extra lines in 1st before 1733 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1838:1855; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1733) 1836 end; 1837 -------------------------------------------------------------------------------- 1838 procedure deleteMacroMenuItems; 1839 var 1840 i: integer; 1841 MHandle: MenuHandle; 1842 begin 1843 while CountMItems(SpecialMenuH) >= FirstMacroItem do 1844 DelMenuItem(SpecialMenuH, FirstMacroItem); 1845 for i := FirstMacroMenu to LastMacroMenu do begin 1846 MHandle := MacroMenusH[i]; 1847 if MHandle <> nil then begin 1848 MacroMenusH[i] := nil; 1849 DeleteMenu(i); 1850 DisposeMenu(MHandle); 1851 needDrawMenuBar := true; 1852 end; 1853 end; 1854 end; 1855 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1856 1857 procedure PreScan2; 1858 {Converts the macro file to a token stream. Some tokens are followed by an argument.} 1859 { is followd by a null terminated string, by a real(4 byte) number,} 1860 { and by a symbol table location(2 byte integer), and} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1863:1868; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1740:1748) 1858 {Converts the macro file to a token stream. Some tokens are followed by an argument.} 1859 { is followd by a null terminated string, by a real(4 byte) number,} 1860 { and by a symbol table location(2 byte integer), and} 1861 {, , , and by a 2 byte ID.} 1862 {UserCommandT, UserFuncT, UserStrFuncT are also followed by a 2 byte ID.} -------------------------------------------------------------------------------- 1863 begin 1864 MacroItems^^[0].MacroStart := 0; 1865 if nMacros > 0 then 1866 deleteMacroMenuItems; 1867 SetHandleSize(Handle(MacroItems), 100); 1868 SetHandleSize(Handle(Macros), 5000); 1740 var 1741 i: integer; 1742 begin 1743 with MacrosP^ do begin 1744 if nMacros > 0 then 1745 for i := 1 to nMacros do begin 1746 DelMenuItem(SpecialMenuH, FirstMacroItem); 1747 MacroKey[i] := chr(0); 1748 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1869 nMacros := 0; 1870 nProcedures := 0; 1871 nGlobals := 0; 1872 if TopOfStack > 0 then 1873 DeallocateStrings2(1, TopOfStack); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1883:1884; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1763) 1878 token := NullT; 1879 SymbolTableLoc := 0; 1880 MacroLineNumber := 1; 1881 repeat 1882 GetToken; -------------------------------------------------------------------------------- 1883 MacrosPC2 := pcp(Macros^ + pc2); 1884 MacrosPC2^.c := chr(ord(token)); 1763 macros[pc2] := chr(ord(token)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1885 case token of 1886 StringLiteral: 1887 StoreString; 1888 NumericLiteral: 1889 StoreReal(StringToReal(TokenStr)); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1901:1902; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1780) 1896 StoreInteger(SymbolTableLoc); 1897 UnknownIdentifier: begin 1898 AddIdentifier; 1899 if token = DoneT then 1900 exit(PreScan2); -------------------------------------------------------------------------------- 1901 MacrosPC2 := pcp(Macros^ + pc2); 1902 MacrosPC2^.c := chr(ord(Identifier)); 1780 macros[pc2] := chr(ord(Identifier)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1903 StoreInteger(nSymbols); 1904 end; 1905 ProcIDT: begin 1906 AddProcedure; 1907 if token = DoneT then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1922:1936; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1800:1808) 1917 StoreInteger(ord(MacroCommand)); 1918 otherwise 1919 ; 1920 end; {case} 1921 pc2 := pc2 + 1; -------------------------------------------------------------------------------- 1922 if pc2 > (GetHandleSize(Handle(Macros)) - 256) then begin 1923 if mySetHandleSize(Handle(Macros), pc2 + 5000) <> noErr then begin 1924 SetHandleSize(Handle(Macros), 100); {free most of the memory} 1925 if nMacros > 0 then 1926 DeleteMacroMenuItems; 1927 nMacros := 0; 1928 nProcedures := 0; 1929 nGlobals := 0; 1930 TopOfStack := 0; 1931 PutMessage('Out of memory while loading macros.'); 1932 exit(PreScan2); 1933 end; 1934 end; 1935 until token = DoneT; 1936 EndMacros := pc2 - 1; 1800 if pc2 > (MaxMacroSize - 256) then begin 1801 if nMacros > 0 then 1802 DelMenuItem(SpecialMenuH, FirstMacroItem + nMacros - 1); 1803 PutMessage('Unable to load all the macros because file is too large.'); 1804 exit(PreScan2); 1805 end; 1806 until token = DoneT; 1807 EndMacros := pc2 - 1; 1808 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1937 if nMacros = 0 then 1938 PutMessage('No macros found.'); 1939 end; 1940 1941 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1946; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1818) 1941 1942 procedure LoadMacros2; 1943 begin 1944 ShowWatch; 1945 if not PreScan1 then begin -------------------------------------------------------------------------------- 1946 DisposHandle(Handle(MacroBufH)); 1818 DisposPtr(ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1947 exit(LoadMacros2); 1948 end; Extra lines in 1st before 1821 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1949; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1821) 1947 exit(LoadMacros2); 1948 end; -------------------------------------------------------------------------------- 1949 needDrawMenuBar := false; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1950 InitSymbolTable; 1951 PreScan2; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1952; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1823) 1950 InitSymbolTable; 1951 PreScan2; -------------------------------------------------------------------------------- 1952 DisposHandle(Handle(MacroBufH)); 1823 DisposPtr(ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1953 CurrentX := 20; 1954 CurrentY := 20; 1955 SaveForeground := -1; 1956 StartOfLine := 0; Extra lines in 1st before 1828 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1957:1958; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1828) 1953 CurrentX := 20; 1954 CurrentY := 20; 1955 SaveForeground := -1; 1956 StartOfLine := 0; -------------------------------------------------------------------------------- 1957 if needDrawMenuBar then 1958 DrawMenuBar; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1959 end; 1960 1961 1962 procedure LoadMacrosFromFile (fname: str255; RefNum: integer); 1963 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1970:1971; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1839:1845) 1965 FileSize: LongInt; 1966 f: integer; 1967 begin 1968 err := FSOpen(fname, RefNum, f); 1969 err := GetEOF(f, FileSize); -------------------------------------------------------------------------------- 1970 MacroBufH := LongIntPtr(GetBigHandle(FileSize)); 1971 if Handle(MacroBufH) = nil then begin 1839 if FileSize > MaxMacroFileSize then begin 1840 err := fsclose(f); 1841 PutMessage('Macro file is too large.'); 1842 exit(LoadMacrosFromFile); 1843 end; 1844 MacroBufP := MacroBufPtr(NewPtr(FileSize)); 1845 if MacroBufP = nil then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1972 err := fsclose(f); 1973 PutMessage('Not enough memory to load macro file.'); 1974 exit(LoadMacrosFromFile); 1975 end; 1976 err := SetFPos(f, fsFromStart, 0); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1977; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1851) 1972 err := fsclose(f); 1973 PutMessage('Not enough memory to load macro file.'); 1974 exit(LoadMacrosFromFile); 1975 end; 1976 err := SetFPos(f, fsFromStart, 0); -------------------------------------------------------------------------------- 1977 err := fsRead(f, FileSize, ptr(MacroBufH^)); 1851 err := fsRead(f, FileSize, ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1978 EndMacros := FileSize - 1; 1979 err := fsclose(f); 1980 LoadMacros2; 1981 end; 1982 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1996:1997; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1870:1871) 1991 if ByteCount <= 0 then begin 1992 PutMessage('Text window is empty.'); 1993 exit(LoadMacrosFromWindow); 1994 end; 1995 EndMacros := ByteCount - 1; -------------------------------------------------------------------------------- 1996 MacroBufH := LongIntPtr(GetBigHandle(ByteCount)); 1997 if Handle(MacroBufH) = nil then begin 1870 MacroBufP := MacroBufPtr(NewPtr(ByteCount)); 1871 if MacroBufP = nil then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1998 PutMessage('Not enough memory to load macros.'); 1999 exit(LoadMacrosFromWindow); 2000 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2001; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1875) 1998 PutMessage('Not enough memory to load macros.'); 1999 exit(LoadMacrosFromWindow); 2000 end; -------------------------------------------------------------------------------- 2001 BlockMove(TextTE^^.hText^, ptr(MacroBufH^), ByteCount); 1875 BlockMove(TextTE^^.hText^, ptr(MacroBufP), ByteCount); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2002 LoadMacros2; 2003 end; 2004 end; 2005 Extra lines in 1st before 1880 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2006:2021; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1880) 2002 LoadMacros2; 2003 end; 2004 end; 2005 -------------------------------------------------------------------------------- 2006 procedure LoadMacrosFromHandle; 2007 var 2008 ByteCount: LongInt; 2009 begin 2010 ByteCount := GetHandleSize(MacroLoadHandle); 2011 if ByteCount = 0 then begin 2012 PutMessage('Text buffer is empty.'); 2013 DisposeHandle(MacroLoadHandle); 2014 MacroLoadHandle := nil; 2015 exit(LoadMacrosFromHandle); 2016 end; 2017 EndMacros := ByteCount - 1; 2018 MacroBufH := LongIntPtr(MacroLoadHandle); 2019 MacroLoadHandle := nil; 2020 LoadMacros2; 2021 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2022 2023 procedure LoadMacros; 2024 var 2025 name: str255; 2026 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2027:2029; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1885) 2022 2023 procedure LoadMacros; 2024 var 2025 name: str255; 2026 begin -------------------------------------------------------------------------------- 2027 if MacroLoadHandle <> nil then 2028 LoadMacrosFromHandle 2029 else if CurrentWindow = TextKind then 1885 if CurrentWindow = TextKind then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2030 LoadMacrosFromWindow 2031 else if GetTextFile(name, MacrosRefNum) then 2032 LoadMacrosFromFile(name, MacrosRefNum); 2033 end; 2034 *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 9:10; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 9:10) 4 5 6 interface 7 8 uses -------------------------------------------------------------------------------- 9 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Graphics, File2,{} 10 UMacroDef, UMacroRun; 9 QuickDraw, Palettes, PrintTraps, Globals, Utilities, Graphics, File2;{} 10 {,UMacroDef, UMacroRun;} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 12 procedure LoadMacrosFromFile (fname: str255; RefNum: integer); 13 procedure LoadMacros; 14 15 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 18:29; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 18:25) 13 procedure LoadMacros; 14 15 16 implementation 17 -------------------------------------------------------------------------------- 18 {type} 19 {MacroBufType = packed array[0..MaxMacroFileSize] of char;} 20 {MacroBufPtr = ^MacroBufType;} 21 var 22 PC2, StartOfLine: LongInt; 23 {MacroBufP: MacroBufPtr;} 24 MacroBufH: LongIntPtr; 25 MacroBufPC: pcp; 26 MacrosPC2: pcp; {pcp(Macros^+pc2)} 27 28 needDrawMenuBar: Boolean; 29 18 type 19 MacroBufType = packed array[0..MaxMacroFileSize] of char; 20 MacroBufPtr = ^MacroBufType; 21 var 22 PC2, StartOfLine: integer; 23 MacroBufP: MacroBufPtr; 24 25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 30 procedure InitSymbolTable; 31 var 32 i: integer; 33 begin 34 with MacrosP^ do begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1226:1238; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1222:1224) 1221 with SymbolTable[280] do begin 1222 symbol := 'windowtitle '; 1223 tType := StringFunctionT; 1224 cType := WindowTitleC; 1225 end; -------------------------------------------------------------------------------- 1226 with SymbolTable[281] do begin 1227 symbol := 'loadmacros '; 1228 cType := LoadMacrosC; 1229 end; 1230 with SymbolTable[282] do begin 1231 symbol := 'concatzf '; 1232 tType := StringFunctionT; 1233 cType := ConcatZFC; 1234 end; 1235 end; {with} 1236 nSymbols := 282; {Must be subscript of last predefined symbol} 1237 {Note: there are currently 2 unused entries in the table. Search for 'Unused' to find them.} 1238 AddUserMacros; 1222 end; {with} 1223 nSymbols := 280; {Must be subscript of last predefined symbol} 1224 {Note: there are currently 2 unused entries in the table. Search for 'Unused' to find them.} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1239 end; 1240 1241 1242 procedure DeallocateStrings2 (first, last: integer); 1243 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1260; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1246) 1255 1256 1257 function CurrentLine: str255; 1258 var 1259 cLine: str255; -------------------------------------------------------------------------------- 1260 i, count: LongInt; 1246 i, count: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1261 begin 1262 i := StartOfLine; 1263 if (i < 0) or (i > EndMacros) then begin 1264 CurrentLine := ''; 1265 exit(CurrentLine); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1271:1275; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1257:1260) 1266 end; 1267 cLine := ''; 1268 count := 0; 1269 repeat 1270 i := i + 1; -------------------------------------------------------------------------------- 1271 MacroBufPC := pcp(MacroBufH^ + i); 1272 count := count + 1; 1273 if not (MacroBufPC^.c = cr) or (MacroBufPC^.c = '|') then 1274 cLine := concat(cLine, MacroBufPC^.c); 1275 until (i >= EndMacros) or (MacroBufPC^.c = cr) or (MacroBufPC^.c = '|') or (count > 60); 1257 count := count + 1; 1258 if not (MacroBufP^[i] = cr) or (MacroBufP^[i] = '|') then 1259 cLine := concat(cLine, MacroBufP^[i]); 1260 until (i >= EndMacros) or (MacroBufP^[i] = cr) or (MacroBufP^[i] = '|') or (count > 60); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1276 while (length(cLine) > 1) and (cLine[1] = ' ') do 1277 delete(cLine, 1, 1); 1278 CurrentLine := concat(cr, '<<', cLine, '>>'); 1279 end; 1280 Extra lines in 2nd before 1284 in 1st (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line Æ1284; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1269:1271) 1279 end; 1280 1281 1282 procedure LTMacroError (str: str255); 1283 {Report load-time errors} -------------------------------------------------------------------------------- 1269 var 1270 str2: str255; 1271 i, count: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1284 begin 1285 if token = DoneT then 1286 exit(LTMacroError); 1287 if TopOfStack > 0 then 1288 DeallocateStrings2(1, TopOfStack); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1322:1329; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1310:1314) 1317 begin 1318 if token = DoneT then 1319 exit(GetToken); 1320 SavePC := PC; 1321 SaveToken := token; -------------------------------------------------------------------------------- 1322 MacroBufPC := pcp(MacroBufH^ + pc); 1323 while not (MacroBufPC^.c in ['a'..'z', '0'..'9', '(', ')', ',', '''', '+', '-', '*', '/', ':', ';', '=', '.', '>', '<', '[', ']', '|']) do begin {skip white space} 1324 if MacroBufPC^.c = cr then 1325 MacroBufPC^.c := '|' 1326 else begin 1327 pc := pc + 1; 1328 MacroBufPC := pcp(MacroBufH^ + pc); 1329 end; 1310 while not (MacroBufP^[pc] in ['a'..'z', '0'..'9', '(', ')', ',', '''', '+', '-', '*', '/', ':', ';', '=', '.', '>', '<', '[', ']', '|']) do begin {skip white space} 1311 if MacroBufP^[pc] = cr then 1312 MacroBufP^[pc] := '|' 1313 else 1314 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1330 if pc > EndMacros then begin 1331 Token := DoneT; 1332 exit(GetToken); 1333 end; 1334 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1335; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1320) 1330 if pc > EndMacros then begin 1331 Token := DoneT; 1332 exit(GetToken); 1333 end; 1334 end; -------------------------------------------------------------------------------- 1335 c := MacroBufPC^.c; 1320 c := MacroBufP^[pc]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1336 case c of 1337 'a'..'z': begin 1338 TokenSymbol := BlankSymbol; 1339 SymbolLength := 0; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1340; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1325) 1336 case c of 1337 'a'..'z': begin 1338 TokenSymbol := BlankSymbol; 1339 SymbolLength := 0; -------------------------------------------------------------------------------- 1340 while MacroBufPC^.c in ['a'..'z', '0'..'9'] do begin 1325 while MacroBufP^[pc] in ['a'..'z', '0'..'9'] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1341 SymbolLength := SymbolLength + 1; 1342 if SymbolLength <= SymbolSize then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1343:1345; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1328:1329) 1341 SymbolLength := SymbolLength + 1; 1342 if SymbolLength <= SymbolSize then -------------------------------------------------------------------------------- 1343 TokenSymbol[SymbolLength] := MacroBufPC^.c; 1344 pc := pc + 1; 1345 MacroBufPC := pcp(MacroBufH^ + pc); 1328 TokenSymbol[SymbolLength] := MacroBufP^[pc]; 1329 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1346 if pc > EndMacros then begin 1347 Token := DoneT; 1348 exit(GetToken); 1349 end; 1350 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1357; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1341) 1352 LookupIdentifier; 1353 exit(GetToken); 1354 end; 1355 '0'..'9', '.': begin 1356 TokenStr := ''; -------------------------------------------------------------------------------- 1357 while MacroBufPC^.c in ['0'..'9', '.'] do begin 1341 while MacroBufP^[pc] in ['0'..'9', '.'] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1358 TokenStr := concat(TokenStr, c); 1359 pc := pc + 1; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1360:1361; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1344) 1358 TokenStr := concat(TokenStr, c); 1359 pc := pc + 1; -------------------------------------------------------------------------------- 1360 MacroBufPC := pcp(MacroBufH^ + pc); 1361 c := MacroBufPC^.c; 1344 c := MacroBufP^[pc]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1362 if pc > EndMacros then begin 1363 Token := DoneT; 1364 exit(GetToken); 1365 end; 1366 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1368; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1351) 1363 Token := DoneT; 1364 exit(GetToken); 1365 end; 1366 end; 1367 Token := NumericLiteral; -------------------------------------------------------------------------------- 1368 if MacroBufPC^.c in ['a'..'z'] then 1351 if MacroBufP^[pc] in ['a'..'z'] then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1369 LTMacroError('Operator or delimiter expected'); 1370 exit(GetToken); 1371 end; 1372 '(': begin 1373 Token := LeftParen; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1392:1402; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1375:1383) 1387 end; 1388 ',': begin 1389 Token := comma; 1390 pc := pc + 1; 1391 end; -------------------------------------------------------------------------------- 1392 ':': begin 1393 pc := pc + 1; 1394 MacroBufPC := pcp(MacroBufH^ + pc); 1395 if MacroBufPC^.c = '=' then begin 1396 Token := AssignOp; 1397 pc := pc + 1; 1398 end 1399 else begin 1400 Token := colon; 1401 end; 1402 end; 1375 ':': 1376 if MacroBufP^[pc + 1] = '=' then begin 1377 Token := AssignOp; 1378 pc := pc + 2; 1379 end 1380 else begin 1381 Token := colon; 1382 pc := pc + 1; 1383 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1403 ';': begin 1404 Token := SemiColon; 1405 pc := pc + 1; 1406 end; 1407 '+': begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1426:1430; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1407:1409) 1421 pc := pc + 1; 1422 end; 1423 '''': begin 1424 TokenStr := ''; 1425 pc := pc + 1; -------------------------------------------------------------------------------- 1426 MacroBufPC := pcp(MacroBufH^ + pc); 1427 while MacroBufPC^.c <> '''' do begin 1428 TokenStr := concat(TokenStr, MacroBufPC^.c); 1429 pc := pc + 1; 1430 MacroBufPC := pcp(MacroBufH^ + pc); 1407 while MacroBufP^[pc] <> '''' do begin 1408 TokenStr := concat(TokenStr, MacroBufP^[pc]); 1409 pc := pc + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1431 if pc > EndMacros then begin 1432 Token := DoneT; 1433 exit(GetToken); 1434 end; 1435 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1445:1446; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1424) 1440 Token := eqOp; 1441 pc := pc + 1; 1442 end; 1443 '<': begin 1444 pc := pc + 1; -------------------------------------------------------------------------------- 1445 MacroBufPC := pcp(MacroBufH^ + pc); 1446 if MacroBufPC^.c = '>' then begin 1424 if MacroBufP^[pc] = '>' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1447 token := neOp; 1448 pc := pc + 1; 1449 end Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1450; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1428) 1447 token := neOp; 1448 pc := pc + 1; 1449 end -------------------------------------------------------------------------------- 1450 else if MacroBufPC^.c = '=' then begin 1428 else if MacroBufP^[pc] = '=' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1451 token := leOp; 1452 pc := pc + 1; 1453 end 1454 else 1455 token := ltOp; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1459:1460; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1437) 1454 else 1455 token := ltOp; 1456 end; 1457 '>': begin 1458 pc := pc + 1; -------------------------------------------------------------------------------- 1459 MacroBufPC := pcp(MacroBufH^ + pc); 1460 if MacroBufPC^.c = '=' then begin 1437 if MacroBufP^[pc] = '=' then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1461 token := geOp; 1462 pc := pc + 1; 1463 end 1464 else 1465 token := gtOp; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1494; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1471) 1489 LTMacroError('Symbol table overflow'); 1490 exit(AddProcedure); 1491 end; 1492 nSymbols := nSymbols + 1; 1493 nProcedures := nProcedures + 1; -------------------------------------------------------------------------------- 1494 with MacrosP^.SymbolTable[nSymbols] do begin 1471 with MacrosP^, MacrosP^.SymbolTable[nSymbols] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1495 symbol := TokenSymbol; 1496 tType := procedureT; 1497 cType := NullC; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1498; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1475) 1495 symbol := TokenSymbol; 1496 tType := procedureT; 1497 cType := NullC; -------------------------------------------------------------------------------- 1498 if pcp(MacroBufH^ + pc)^.c = ';' then 1475 if MacroBufP^[pc] = ';' then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1499 pc := pc + 1; 1500 loc := pc2 + 1; 1501 end; 1502 end; 1503 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1512; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1489) 1507 if nSymbols >= MaxSymbols then begin 1508 LTMacroError('Symbol table overflow'); 1509 exit(AddIdentifier); 1510 end; 1511 nSymbols := nSymbols + 1; -------------------------------------------------------------------------------- 1512 with MacrosP^.SymbolTable[nSymbols] do begin 1489 with MacrosP^, MacrosP^.SymbolTable[nSymbols] do begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1513 symbol := TokenSymbol; 1514 tType := Identifier; 1515 cType := NullC; 1516 loc := pc2; 1517 end; Extra lines in 1st before 1578 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1601:1602; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1578) 1596 procedure DoGlobalDeclarations; 1597 begin 1598 GetGDToken; 1599 while ((token = UnknownIdentifier) or (token = Identifier)) and (Token <> DoneT) do 1600 DoGlobalDeclaration; -------------------------------------------------------------------------------- 1601 if token = beginT then 1602 MacroItems^^[0].MacroStart := pc2 + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1603 PutTokenBack2; 1604 end; 1605 1606 1607 function PreScan1: boolean; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1612:1616; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1587:1591) 1607 function PreScan1: boolean; 1608 {Converts the macro file to lowercase and removes comments.} 1609 var 1610 inString, inComment: boolean; 1611 c: char; -------------------------------------------------------------------------------- 1612 i, StartComment: LongInt; 1613 1614 function LineNumber: LongInt; 1615 var 1616 i, n: LongInt; 1587 i, StartComment: integer; 1588 1589 function LineNumber: integer; 1590 var 1591 i, n: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1617 begin 1618 n := 1; 1619 for i := 0 to pc do Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1620; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1595) 1617 begin 1618 n := 1; 1619 for i := 0 to pc do -------------------------------------------------------------------------------- 1620 if pcp(MacroBufH^ + i)^.c = cr then begin 1595 if MacroBufP^[i] = cr then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1621 StartOfLine := i; 1622 n := n + 1; 1623 end; 1624 LineNumber := n; 1625 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1632:1633; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1607) 1627 begin 1628 PreScan1 := false; 1629 inString := false; 1630 inComment := false; 1631 for i := 0 to EndMacros do begin -------------------------------------------------------------------------------- 1632 MacroBufPC := pcp(MacroBufH^ + i); 1633 c := MacroBufPC^.c; 1607 c := MacroBufP^[i]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1634 if inString and (c = cr) then begin 1635 pc := i - 1; 1636 PutMessage(concat('The quoted string in line ', long2str(LineNumber), ' of the macro file is not terminated.', CurrentLine)); 1637 exit(PreScan1); 1638 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1651; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1625) 1646 exit(PreScan1); 1647 end; 1648 if c = '}' then 1649 inComment := false; 1650 if c <> cr then -------------------------------------------------------------------------------- 1651 MacroBufPC^.c := ' '; 1625 MacroBufP^[i] := ' '; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1652 end 1653 else begin 1654 if (c = 'Ô') or (c = '`') then begin 1655 pc := i; 1656 PutMessage(concat('Bad quote("Ô" or "`") in line ', long2str(LineNumber), ' of macro file.', CurrentLine)); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1662; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1636) 1657 exit(PreScan1); 1658 end; 1659 if c = '''' then 1660 inString := not inString; 1661 if (c >= 'A') and (c <= 'Z') and not inString then -------------------------------------------------------------------------------- 1662 MacroBufPC^.c := chr(ord(c) + 32); 1636 MacroBufP^[i] := chr(ord(c) + 32); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1663 end; 1664 end; 1665 if inComment then begin 1666 pc := StartComment; 1667 PutMessage(concat('The comment starting in line ', long2str(LineNumber), ' of the macro file is not terminated.', CurrentLine)) Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1676:1681; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1650:1655) 1671 end; 1672 1673 1674 procedure StoreInteger (i: integer); 1675 begin -------------------------------------------------------------------------------- 1676 pc2 := pc2 + 1; 1677 MacrosPC2 := pcp(Macros^ + pc2); 1678 MacrosPC2^.c := chr(band(bsr(i, 8), $ff)); 1679 pc2 := pc2 + 1; 1680 MacrosPC2 := pcp(Macros^ + pc2); 1681 MacrosPC2^.c := chr(band(i, $ff)); 1650 with macrosP^ do begin 1651 pc2 := pc2 + 1; 1652 macros[pc2] := chr(band(bsr(i, 8), $ff)); 1653 pc2 := pc2 + 1; 1654 macros[pc2] := chr(band(i, $ff)); 1655 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1682 end; 1683 1684 1685 procedure StoreReal (r: real); 1686 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1690:1701; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1664:1673) 1685 procedure StoreReal (r: real); 1686 var 1687 i: LongInt; 1688 begin 1689 i := LongInt(r); -------------------------------------------------------------------------------- 1690 pc2 := pc2 + 1; 1691 MacrosPC2 := pcp(Macros^ + pc2); 1692 MacrosPC2^.c := chr(band(bsr(i, 24), $ff)); 1693 pc2 := pc2 + 1; 1694 MacrosPC2 := pcp(Macros^ + pc2); 1695 MacrosPC2^.c := chr(band(bsr(i, 16), $ff)); 1696 pc2 := pc2 + 1; 1697 MacrosPC2 := pcp(Macros^ + pc2); 1698 MacrosPC2^.c := chr(band(bsr(i, 8), $ff)); 1699 pc2 := pc2 + 1; 1700 MacrosPC2 := pcp(Macros^ + pc2); 1701 MacrosPC2^.c := chr(band(i, $ff)); 1664 with macrosP^ do begin 1665 pc2 := pc2 + 1; 1666 macros[pc2] := chr(band(bsr(i, 24), $ff)); 1667 pc2 := pc2 + 1; 1668 macros[pc2] := chr(band(bsr(i, 16), $ff)); 1669 pc2 := pc2 + 1; 1670 macros[pc2] := chr(band(bsr(i, 8), $ff)); 1671 pc2 := pc2 + 1; 1672 macros[pc2] := chr(band(i, $ff)); 1673 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1702 end; 1703 1704 1705 procedure StoreString; 1706 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1709:1716; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1681:1688) 1704 1705 procedure StoreString; 1706 var 1707 i: integer; 1708 begin -------------------------------------------------------------------------------- 1709 for i := 1 to length(TokenStr) do begin 1710 pc2 := pc2 + 1; 1711 MacrosPC2 := pcp(Macros^ + pc2); 1712 MacrosPC2^.c := TokenStr[i]; 1713 end; 1714 pc2 := pc2 + 1; 1715 MacrosPC2 := pcp(Macros^ + pc2); 1716 MacrosPC2^.c := chr(0); 1681 with macrosP^ do begin 1682 for i := 1 to length(TokenStr) do begin 1683 pc2 := pc2 + 1; 1684 macros[pc2] := TokenStr[i]; 1685 end; 1686 pc2 := pc2 + 1; 1687 macros[pc2] := chr(0); 1688 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1717 end; 1718 1719 1720 procedure AddMenuItem; 1721 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1722:1819; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1694:1714) 1717 end; 1718 1719 1720 procedure AddMenuItem; 1721 var -------------------------------------------------------------------------------- 1722 i, j, k, oc, fkey: integer; 1723 c, key: char; 1724 size: LongInt; 1725 MenuName: Str255; 1726 MHandle: MenuHandle; 1727 begin 1728 GetToken; 1729 pc2 := pc2 + 1; 1730 MacrosPC2 := pcp(Macros^ + pc2); 1731 MacrosPC2^.c := chr(ord(token)); 1732 if token <> StringLiteral then begin 1733 LTMacroError('Macro command name not found'); 1734 exit(AddMenuItem); 1735 end; 1736 StoreString; 1737 if nMacros < MaxMacros then begin 1738 nMacros := nMacros + 1; 1739 size := (nMacros + 1) * sizeof(MacroItemsRec);{allow for element zero} 1740 if GetHandleSize(Handle(MacroItems)) < size then begin 1741 if mySetHandleSize(Handle(MacroItems), size + 100) <> noErr then begin 1742 nMacros := nMacros - 1; 1743 LTMacroError('Out of memory'); 1744 exit(AddMenuItem); 1745 end 1746 end; 1747 end 1748 else 1749 PutMessage('Too many macros.'); 1750 with MacroItems^^[nMacros] do begin 1751 MacroStart := pc2 + 1; 1752 MacroKey := chr(0); 1753 j := pos('{', TokenStr); 1754 k := pos('}', TokenStr); 1755 MenuName := ''; 1756 if (j > 0) and (j < k) then begin 1757 for i := j + 1 to k - 1 do begin 1758 oc := ord(TokenStr[i]); 1759 if (ord('0') < oc) and (oc < ord('9')) then 1760 else if (ord('A') <= oc) and (oc <= ord('Z')) then 1761 else if (ord('a') <= oc) and (oc <= ord('z')) then 1762 else 1763 oc := ord('_'); {protect against bad menu names} 1764 MenuName := Concat(MenuName, chr(oc)); 1765 end; 1766 delete(TokenStr, j, k); 1767 end; 1768 if length(MenuName) <> 0 then begin 1769 MHandle := nil; 1770 i := FirstMacroMenu; 1771 MMenuID := 0; 1772 while i < LastMacroMenu do begin 1773 MHandle := MacroMenusH[i]; 1774 if MHandle <> nil then begin 1775 with MHandle^^ do 1776 if length(menuData) = length(MenuName) then 1777 if pos(menuData, MenuName) > 0 then begin 1778 AppendMenu(MHandle, TokenStr); 1779 MMenuID := i; 1780 MMitem := CountMitems(MHandle); 1781 end; 1782 if MMenuID <> 0 then begin 1783 {Also append item to hierarchal menu on special menu} 1784 MHandle := MacroMenusH[i + 1]; 1785 if MHandle <> nil then 1786 AppendMenu(MHandle, TokenStr); 1787 leave; 1788 end; 1789 end 1790 else begin 1791 MHandle := NewMenu(i, MenuName); 1792 MacroMenusH[i] := MHandle; 1793 InsertMenu(MHandle, 0); 1794 needDrawMenuBar := true; 1795 AppendMenu(MHandle, 'Hide this menu;(-'); 1796 AppendMenu(MHandle, TokenStr); 1797 MMenuID := i; 1798 MMitem := CountMitems(MHandle); 1799 {Now add a hierarchal menu to the special menu} 1800 MHandle := NewMenu(i + 1, MenuName); 1801 MacroMenusH[i + 1] := MHandle; 1802 InsertMenu(MHandle, -1); {hierarchal menu} 1803 AppendMenu(SpecialMenuH, concat(MenuName, '/', chr(27), '!', chr(i + 1))); 1804 AppendMenu(MHandle, 'Show this menu on menubar;(-'); 1805 AppendMenu(MHandle, TokenStr); 1806 leave; 1807 end; 1808 i := i + 2 1809 end; 1810 if i >= LastMacroMenu then begin 1811 PutMessage('Too many Macro Menus, using Special'); 1812 MenuName := ''; 1813 end; 1814 end; 1815 if length(MenuName) = 0 then begin 1816 AppendMenu(SpecialMenuH, TokenStr); 1817 MMenuID := SpecialMenu; 1818 MMitem := CountMItems(SpecialMenuH); 1819 end; 1694 i, fkey: integer; 1695 c, key: char; 1696 begin 1697 with MacrosP^ do begin 1698 GetToken; 1699 pc2 := pc2 + 1; 1700 macros[pc2] := chr(ord(token)); 1701 if token <> StringLiteral then begin 1702 LTMacroError('Macro command name not found'); 1703 exit(AddMenuItem); 1704 end; 1705 StoreString; 1706 if nMacros < MaxMacros then begin 1707 AppendMenu(SpecialMenuH, TokenStr); 1708 nMacros := nMacros + 1 1709 end 1710 else 1711 PutMessage('Too many macros.'); 1712 if macros[pc] = ';' then 1713 pc := pc + 1; 1714 MacroStart[nMacros] := pc2 + 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1820 i := pos('[', TokenStr); 1821 if i > 0 then begin {Assign a key to macro?} 1822 i := i + 1; 1823 key := TokenStr[i]; 1824 if (key >= 'A') and (key <= 'Z') then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1826; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1721) 1821 if i > 0 then begin {Assign a key to macro?} 1822 i := i + 1; 1823 key := TokenStr[i]; 1824 if (key >= 'A') and (key <= 'Z') then 1825 key := chr(ord(key) + 32); -------------------------------------------------------------------------------- 1826 MacroKey := key; 1721 MacroKey[nMacros] := key; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1827 if (key = 'f') and (TokenStr[i + 1] in ['1'..'9']) then begin {Function Key?} 1828 fkey := ord(TokenStr[i + 1]) - ord('0'); 1829 if TokenStr[i + 2] in ['0'..'5'] then 1830 fkey := fkey * 10 + ord(TokenStr[i + 2]) - ord('0'); 1831 if (fkey >= 1) and (fkey <= 15) then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1832; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1727) 1827 if (key = 'f') and (TokenStr[i + 1] in ['1'..'9']) then begin {Function Key?} 1828 fkey := ord(TokenStr[i + 1]) - ord('0'); 1829 if TokenStr[i + 2] in ['0'..'5'] then 1830 fkey := fkey * 10 + ord(TokenStr[i + 2]) - ord('0'); 1831 if (fkey >= 1) and (fkey <= 15) then -------------------------------------------------------------------------------- 1832 MacroKey := chr(ord('A') + fkey - 1); 1727 MacroKey[nMacros] := chr(ord('A') + fkey - 1); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1833 end; {Function key?} 1834 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1835; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1730) 1833 end; {Function key?} 1834 end; -------------------------------------------------------------------------------- 1835 end; 1730 end; {with} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1836 end; 1837 Extra lines in 1st before 1733 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1838:1855; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1733) 1836 end; 1837 -------------------------------------------------------------------------------- 1838 procedure deleteMacroMenuItems; 1839 var 1840 i: integer; 1841 MHandle: MenuHandle; 1842 begin 1843 while CountMItems(SpecialMenuH) >= FirstMacroItem do 1844 DelMenuItem(SpecialMenuH, FirstMacroItem); 1845 for i := FirstMacroMenu to LastMacroMenu do begin 1846 MHandle := MacroMenusH[i]; 1847 if MHandle <> nil then begin 1848 MacroMenusH[i] := nil; 1849 DeleteMenu(i); 1850 DisposeMenu(MHandle); 1851 needDrawMenuBar := true; 1852 end; 1853 end; 1854 end; 1855 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1856 1857 procedure PreScan2; 1858 {Converts the macro file to a token stream. Some tokens are followed by an argument.} 1859 { is followd by a null terminated string, by a real(4 byte) number,} 1860 { and by a symbol table location(2 byte integer), and} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1863:1936; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1740:1808) 1858 {Converts the macro file to a token stream. Some tokens are followed by an argument.} 1859 { is followd by a null terminated string, by a real(4 byte) number,} 1860 { and by a symbol table location(2 byte integer), and} 1861 {, , , and by a 2 byte ID.} 1862 {UserCommandT, UserFuncT, UserStrFuncT are also followed by a 2 byte ID.} -------------------------------------------------------------------------------- 1863 begin 1864 MacroItems^^[0].MacroStart := 0; 1865 if nMacros > 0 then 1866 deleteMacroMenuItems; 1867 SetHandleSize(Handle(MacroItems), 100); 1868 SetHandleSize(Handle(Macros), 5000); 1869 nMacros := 0; 1870 nProcedures := 0; 1871 nGlobals := 0; 1872 if TopOfStack > 0 then 1873 DeallocateStrings2(1, TopOfStack); 1874 TopOfStack := 0; 1875 MacroOrProcName := BlankSymbol; 1876 pc := 0; 1877 pc2 := 0; 1878 token := NullT; 1879 SymbolTableLoc := 0; 1880 MacroLineNumber := 1; 1881 repeat 1882 GetToken; 1883 MacrosPC2 := pcp(Macros^ + pc2); 1884 MacrosPC2^.c := chr(ord(token)); 1885 case token of 1886 StringLiteral: 1887 StoreString; 1888 NumericLiteral: 1889 StoreReal(StringToReal(TokenStr)); 1890 MacroT: begin 1891 AddMenuItem; 1892 if token = DoneT then 1893 exit(PreScan2); 1894 end; 1895 Identifier, ProcedureT: 1896 StoreInteger(SymbolTableLoc); 1897 UnknownIdentifier: begin 1898 AddIdentifier; 1899 if token = DoneT then 1900 exit(PreScan2); 1901 MacrosPC2 := pcp(Macros^ + pc2); 1902 MacrosPC2^.c := chr(ord(Identifier)); 1903 StoreInteger(nSymbols); 1904 end; 1905 ProcIDT: begin 1906 AddProcedure; 1907 if token = DoneT then 1908 exit(PreScan2); 1909 end; 1910 VarT: 1911 if (nMacros = 0) and (nProcedures = 0) then begin 1912 DoGlobalDeclarations; 1913 if token = DoneT then 1914 exit(PreScan2); 1915 end; 1916 CommandT, FunctionT, StringFunctionT, ArrayT, UserCommandT, UserFuncT, UserStrFuncT: 1917 StoreInteger(ord(MacroCommand)); 1918 otherwise 1919 ; 1920 end; {case} 1921 pc2 := pc2 + 1; 1922 if pc2 > (GetHandleSize(Handle(Macros)) - 256) then begin 1923 if mySetHandleSize(Handle(Macros), pc2 + 5000) <> noErr then begin 1924 SetHandleSize(Handle(Macros), 100); {free most of the memory} 1925 if nMacros > 0 then 1926 DeleteMacroMenuItems; 1927 nMacros := 0; 1928 nProcedures := 0; 1929 nGlobals := 0; 1930 TopOfStack := 0; 1931 PutMessage('Out of memory while loading macros.'); 1932 exit(PreScan2); 1933 end; 1934 end; 1935 until token = DoneT; 1936 EndMacros := pc2 - 1; 1740 var 1741 i: integer; 1742 begin 1743 with MacrosP^ do begin 1744 if nMacros > 0 then 1745 for i := 1 to nMacros do begin 1746 DelMenuItem(SpecialMenuH, FirstMacroItem); 1747 MacroKey[i] := chr(0); 1748 end; 1749 nMacros := 0; 1750 nProcedures := 0; 1751 nGlobals := 0; 1752 if TopOfStack > 0 then 1753 DeallocateStrings2(1, TopOfStack); 1754 TopOfStack := 0; 1755 MacroOrProcName := BlankSymbol; 1756 pc := 0; 1757 pc2 := 0; 1758 token := NullT; 1759 SymbolTableLoc := 0; 1760 MacroLineNumber := 1; 1761 repeat 1762 GetToken; 1763 macros[pc2] := chr(ord(token)); 1764 case token of 1765 StringLiteral: 1766 StoreString; 1767 NumericLiteral: 1768 StoreReal(StringToReal(TokenStr)); 1769 MacroT: begin 1770 AddMenuItem; 1771 if token = DoneT then 1772 exit(PreScan2); 1773 end; 1774 Identifier, ProcedureT: 1775 StoreInteger(SymbolTableLoc); 1776 UnknownIdentifier: begin 1777 AddIdentifier; 1778 if token = DoneT then 1779 exit(PreScan2); 1780 macros[pc2] := chr(ord(Identifier)); 1781 StoreInteger(nSymbols); 1782 end; 1783 ProcIDT: begin 1784 AddProcedure; 1785 if token = DoneT then 1786 exit(PreScan2); 1787 end; 1788 VarT: 1789 if (nMacros = 0) and (nProcedures = 0) then begin 1790 DoGlobalDeclarations; 1791 if token = DoneT then 1792 exit(PreScan2); 1793 end; 1794 CommandT, FunctionT, StringFunctionT, ArrayT, UserCommandT, UserFuncT, UserStrFuncT: 1795 StoreInteger(ord(MacroCommand)); 1796 otherwise 1797 ; 1798 end; {case} 1799 pc2 := pc2 + 1; 1800 if pc2 > (MaxMacroSize - 256) then begin 1801 if nMacros > 0 then 1802 DelMenuItem(SpecialMenuH, FirstMacroItem + nMacros - 1); 1803 PutMessage('Unable to load all the macros because file is too large.'); 1804 exit(PreScan2); 1805 end; 1806 until token = DoneT; 1807 EndMacros := pc2 - 1; 1808 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1937 if nMacros = 0 then 1938 PutMessage('No macros found.'); 1939 end; 1940 1941 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1946; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1818) 1941 1942 procedure LoadMacros2; 1943 begin 1944 ShowWatch; 1945 if not PreScan1 then begin -------------------------------------------------------------------------------- 1946 DisposHandle(Handle(MacroBufH)); 1818 DisposPtr(ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1947 exit(LoadMacros2); 1948 end; Extra lines in 1st before 1821 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1949; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1821) 1947 exit(LoadMacros2); 1948 end; -------------------------------------------------------------------------------- 1949 needDrawMenuBar := false; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1950 InitSymbolTable; 1951 PreScan2; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1952; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1823) 1950 InitSymbolTable; 1951 PreScan2; -------------------------------------------------------------------------------- 1952 DisposHandle(Handle(MacroBufH)); 1823 DisposPtr(ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1953 CurrentX := 20; 1954 CurrentY := 20; 1955 SaveForeground := -1; 1956 StartOfLine := 0; Extra lines in 1st before 1828 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1957:1958; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1828) 1953 CurrentX := 20; 1954 CurrentY := 20; 1955 SaveForeground := -1; 1956 StartOfLine := 0; -------------------------------------------------------------------------------- 1957 if needDrawMenuBar then 1958 DrawMenuBar; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1959 end; 1960 1961 1962 procedure LoadMacrosFromFile (fname: str255; RefNum: integer); 1963 var Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1970:1971; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1839:1845) 1965 FileSize: LongInt; 1966 f: integer; 1967 begin 1968 err := FSOpen(fname, RefNum, f); 1969 err := GetEOF(f, FileSize); -------------------------------------------------------------------------------- 1970 MacroBufH := LongIntPtr(GetBigHandle(FileSize)); 1971 if Handle(MacroBufH) = nil then begin 1839 if FileSize > MaxMacroFileSize then begin 1840 err := fsclose(f); 1841 PutMessage('Macro file is too large.'); 1842 exit(LoadMacrosFromFile); 1843 end; 1844 MacroBufP := MacroBufPtr(NewPtr(FileSize)); 1845 if MacroBufP = nil then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1972 err := fsclose(f); 1973 PutMessage('Not enough memory to load macro file.'); 1974 exit(LoadMacrosFromFile); 1975 end; 1976 err := SetFPos(f, fsFromStart, 0); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1977; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1851) 1972 err := fsclose(f); 1973 PutMessage('Not enough memory to load macro file.'); 1974 exit(LoadMacrosFromFile); 1975 end; 1976 err := SetFPos(f, fsFromStart, 0); -------------------------------------------------------------------------------- 1977 err := fsRead(f, FileSize, ptr(MacroBufH^)); 1851 err := fsRead(f, FileSize, ptr(MacroBufP)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1978 EndMacros := FileSize - 1; 1979 err := fsclose(f); 1980 LoadMacros2; 1981 end; 1982 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 1996:1997; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1870:1871) 1991 if ByteCount <= 0 then begin 1992 PutMessage('Text window is empty.'); 1993 exit(LoadMacrosFromWindow); 1994 end; 1995 EndMacros := ByteCount - 1; -------------------------------------------------------------------------------- 1996 MacroBufH := LongIntPtr(GetBigHandle(ByteCount)); 1997 if Handle(MacroBufH) = nil then begin 1870 MacroBufP := MacroBufPtr(NewPtr(ByteCount)); 1871 if MacroBufP = nil then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1998 PutMessage('Not enough memory to load macros.'); 1999 exit(LoadMacrosFromWindow); 2000 end; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2001; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1875) 1998 PutMessage('Not enough memory to load macros.'); 1999 exit(LoadMacrosFromWindow); 2000 end; -------------------------------------------------------------------------------- 2001 BlockMove(TextTE^^.hText^, ptr(MacroBufH^), ByteCount); 1875 BlockMove(TextTE^^.hText^, ptr(MacroBufP), ByteCount); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2002 LoadMacros2; 2003 end; 2004 end; 2005 Extra lines in 1st before 1880 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2006:2021; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line Æ1880) 2002 LoadMacros2; 2003 end; 2004 end; 2005 -------------------------------------------------------------------------------- 2006 procedure LoadMacrosFromHandle; 2007 var 2008 ByteCount: LongInt; 2009 begin 2010 ByteCount := GetHandleSize(MacroLoadHandle); 2011 if ByteCount = 0 then begin 2012 PutMessage('Text buffer is empty.'); 2013 DisposeHandle(MacroLoadHandle); 2014 MacroLoadHandle := nil; 2015 exit(LoadMacrosFromHandle); 2016 end; 2017 EndMacros := ByteCount - 1; 2018 MacroBufH := LongIntPtr(MacroLoadHandle); 2019 MacroLoadHandle := nil; 2020 LoadMacros2; 2021 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2022 2023 procedure LoadMacros; 2024 var 2025 name: str255; 2026 begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Macros2.p"; Line 2027:2029; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Macros2.p"; Line 1885) 2022 2023 procedure LoadMacros; 2024 var 2025 name: str255; 2026 begin -------------------------------------------------------------------------------- 2027 if MacroLoadHandle <> nil then 2028 LoadMacrosFromHandle 2029 else if CurrentWindow = TextKind then 1885 if CurrentWindow = TextKind then ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2030 LoadMacrosFromWindow 2031 else if GetTextFile(name, MacrosRefNum) then 2032 LoadMacrosFromFile(name, MacrosRefNum); 2033 end; 2034 *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p Extra lines in 1st before 22 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 22; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ22) 17 procedure DoKeyDownInText (ch: char); 18 procedure ChangeFontOrSize; 19 procedure DoTextCopy; 20 procedure DoTextPaste; 21 procedure DoTextClear; -------------------------------------------------------------------------------- 22 procedure DoTextSelectAll; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 23 procedure SaveText; 24 procedure SaveTextAs; 25 function SaveTextChanges: integer; 26 procedure InsertText (str: str255; EndOfLine: boolean); 27 procedure DoFind; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 158:162; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 157:162) 153 TEAutoView(true, TextTE); {Enable auto-scrolling} 154 end; 155 end; 156 157 -------------------------------------------------------------------------------- 158 procedure myTEScroll (dh, dv: Integer; hTE: TEHandle); 159 begin 160 {required per tech note #22} 161 if (dh <> 0) or (dv <> 0) then 162 TEScroll(dh, dv, hTE); 157 procedure ScrollText; 158 var 159 value: integer; 160 begin 161 with TextInfo^, TextInfo^.TextTE^^ do 162 TEScroll(0, (viewRect.top - destRect.top) - (GetCtlValue(vTextScrollBar) * LineHeight), TextTE); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 163 end; 164 165 Extra lines in 1st before 166 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 166:174; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ166) 163 end; 164 165 -------------------------------------------------------------------------------- 166 procedure ScrollText; 167 var 168 value: integer; 169 begin 170 with TextInfo^, TextInfo^.TextTE^^ do 171 myTEScroll(0, (viewRect.top - destRect.top) - (GetCtlValue(vTextScrollBar) * LineHeight), TextTE); 172 end; 173 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 175 procedure ScrAction (theCtl: ControlHandle; partCode: integer); 176 var 177 bInc, pInc, delta: integer; 178 begin 179 if TextInfo <> nil then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 269:271; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 260:261) 264 function MakeNewTextWindow (name: str255; width, height: integer): boolean; 265 var 266 wrect, crect: rect; 267 begin 268 MakeNewTextWindow := false; -------------------------------------------------------------------------------- 269 if nTextWindows >= MaxTextWindows then begin 270 PutMessage(concat('NIH Image cannot open more than ', long2str(MaxTextWindows), ' text windows.')); 271 macro := false; 260 if nTextWindows >= 10 then begin 261 PutMessage(concat('NIH Image cannot open more than ', long2str(MaxTextWindows), ' text windows.')); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 272 exit(MakeNewTextWindow); 273 end; 274 TextInfo := TextInfoPtr(NewPtr(SizeOf(TextInfoRec))); 275 if TextInfo = nil then 276 exit(MakeNewTextWindow); Extra lines in 1st before 304 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 314:315; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ304) 309 TooBig := false; 310 InsMenuItem(WindowsMenuH, 'Dummy', WindowsMenuItems - 1 + nTextWindows); 311 SetItem(WindowsMenuH, WindowsMenuItems + nTextWindows, name); 312 nTextWindows := nTextWindows + 1; 313 WindowNum := nTextWindows; -------------------------------------------------------------------------------- 314 TxWidNum := nextTxWid; 315 nextTxWid := nextTxWid - 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 316 TextWindow[nTextWindows] := TextWindowPtr; 317 MakeNewTextWindow := true; 318 end; {with} 319 end; 320 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 344; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 332) 339 if item = cancel then begin 340 err := fsclose(f); 341 exit(OpenTextFile); 342 end 343 else begin -------------------------------------------------------------------------------- 344 TextFileSize := 32000; 332 TextFileSize := 30000; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 345 LargerThan32K := true; 346 end; 347 end; 348 if not MakeNewTextWindow(name, 500, 400) then begin 349 err := fsclose(f); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 353; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 341:342) 348 if not MakeNewTextWindow(name, 500, 400) then begin 349 err := fsclose(f); 350 exit(OpenTextFile); 351 end; 352 with TextInfo^ do begin -------------------------------------------------------------------------------- 353 if mySetHandleSize(TextTE^^.hText, TextFileSize) <> noErr then begin 341 SetHandleSize(TextTE^^.hText, TextFileSize); 342 if MemError <> noErr then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 354 err := fsclose(f); 355 PutMessage('Out of memory.'); 356 DisposePtr(ptr(TextInfo)); 357 TextInfo := nil; 358 exit(OpenTextFile); Extra lines in 1st before 438 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 449:457; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ438) 444 UpdateScrollBars; 445 WhatToUndo := NothingToUndo; 446 end; 447 448 -------------------------------------------------------------------------------- 449 procedure DoTextSelectAll; 450 begin 451 if TextInfo <> nil then begin 452 TESetSelect(0, 32767, TextInfo^.TextTE); 453 end; 454 UpdateScrollBars; 455 end; 456 457 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 458 procedure DoSaveText; 459 var 460 err, f: integer; 461 TheInfo: FInfo; 462 ByteCount: LongInt; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 492:495; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 472:473) 487 ShowWatch; 488 err := fsopen(TextTitle, TextRefNum, f); 489 if CheckIO(err) <> 0 then 490 exit(DoSaveText); 491 err := fswrite(f, ByteCount, hText^); -------------------------------------------------------------------------------- 492 if CheckIO(err) <> 0 then begin 493 err := fsclose(f); {don't leave the file open just because of error} 494 exit(DoSaveText); 495 end; 472 if CheckIO(err) <> 0 then 473 exit(DoSaveText); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 496 err := SetEof(f, ByteCount); 497 err := fsclose(f); 498 err := FlushVol(nil, TextRefNum); 499 Changes := false; 500 end; {with} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 570:571; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 548) 565 end; 566 567 568 procedure InsertText (str: str255; EndOfLine: boolean); 569 var -------------------------------------------------------------------------------- 570 text: Ptr; 571 len: LongInt; 548 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 572 begin 573 if TextInfo <> nil then 574 with TextInfo^ do begin 575 if EndOfLine then 576 str := concat(str, cr); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 577:584; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 554:555) 572 begin 573 if TextInfo <> nil then 574 with TextInfo^ do begin 575 if EndOfLine then 576 str := concat(str, cr); -------------------------------------------------------------------------------- 577 {this was terribly slow} 578 {for i := 1 to length(str) do} 579 {TEKey(str[i], TextTE);} 580 len := length(str); 581 if len > 0 then begin 582 TEDelete(TextTE); 583 text := Ptr(Ord4(@str) + 1); 584 TEInsert(text, len, TextTE); 554 for i := 1 to length(str) do 555 TEKey(str[i], TextTE); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 585 Changes := true; 586 UpdateScrollBars; 587 WhatToUndo := NothingToUndo; 588 end; 589 end; Extra lines in 1st before 561 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 590; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ561) 585 Changes := true; 586 UpdateScrollBars; 587 WhatToUndo := NothingToUndo; 588 end; 589 end; -------------------------------------------------------------------------------- 590 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 591 592 593 procedure GoToLine (str: str255; data: CharArrayPtr); 594 var 595 pos, line: integer; *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p Extra lines in 1st before 22 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 22; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ22) 17 procedure DoKeyDownInText (ch: char); 18 procedure ChangeFontOrSize; 19 procedure DoTextCopy; 20 procedure DoTextPaste; 21 procedure DoTextClear; -------------------------------------------------------------------------------- 22 procedure DoTextSelectAll; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 23 procedure SaveText; 24 procedure SaveTextAs; 25 function SaveTextChanges: integer; 26 procedure InsertText (str: str255; EndOfLine: boolean); 27 procedure DoFind; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 158:162; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 157:162) 153 TEAutoView(true, TextTE); {Enable auto-scrolling} 154 end; 155 end; 156 157 -------------------------------------------------------------------------------- 158 procedure myTEScroll (dh, dv: Integer; hTE: TEHandle); 159 begin 160 {required per tech note #22} 161 if (dh <> 0) or (dv <> 0) then 162 TEScroll(dh, dv, hTE); 157 procedure ScrollText; 158 var 159 value: integer; 160 begin 161 with TextInfo^, TextInfo^.TextTE^^ do 162 TEScroll(0, (viewRect.top - destRect.top) - (GetCtlValue(vTextScrollBar) * LineHeight), TextTE); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 163 end; 164 165 Extra lines in 1st before 166 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 166:174; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ166) 163 end; 164 165 -------------------------------------------------------------------------------- 166 procedure ScrollText; 167 var 168 value: integer; 169 begin 170 with TextInfo^, TextInfo^.TextTE^^ do 171 myTEScroll(0, (viewRect.top - destRect.top) - (GetCtlValue(vTextScrollBar) * LineHeight), TextTE); 172 end; 173 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 175 procedure ScrAction (theCtl: ControlHandle; partCode: integer); 176 var 177 bInc, pInc, delta: integer; 178 begin 179 if TextInfo <> nil then Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 269:271; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 260:261) 264 function MakeNewTextWindow (name: str255; width, height: integer): boolean; 265 var 266 wrect, crect: rect; 267 begin 268 MakeNewTextWindow := false; -------------------------------------------------------------------------------- 269 if nTextWindows >= MaxTextWindows then begin 270 PutMessage(concat('NIH Image cannot open more than ', long2str(MaxTextWindows), ' text windows.')); 271 macro := false; 260 if nTextWindows >= 10 then begin 261 PutMessage(concat('NIH Image cannot open more than ', long2str(MaxTextWindows), ' text windows.')); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 272 exit(MakeNewTextWindow); 273 end; 274 TextInfo := TextInfoPtr(NewPtr(SizeOf(TextInfoRec))); 275 if TextInfo = nil then 276 exit(MakeNewTextWindow); Extra lines in 1st before 304 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 314:315; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ304) 309 TooBig := false; 310 InsMenuItem(WindowsMenuH, 'Dummy', WindowsMenuItems - 1 + nTextWindows); 311 SetItem(WindowsMenuH, WindowsMenuItems + nTextWindows, name); 312 nTextWindows := nTextWindows + 1; 313 WindowNum := nTextWindows; -------------------------------------------------------------------------------- 314 TxWidNum := nextTxWid; 315 nextTxWid := nextTxWid - 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 316 TextWindow[nTextWindows] := TextWindowPtr; 317 MakeNewTextWindow := true; 318 end; {with} 319 end; 320 Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 344; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 332) 339 if item = cancel then begin 340 err := fsclose(f); 341 exit(OpenTextFile); 342 end 343 else begin -------------------------------------------------------------------------------- 344 TextFileSize := 32000; 332 TextFileSize := 30000; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 345 LargerThan32K := true; 346 end; 347 end; 348 if not MakeNewTextWindow(name, 500, 400) then begin 349 err := fsclose(f); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 353; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 341:342) 348 if not MakeNewTextWindow(name, 500, 400) then begin 349 err := fsclose(f); 350 exit(OpenTextFile); 351 end; 352 with TextInfo^ do begin -------------------------------------------------------------------------------- 353 if mySetHandleSize(TextTE^^.hText, TextFileSize) <> noErr then begin 341 SetHandleSize(TextTE^^.hText, TextFileSize); 342 if MemError <> noErr then begin ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 354 err := fsclose(f); 355 PutMessage('Out of memory.'); 356 DisposePtr(ptr(TextInfo)); 357 TextInfo := nil; 358 exit(OpenTextFile); Extra lines in 1st before 438 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 449:457; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line Æ438) 444 UpdateScrollBars; 445 WhatToUndo := NothingToUndo; 446 end; 447 448 -------------------------------------------------------------------------------- 449 procedure DoTextSelectAll; 450 begin 451 if TextInfo <> nil then begin 452 TESetSelect(0, 32767, TextInfo^.TextTE); 453 end; 454 UpdateScrollBars; 455 end; 456 457 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 458 procedure DoSaveText; 459 var 460 err, f: integer; 461 TheInfo: FInfo; 462 ByteCount: LongInt; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 492:495; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 472:473) 487 ShowWatch; 488 err := fsopen(TextTitle, TextRefNum, f); 489 if CheckIO(err) <> 0 then 490 exit(DoSaveText); 491 err := fswrite(f, ByteCount, hText^); -------------------------------------------------------------------------------- 492 if CheckIO(err) <> 0 then begin 493 err := fsclose(f); {don't leave the file open just because of error} 494 exit(DoSaveText); 495 end; 472 if CheckIO(err) <> 0 then 473 exit(DoSaveText); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 496 err := SetEof(f, ByteCount); 497 err := fsclose(f); 498 err := FlushVol(nil, TextRefNum); 499 Changes := false; 500 end; {with} Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 570:571; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 548) 565 end; 566 567 568 procedure InsertText (str: str255; EndOfLine: boolean); 569 var -------------------------------------------------------------------------------- 570 text: Ptr; 571 len: LongInt; 548 i: integer; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 572 begin 573 if TextInfo <> nil then 574 with TextInfo^ do begin 575 if EndOfLine then 576 str := concat(str, cr); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Text.p"; Line 577:588; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Text.p"; Line 554:558) 572 begin 573 if TextInfo <> nil then 574 with TextInfo^ do begin 575 if EndOfLine then 576 str := concat(str, cr); -------------------------------------------------------------------------------- 577 {this was terribly slow} 578 {for i := 1 to length(str) do} 579 {TEKey(str[i], TextTE);} 580 len := length(str); 581 if len > 0 then begin 582 TEDelete(TextTE); 583 text := Ptr(Ord4(@str) + 1); 584 TEInsert(text, len, TextTE); 585 Changes := true; 586 UpdateScrollBars; 587 WhatToUndo := NothingToUndo; 588 end; 554 for i := 1 to length(str) do 555 TEKey(str[i], TextTE); 556 Changes := true; 557 UpdateScrollBars; 558 WhatToUndo := NothingToUndo; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 589 end; 590 end; 591 592 593 procedure GoToLine (str: str255; data: CharArrayPtr); *** EOF on both files at the same time *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p Extra lines in 1st before 108 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 108; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ108) 103 procedure DrawBString (str: string); 104 procedure DrawMyGrowIcon (w: WindowPtr); 105 procedure PutMemoryAlert; 106 function GetBigHandle (NeededSize: LongInt): handle; 107 function GetImageMemory (SaveInfo: infoPtr): ptr; -------------------------------------------------------------------------------- 108 function mySetHandleSize (h: Handle; size: LongInt): OSErr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 109 procedure UpdateAnalysisMenu; 110 procedure ExtendWindowsMenu (fname: str255; size: LongInt; wptr: WindowPtr); 111 procedure MakeNewWindow (name: str255); 112 function long2str (num: LongInt): str255; 113 procedure PutWarning; Extra lines in 1st before 138 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 139:146; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ138) 134 function ScreenDepth: integer; 135 procedure SetFColor (index: integer); 136 procedure SetBColor (index: integer); 137 138 -------------------------------------------------------------------------------- 139 { MOVEA.L (A7)+,A0 ;pop entry address off stack} 140 { JSR (A0) ;execute the procedure pointed to by ProcPtr} 141 procedure doUserWindow (userInfo: userInfoHandle; proc: ProcPtr); 142 inline 143 $205F, $4E90; 144 function NewUserWindow: userInfoHandle; 145 procedure InitUserWindow (userInfo: userInfoHandle); 146 procedure DisposeUserWindow (userInfo: userInfoHandle); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 147 148 implementation 149 150 151 type Extra lines in 1st before 1506 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1515; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1506) 1510 if User1M in measurements then 1511 nListColumns := nListColumns + 1; 1512 if User2M in measurements then 1513 nListColumns := nListColumns + 1; 1514 with info^ do begin -------------------------------------------------------------------------------- 1515 column := 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1516 fwidth := FieldWidth; 1517 if Headings and (FirstCount = 1) then begin 1518 PutFString(' ', 5); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1519; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 1509) 1516 fwidth := FieldWidth; 1517 if Headings and (FirstCount = 1) then begin 1518 PutFString(' ', 5); -------------------------------------------------------------------------------- 1519 PutTab; 1509 PutTabDelimeter; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1520 if AreaM in measurements then begin 1521 PutFString('Area', fwidth); 1522 PutTabDelimeter; 1523 end; 1524 if MeanM in measurements then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1599; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 1589) 1594 PutReal(sd^[i], fwidth, precision); 1595 PutTabDelimeter; 1596 end; 1597 if (xyLocM in measurements) or (nPoints > 0) then begin 1598 PutReal(xcenter^[i], fwidth, precision); -------------------------------------------------------------------------------- 1599 PutTabDelimeter; 1589 PutTab; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1600 PutReal(ycenter^[i], fwidth, precision); 1601 PutTabDelimeter; 1602 end; 1603 if ModeM in measurements then begin 1604 PutReal(mode^[i], fwidth, precision); Extra lines in 1st before 1947 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1957; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1947) 1952 procedure CompactMemory; 1953 var 1954 size: LongInt; 1955 TempInfo: InfoPtr; 1956 i: integer; -------------------------------------------------------------------------------- 1957 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1958 begin 1959 for i := 1 to nPics do begin 1960 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1961 hunlock(TempInfo^.PicBaseHandle) 1962 end; Extra lines in 1st before 1952 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1963:1967; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1952) 1958 begin 1959 for i := 1 to nPics do begin 1960 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1961 hunlock(TempInfo^.PicBaseHandle) 1962 end; -------------------------------------------------------------------------------- 1963 UserInfo := UserInfoList; 1964 while UserInfo <> nil do begin 1965 doUserWindow(UserInfo, UserInfo^^.UserUnlockHandles); 1966 UserInfo := UserInfo^^.Link; 1967 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1968 size := MaxSize; 1969 size := MaxMem(size); 1970 for i := 1 to nPics do begin 1971 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1972 with TempInfo^ do begin Extra lines in 1st before 1962 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1978:1982; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1962) 1973 hlock(PicBaseHandle); 1974 PicBaseAddr := StripAddress(PicBaseHandle^); 1975 osPort^.PortPixMap^^.BaseAddr := PicBaseAddr; 1976 end; 1977 end; -------------------------------------------------------------------------------- 1978 UserInfo := UserInfoList; 1979 while UserInfo <> nil do begin 1980 doUserWindow(UserInfo, UserInfo^^.UserLockHandles); 1981 UserInfo := UserInfo^^.Link; 1982 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1983 end; 1984 1985 1986 1987 function GetBigHandle (NeededSize: LongInt): handle; Extra lines in 1st before 2026 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 2047:2070; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ2026) 2042 hlock(PicBaseHandle); 2043 GetImageMemory := StripAddress(PicBaseHandle^); 2044 end; 2045 end; 2046 -------------------------------------------------------------------------------- 2047 {This setHandleSize replacement enforces MinFree.} 2048 {Also if the first attempt fails, it calls compactMemory which unlocks images} 2049 {and recovers any fragmented space there.} 2050 {Do not use MemError to check for failure of mySetHandleSize since it could } 2051 {give noErr even when the operation failed.} 2052 function mySetHandleSize (h: Handle; size: LongInt): OSErr; 2053 var 2054 oldSize: integer; 2055 begin 2056 oldSize := getHandleSize(h); 2057 setHandleSize(h, size); 2058 if MemError <> noErr then begin 2059 if FreeMem > 0 then {do not call compactMemory if FreeMem is zero} 2060 compactMemory; {unlock the images and recover fragmented space} 2061 setHandleSize(h, size);{try again} 2062 end; 2063 if (FreeMem < MinFree) and (oldSize < size) then 2064 setHandleSize(h, oldSize); 2065 if getHandleSize(h) <> size then 2066 mySetHandleSize := memFullErr 2067 else 2068 mySetHandleSize := noErr; 2069 end; 2070 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2071 2072 {$PUSH} 2073 {$D-} 2074 2075 procedure UpdateAnalysisMenu; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 3045:3129; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 3000:3001) 3040 pmBackColor(index) 3041 else 3042 RGBBackColor(osGDevice^^.gdPMap^^.pmTable^^.ctTable[index].rgb); 3043 end; 3044 -------------------------------------------------------------------------------- 3045 procedure nilUserWindowProc (userInfo: userInfoHandle); 3046 begin 3047 end; 3048 3049 function NewUserWindow: userInfoHandle; 3050 var 3051 userInfo: UserInfoHandle; 3052 begin 3053 userInfo := UserInfoHandle(NewHandle(sizeof(UserInfoRec))); 3054 NewUserWindow := userInfo; 3055 if userInfo <> nil then begin 3056 MoveHHi(Handle(userInfo)); 3057 HLock(Handle(userInfo)); 3058 with userInfo^^ do begin 3059 Link := UserInfoList; 3060 UserInfoList := userInfo; 3061 {fill in all other fields with default values} 3062 UserWindowPtr := nil; 3063 UserData := nil; {user's data area} 3064 UserUnlockHandles := @nilUserWindowProc; 3065 UserLockHandles := @nilUserWindowProc; 3066 UserDispose := @nilUserWindowProc; 3067 UserActivate := @nilUserWindowProc; 3068 UserUpdate := @nilUserWindowProc; 3069 UserGrow := @nilUserWindowProc; 3070 UserDrag := @nilUserWindowProc; 3071 UserClose := @nilUserWindowProc; 3072 UserZoom := @nilUserWindowProc; 3073 UserMouseDown := @nilUserWindowProc; 3074 UserCursor := @nilUserWindowProc; 3075 UserUndo := @nilUserWindowProc; 3076 UserCut := @nilUserWindowProc; 3077 UserCopy := @nilUserWindowProc; 3078 UserPaste := @nilUserWindowProc; 3079 UserClear := @nilUserWindowProc; 3080 UserCloseWarning := @nilUserWindowProc; 3081 UKind := 0; 3082 end; 3083 end; 3084 end; 3085 3086 procedure InitUserWindow (userInfo: userInfoHandle); 3087 var 3088 SavePort: GrafPtr; 3089 begin 3090 HLock(Handle(userInfo)); 3091 with userInfo^^ do 3092 if UserWindowPtr <> nil then begin 3093 GetPort(SavePort); 3094 SetPort(UserWindowPtr); 3095 SetPalette(UserWindowPtr, ExplicitPalette, false); 3096 pmForeColor(BlackIndex); 3097 pmBackColor(WhiteIndex); 3098 WindowPeek(UserWindowPtr)^.WindowKind := UserKind; 3099 WindowPeek(UserWindowPtr)^.RefCon := Ord4(userInfo); 3100 SetPort(SavePort); 3101 end; 3102 end; 3103 3104 procedure DisposeUserWindow (userInfo: userInfoHandle); 3105 var 3106 prev, next: UserInfoHandle; 3107 begin 3108 doUserWindow(userInfo, userInfo^^.UserDispose); 3109 with userInfo^^ do 3110 if UserWindowPtr <> nil then 3111 DisposeWindow(UserWindowPtr); 3112 next := UserInfoList; 3113 if next = userInfo then 3114 UserInfoList := next^^.Link 3115 else begin 3116 repeat 3117 prev := next; 3118 next := prev^^.Link; 3119 if next = nil then begin 3120 PutMessage('DisposeUserWindow Utilities.p'); 3121 exit(DisposeUserWindow); 3122 end; 3123 until next = userInfo; 3124 prev^^.Link := next^^.Link; 3125 end; 3126 DisposHandle(Handle(userInfo)); 3127 end; 3128 3129 end. 3000 3001 end. *** EOF on both files *** File #1: PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p File #2: PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p Extra lines in 1st before 108 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 108; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ108) 103 procedure DrawBString (str: string); 104 procedure DrawMyGrowIcon (w: WindowPtr); 105 procedure PutMemoryAlert; 106 function GetBigHandle (NeededSize: LongInt): handle; 107 function GetImageMemory (SaveInfo: infoPtr): ptr; -------------------------------------------------------------------------------- 108 function mySetHandleSize (h: Handle; size: LongInt): OSErr; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 109 procedure UpdateAnalysisMenu; 110 procedure ExtendWindowsMenu (fname: str255; size: LongInt; wptr: WindowPtr); 111 procedure MakeNewWindow (name: str255); 112 function long2str (num: LongInt): str255; 113 procedure PutWarning; Extra lines in 1st before 138 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 139:146; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ138) 134 function ScreenDepth: integer; 135 procedure SetFColor (index: integer); 136 procedure SetBColor (index: integer); 137 138 -------------------------------------------------------------------------------- 139 { MOVEA.L (A7)+,A0 ;pop entry address off stack} 140 { JSR (A0) ;execute the procedure pointed to by ProcPtr} 141 procedure doUserWindow (userInfo: userInfoHandle; proc: ProcPtr); 142 inline 143 $205F, $4E90; 144 function NewUserWindow: userInfoHandle; 145 procedure InitUserWindow (userInfo: userInfoHandle); 146 procedure DisposeUserWindow (userInfo: userInfoHandle); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 147 148 implementation 149 150 151 type Extra lines in 1st before 1506 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1515; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1506) 1510 if User1M in measurements then 1511 nListColumns := nListColumns + 1; 1512 if User2M in measurements then 1513 nListColumns := nListColumns + 1; 1514 with info^ do begin -------------------------------------------------------------------------------- 1515 column := 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1516 fwidth := FieldWidth; 1517 if Headings and (FirstCount = 1) then begin 1518 PutFString(' ', 5); Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1519; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 1509) 1516 fwidth := FieldWidth; 1517 if Headings and (FirstCount = 1) then begin 1518 PutFString(' ', 5); -------------------------------------------------------------------------------- 1519 PutTab; 1509 PutTabDelimeter; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1520 if AreaM in measurements then begin 1521 PutFString('Area', fwidth); 1522 PutTabDelimeter; 1523 end; 1524 if MeanM in measurements then begin Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1599; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 1589) 1594 PutReal(sd^[i], fwidth, precision); 1595 PutTabDelimeter; 1596 end; 1597 if (xyLocM in measurements) or (nPoints > 0) then begin 1598 PutReal(xcenter^[i], fwidth, precision); -------------------------------------------------------------------------------- 1599 PutTabDelimeter; 1589 PutTab; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1600 PutReal(ycenter^[i], fwidth, precision); 1601 PutTabDelimeter; 1602 end; 1603 if ModeM in measurements then begin 1604 PutReal(mode^[i], fwidth, precision); Extra lines in 1st before 1947 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1957; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1947) 1952 procedure CompactMemory; 1953 var 1954 size: LongInt; 1955 TempInfo: InfoPtr; 1956 i: integer; -------------------------------------------------------------------------------- 1957 UserInfo: UserInfoHandle; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1958 begin 1959 for i := 1 to nPics do begin 1960 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1961 hunlock(TempInfo^.PicBaseHandle) 1962 end; Extra lines in 1st before 1952 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1963:1967; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1952) 1958 begin 1959 for i := 1 to nPics do begin 1960 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1961 hunlock(TempInfo^.PicBaseHandle) 1962 end; -------------------------------------------------------------------------------- 1963 UserInfo := UserInfoList; 1964 while UserInfo <> nil do begin 1965 doUserWindow(UserInfo, UserInfo^^.UserUnlockHandles); 1966 UserInfo := UserInfo^^.Link; 1967 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1968 size := MaxSize; 1969 size := MaxMem(size); 1970 for i := 1 to nPics do begin 1971 TempInfo := pointer(WindowPeek(PicWindow[i])^.RefCon); 1972 with TempInfo^ do begin Extra lines in 1st before 1962 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 1978:1982; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ1962) 1973 hlock(PicBaseHandle); 1974 PicBaseAddr := StripAddress(PicBaseHandle^); 1975 osPort^.PortPixMap^^.BaseAddr := PicBaseAddr; 1976 end; 1977 end; -------------------------------------------------------------------------------- 1978 UserInfo := UserInfoList; 1979 while UserInfo <> nil do begin 1980 doUserWindow(UserInfo, UserInfo^^.UserLockHandles); 1981 UserInfo := UserInfo^^.Link; 1982 end; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1983 end; 1984 1985 1986 1987 function GetBigHandle (NeededSize: LongInt): handle; Extra lines in 1st before 2026 in 2nd (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 2047:2070; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line Æ2026) 2042 hlock(PicBaseHandle); 2043 GetImageMemory := StripAddress(PicBaseHandle^); 2044 end; 2045 end; 2046 -------------------------------------------------------------------------------- 2047 {This setHandleSize replacement enforces MinFree.} 2048 {Also if the first attempt fails, it calls compactMemory which unlocks images} 2049 {and recovers any fragmented space there.} 2050 {Do not use MemError to check for failure of mySetHandleSize since it could } 2051 {give noErr even when the operation failed.} 2052 function mySetHandleSize (h: Handle; size: LongInt): OSErr; 2053 var 2054 oldSize: integer; 2055 begin 2056 oldSize := getHandleSize(h); 2057 setHandleSize(h, size); 2058 if MemError <> noErr then begin 2059 if FreeMem > 0 then {do not call compactMemory if FreeMem is zero} 2060 compactMemory; {unlock the images and recover fragmented space} 2061 setHandleSize(h, size);{try again} 2062 end; 2063 if (FreeMem < MinFree) and (oldSize < size) then 2064 setHandleSize(h, oldSize); 2065 if getHandleSize(h) <> size then 2066 mySetHandleSize := memFullErr 2067 else 2068 mySetHandleSize := noErr; 2069 end; 2070 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2071 2072 {$PUSH} 2073 {$D-} 2074 2075 procedure UpdateAnalysisMenu; Nonmatching lines (File "PGL6R:Huff6R:NIHI:NIHUMX155b8:Utilities.p"; Line 3045:3129; File "PGL6R:Huff6R:NIHI:M:V1.55Source:Utilities.p"; Line 3000:3001) 3040 pmBackColor(index) 3041 else 3042 RGBBackColor(osGDevice^^.gdPMap^^.pmTable^^.ctTable[index].rgb); 3043 end; 3044 -------------------------------------------------------------------------------- 3045 procedure nilUserWindowProc (userInfo: userInfoHandle); 3046 begin 3047 end; 3048 3049 function NewUserWindow: userInfoHandle; 3050 var 3051 userInfo: UserInfoHandle; 3052 begin 3053 userInfo := UserInfoHandle(NewHandle(sizeof(UserInfoRec))); 3054 NewUserWindow := userInfo; 3055 if userInfo <> nil then begin 3056 MoveHHi(Handle(userInfo)); 3057 HLock(Handle(userInfo)); 3058 with userInfo^^ do begin 3059 Link := UserInfoList; 3060 UserInfoList := userInfo; 3061 {fill in all other fields with default values} 3062 UserWindowPtr := nil; 3063 UserData := nil; {user's data area} 3064 UserUnlockHandles := @nilUserWindowProc; 3065 UserLockHandles := @nilUserWindowProc; 3066 UserDispose := @nilUserWindowProc; 3067 UserActivate := @nilUserWindowProc; 3068 UserUpdate := @nilUserWindowProc; 3069 UserGrow := @nilUserWindowProc; 3070 UserDrag := @nilUserWindowProc; 3071 UserClose := @nilUserWindowProc; 3072 UserZoom := @nilUserWindowProc; 3073 UserMouseDown := @nilUserWindowProc; 3074 UserCursor := @nilUserWindowProc; 3075 UserUndo := @nilUserWindowProc; 3076 UserCut := @nilUserWindowProc; 3077 UserCopy := @nilUserWindowProc; 3078 UserPaste := @nilUserWindowProc; 3079 UserClear := @nilUserWindowProc; 3080 UserCloseWarning := @nilUserWindowProc; 3081 UKind := 0; 3082 end; 3083 end; 3084 end; 3085 3086 procedure InitUserWindow (userInfo: userInfoHandle); 3087 var 3088 SavePort: GrafPtr; 3089 begin 3090 HLock(Handle(userInfo)); 3091 with userInfo^^ do 3092 if UserWindowPtr <> nil then begin 3093 GetPort(SavePort); 3094 SetPort(UserWindowPtr); 3095 SetPalette(UserWindowPtr, ExplicitPalette, false); 3096 pmForeColor(BlackIndex); 3097 pmBackColor(WhiteIndex); 3098 WindowPeek(UserWindowPtr)^.WindowKind := UserKind; 3099 WindowPeek(UserWindowPtr)^.RefCon := Ord4(userInfo); 3100 SetPort(SavePort); 3101 end; 3102 end; 3103 3104 procedure DisposeUserWindow (userInfo: userInfoHandle); 3105 var 3106 prev, next: UserInfoHandle; 3107 begin 3108 doUserWindow(userInfo, userInfo^^.UserDispose); 3109 with userInfo^^ do 3110 if UserWindowPtr <> nil then 3111 DisposeWindow(UserWindowPtr); 3112 next := UserInfoList; 3113 if next = userInfo then 3114 UserInfoList := next^^.Link 3115 else begin 3116 repeat 3117 prev := next; 3118 next := prev^^.Link; 3119 if next = nil then begin 3120 PutMessage('DisposeUserWindow Utilities.p'); 3121 exit(DisposeUserWindow); 3122 end; 3123 until next = userInfo; 3124 prev^^.Link := next^^.Link; 3125 end; 3126 DisposHandle(Handle(userInfo)); 3127 end; 3128 3129 end. 3000 3001 end. *** EOF on both files ***