1 /* sane - Scanner Access Now Easy. 2 Copyright (C) 2003 Martijn van Oosterhout <kleptog@svana.org> 3 Copyright (C) 2003 Thomas Soumarmon <thomas.soumarmon@cogitae.net> 4 5 This file was initially copied from the hp3300 testools and adjusted to 6 suit. Original copyright notice follows: 7 8 Copyright (C) 2001 Bertrik Sikken (bertrik@zonnet.nl) 9 10 This file is part of the SANE package. 11 12 This program is free software; you can redistribute it and/or 13 modify it under the terms of the GNU General Public License 14 as published by the Free Software Foundation; either version 2 15 of the License, or (at your option) any later version. 16 17 This program is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 GNU General Public License for more details. 21 22 You should have received a copy of the GNU General Public License 23 along with this program. If not, see <https://www.gnu.org/licenses/>. 24 25 As a special exception, the authors of SANE give permission for 26 additional uses of the libraries contained in this release of SANE. 27 28 The exception is that, if you link a SANE library with other files 29 to produce an executable, this does not by itself cause the 30 resulting executable to be covered by the GNU General Public 31 License. Your use of that executable is in no way restricted on 32 account of linking the SANE library code into it. 33 34 This exception does not, however, invalidate any other reasons why 35 the executable file might be covered by the GNU General Public 36 License. 37 38 If you submit changes to SANE to the maintainers to be included in 39 a subsequent release, you agree by submitting the changes that 40 those changes may be distributed with this exception intact. 41 42 If you write modifications of your own for SANE, it is your choice 43 whether to permit this exception to apply to your modifications. 44 If you do not wish that, delete this exception notice. 45 */ 46 47 48 /* 49 SANE interface for hp54xx scanners. Prototype. 50 Parts of this source were inspired by other backends. 51 */ 52 53 #include "../include/sane/config.h" 54 55 #include "hp5400_debug.h" 56 #include "hp5400.h" 57 58 #include "../include/sane/config.h" 59 #include "../include/sane/sane.h" 60 #include "../include/sane/sanei.h" 61 #include "../include/sane/sanei_backend.h" 62 #include "../include/sane/sanei_config.h" 63 #include "../include/sane/saneopts.h" 64 65 66 #include <stdlib.h> /* malloc, free */ 67 #include <string.h> /* memcpy */ 68 #include <stdio.h> 69 #ifdef HAVE_SYS_TYPES_H 70 #include <sys/types.h> 71 #endif 72 73 74 #define HP5400_CONFIG_FILE "hp5400.conf" 75 76 #define BUILD 3 77 78 /* (source) includes for data transfer methods */ 79 #include "hp5400_debug.c" 80 #include "hp5400_internal.c" 81 #include "hp5400_sane.c" 82 #include "hp5400_sanei.c" 83