inffic.c

Go to the documentation of this file.
00001 /* Copyright INRIA/ENPC */
00002 #include <string.h>
00003 #include "machine.h"
00004 #include "core_math.h"
00005 #include "inffic.h"
00006 
00007 #define MAXDATA 5 
00008 
00009 static char *dataStrings[] = {
00010   "$MANCHAPTERS",
00011   "exec('SCI/etc/scilab.start',-1);",         /* start_up instructions file   */
00012   "scilab_demos();",     /* demos instructions file      */
00013 #ifdef _MSC_VER
00014   "home/history.scilab",                 /* history file                */
00015 #else 
00016   "home/.history.scilab",                /* history file                */
00017 #endif
00018   "home/scilab.save",                    /* on crash save file          */
00019   "exec('SCI/etc/scilab.quit',-1);quit;"         /* exit instructions file      */
00020 };
00021 
00022 /******************************************
00023  * get string associated with iopt 
00024  ******************************************/
00025 
00026 void C2F(inffic)(integer *iopt, char *name, integer *nc)
00027 {
00028   *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
00029   strcpy(name,dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
00030 }
00031 
00032 /******************************************
00033  * just get string length 
00034  ******************************************/
00035 
00036 void C2F(infficl)(integer *iopt, integer *nc)
00037 {
00038   *nc=strlen(dataStrings[Max(Min(*iopt-1,MAXDATA),0)]);
00039 }
00040 
00041 
00042 /******************************************
00043  *  get string .....
00044  ******************************************/
00045 
00046 char *get_sci_data_strings(int n)
00047 {
00048   return dataStrings[Max(Min(n,MAXDATA),0)];
00049 }
00050 
00051 

Generated on Sun Mar 4 15:03:46 2007 for Scilab [trunk] by  doxygen 1.5.1