From 0093fc7e20e923aae4c910bbb2ac3b6609ab4120 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sun, 5 Mar 2000 13:57:01 +0000 Subject: [PATCH] Merged main branch with current DEVEL_1_9. --- include/sane/sanei_backend.h | 9 ++++++--- include/sane/sanei_config.h | 1 + include/sane/sanei_thread.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 include/sane/sanei_thread.h diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h index 588e2d010..339e55efb 100644 --- a/include/sane/sanei_backend.h +++ b/include/sane/sanei_backend.h @@ -18,13 +18,16 @@ #ifndef __GLIBC__ # ifndef u_int8_t -# define u_int8_t unsigned char +# define u_int8_t u_int8_t +typedef unsigned char u_int8_t; # endif # ifndef u_int16_t -# define u_int16_t unsigned short +# define u_int16_t u_int16_t +typedef unsigned short u_int16_t; # endif # ifndef u_int32_t -# define u_int32_t unsigned int +# define u_int32_t u_int32_t +typedef unsigned int u_int32_t; # endif #endif diff --git a/include/sane/sanei_config.h b/include/sane/sanei_config.h index ac6400710..64ae93a75 100644 --- a/include/sane/sanei_config.h +++ b/include/sane/sanei_config.h @@ -45,6 +45,7 @@ #include extern FILE *sanei_config_open (const char *name); +extern char *sanei_config_read (char *str, int n, FILE *stream); extern const char *sanei_config_skip_whitespace (const char *str); /* Scan a string constant from the string pointed to by STR and return a malloced copy of it in *STRING_CONST (it's the responsibility of diff --git a/include/sane/sanei_thread.h b/include/sane/sanei_thread.h new file mode 100644 index 000000000..977b84d23 --- /dev/null +++ b/include/sane/sanei_thread.h @@ -0,0 +1,33 @@ +/* sane - Scanner Access Now Easy. + Copyright (C) 2000 Yuri Dario + This file is part of the SANE package. + + SANE 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. + + SANE 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 sane; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + This file declares a _proposed_ internal SANE interface. It was + proposed 2000-02-19 by Yuri Dario to wrap UNIX functions fork(), + kill(), waitpid() and wait(), which are missing on OS/2. +*/ + +#ifndef sanei_thread_h +#define sanei_thread_h + +extern int sanei_thread_begin( void (*start)(void *arg), + void *arg_list); +extern int sanei_thread_kill( int pid, int sig); +extern int sanei_thread_waitpid( int pid, int *stat_loc, int options); +extern int sanei_thread_wait( int *stat_loc); + +#endif /* sanei_thread_h */