/[gcl]/gcl/o/mingfile.c
ViewVC logotype

Diff of /gcl/o/mingfile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mjthomas, Wed Jul 31 07:16:44 2002 UTC revision 1.4 by mjthomas, Wed Aug 7 00:26:46 2002 UTC
# Line 52  void Ldirectory ( void ) Line 52  void Ldirectory ( void )
52    
53          }          }
54  }  }
 #if 0  
 int  
 rename(const char *file, const char *tofile)  
 {  return MoveFile(file,tofile);  
 }  
   
 int setenv(const char *variable,const char *value,int force)  
 {  
   char buf [3];  
     
   if (force || GetEnvironmentVariable(variable,buf,sizeof(buf)-1)==0)  
     /* return value is the opposite to setenv */  
     return (!SetEnvironmentVariable(variable,value));  
   
 }  
   
   
 /* callers of this mingw version should know to  
    free the result */  
   
 char *  
 getenv(const char *variable)  
 {  
   char buf [2];  
   int n ;  
   char *res;  
   n=GetEnvironmentVariable(variable,buf,sizeof(buf)-1);  
   if (n == 0) return NULL;  
   res = malloc(n);  
   GetEnvironmentVariable(variable,res,n);  
   return res;  
 }  
 #endif  
55    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26