~ubuntu-branches/ubuntu/trusty/scilab/trusty

« back to all changes in this revision

Viewing changes to modules/external_objects/sci_gateway/cpp/sci_percent_EObj_1_foo.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-02 11:02:49 UTC
  • mfrom: (1.4.6)
  • Revision ID: package-import@ubuntu.com-20120802110249-0v5953emkp25geuz
Tags: 5.4.0-beta-2-1~exp1
* New upstream release
* Remove libscilab-java (remove upstream). Use libscilab2-java instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 
3
 * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
 
4
 *
 
5
 * This file must be used under the terms of the CeCILL.
 
6
 * This source file is licensed as described in the file COPYING, which
 
7
 * you should have received as part of this distribution.  The terms
 
8
 * are also available at
 
9
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
10
 *
 
11
 */
 
12
 
 
13
#include "ScilabGateway.hxx"
 
14
 
 
15
extern "C" {
 
16
#include "Scierror.h"
 
17
#include "gw_external_objects.h"
 
18
}
 
19
 
 
20
using namespace org_modules_external_objects;
 
21
 
 
22
int sci_percent_EObj_1_foo(char * fname, unsigned long fname_len)
 
23
{
 
24
    try
 
25
    {
 
26
        return ScilabGateway::operation(fname, 0, Lt, pvApiCtx);
 
27
    }
 
28
    catch (std::exception & e)
 
29
    {
 
30
        Scierror(999, "%s: An error occured: %s", fname, e.what());
 
31
        return 0;
 
32
    }
 
33
}