/////////////////////////////////////////
// Obsolete versions of StdLib functions.
/////////////////////////////////////////

////////////////////
// Changed 20251212:
////////////////////
 {
 Find comma separated window list where curve is inside.
 }
 function WinListByCurve(crv:Integer; comma:Char):String;
 var list,win:String; n,m,i,j,t,c:Integer;
 begin
  list:=''; win:='';
  if not IsEmptyStr(CrvName(crv)) then for m:=1 to 2 do begin
   n:=0;
   repeat
    c:=0;
    win:=ParamStr(ExtractWord(m,'CURWINNAME,TABWINNAME')+' '+Str(n)); n:=n+1;
    if not IsEmptyStr(win) then begin
     t:=ReadIniSection(Text_New,16+8+4+1,'', StrAddBrackets(win,'[',']'));
     for i:=0 to Text_NumLn(t)-1 do
     if IsSameText(ExtractWord(1,Text_GetLn(t,i)),'CurveList') then
     for j:=2 to WordCount(Text_GetLn(t,i)) do
     if IsSameText(ExtractWord(j,Text_GetLn(t,i)),CrvName(crv)) then c:=c+1;
     bNul(Text_Free(t));
     if c>0 then
     if IsEmptyStr(list) then list:=win else list:=list+comma+Trim(win);
    end;
   until IsEmptyStr(win);
  end;
  WinListByCurve:=list;
  list:=''; win:='';
 end;
 {
 Select windows where curve crv is inside. Also select curve selcrv.
 }
 function WinSelectByCurve(crv:Integer; selcrv:Integer):Integer;
 var list:String; i,n:Integer; comma:Char;
 begin
  n:=0;
  list:='';
  comma:=',';
  list:=WinListByCurve(crv,comma);
  for i:=1 to WordCountDelims(list,Dump(comma)) do begin
   bNul(WinSelect(ExtractWordDelims(i,list,Dump(comma))));
   if selcrv<>0 then bNul(WinDraw(ExtractWordDelims(i,list,Dump(comma))+'|SelectCurve='+CrvName(selcrv)));
   n:=n+1;
  end;
  WinSelectByCurve:=n;
  list:='';
 end;

//////////////
// END OF FILE
//////////////
