"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sh.misc.c" between
tcsh-6.22.02.tar.gz and tcsh-6.22.03.tar.gz

About: Tcsh is a version of the Berkeley C-Shell, with the addition of: A command line editor, command and file name completion, listing, ...

sh.misc.c  (tcsh-6.22.02):sh.misc.c  (tcsh-6.22.03)
skipping to change at line 533 skipping to change at line 533
return (0); return (0);
} }
} }
#ifndef WINNT_NATIVE #ifndef WINNT_NATIVE
char * char *
areadlink(const char *path) areadlink(const char *path)
{ {
char *buf; char *buf;
size_t size; size_t size;
ssize_t res; ssize_t res;
#ifdef __IBMC__
/*
* Prevent infinite recursion. Someone should tell me how to expand
* these...
*/
size_t i;
static const char *vars[] = {
"/$VERSION",
"/$SYSNAME",
"/$SYSSYMR",
"/$SYSSYMA",
};
for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
if (strcmp(vars[i], path) == 0) {
return NULL;
}
}
#endif
size = MAXPATHLEN + 1; size = MAXPATHLEN + 1;
buf = xmalloc(size); buf = xmalloc(size);
while ((size_t)(res = readlink(path, buf, size)) == size) { while ((size_t)(res = readlink(path, buf, size)) == size) {
size *= 2; size *= 2;
buf = xrealloc(buf, size); buf = xrealloc(buf, size);
} }
if (res == -1) { if (res == -1) {
int err; int err;
 End of changes. 1 change blocks. 
0 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)