Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 1116:3bcd77d0bf93
[xemacs-hg @ 2002-11-22 12:57:09 by ben]
file-truename and other crash
fileio.c: Fix crashes due to incorrectly ported code from
FSF.
realpath.c: Don't return EIO when a filename is incorrect,
since the I/O error gets passed all the way up. Clean up this
file and avoid using macros as a poor-man's dispatch mechanism --
it just makes it impossible to follow the code.
author | ben |
---|---|
date | Fri, 22 Nov 2002 12:57:11 +0000 |
parents | 184461bc8de4 |
children | 37bdd24225ef |
comparison
equal
deleted
inserted
replaced
1115:cb1d0fc87e10 | 1116:3bcd77d0bf93 |
---|---|
372 Ibyte *res; | 372 Ibyte *res; |
373 Ibyte *wd = mswindows_getdcwd (toupper (*beg) - 'A' + 1); | 373 Ibyte *wd = mswindows_getdcwd (toupper (*beg) - 'A' + 1); |
374 | 374 |
375 res = alloca_array (Ibyte, | 375 res = alloca_array (Ibyte, |
376 (wd ? qxestrlen (wd) : 0) + 10); /* go overboard */ | 376 (wd ? qxestrlen (wd) : 0) + 10); /* go overboard */ |
377 res[0] = '\0'; | |
377 if (p == beg + 4 && IS_DIRECTORY_SEP (*beg) && beg[1] == ':') | 378 if (p == beg + 4 && IS_DIRECTORY_SEP (*beg) && beg[1] == ':') |
378 { | 379 { |
379 qxestrncpy (res, beg, 2); | 380 qxestrncpy (res, beg, 2); |
380 beg += 2; | 381 beg += 2; |
382 res[2] = '\0'; | |
381 } | 383 } |
382 | 384 |
383 if (wd) | 385 if (wd) |
384 { | 386 { |
385 qxestrcat (res, wd); | 387 qxestrcat (res, wd); |