pike.git
/
src
/
modules
/
SANE
/
sane.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/SANE/sane.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: sane.c,v 1.
14
2002/10/
11
01
:
39
:
49
nilsson
Exp $
+
|| $Id: sane.c,v 1.
15
2002/10/
21
17
:
06
:
22
marcus
Exp $
*/ #include "config.h" #if defined(HAVE_SANE_SANE_H) || defined(HAVE_SANE_H) #ifdef HAVE_SANE_SANE_H #include <sane/sane.h> #else #ifdef HAVE_SANE_H #include <sane.h>
pike.git/src/modules/SANE/sane.c:29:
#include "pike_error.h" #include "mapping.h" #include "multiset.h" #include "backend.h" #include "operators.h" #include "module_support.h" #include "builtin_functions.h" #include "../Image/image.h"
-
/* must be included last */
-
#include "module_magic.h"
+
#define sp Pike_sp
-
RCSID("$Id: sane.c,v 1.
14
2002/10/
11
01
:
39
:
49
nilsson
Exp $");
+
RCSID("$Id: sane.c,v 1.
15
2002/10/
21
17
:
06
:
22
marcus
Exp $");
/*! @module SANE *! *! This module enables access to the SANE (Scanner Access Now Easy) *! library from pike */ static int sane_is_inited; struct scanner
pike.git/src/modules/SANE/sane.c:771:
{ THIS->h = 0; } static void exit_scanner_struct( struct object *p ) { if( THIS->h ) sane_close( THIS->h ); }
-
void pike
_
module
_
init()
+
PIKE
_
MODULE
_
INIT
{ struct program *p; add_function( "list_scanners", f_list_scanners, "function(void:array(mapping))", 0 ); add_integer_constant( "FrameGray", SANE_FRAME_GRAY,0 ); add_integer_constant( "FrameRGB", SANE_FRAME_RGB,0 ); add_integer_constant( "FrameRed", SANE_FRAME_RED,0 ); add_integer_constant( "FrameGreen",SANE_FRAME_GREEN,0 ); add_integer_constant( "FrameBlue", SANE_FRAME_BLUE,0 );
pike.git/src/modules/SANE/sane.c:818:
add_function( "create", f_scanner_create, "function(string:void)", ID_STATIC ); set_init_callback(init_scanner_struct); set_exit_callback(exit_scanner_struct); add_program_constant( "Scanner", (p=end_program( ) ), 0 ); free_program( p ); }
-
void pike
_
module
_
exit()
+
PIKE
_
MODULE
_
EXIT
{ if( sane_is_inited ) sane_exit(); if( image_program ) free_program( image_program ); } #else
-
#include "module
_magic
.h"
-
void pike
_
module
_
init()
{}
-
void pike
_
module
_
exit()
{}
+
#include "module.h"
+
PIKE
_
MODULE
_
INIT
{}
+
PIKE
_
MODULE
_
EXIT
{}
#endif