Deleted Added
full compact
mtsm.cpp (151498) mtsm.cpp (222083)
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
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)
614int state_set::is_in(units_value_state u)
615{
615int state_set::is_in(units_value_state u)
616{
616 return (unitsset & (1 << (int)u) != 0);
617 return (unitsset & (1 << (int)u)) != 0;
617}
618
618}
619
620// Note: this used to have a bug s.t. it always tested for bit 0 (benl 18/5/11)
619int state_set::is_in(string_value_state s)
620{
621int state_set::is_in(string_value_state s)
622{
621 return (stringset & (1 << (int)s) != 0);
623 return (stringset & (1 << (int)s)) != 0;
622}
623
624void state_set::add(units_value_state, int n)
625{
626 unitsset += n;
627}
628
629units state_set::val(units_value_state)
630{
631 return unitsset;
632}
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}