~ubuntu-branches/debian/sid/octave3.0/sid

« back to all changes in this revision

Viewing changes to src/pt-assign.cc

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2009-04-28 15:17:35 UTC
  • mfrom: (6.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090428151735-gm59wmfcmwec3f9e
Tags: 1:3.0.5-3
debian/in/PACKAGE.postinst: Add -verbose option when calling 'pkg
rebuild' in octave and redirect stdin from /dev/null.  This is just to
help debugging the hang up on the mipsel buildd when installing
octave3.0 for building other packages (Bug#524745).

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
// Simple assignment expressions.
46
46
 
 
47
// FIXME -- the following variable and the function that uses it
 
48
// should be removed from some future version of Octave.
 
49
 
47
50
static const char *former_built_in_variables[] =
48
51
{
49
52
  "DEFAULT_EXEC_PATH",
157
160
tree_simple_assignment::tree_simple_assignment
158
161
  (tree_expression *le, tree_expression *re,
159
162
   bool plhs, int l, int c, octave_value::assign_op t)
160
 
    : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t)
161
 
{
162
 
  if (lhs)
163
 
    maybe_warn_former_built_in_variable (lhs->name ());
164
 
}
 
163
    : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t),
 
164
      first_execution (true) { }
165
165
 
166
166
tree_simple_assignment::~tree_simple_assignment (void)
167
167
{
194
194
{
195
195
  octave_value retval;
196
196
 
 
197
  if (first_execution && lhs)
 
198
    maybe_warn_former_built_in_variable (lhs->name ());
 
199
 
197
200
  if (error_state)
198
201
    return retval;
199
202
 
258
261
        eval_error ();
259
262
    }
260
263
 
 
264
  first_execution = false;
 
265
 
261
266
  return retval;
262
267
}
263
268
 
302
307
tree_multi_assignment::tree_multi_assignment
303
308
  (tree_argument_list *lst, tree_expression *r,
304
309
   bool plhs, int l, int c, octave_value::assign_op t)
305
 
    : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs), etype (t)
306
 
{
307
 
  for (tree_argument_list::iterator p = lhs->begin (); p != lhs->end (); p++)
308
 
    {
309
 
      tree_expression *lhs_expr = *p;
310
 
 
311
 
      if (lhs_expr)
312
 
        maybe_warn_former_built_in_variable (lhs_expr->name ());
313
 
    }
314
 
}
 
310
    : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs), etype (t),
 
311
      first_execution (true) { }
315
312
 
316
313
tree_multi_assignment::~tree_multi_assignment (void)
317
314
{
345
342
  if (error_state)
346
343
    return retval;
347
344
 
 
345
  if (first_execution)
 
346
    {
 
347
      for (tree_argument_list::iterator p = lhs->begin (); p != lhs->end (); p++)
 
348
        {
 
349
          tree_expression *lhs_expr = *p;
 
350
 
 
351
          if (lhs_expr)
 
352
            maybe_warn_former_built_in_variable (lhs_expr->name ());
 
353
        }
 
354
    }
 
355
 
348
356
  if (rhs)
349
357
    {
350
358
      std::list<octave_lvalue> lvalue_list = lhs->lvalue_list ();
486
494
  else
487
495
    eval_error ();
488
496
 
 
497
  first_execution = false;
 
498
 
489
499
  return retval;
490
500
}
491
501