19
19
#include "Scierror.h"
20
20
#include "localization.h"
21
21
/*--------------------------------------------------------------------------*/
22
int sci_system_setproperty(char *fname,unsigned long fname_len)
22
int sci_system_setproperty(char *fname, unsigned long fname_len)
28
if ( (GetType(1) == sci_strings) && (GetType(2) == sci_strings) )
30
static int m1,n1=0,l1=0;
31
static int m2,n2=0,l2=0;
32
char *propertyName = NULL;
33
char *propertyValue = NULL;
34
char *previousValue = NULL;
36
GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
37
propertyName = cstk(l1);
39
GetRhsVar(2,STRING_DATATYPE,&m2,&n2,&l2);
40
propertyValue = cstk(l2);
42
previousValue = system_setproperty(propertyName,propertyValue);
47
CreateVarFromPtr(Rhs+1,STRING_DATATYPE,(m1=(int)strlen(propertyValue), &m1),&n1,&previousValue);
54
CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&n1,&m1,&l1);
57
if (previousValue) {FREE(previousValue); previousValue = NULL;}
28
if ( (GetType(1) == sci_strings) && (GetType(2) == sci_strings) )
30
static int m1, n1 = 0, l1 = 0;
31
static int m2, n2 = 0, l2 = 0;
32
char *propertyName = NULL;
33
char *propertyValue = NULL;
34
char *previousValue = NULL;
36
GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
37
propertyName = cstk(l1);
39
GetRhsVar(2, STRING_DATATYPE, &m2, &n2, &l2);
40
propertyValue = cstk(l2);
42
previousValue = system_setproperty(propertyName, propertyValue);
47
m1 = (int)strlen(propertyValue);
48
CreateVarFromPtr(Rhs + 1, STRING_DATATYPE, &m1, &n1, &previousValue);
55
CreateVar(Rhs + 1, MATRIX_OF_DOUBLE_DATATYPE, &n1, &m1, &l1);
62
Scierror(999,_("%s: Wrong type for input argument #%d or #%d: String expected.\n"),fname, 1, 2);
67
Scierror(999, _("%s: Wrong type for input argument #%d or #%d: String expected.\n"), fname, 1, 2);
66
71
/*--------------------------------------------------------------------------*/