Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 48765 | Differences between
and this patch

Collapse All | Expand All

(-)variable.h (+2 lines)
Lines 107-112 Link Here
107
extern char *expand_argument PARAMS ((char *str, char *end));
107
extern char *expand_argument PARAMS ((char *str, char *end));
108
extern char *variable_expand_string PARAMS ((char *line, char *string,
108
extern char *variable_expand_string PARAMS ((char *line, char *string,
109
                                             long length));
109
                                             long length));
110
extern void install_variable_buffer PARAMS ((char **bufp, unsigned int *lenp));
111
extern void restore_variable_buffer PARAMS ((char *buf, unsigned int len));
110
112
111
/* function.c */
113
/* function.c */
112
extern int handle_function PARAMS ((char **op, char **stringp));
114
extern int handle_function PARAMS ((char **op, char **stringp));
(-)expand.c (+25 lines)
Lines 545-547 Link Here
545
545
546
  return value;
546
  return value;
547
}
547
}
548
549
/* Install a new variable_buffer context, returning the current one for
550
   safe-keeping.  */
551
552
void
553
install_variable_buffer (char **bufp, unsigned int *lenp)
554
{
555
  *bufp = variable_buffer;
556
  *lenp = variable_buffer_length;
557
558
  variable_buffer = 0;
559
  initialize_variable_output ();
560
}
561
562
/* Restore a previously-saved variable_buffer setting (free the current one).
563
 */
564
565
void
566
restore_variable_buffer (char *buf, unsigned int len)
567
{
568
  free (variable_buffer);
569
570
  variable_buffer = buf;
571
  variable_buffer_length = len;
572
}
(-)function.c (+10 lines)
Lines 1196-1202 Link Here
1196
static char *
1196
static char *
1197
func_eval (char *o, char **argv, const char *funcname)
1197
func_eval (char *o, char **argv, const char *funcname)
1198
{
1198
{
1199
  char *buf;
1200
  unsigned int len;
1201
1202
  /* Eval the buffer.  Pop the current variable buffer setting so that the
1203
     eval'd code can use its own without conflicting.  */
1204
1205
  install_variable_buffer (&buf, &len);
1206
1199
  eval_buffer (argv[0]);
1207
  eval_buffer (argv[0]);
1208
1209
  restore_variable_buffer (buf, len);
1200
1210
1201
  return o;
1211
  return o;
1202
}
1212
}

Return to bug 48765