scicurdir.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int C2F() scichdir (char *path, int *err)
int C2F() scigetcwd (char **path, int *lpath, int *err)


Function Documentation

int C2F() scichdir ( char *  path,
int err 
)

Definition at line 17 of file scicurdir.c.

References cur_dir, err, NULL, path, and sciprint().

00018 {
00019         *err=0;
00020         if (path == (char*) NULL) 
00021         {
00022                 *cur_dir = '\0';
00023                 return (0);
00024         }
00025 #ifndef _MSC_VER
00026         if (chdir(path) == -1) 
00027         {
00028                 sciprint("Can't go to directory %s \r\n", path); 
00029             *err=1;
00030         } 
00031 #else
00032         if (SetCurrentDirectory(path) == 0)
00033         {
00034                 sciprint("Can't go to directory %s \r\n", path); 
00035                 *err=1;
00036         }
00037 #endif
00038         return 0;
00039 }

Here is the call graph for this function:

int C2F() scigetcwd ( char **  path,
int lpath,
int err 
)

Definition at line 41 of file scicurdir.c.

References cur_dir, err, FSIZE, GETCWD, path, and sciprint().

00042 {
00043 #ifndef _MSC_VER
00044         if (GETCWD(cur_dir, FSIZE) == (char*) 0)
00045 #else
00046         if ( GetCurrentDirectory(FSIZE,cur_dir) == 0 )
00047 #endif
00048         {
00049                 /* get current working dir */
00050                 sciprint("Can't get current directory\r\n");
00051                 *cur_dir = '\0';
00052                 *lpath=0;
00053                 *err=1;
00054         }
00055     else 
00056         {
00057                 *path= cur_dir;
00058                 *lpath=strlen(cur_dir);
00059                 *err=0;
00060         }
00061     return 0;
00062 }

Here is the call graph for this function:


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