1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution. The terms
7 // are also available at
8 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 function xinit(fileName)
11 // set name of the file to export
13 global %exportFileName;
18 if (%driverName == "Rec" | %driverName == "X11" | %driverName == "" | %driverName == []) then
19 // screen display, should be xinit without argument
21 error(msprintf(gettext("%s: Wrong number of input arguments: Function has no input argument with ''Rec'' or ''X11'' drivers.\n"), "xinit"));
27 error(msprintf(gettext("%s: Wrong number of input arguments: A string expected with ''GIF'', ''PPM'', ''POS'' or ''Fig'' drivers.\n"), "xinit"));
30 if (type(fileName) <> 10) then
31 // wrong type for driverName
32 error(msprintf(gettext("%s: Wrong type for input arguments #%d: A string expected with ''GIF'', ''PPM'', ''POS'' or ''Fig'' drivers.\n"), "xinit",1));
36 %exportFileName = fileName;