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

version» Context lines:

pike.git/src/modules/SANE/sane.c:54:    if( sane_init( NULL, NULL ) )    Pike_error( "Sane init failed.\n" );    sane_is_inited = 1;   }      static void push_device( SANE_Device *d )   {    push_text( "name" ); push_text( d->name );    push_text( "vendor" ); push_text( d->vendor );    push_text( "model" ); push_text( d->model ); -  push_text( "type" ); push_text( d->type ); +  ref_push_string( literal_type_string ); push_text( d->type );    f_aggregate_mapping( 8 );   }         /*! @decl array(mapping) list_scanners()    *!    *! Returns an array with all available scanners.    *!    *! @example    *! Pike v0.7 release 120 running Hilfe v2.0 (Incremental Pike Frontend)
pike.git/src/modules/SANE/sane.c:119:    push_text( "title" );    if( o->title )    push_text( o->title );    else    push_int( 0 );    push_text( "desc" );    if( o->desc )    push_text( o->desc );    else    push_int( 0 ); -  push_text( "type" ); +  ref_push_string( literal_type_string );    switch( o->type )    {    case SANE_TYPE_BOOL: push_text( "boolean" ); break; -  case SANE_TYPE_INT: push_text( "int" ); break; -  case SANE_TYPE_FIXED: push_text( "float" ); break; -  case SANE_TYPE_STRING: push_text( "string" ); break; +  case SANE_TYPE_INT: ref_push_string( literal_int_string ); break; +  case SANE_TYPE_FIXED: ref_push_string( literal_float_string ); break; +  case SANE_TYPE_STRING: ref_push_string( literal_string_string ); break;    case SANE_TYPE_BUTTON: push_text( "button" ); break;    case SANE_TYPE_GROUP: push_text( "group" ); break;    }          push_text( "unit" );    switch( o->unit )    {    case SANE_UNIT_NONE: push_text( "none" ); break;    case SANE_UNIT_PIXEL: push_text( "pixel" ); break;
pike.git/src/modules/SANE/sane.c:162:    if( o->cap & SANE_CAP_INACTIVE ) push_text( "inactive" );    if( o->cap & SANE_CAP_ADVANCED ) push_text( "advanced" );    f_aggregate_multiset( sp - osp );    }       push_text( "constaint" );    switch( o->constraint_type )    {    case SANE_CONSTRAINT_NONE: push_int( 0 ); break;    case SANE_CONSTRAINT_RANGE: -  push_text( "type" ); push_text( "range" ); +  ref_push_string( literal_type_string ); push_text( "range" );    push_text( "min" ); push_int( o->constraint.range->min );    push_text( "max" ); push_int( o->constraint.range->max );    push_text( "quant" ); push_int( o->constraint.range->quant );    f_aggregate_mapping( 8 );    break;    case SANE_CONSTRAINT_WORD_LIST: -  push_text( "type" ); +  ref_push_string( literal_type_string );    push_text( "list" );    push_text( "list" );    for( i = 0; i<o->constraint.word_list[0]; i++ )    if( o->type == SANE_TYPE_FIXED )    push_float( SANE_UNFIX(o->constraint.word_list[i+1]) );    else    push_int( o->constraint.word_list[i+1] );    f_aggregate( o->constraint.word_list[0] );    f_aggregate_mapping( 4 );    break;    case SANE_CONSTRAINT_STRING_LIST: -  push_text( "type" ); +  ref_push_string( literal_type_string );    push_text( "list" );    push_text( "list" );    for( i = 0; o->constraint.string_list[i]; i++ )    push_text( o->constraint.string_list[i] );    f_aggregate( i );    f_aggregate_mapping( 4 );    break;    }    f_aggregate_mapping( sp - osp );   }