#ifdef DOS_NT
beg = strcpy (alloca (strlen (beg) + 1), beg);
#endif
- p = beg + XSTRING (filename)->size_byte;
+ p = beg + STRING_BYTES (XSTRING (filename));
while (p != beg && !IS_DIRECTORY_SEP (p[-1])
#ifdef VMS
return call2 (handler, Qfile_name_nondirectory, filename);
beg = XSTRING (filename)->data;
- end = p = beg + XSTRING (filename)->size_byte;
+ end = p = beg + STRING_BYTES (XSTRING (filename));
while (p != beg && !IS_DIRECTORY_SEP (p[-1])
#ifdef VMS
if (!NILP (handler))
return call2 (handler, Qfile_name_as_directory, file);
- buf = (char *) alloca (XSTRING (file)->size_byte + 10);
+ buf = (char *) alloca (STRING_BYTES (XSTRING (file)) + 10);
return build_string (file_name_as_directory (buf, XSTRING (file)->data));
}
\f
/* 20 extra chars is insufficient for VMS, since we might perform a
logical name translation. an equivalence string can be up to 255
chars long, so grab that much extra space... - sss */
- buf = (char *) alloca (XSTRING (directory)->size_byte + 20 + 255);
+ buf = (char *) alloca (STRING_BYTES (XSTRING (directory)) + 20 + 255);
#else
- buf = (char *) alloca (XSTRING (directory)->size_byte + 20);
+ buf = (char *) alloca (STRING_BYTES (XSTRING (directory)) + 20);
#endif
directory_file_name (XSTRING (directory)->data, buf);
return build_string (buf);
CORRECT_DIR_SEPS (nm);
substituted = (strcmp (nm, XSTRING (filename)->data) != 0);
#endif
- endp = nm + XSTRING (filename)->size_byte;
+ endp = nm + STRING_BYTES (XSTRING (filename));
/* If /~ or // appears, discard everything through first slash. */
/* If substitution required, recopy the string and do it */
/* Make space in stack frame for the new copy */
- xnm = (unsigned char *) alloca (XSTRING (filename)->size_byte + total + 1);
+ xnm = (unsigned char *) alloca (STRING_BYTES (XSTRING (filename)) + total + 1);
x = xnm;
/* Copy the rest of the name through, replacing $ constructs with values */
absname = Fexpand_file_name (filename, defdir);
#ifdef VMS
{
- register int c = XSTRING (absname)->data[XSTRING (absname)->size_byte - 1];
+ register int c = XSTRING (absname)->data[STRING_BYTES (XSTRING (absname)) - 1];
if (c == ':' || c == ']' || c == '>')
absname = Fdirectory_file_name (absname);
}
/* Remove final slash, if any (unless this is the root dir).
stat behaves differently depending! */
if (XSTRING (absname)->size > 1
- && IS_DIRECTORY_SEP (XSTRING (absname)->data[XSTRING (absname)->size_byte - 1])
- && !IS_DEVICE_SEP (XSTRING (absname)->data[XSTRING (absname)->size_byte-2]))
+ && IS_DIRECTORY_SEP (XSTRING (absname)->data[STRING_BYTES (XSTRING (absname)) - 1])
+ && !IS_DEVICE_SEP (XSTRING (absname)->data[STRING_BYTES (XSTRING (absname))-2]))
/* We cannot take shortcuts; they might be wrong for magic file names. */
absname = Fdirectory_file_name (absname);
#endif
if (STRINGP (start))
{
failure = 0 > a_write (desc, XSTRING (start)->data,
- XSTRING (start)->size_byte, 0, &annotations,
+ STRING_BYTES (XSTRING (start)), 0, &annotations,
&coding);
save_errno = errno;
}
tem = Fcdr (Fcar (*annot));
if (STRINGP (tem))
{
- if (0 > e_write (desc, XSTRING (tem)->data, XSTRING (tem)->size_byte,
+ if (0 > e_write (desc, XSTRING (tem)->data, STRING_BYTES (XSTRING (tem)),
coding))
return -1;
}
if (!NILP (b->filename))
{
fwrite (XSTRING (b->filename)->data, 1,
- XSTRING (b->filename)->size_byte, stream);
+ STRING_BYTES (XSTRING (b->filename)), stream);
}
putc ('\n', stream);
fwrite (XSTRING (b->auto_save_file_name)->data, 1,
- XSTRING (b->auto_save_file_name)->size_byte, stream);
+ STRING_BYTES (XSTRING (b->auto_save_file_name)), stream);
putc ('\n', stream);
}
register int n;
int osize, count;
- osize = XSTRING (val)->size_byte;
+ osize = STRING_BYTES (XSTRING (val));
/* Count the number of $ characters. */
for (n = osize, count = 0, old = XSTRING (val)->data; n > 0; n--)
&& IS_DIRECTORY_SEP (XSTRING (dir)->data[strlen (homedir)]))
{
dir = make_string (XSTRING (dir)->data + strlen (homedir) - 1,
- XSTRING (dir)->size_byte - strlen (homedir) + 1);
+ STRING_BYTES (XSTRING (dir)) - strlen (homedir) + 1);
XSTRING (dir)->data[0] = '~';
}