Ignore:
Timestamp:
Jun 20, 2012, 12:44:52 AM (13 years ago)
Author:
bird
Message:

gnumake/current -> 3.82-cvs.

Location:
vendor/gnumake/current
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current

    • Property svn:ignore deleted
  • vendor/gnumake/current/expand.c

    r1989 r2596  
    11/* Variable expansion functions for GNU Make.
    22Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
    4 Foundation, Inc.
     31998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
     42010 Free Software Foundation, Inc.
    55This file is part of GNU Make.
    66
     
    410410      if (*p == '\0')
    411411        break;
    412       else
    413         ++p;
     412
     413      ++p;
    414414    }
    415415
     
    443443expand_argument (const char *str, const char *end)
    444444{
    445   char *tmp;
     445  char *tmp, *alloc = NULL;
     446  char *r;
    446447
    447448  if (str == end)
     
    451452    return allocated_variable_expand (str);
    452453
    453   tmp = alloca (end - str + 1);
     454  if (end - str + 1 > 1000)
     455    tmp = alloc = xmalloc (end - str + 1);
     456  else
     457    tmp = alloca (end - str + 1);
     458
    454459  memcpy (tmp, str, end - str);
    455460  tmp[end - str] = '\0';
    456461
    457   return allocated_variable_expand (tmp);
     462  r = allocated_variable_expand (tmp);
     463
     464  if (alloc)
     465    free (alloc);
     466
     467  return r;
    458468}
    459469
     
    570580  value = variable_expand_for_file (line, file);
    571581
    572 #if 0
    573   /* Waste a little memory and save time.  */
    574   value = xrealloc (value, strlen (value))
    575 #endif
    576 
    577582  variable_buffer = obuf;
    578583  variable_buffer_length = olen;
Note: See TracChangeset for help on using the changeset viewer.