Partially sync files.el from XEmacs 21.5 for wildcard support.
[sxemacs] / src / extents.c
index 58a1284..85c1212 100644 (file)
@@ -3140,12 +3140,12 @@ print_extent_1(Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
                *bp++ = '*';
        *bp++ = (extent_start_open_p(anc) ? '(' : '[');
        if (extent_detached_p(ext))
-               strncpy(bp, "detached", sizeof(buf)-1);
+               xstrncpy(bp, "detached", sizeof(buf)-6);
        else {
-               sz=snprintf(bp, sizeof(buf)-2, "%ld, %ld",
+               sz=snprintf(bp, sizeof(buf)-6, "%ld, %ld",
                            XINT(Fextent_start_position(obj)),
                            XINT(Fextent_end_position(obj)));
-               assert(sz>=0 && (size_t)sz<(sizeof(buf)-2));
+               assert(sz>=0 && (size_t)sz<(sizeof(buf)-6));
        }
        bp += strlen(bp);
        *bp++ = (extent_end_open_p(anc) ? ')' : ']');