File: inffic.c

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (40 lines) | stat: -rw-r--r-- 1,093 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
35
36
37
38
39
40
/* Copyright INRIA */
#if defined(THINK_C)||defined(__MWERKS__)
#include "::graphics:Math.h"
#else
#include "../graphics/Math.h"
#endif

#define MAXDATA 5 

static char *dataStrings[] = {
  "$MANCHAPTERS",
  "exec('SCI/scilab.star',-1);",         /* start_up instructions file   */
  "exec('SCI/demos/alldems.dem');",	 /* demos instructions file      */
  "home/scilab.hist",			 /* history file                */
  "home/scilab.save",			 /* on crash save file          */
  "exec('SCI/scilab.quit',-1);quit;"	 /* exit instructions file      */
};

/******************************************
 * get string associated with iopt 
 ******************************************/

void C2F(inffic)(iopt,name,nc)
     integer *iopt,*nc;
     char *name;
{
  *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
  strcpy(name,dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
}

/******************************************
 * just get string length 
 ******************************************/

void C2F(infficl)(iopt,nc)
     integer *iopt,*nc;
{
  *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
}