pike.git
/
src
/
modules
/
SANE
/
sane.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/SANE/sane.c:22:
#include "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"
-
RCSID("$Id: sane.c,v 1.
4
2000/
03
/
02
19
:
22
:
23
per
Exp $");
+
RCSID("$Id: sane.c,v 1.
5
2000/
07
/
07
16
:
10
:
07
marcus
Exp $");
/* **! module SANE **! **! This module enables access to the SANE (Scanner Access Now Easy) **! library from pike **! **! note
-
**! $Id: sane.c,v 1.
4
2000/
03
/
02
19
:
22
:
23
per
Exp $
+
**! $Id: sane.c,v 1.
5
2000/
07
/
07
16
:
10
:
07
marcus
Exp $
*/ static int sane_is_inited; struct scanner { SANE_Handle h; }; static void init_sane()
pike.git/src/modules/SANE/sane.c:101:
{ case 0: while( devices[i] ) push_device( devices[i++] ); f_aggregate( i ); break; default: error("Failed to get device list\n"); } }
-
#define THIS ((struct scanner *)fp->current_storage)
+
#define THIS ((struct scanner *)
Pike_
fp->current_storage)
static void push_option_descriptor( const SANE_Option_Descriptor *o ) { int i; struct svalue *osp = sp; push_text( "name" ); if( o->name ) push_text( o->name ); else push_int( 0 );
pike.git/src/modules/SANE/sane.c:520:
get_rgb_frame( h, &p, (char *)r ); break; case SANE_FRAME_RED: case SANE_FRAME_GREEN: case SANE_FRAME_BLUE: break; } THREADS_DISALLOW(); ref_push_object( o ); push_int( i );
-
ref_push_object( fp->current_object );
+
ref_push_object(
Pike_
fp->current_object );
apply_svalue( sp-args-3, 3 ); pop_stack(); } free_object( o ); pop_n_elems( args ); push_int( 0 ); } struct row_scan_struct {
pike.git/src/modules/SANE/sane.c:643:
error("Composite frame mode not supported for row_scan\n"); break; } assert_image_program(); rsp = malloc( sizeof(struct row_scan_struct) ); push_int( p.pixels_per_line ); push_int( 1 ); rsp->o = clone_object( image_program, 2 );
-
rsp->t = fp->current_object;
-
fp->current_object->refs++;
+
rsp->t =
Pike_
fp->current_object;
+
Pike_
fp->current_object->refs++;
rsp->r = ((struct image *)rsp->o->storage)->img; rsp->h = THIS->h; rsp->p = p; rsp->buffer = malloc( p.bytes_per_line ); rsp->current_row = 0; rsp->bufferpos = 0; rsp->callback = sp[-1]; rsp->nonblocking = !sane_set_io_mode( THIS->h, 1 ); sp--;