1 /* 2 * This file is part of the XForms library package. 3 * 4 * XForms is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as 6 * published by the Free Software Foundation; either version 2.1, or 7 * (at your option) any later version. 8 * 9 * XForms is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with XForms. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifdef HAVE_CONFIG_H 19 #include "config.h" 20 #endif 21 22 #include <stdio.h> 23 #include "include/forms.h" 24 #include "flinternal.h" 25 #include "ulib.h" 26 27 28 /*************************************** 29 ***************************************/ 30 31 int fli_fget4LSBF(FILE * fp)32fli_fget4LSBF( FILE * fp ) 33 { 34 int ret = getc(fp); 35 36 ret |= getc(fp) << 8; 37 ret |= getc(fp) << 16; 38 ret |= getc(fp) << 24; 39 return ret; 40 } 41 42 43 /*************************************** 44 ***************************************/ 45 46 int fli_fput4LSBF(int code,FILE * fp)47fli_fput4LSBF( int code, 48 FILE * fp ) 49 { 50 putc(code & 0xff, fp); 51 putc((code >> 8) & 0xff, fp); 52 putc((code >> 16) & 0xff, fp); 53 return putc((code >> 24) & 0xff, fp); 54 } 55 56 57 /* 58 * Local variables: 59 * tab-width: 4 60 * indent-tabs-mode: nil 61 * End: 62 */ 63