~ubuntu-branches/ubuntu/utopic/sip-tester/utopic

« back to all changes in this revision

Viewing changes to variables.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell, Paul Belanger, Mark Purcell
  • Date: 2011-11-03 21:56:17 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20111103215617-nnxicj1oto9e8ix5
Tags: 1:3.2-1
[ Paul Belanger ]
* New Upstream Release (Closes: #623915).
* Switch to dpkg-source 3.0 (quilt) format
* Building with PCAP play.
* Switch back to Debhelper.
* debian/patches/spelling-error-in-binary: Fix lintian warning

[ Mark Purcell ]
* Drop pabs from Uploaders: at his request
* fix debhelper-overrides-need-versioned-build-depends
* fix description-synopsis-starts-with-article

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
      return(false);
40
40
  } else if (M_type == E_VT_BOOL) {
41
41
    return M_bool;
 
42
  } else if (M_type == E_VT_DOUBLE) {
 
43
    return M_double;
42
44
  }
43
45
  return (M_type != E_VT_UNDEFINED);
44
46
}
333
335
}
334
336
 
335
337
char *AllocVariableTable::getName(int i) {
336
 
  int thisLevel  = i & (1 << LEVEL_BITS);
 
338
  int thisLevel  = i & ((1 << LEVEL_BITS) - 1);
337
339
  assert(thisLevel <= level);
338
340
  if (thisLevel == level) {
339
341
        return variableRevMap[i];
342
344
  return av_parent->getName(i);
343
345
}
344
346
 
 
347
void AllocVariableTable::dump() {
 
348
  if (av_parent) {
 
349
    av_parent->dump();
 
350
  }
 
351
  WARNING("%d level %d variables:", variableMap.size(), level);
 
352
  for (str_int_map::iterator i = variableMap.begin(); i != variableMap.end(); i++) {
 
353
        WARNING("%s", i->first.c_str());
 
354
  }
 
355
}
 
356
 
345
357
void AllocVariableTable::validate() {
346
358
  for (str_int_map::iterator var_it = variableMap.begin(); var_it != variableMap.end(); var_it++) {
347
359
    if (variableReferences[var_it->second] < 2) {