1. 26 Jun, 2012 4 commits
    • Dmitry Antipov's avatar
      * src/alloc.c: Remove build_string. · 1130ecfc
      Dmitry Antipov authored
      * src/lisp.h: Define build_string as static inline.  This provides
      a better opportunity to optimize away calls to strlen when the
      function is called with compile-time constant argument.
      * src/image.c (imagemagick_error): Convert to build_string.
      * src/w32proc.c (sys_spawnve): Likewise.
      * src/xterm.c (x_term_init): Likewise.
      * admin/coccinelle/build_string.cocci: Semantic patch
      to convert from make_string to build_string.
    • Paul Eggert's avatar
      Use sprintf return value instead of invoking strlen on result. · 99027bdd
      Paul Eggert authored
      In the old days this wasn't portable, since some sprintf
      implementations returned char *.  But they died out years ago and
      Emacs already assumes sprintf returns int.
      Similarly for float_to_string.
      This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
      * ccl.c (ccl_driver):
      * character.c (string_escape_byte8):
      * data.c (Fnumber_to_string):
      * doprnt.c (doprnt):
      * print.c (print_object):
      * xdisp.c (message_dolog):
      * xfns.c (syms_of_xfns):
      Use sprintf or float_to_string result to avoid need to call strlen.
      * data.c (Fnumber_to_string):
      Use make_unibyte_string, since the string must be ASCII.
      * lisp.h, print.c (float_to_string): Now returns int length.
      * term.c (produce_glyphless_glyph):
      Use sprintf result rather than recomputing it.
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * Makefile.in (ALL_CFLAGS): Add -I../lib -I${srcdir}/../lib. · 414e642c
      Paul Eggert authored
      This is needed for hosts that lack <alloca.h>, when Emacs is
      configured --with-x-toolkit=no.  Problem reported by Herbert
      J. Skuhra for FreeBSD.
  2. 25 Jun, 2012 10 commits
  3. 24 Jun, 2012 15 commits
  4. 23 Jun, 2012 11 commits