1// -*- C++ -*- 2/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3 Written by Gaius Mulley (gaius@glam.ac.uk) 4 5This file is part of groff. 6 7groff is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 597 unchanged lines hidden (view full) --- 606 return (boolset & (1 << (int)b)) != 0; 607} 608 609int state_set::is_in(int_value_state i) 610{ 611 return (intset & (1 << (int)i)) != 0; 612} 613 |
614// Note: this used to have a bug s.t. it always tested for bit 0 (benl 18/5/11) |
615int state_set::is_in(units_value_state u) 616{ |
617 return (unitsset & (1 << (int)u)) != 0; |
618} 619 |
620// Note: this used to have a bug s.t. it always tested for bit 0 (benl 18/5/11) |
621int state_set::is_in(string_value_state s) 622{ |
623 return (stringset & (1 << (int)s)) != 0; |
624} 625 626void state_set::add(units_value_state, int n) 627{ 628 unitsset += n; 629} 630 631units state_set::val(units_value_state) 632{ 633 return unitsset; 634} |