int pixus990i_setalert(bscc2sts_tbl *p_tbl, int color_num) { int i,ret; for(i=0; i<color_num; i++){ ret=com_warnoperatechk(p_tbl->warning, p_tbl->ink[i].color, sizeof(p_tbl->warning)); if( ret == OCCUR ){ p_tbl->ink[i].alert = INKLOW; } else { p_tbl->ink[i].alert = NOALERT; } } for(i=0; i<color_num; i++){ ret=com_warnoperatechk(p_tbl->operator_call, p_tbl->ink[i].color, sizeof(p_tbl->operator_call)); if( ret == OCCUR ){ p_tbl->ink[i].alert = INKOUT; } } return(OK); }
static int ip2500_setalert(bscc2sts_tbl *p_tbl, int color_num) { int i,ret; for(i=0; i<color_num; i++){ ret=com_warnoperatechk(p_tbl->warning, p_tbl->ink[i].color, sizeof(p_tbl->warning)); if( ret == OCCUR ){ p_tbl->ink[i].alert = INKWAR; } else { p_tbl->ink[i].alert = NOALERT; } } return(OK); }
/* * Ink information is set from warning and an operator call. */ int ip90_setink(ST_STORESET *p_s, ST_BSCC2STS *p_ct, bscc2sts_tbl *p_tbl, ST_BSCCBUF *p_bsccbuf) { int ret; int i=0; // int color_num=0; char ip90color[]="be"; // char ip90color[]="BE"; char *p_temp; //if no cartridge , warning mask if( (p_tbl->cartridge[0].type)==UNEQUIP ){ ip90_maskwarning2(p_tbl->operator_call, sizeof(p_tbl->operator_call), p_tbl->warning, sizeof(p_tbl->warning)); } if( (p_tbl->cartridge[0].type)==UNEQUIP || (p_tbl->cartridge[0].type=='?') || (p_tbl->warning[0]==NOITEM) || (p_tbl->operator_call[0]==NOITEM) || (p_bsccbuf+DWS)->p_bsccsts==NULL ){ return(OK); } //2.00.01.02 strncpy(p_tbl->ink[0].fill, FULL, sizeof(p_tbl->ink[0].fill)); strncpy(p_tbl->ink[1].fill, FULL, sizeof(p_tbl->ink[1].fill)); for(i=0; i<MAXip90COLORNUM; i++){ p_tbl->ink[i].color=ip90color[i]; ret=com_warnoperatechk(p_tbl->warning, p_tbl->ink[i].color, sizeof(p_tbl->warning)); if(ret == OCCUR){ strncpy(p_tbl->ink[i].fill, ZEROPER, sizeof(p_tbl->ink[i].fill)); p_tbl->ink[i].alert=INKLOW; } else { p_temp=(char *)malloc( strlen( (p_bsccbuf+DWS)->p_bsccsts ) +1 ); if(p_temp == NULL){ return(ERR_MEMORY); } strncpy(p_temp, (p_bsccbuf+DWS)->p_bsccsts, strlen((p_bsccbuf+DWS)->p_bsccsts)); ret=ip90_inklowlevel1chk(p_tbl->ink[i].color, p_temp); free(p_temp); // 2.00.01.02 chage DWS:1561,1510; // warning = " e" ---> warning = "*e" ip90tbl.c if(ret == OCCUR){ strncpy(p_tbl->ink[i].fill, HARF, sizeof(p_tbl->ink[i].fill)); } //if(ret == OCCUR){ // strncpy(p_tbl->ink[i].fill, HARF, sizeof(p_tbl->ink[i].fill)); //} else { // strncpy(p_tbl->ink[i].fill, FULL, sizeof(p_tbl->ink[i].fill)); //} p_tbl->ink[i].alert=NOALERT; } // 2.00.01.02 not tolower be -> be ret=com_warnoperatechk(p_tbl->warning, p_tbl->ink[i].color, sizeof(p_tbl->warning)); //ret=com_warnoperatechk(p_tbl->warning, tolower(p_tbl->ink[i].color), sizeof(p_tbl->warning)); if(ret == OCCUR){ strncpy(p_tbl->ink[i].fill, ZEROPER, sizeof(p_tbl->ink[i].fill)); p_tbl->ink[i].alert=INKLOW; } //for 'U' or 'u' --> UNKNOWNPER:UUU, INKUNKNOWN ret=ip90_inkunknownchk(p_tbl->warning, sizeof(p_tbl->warning)); if(ret == 1){ strncpy(p_tbl->ink[0].fill, UNKNOWNPER, sizeof(p_tbl->ink[0].fill)); p_tbl->ink[0].alert=INKUNKNOWN; } else if(ret == 2){ strncpy(p_tbl->ink[1].fill, UNKNOWNPER, sizeof(p_tbl->ink[1].fill)); p_tbl->ink[1].alert=INKUNKNOWN; } else if(ret == 3){ strncpy(p_tbl->ink[0].fill, UNKNOWNPER, sizeof(p_tbl->ink[0].fill)); strncpy(p_tbl->ink[1].fill, UNKNOWNPER, sizeof(p_tbl->ink[1].fill)); p_tbl->ink[0].alert=INKUNKNOWN; p_tbl->ink[1].alert=INKUNKNOWN; } //for 'M' or 'm' --> UNSETTANK:NNN ret=ip90_inkunsetchk(p_tbl->operator_call, sizeof(p_tbl->operator_call)); if(ret == 1){ strncpy(p_tbl->ink[0].fill, UNSETTANK, sizeof(p_tbl->ink[0].fill)); p_tbl->ink[0].alert=' '; } else if(ret == 2){ strncpy(p_tbl->ink[1].fill, UNSETTANK, sizeof(p_tbl->ink[1].fill)); p_tbl->ink[1].alert=' '; } else if(ret == 3){ strncpy(p_tbl->ink[0].fill, UNSETTANK, sizeof(p_tbl->ink[0].fill)); strncpy(p_tbl->ink[1].fill, UNSETTANK, sizeof(p_tbl->ink[1].fill)); p_tbl->ink[0].alert=' '; p_tbl->ink[1].alert=' '; } } //warning mask ip90_maskwarning(p_tbl->operator_call, sizeof(p_tbl->operator_call), p_tbl->warning, sizeof(p_tbl->warning)); return(OK); }