pike.git / src / modules / SANE / sane.c

version» Context lines:

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.16 2002/12/30 12:30:06 grubba Exp $ + || $Id: sane.c,v 1.17 2003/03/14 15:57:49 grubba 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:32:   #include "backend.h"   #include "operators.h"   #include "module_support.h"   #include "builtin_functions.h"      #include "../Image/image.h"         #define sp Pike_sp    - RCSID("$Id: sane.c,v 1.16 2002/12/30 12:30:06 grubba Exp $"); + RCSID("$Id: sane.c,v 1.17 2003/03/14 15:57:49 grubba 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:715:    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 = Pike_fp->current_object; -  Pike_fp->current_object->refs++; +  add_ref(Pike_fp->current_object);    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--;