diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/lib/cfuns-c.c | 6 | 
2 files changed, 7 insertions, 3 deletions
| diff --git a/src/ChangeLog b/src/ChangeLog index 81f8396a..8c8b3746 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@  2008-05-21  Gabriel Dos Reis  <gdr@cs.tamu.edu> +	* lib/cfuns-c.c (oa_getenv): Fix thinko. +	(oa_getcwd): Likewise. +	* lib/cfuns-c.c (oa_access_file_for_read): Likewise. +  	* hyper/lex.c: Don't include hyper.h, hterror.h and  	sockio.h. Include node.h.  	* hyper/hyper.h: Don't include X11 headers.  Include node.h. diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index bc6e10bd..2620be00 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -454,7 +454,7 @@ oa_getenv(const char* var)        return NULL;     }     else if (len > BUFSIZE) { -      buf = (char*) realloc(len); +     buf = (char*) realloc(buf,len);        len = GetEnvironmentVariable(var, buf, len);        if (len == 0) {           free(buf); @@ -474,7 +474,7 @@ oa_getcwd(void)     int bufsz = 256;     char* buf = (char*) malloc(bufsz);  #ifdef __MINGW32__ -   int n = GetCurrentDirectory(bufsz, bufsz); +   int n = GetCurrentDirectory(bufsz, buf);     if (n == 0) {        perror("oa_getcwd");        exit(-1); @@ -508,7 +508,7 @@ OPENAXIOM_EXPORT int  oa_access_file_for_read(const char* path)  {  #ifdef __MINGW32__ -   GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES ? -1 : 1; +  return GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES ? -1 : 1;  #else     return access(path, R_OK);  #endif    | 
