/****************************************************************************** * $Id: unsigned.c,v 1.1 1993/09/16 08:52:25 courtel Exp $ * * Kind: C library of functions * Abstract: Definition of unsigned types for Ada * * Copyright 1990 - 1993 Centre d'Etudes de la Navigation Aerienne (CENA) * * PARADISE is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License * as published by the Free Software Foundation; * * PARADISE 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 Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with PARADISE; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ******************************************************************************/ #include u_long not (arg) u_long arg; { return (~arg); } u_long and (left, right) u_long left, right; { return (left & right); } u_long or (left, right) u_long left, right; { return (left | right); } u_long xor (left, right) u_long left, right; { return (left ^ right); } u_long asl (arg, num) u_long arg; int num; { return (arg << num); } u_long asr (arg, num) u_long arg; int num; { return (arg >> num); }