Loading ...
Sorry, an error occurred while loading the content.

Re: libcall()

Expand Messages
  • Stephen P. Wall
    ... Made a patch myself, but took a slightly different approach. In eval.c, I only added UNIX to the #ifdef WIN32, then made the functional change by adding a
    Message 1 of 38 , Feb 24, 2000
    • 0 Attachment
      > From: Neil Bird <neil.bird@...>
      > To: Vim mailing list <vim@...>
      >
      > I'm attaching a patch for src/eval.c that should add this to a UNIX
      > implementation. I've done it on Solaris 2.5.1 but from what I can tell
      > Linux (ast least) has the same calls, and it looks as if it may be a
      > 'standard' UNIX thing.
      >

      Made a patch myself, but took a slightly different approach. In eval.c,
      I only added UNIX to the #ifdef WIN32, then made the functional change
      by adding a mch_libcall to os_unix.c. I'll incorporate the other changes
      that were posted, and post the new version...


      Ok, done.

      Here's the patch. Includes config patch posted by Johannes Zellner
      and eval.txt patch posted by Neil Bird.

      Anyone care to tackle signal trapping?

      --
      ______________________________________________________________________
      ________ ______
      Stephen P. Wall Redcom Laboratories, Inc. / __ /\/ ___/\
      Steve_Wall@... One Redcom Center ___/ /\/ /_/ /\__\/
      (716) 924-7550 Victor, NY 14564 /_____/ /_______/ /
      x300 USA \_____\/\_______\/
      ______________________________________________________________________
    • Bram Moolenaar
      ... Yes, but it uses alloc() (a Vim function) instead of malloc(). alloc() has a few extra checks for not allocating too much memory (so that enough is left
      Message 38 of 38 , Mar 12, 2000
      • 0 Attachment
        Wichert Akkerman wrote:
        > Previously Bram Moolenaar wrote:
        > > No, vim_strsave() is just a wrapper around malloc(), used to make a copy
        > > of a string.
        >
        > So it's basically strdup?

        Yes, but it uses alloc() (a Vim function) instead of malloc(). alloc() has a
        few extra checks for not allocating too much memory (so that enough is left to
        write out the file when needed, for example).

        --
        hundred-and-one symptoms of being an internet addict:
        147. You finally give up smoking...because it made the monitor dirty.

        /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
        \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
      Your message has been successfully submitted and would be delivered to recipients shortly.