~ubuntu-branches/debian/sid/neovim/sid

« back to all changes in this revision

Viewing changes to src/nvim/os/env.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2016-04-18 21:42:19 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20160418214219-1e6d4o1fwqarzk46
Tags: 0.1.3-1
* New upstream release.  (Closes: #820562)
* debian/control:
  + Remove unnecessary luarocks Build-Depends
  + Add libkvm-dev Build-Depends for kfreebsd-*
  + Add python(3)-neovim to Recommends.  (Closes: #812737)
  + Declare compiance with policy 3.9.8, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
262
262
    startstr_len = (int)STRLEN(startstr);
263
263
 
264
264
  src = skipwhite(srcp);
265
 
  --dstlen;  // leave one char space for "\,"
 
265
  dstlen--;  // leave one char space for "\,"
266
266
  while (*src && dstlen > 0) {
 
267
    // Skip over `=expr`.
 
268
    if (src[0] == '`' && src[1] == '=') {
 
269
      var = src;
 
270
      src += 2;
 
271
      (void)skip_expr(&src);
 
272
      if (*src == '`') {
 
273
        src++;
 
274
      }
 
275
      size_t len = (size_t)(src - var);
 
276
      if (len > (size_t)dstlen) {
 
277
        len = (size_t)dstlen;
 
278
      }
 
279
      memcpy((char *)dst, (char *)var, len);
 
280
      dst += len;
 
281
      dstlen -= (int)len;
 
282
      continue;
 
283
    }
267
284
    copy_char = true;
268
285
    if ((*src == '$') || (*src == '~' && at_start)) {
269
286
      mustfree = false;
742
759
void vim_setenv(const char *name, const char *val)
743
760
{
744
761
  os_setenv(name, val, 1);
745
 
  /*
746
 
   * When setting $VIMRUNTIME adjust the directory to find message
747
 
   * translations to $VIMRUNTIME/lang.
748
 
   */
 
762
#ifndef LOCALE_INSTALL_DIR
 
763
  // When setting $VIMRUNTIME adjust the directory to find message
 
764
  // translations to $VIMRUNTIME/lang.
749
765
  if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) {
750
766
    char *buf = (char *)concat_str((char_u *)val, (char_u *)"/lang");
751
 
    bindtextdomain(VIMPACKAGE, buf);
 
767
    bindtextdomain(PROJECT_NAME, buf);
752
768
    xfree(buf);
753
769
  }
 
770
#endif
754
771
}
755
772
 
756
773