/* $Id$ */ /* "Offerte speciali" (IOI 1995) Copyright (C) 2000 Massimo Santini This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "pack.h" void cleanfields( fields x ) { int i; for ( i = 0; i < FLDNUM; i++ ) x[i] = 0; } void packfields( fieldpack *p, const fields x ) { int i; *p = 0; for ( i = 0; i < FLDNUM - 1; i++ ) { *p |= x[i] & ~(~0<=0 ; i-- ) { x[i] = t &~(~0<>= BITFLD; } } int isleq( const fieldpack p, const fieldpack q ) { int i; fieldpack s, t; s = p; t = q; for ( i = FLDNUM - 1; i >=0 ; i-- ) { if ( ( s &~(~0< ( t &~(~0<>= BITFLD; t >>= BITFLD; } return i < 0; }