pike.git / src / modules / DVB / dvb.c

version» Context lines:

pike.git/src/modules/DVB/dvb.c:233:   static void f_create(INT32 args) {       int fefd;    char *devname;       if(DVB->cardn != -1)    Pike_error("Create already called!\n");       DVB->cardn = 0;    if(args) { -  if(Pike_sp[-1].type != T_INT) +  if(TYPEOF(Pike_sp[-1]) != T_INT)    Pike_error("Invalid argument 1, expected int.\n");    else    DVB->cardn = (u_short)Pike_sp[-1].u.integer;    }       if((devname = mk_devname(DVB->cardn, FRONTENDDEVICE)) == NULL)    Pike_error("Internal error: can't malloc buffer.\n");    fefd = open (devname, O_RDWR | O_NONBLOCK);    if (fefd < 0) {    DVB->cardn = -1;
pike.git/src/modules/DVB/dvb.c:488:    int pol;    uint sr;    char *devname;       check_all_args("DVB.dvb->tune", args, BIT_INT, BIT_INT, BIT_INT | BIT_STRING,    BIT_INT, 0);       sr = (u_short)Pike_sp[-1].u.integer * 1000;    Pike_sp--;    -  if(Pike_sp[-1].type == T_INT) +  if(TYPEOF(Pike_sp[-1]) == T_INT)    pol = (u_short)Pike_sp[-1].u.integer;    else    pol = Pike_sp[-1].u.string->str[0] == 'V' ||    Pike_sp[-1].u.string->str[0] == 'v';    Pike_sp--;       freq = (u_short)Pike_sp[-1].u.integer * 1000;    Pike_sp--;       satno = (u_short)Pike_sp[-1].u.integer;
pike.git/src/modules/DVB/dvb.c:1111:    push_int(0); /* PID already attached */    return;    }       ref_push_object( Pike_fp->current_object ); /* dvb */    push_int( pid );    push_int(0); /* func */    push_int(ptype);    push_object( clone_object(dvb_stream_program, 4 ) );    -  if(Pike_sp[-1].type!=PIKE_T_OBJECT) +  if(TYPEOF(Pike_sp[-1]) != PIKE_T_OBJECT)    Pike_error("Failed to create Stream object!\n");      }      static void f__sprintf(INT32 args) {       int n = 0, x, cnt;    dvb_stream_data *st = DVB->stream;       check_all_args("DVB.dvb->_sprintf", args, BIT_INT, BIT_MAPPING | BIT_VOID, 0);
pike.git/src/modules/DVB/dvb.c:1427:    *! The number of card equipment.    */   static void f_audio_create(INT32 args) {    char *devname;    int devno = 0;       if(DVBAudio->fd != -1)    Pike_error("Create already called!\n");       if(args) { -  if(Pike_sp[-1].type != T_INT) +  if(TYPEOF(Pike_sp[-1]) != T_INT)    Pike_error("Invalid argument 1, expected int.\n");    else    devno = (u_short)Pike_sp[-1].u.integer;    }    pop_n_elems(args);    if((devname = mk_devname(devno, AUDIODEVICE)) == NULL)    Pike_error("Internal error: can't malloc buffer.\n");    DVBAudio->fd = open( devname, O_RDWR );    /* free(devname); */    if (DVBAudio->fd < 0) {
pike.git/src/modules/DVB/dvb.c:1536:   }      static void f_audio_ctrl(INT32 args) {       dvb_audio_data *dvb_audio = DVBAudio;    int ret;    int cw = -1;       check_all_args("DVB.dvb->ctrl", args, BIT_INT | BIT_STRING, 0);    -  if(Pike_sp[-1].type == T_INT) +  if(TYPEOF(Pike_sp[-1]) == T_INT)    cw = (u_short)Pike_sp[-1].u.integer;    else    if(!strcmp(Pike_sp[-1].u.string->str, "play"))    cw = AUDIO_PLAY;    else    if(!strcmp(Pike_sp[-1].u.string->str, "pause"))    cw = AUDIO_PAUSE;    else    if(!strcmp(Pike_sp[-1].u.string->str, "continue"))    cw = AUDIO_CONTINUE;