-char *asciiz(virt) /* Get ASCIIZ string from arrayof char */
-virtaddr *virt;
-{
- word am;
- int len, i;
- char *cp;
-
- if (member(virt, &am))
- {
- len = M[ am ]-3; /* length of the string */
- cp = ballocate(len+1); /* allocate buffer for the string */
- if (cp == NULL) errsignal(RTEMEMOV);
- for (i = 0; i < len; i++) cp[ i ] = (char) M[ am+3+i ];
- cp[ len ] = '\0'; /* terminate string with 0 byte */
- return (cp);
- }
- else errsignal(RTEREFTN); /* reference to none */
-} /* end asciiz */
-
-
-void addext(fname, ext) /* Add extension to a file name */
-char *fname, *ext;