~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to routines/sun/inffic.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright INRIA/ENPC */
 
2
#include <string.h>
 
3
 
 
4
#if defined(THINK_C)||defined(__MWERKS__)
 
5
#include "::graphics:Math.h"
 
6
#else
 
7
#include "../graphics/Math.h"
 
8
#endif
 
9
 
 
10
#define MAXDATA 5 
 
11
 
 
12
static char *dataStrings[] = {
 
13
  "$MANCHAPTERS",
 
14
  "exec('SCI/scilab.star',-1);",         /* start_up instructions file   */
 
15
  "exec('SCI/demos/alldems.dem');",      /* demos instructions file      */
 
16
  "home/scilab.hist",                    /* history file                */
 
17
  "home/scilab.save",                    /* on crash save file          */
 
18
  "exec('SCI/scilab.quit',-1);quit;"     /* exit instructions file      */
 
19
};
 
20
 
 
21
/******************************************
 
22
 * get string associated with iopt 
 
23
 ******************************************/
 
24
 
 
25
void C2F(inffic)(iopt,name,nc)
 
26
     integer *iopt,*nc;
 
27
     char *name;
 
28
{
 
29
  *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
 
30
  strcpy(name,dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
 
31
}
 
32
 
 
33
/******************************************
 
34
 * just get string length 
 
35
 ******************************************/
 
36
 
 
37
void C2F(infficl)(iopt,nc)
 
38
     integer *iopt,*nc;
 
39
{
 
40
  *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
 
41
}
 
42