// Copyright (C) 2019 - IIT Bombay - FOSSEE // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // Author: Rupak Rokade // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in #include #include #include "wchar.h" #include #include extern "C" { #include #include #include #include "localization.h" #include "fun.h" #include #include #include #include "os_string.h" #include static const char fname[] = "octave_fun"; int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* opt, int nout, scilabVar* out) { //printf("nin: %d\n", nin); if (nin < 2) { Scierror(999, _("%s: Wrong number of input arguments. Atleast %d expected.\n"), fname, 2); return STATUS_ERROR; } FUNCCALL funcall; FUNCCALL *funptr = &funcall; funcall.n_in_arguments = nin; funcall.n_out_user = nout; FUNCARGS ins[funcall.n_in_arguments*nout]; FUNCARGS *argptr = ins; int i,j; double* d; double* rd = NULL;; double* cd = NULL;; int size; char str[20]; char* c; double* n = NULL; int row = 0; int col = 0; double* in_real; double* in_img; for(i=0;i