{Copyright Equipoise Imaging, LLC, 2002. All rights reserved.} macro '#include> [F12]'; var int1, int2, recipLines, prefsSize, fileSize, srcLines: integer; prefsFile, prefsPath, prefsFP, prefsType: string; srcFName, outFName, str1, str2, str3, fileType, incName, incPath, incFP: string; stopFlag, found: boolean; begin SetDelimiter('>'); prefsPath := GetPath('pref'); prefsFile := 'EqPi_prefs'; prefsFP := concat(prefsPath, prefsFile); prefsType := 'TEXT'; GetFileInfo(prefsFP, prefsType, prefsSize); Open(prefsFP); for int1 := 1 to nStrings do begin str1 := FetchString(int1); str2 := Substring(str1,1,1); if ( str2 ='#') then begin incPath := GetToken(str1, 2); end; end; Dispose; srcFName := WindowTitle; outFName := concat(srcFName, '.incl'); NewTextWindow(outFName); int1 := 1; repeat SelectWindow(srcFName); str1 := FetchString(int1); str2 := Substring(str1,2,1); SelectWindow(outFName); if ( str2 <>'#') then WriteLn(str1); SelectWindow(srcFName); if ( str2 ='#') then begin incName := GetToken(str1, 2); incName := Substring(incName, 1, length(incName) - 1); fileType := 'TEXT'; incFP := concat(incPath, incName); GetFileInfo(incFP, fileType, fileSize); Open(incFP); srcLines := nStrings; SelectWindow(outFName); for int2 := 1 to srcLines do begin SelectWindow(incName); str3 := FetchString(int2); SelectWindow(outFName); WriteLn(str3); end; WriteLn(''); SelectWindow(incName); Dispose; SelectWindow(srcFName); recipLines := nStrings; SetDelimiter('>'); end; int1 := int1 + 1; until (str2 ='!'); end;