/[emacs]/emacs/src/alloc.c
ViewVC logotype

Diff of /emacs/src/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.293 by monnier, Sat Feb 22 22:15:31 2003 UTC revision 1.294 by handa, Wed Mar 19 12:24:43 2003 UTC
# Line 1819  make_string_from_bytes (contents, nchars Line 1819  make_string_from_bytes (contents, nchars
1819    
1820  /* Make a string from NCHARS characters occupying NBYTES bytes at  /* Make a string from NCHARS characters occupying NBYTES bytes at
1821     CONTENTS.  The argument MULTIBYTE controls whether to label the     CONTENTS.  The argument MULTIBYTE controls whether to label the
1822     string as multibyte.  */     string as multibyte.  If NCHARS is negative, it counts the number of
1823       characters by itself.  */
1824    
1825  Lisp_Object  Lisp_Object
1826  make_specified_string (contents, nchars, nbytes, multibyte)  make_specified_string (contents, nchars, nbytes, multibyte)
# Line 1828  make_specified_string (contents, nchars, Line 1829  make_specified_string (contents, nchars,
1829       int multibyte;       int multibyte;
1830  {  {
1831    register Lisp_Object val;    register Lisp_Object val;
1832    
1833      if (nchars < 0)
1834        {
1835          if (multibyte)
1836            nchars = multibyte_chars_in_text (contents, nbytes);
1837          else
1838            nchars = nbytes;
1839        }
1840    val = make_uninit_multibyte_string (nchars, nbytes);    val = make_uninit_multibyte_string (nchars, nbytes);
1841    bcopy (contents, SDATA (val), nbytes);    bcopy (contents, SDATA (val), nbytes);
1842    if (!multibyte)    if (!multibyte)

Legend:
Removed from v.1.293  
changed lines
  Added in v.1.294

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26