summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Closefile.sci
blob: f2928103b4708b0dd5d76e1d70cade1dd5bd9224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
// 13.05.19  openfile error tackled
// 13.11.01  Endpicture joined optionally
// 13.11.05  debugged

function Closefile(varargin)
  global Wfile FID;
  if length(varargin)>=1 then
    Pa=varargin(1);
    if type(Pa)==10 then
      if Pa=="1" then  // 2013.11.05
        Endpicture(1)
      end;
      if Pa=="0" then
        Endpicture(0)
      end  //
    end
  end
  if Wfile~='default' then
    mclose(FID);
    FID=[]; // 2013.05.19
  end
  Wfile='default';
endfunction