diff options
Diffstat (limited to 'vmsify.c')
-rw-r--r-- | vmsify.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -22,6 +22,8 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> #include <ctype.h> +#include "makeint.h" + #if VMS #include <unixlib.h> #include <stdlib.h> @@ -137,9 +139,7 @@ trnlog (const char *name) } reslt[resltlen] = '\0'; - s = malloc (resltlen+1); - if (s == 0) - return ""; + s = xmalloc (resltlen+1); strcpy (s, reslt); return s; } @@ -221,10 +221,11 @@ vmsify (const char *name, int type) max 39 filetype max 5 version */ -#define MAXPATHLEN 512 +/* todo: VMSMAXPATHLEN is defined for ODS2 names: it needs to be adjusted. */ +#define VMSMAXPATHLEN 512 enum namestate nstate; - static char vmsname[MAXPATHLEN+1]; + static char vmsname[VMSMAXPATHLEN+1]; const char *fptr; const char *t; char *vptr; @@ -402,9 +403,9 @@ vmsify (const char *name, int type) fptr++; if (*fptr == 0) /* just // */ { - char cwdbuf[MAXPATHLEN+1]; + char cwdbuf[VMSMAXPATHLEN+1]; - s1 = getcwd(cwdbuf, MAXPATHLEN); + s1 = getcwd(cwdbuf, VMSMAXPATHLEN); if (s1 == 0) { vmsname[0] = '\0'; @@ -796,9 +797,9 @@ vmsify (const char *name, int type) } { /* got '..' or '../' */ char *vp; - char cwdbuf[MAXPATHLEN+1]; + char cwdbuf[VMSMAXPATHLEN+1]; - vp = getcwd(cwdbuf, MAXPATHLEN); + vp = getcwd(cwdbuf, VMSMAXPATHLEN); if (vp == 0) { vmsname[0] = '\0'; @@ -856,9 +857,9 @@ vmsify (const char *name, int type) { char *vp; - char cwdbuf[MAXPATHLEN+1]; + char cwdbuf[VMSMAXPATHLEN+1]; - vp = getcwd(cwdbuf, MAXPATHLEN); + vp = getcwd(cwdbuf, VMSMAXPATHLEN); if (vp == 0) { vmsname[0] = '\0'; |