1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy. 2141cc406Sopenharmony_ci Copyright (C) 2003 Martijn van Oosterhout <kleptog@svana.org> 3141cc406Sopenharmony_ci Copyright (C) 2003 Thomas Soumarmon <thomas.soumarmon@cogitae.net> 4141cc406Sopenharmony_ci 5141cc406Sopenharmony_ci This file was initially copied from the hp3300 testools and adjusted to 6141cc406Sopenharmony_ci suit. Original copyright notice follows: 7141cc406Sopenharmony_ci 8141cc406Sopenharmony_ci Copyright (C) 2001 Bertrik Sikken (bertrik@zonnet.nl) 9141cc406Sopenharmony_ci 10141cc406Sopenharmony_ci This file is part of the SANE package. 11141cc406Sopenharmony_ci 12141cc406Sopenharmony_ci This program is free software; you can redistribute it and/or 13141cc406Sopenharmony_ci modify it under the terms of the GNU General Public License 14141cc406Sopenharmony_ci as published by the Free Software Foundation; either version 2 15141cc406Sopenharmony_ci of the License, or (at your option) any later version. 16141cc406Sopenharmony_ci 17141cc406Sopenharmony_ci This program is distributed in the hope that it will be useful, 18141cc406Sopenharmony_ci but WITHOUT ANY WARRANTY; without even the implied warranty of 19141cc406Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20141cc406Sopenharmony_ci GNU General Public License for more details. 21141cc406Sopenharmony_ci 22141cc406Sopenharmony_ci You should have received a copy of the GNU General Public License 23141cc406Sopenharmony_ci along with this program. If not, see <https://www.gnu.org/licenses/>. 24141cc406Sopenharmony_ci 25141cc406Sopenharmony_ci As a special exception, the authors of SANE give permission for 26141cc406Sopenharmony_ci additional uses of the libraries contained in this release of SANE. 27141cc406Sopenharmony_ci 28141cc406Sopenharmony_ci The exception is that, if you link a SANE library with other files 29141cc406Sopenharmony_ci to produce an executable, this does not by itself cause the 30141cc406Sopenharmony_ci resulting executable to be covered by the GNU General Public 31141cc406Sopenharmony_ci License. Your use of that executable is in no way restricted on 32141cc406Sopenharmony_ci account of linking the SANE library code into it. 33141cc406Sopenharmony_ci 34141cc406Sopenharmony_ci This exception does not, however, invalidate any other reasons why 35141cc406Sopenharmony_ci the executable file might be covered by the GNU General Public 36141cc406Sopenharmony_ci License. 37141cc406Sopenharmony_ci 38141cc406Sopenharmony_ci If you submit changes to SANE to the maintainers to be included in 39141cc406Sopenharmony_ci a subsequent release, you agree by submitting the changes that 40141cc406Sopenharmony_ci those changes may be distributed with this exception intact. 41141cc406Sopenharmony_ci 42141cc406Sopenharmony_ci If you write modifications of your own for SANE, it is your choice 43141cc406Sopenharmony_ci whether to permit this exception to apply to your modifications. 44141cc406Sopenharmony_ci If you do not wish that, delete this exception notice. 45141cc406Sopenharmony_ci*/ 46141cc406Sopenharmony_ci 47141cc406Sopenharmony_ci 48141cc406Sopenharmony_ci/* 49141cc406Sopenharmony_ci SANE interface for hp54xx scanners. Prototype. 50141cc406Sopenharmony_ci Parts of this source were inspired by other backends. 51141cc406Sopenharmony_ci*/ 52141cc406Sopenharmony_ci 53141cc406Sopenharmony_ci#include "../include/sane/config.h" 54141cc406Sopenharmony_ci 55141cc406Sopenharmony_ci#include "hp5400_debug.h" 56141cc406Sopenharmony_ci#include "hp5400.h" 57141cc406Sopenharmony_ci 58141cc406Sopenharmony_ci#include "../include/sane/config.h" 59141cc406Sopenharmony_ci#include "../include/sane/sane.h" 60141cc406Sopenharmony_ci#include "../include/sane/sanei.h" 61141cc406Sopenharmony_ci#include "../include/sane/sanei_backend.h" 62141cc406Sopenharmony_ci#include "../include/sane/sanei_config.h" 63141cc406Sopenharmony_ci#include "../include/sane/saneopts.h" 64141cc406Sopenharmony_ci 65141cc406Sopenharmony_ci 66141cc406Sopenharmony_ci#include <stdlib.h> /* malloc, free */ 67141cc406Sopenharmony_ci#include <string.h> /* memcpy */ 68141cc406Sopenharmony_ci#include <stdio.h> 69141cc406Sopenharmony_ci#ifdef HAVE_SYS_TYPES_H 70141cc406Sopenharmony_ci#include <sys/types.h> 71141cc406Sopenharmony_ci#endif 72141cc406Sopenharmony_ci 73141cc406Sopenharmony_ci 74141cc406Sopenharmony_ci#define HP5400_CONFIG_FILE "hp5400.conf" 75141cc406Sopenharmony_ci 76141cc406Sopenharmony_ci#define BUILD 3 77141cc406Sopenharmony_ci 78141cc406Sopenharmony_ci/* (source) includes for data transfer methods */ 79141cc406Sopenharmony_ci#include "hp5400_debug.c" 80141cc406Sopenharmony_ci#include "hp5400_internal.c" 81141cc406Sopenharmony_ci#include "hp5400_sane.c" 82141cc406Sopenharmony_ci#include "hp5400_sanei.c" 83