File: sci_view.c

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (34 lines) | stat: -rw-r--r-- 914 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA -
 * 
 * This file is released into the public domain
 */

#include "displ.h"
#include "stack-c.h"

int sci_view(char *fname) 
{
  static int l1, m1, n1, l2, m2, n2, m3, n3, l3;
  static int minlhs=1, maxlhs=3, minrhs=3, maxrhs=3;

  /* Check number of inputs (rhs=3) and outputs (lhs=3) */
  CheckRhs(minrhs,maxrhs) ;
  CheckLhs(minlhs,maxlhs) ;

  /* Get X (1 ,double), Y (2, int) and  C (3, string) */
  GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1);
  GetRhsVar(2,MATRIX_OF_INTEGER_DATATYPE, &m2, &n2, &l2);
  GetRhsVar(3,STRING_DATATYPE, &m3, &n3, &l3);

  /* Call display function
     stk(l1)->X (double), istk(l2)->Y (int), cstk(l3)->Z  (char)    */
  displ(stk(l1), m1, n1, istk(l2), m2, n2, cstk(l3), m3, n3);

  /*  Return variables  */
  LhsVar(1) = 1;
  LhsVar(2) = 2;
  LhsVar(3) = 3;
  return 0;
}