⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.c

📁 一款收款机C源代码!因为是几年前的代码了
💻 C
📖 第 1 页 / 共 2 页
字号:
			}
			else
			{
				if(cur_str[inc] == ' ')		/* The next character is the blank */
				{
					memcpy(prn_Buf+6, cur_str, inc);
					print();
					while(cur_str[inc] == ' ')
						inc ++;
				}
				
				/* Print the integrated word in one line */
				else if((Chk_Word(cur_str[inc - 1]) == NG) && (Chk_Word(cur_str[inc]) != NG))
				{
					memcpy(prn_Buf+6, cur_str, inc);
					print();
				}
				else
				{
					while(Chk_Word(cur_str[inc - 1]) != NG)
					{
						inc --;
						if(inc == 0)
						{
							inc = MAX_PRN_LEN-5;
							break;
						}
					}
					/* The new add: */
					/* 用于全角字符的调整 */
					spec_char_cnt = 0;
					for(j = 0; j < inc; j ++)
					{
						if((byte)(cur_str[j]) >= 0xa1)			/* Indicate the korea character */
							spec_char_cnt ++;
					}
					if(spec_char_cnt&0x01)			/* The counter is odd */
						inc --;
					/*--------------*/
					memcpy(prn_Buf+6, cur_str, inc);
					print();
				}
				cur_str += inc;
				len -= inc;
			}
		}
	}

	prn_Line('-');
	prn_Stamp();
}

const int	Error_Type_Tabl[ERROR_TYPE_NUM] = {
		ERR_DIGIT_ILLEGAL,
		ERR_KEY_ILLEGAL,
		ERR_MODE,
		ERR_DEC_KEY,
		ERR_DEC_PRESS,
		ERR_DEPT_OVER,
		ERR_DEPT_LIMIT,
		ERR_DPSF_INHT,
		ERR_PRN_NOT_END,
        ERR_DPLU_OVER,
        ERR_DIGIT_OVER,
        ERR_DIGIT_FMT,
		ERR_PROGRAM_NO_END,
		ERR_DESC_BLANK,
		ERR_KEY_CODE,
		ERR_HARD_LOCK,
		ERR_PLU_GROUP_FULL,
		ERR_KEY_SEQ,
		ERR_ZERO_TRANS,
		ERR_FULL_ITEM,
		ERR_HALO,
		ERR_XTIME_QTY,
		ERR_TRANS_AMT,
		ERR_TRANS_QTY,
		ERR_VOID_OVER,
		ERR_RFND_OVER,
		ERR_PER_RATE_ZERO,
		ERR_FLAG_FUNCTION,
		ERR_SALE_FNSH,
		ERR_SALE_NO_END,
		ERR_PAY_NO_END,
		ERR_ZERO_PAY,
		ERR_CID,
		ERR_IDVUL_NO_END,
		ERR_RPT_NOT_EMPTY,
		ERR_PLU_RPT_EMPTY,
		ERR_Z_MODE,
		ERR_NO_RPT_DISP,
		ERR_FUNC_RES,
		ERR_CLERK_INHT,
		ERR_CLERK_PRE,
		ERR_PASS_ZERO,
		ERR_PASS_SAME,
		ERR_PASS_EXIST,
		ERR_WAITER_SAME,
		ERR_WAITER_EXIST,
		ERR_LOGI_NO_ZERO,
		ERR_SAME_LOGI_NO,
		ERR_LOGI_NO_EXIST,
		ERR_TBL_OPEN,
		ERR_TBL_NOT_ACT,
		ERR_OBJ_SRC_TBL_SAME,
		ERR_TBL_MERGE_LONG,
		ERR_RSNT_MODE,
		ERR_KP_ATV,
		ERR_KP_TM_OUT,
	#ifdef	REST_PLU_FUNC
		ERR_PLU_ATTR,
		ERR_NORMAL_ATTR,
		ERR_SLAVE_ATTR,
		ERR_EMPTY_MENU,
		ERR_MENU_FULL,
		ERR_MENU_INBT,
	#endif
		ERR_BAR_FORMAT,
		ERR_BAR_EXIST,
		ERR_SAME_BAR,
	#ifdef	PC_COMM
		ERR_NO_PC_PORT,
		ERR_PLU_DOWN_INT,
	#endif
		ERR_CALC_KEY,
	#ifdef	FCE_FUNC
		ERR_FCE_RATE_ZERO,
		ERR_FCE_XCH_BIG,
		ERR_FCE_OVER,
	#endif
	#ifdef	ELEC_JRNL
		ERR_EJ_ATV,
		ERR_EJ_EMPTY,
		ERR_EJ_END_INPUT,
		ERR_EJ_ZERO_ITEM,
	#endif
	#if	SW_VER == SW_NE2
		ERR_FM_NOT_EXIST,
		ERR_FIRM_CODE_PRESET,
		ERR_INVALID_TURKEY_CHAR,
		ERR_INPUT_DIGIT,
		ERR_FM_WRITE,
		ERR_FIRM_CODE_ZERO,
		ERR_FIRM_CODE_NOT_PRESET,
	#endif
		ERR_IC_NO_CARD	,
		ERR_IC_BAD,		
 		ERR_IC_ADDR_OVER,
		ERR_IC_WRITE_FALID	,
		ERR_PLU_NUM_MATCHED	,
		ERR_DEPT_NUM_MATCHED,
		
		ERR_FLASH_DAMAGE,
		ERR_FLASH_EXIST,
		ERR_SRAM_WRONG
};

const char	*Prn_Error_Tabl[ERROR_TYPE_NUM] = {			/* Pointer array */
		/* ERR_DIGIT_ILLEGAL			*/	"Input the illegal digit",
		/* ERR_KEY_ILLEGAL         */	"Press the illegal key",
		/* ERR_MODE                */	"Inexistent working mode",
		/* ERR_DEC_KEY             */	"Not allow pressed [.] key",
		/* ERR_DEC_PRESS           */	"The [.] key has pressed",
		/* ERR_DEPT_OVER           */	"Inexistent department",
		/* ERR_DEPT_LIMIT          */	"Max 24 operatable departments",
		/* ERR_DPSF_INHT           */	"[DEPT SHIFT] key was inhibited",
		/* ERR_PRN_NOT_END         */	"The integral receipt printing no end",
	    /*ERR_DPLU_OVER			   */   "Inexistent DPLU",
        /*ERR_DIGIT_OVER           */   "The number input is too large",
        /*ERR_DIGIT_FMT            */   "the digit format input error",
		/* ERR_PROGRAM_NO_END      */	"The programming no end",
		/* ERR_DESC_BLANK          */	"Input the blank descriptor",
		/* ERR_KEY_CODE            */	"Illegal key code",
		/* ERR_HARD_LOCK           */	"Inexistent the hard control lock",
		/* ERR_PLU_GROUP_FULL      */	"Full PLU group",
		/* ERR_KEY_SEQ             */	"Key sequence error",
		/* ERR_ZERO_TRANS          */	"Zero transaction was inhibited",
		/* ERR_FULL_ITEM           */	"The transaction is full",
		/* ERR_HALO                */	"HALO error",
		/* ERR_XTIME_QTY           */	"The multiplication max quantity is 9999.999",
		/* ERR_TRANS_AMT           */	"The transaction amount is reach to the max",
		/* ERR_TRANS_QTY           */	"The transacton's quantity is reach to the max",
		/* ERR_VOID_OVER           */	"VOID operation, input the digit too big",
		/* ERR_RFND_OVER           */	"Refund operation, input the digit too big",
		/* ERR_PER_RATE_ZERO       */	"The percent rate is 0",
		/* ERR_FLAG_FUNCTION       */	"The percent or refund operation was inhibited",
		/* ERR_SALE_FNSH           */	"No new sale",
		/* ERR_SALE_NO_END         */	"The sale no end",
		/* ERR_PAY_NO_END          */	"The payment no end",
		/* ERR_ZERO_PAY            */	"Not allowed zero payment",
		/* ERR_CID                 */	"The cash total in drawer is over",
		/* ERR_IDVUL_NO_END        */	"Doing the individual report",
		/* ERR_RPT_NOT_EMPTY       */	"The corresponding reports data is not empty",
		/* ERR_PLU_RPT_EMPTY       */	"The PLU report is empty",
		/* ERR_Z_MODE              */	"This operation is not allowed in Z mode",
		/*ERR_NO_RPT_DISP*/		"no report on display",
		/* ERR_FUNC_RES            */ "Function Reserved",
		/* ERR_CLERK_INHT          */	"Clerk function was inhibited",
		/* ERR_CLERK_PRE           */	"Not the prevoius opening table clerk ",
		/* ERR_PASS_ZERO           */	"The password can't be setted to 0",
		/* ERR_PASS_SAME           */	"This password has existed",
		/* ERR_PASS_EXIST          */	"Inexistent password",
		/* ERR_WAITER_SAME         */	"Not the prevoius opening table waiter",
		/* ERR_WAITER_EXIST        */	"Existing waiter in this table",
		/* ERR_LOGI_NO_ZERO        */	"Table logical number can't be setted to 0",
		/* ERR_SAME_LOGI_NO        */	"This logical number is exist in other table",
		/* ERR_LOGI_NO_EXIST       */	"The logical number not exist",
		/* ERR_TBL_OPEN            */	"Inexistent opened table",
		/* ERR_TBL_NOT_ACT         */	"The select table not active",
		/* ERR_OBJ_SRC_TBL_SAME    */	"The object and source table are the same",
		/* ERR_TBL_MERGE_LONG      */	"The merge length of two tables buffer is too big",
		/* ERR_RSNT_MODE           */	"Not in the Restaurant mode",
		/* ERR_KP_ATV              */	"The kitchen printer not active",
		/* ERR_KP_TM_OUT           */	"Kitchen printer timer out",
	#ifdef	REST_PLU_FUNC
		/* ERR_PLU_ATTR				*/	"The PLU was inhibit",
		/* ERR_NORMAL_ATTR         */	"Not the normal PLU",
		/* ERR_SLAVE_ATTR          */	"Not the descriptive or gift PLU",
		/* ERR_EMPTY_MENU          */	"This container is empty",
		/* ERR_MENU_FULL           */	"This container is full",
		/* ERR_MENU_INBT           */	"All container item are inhibitted",
	#endif
		/* ERR_BAR_FORMAT				*/	"Not-supported bar code format",
		/* ERR_BAR_EXIST           */	"Find bar code error",
		/* ERR_SAME_BAR            */	"Set the same bar code",
	#ifdef	PC_COMM
		/* ERR_NO_PC_PORT				*/	"No port used to PC communication",
		/* ERR_PLU_DOWN_INT        */	"The PLU attribute download interrupt",
	#endif
		/* ERR_CALC_KEY				*/	"Not calculator key",
	#ifdef	FCE_FUNC
		/* ERR_FCE_RATE_ZERO			*/	"The FCE rate is 0",
		/* ERR_FCE_XCH_BIG         */	"The FCE exchange data are too big",
		/* ERR_FCE_OVER            */	"FCE data over",
	#endif
	#ifdef	ELEC_JRNL
		/* ERR_EJ_ATV					*/	"The EJ is not active",
		/* ERR_EJ_EMPTY            */	"The EJ is empty",
		/* ERR_EJ_END_INPUT        */	"EJ end condition input is illegal",
		/* ERR_EJ_ZERO_ITEM        */	"Not found the item of EJ",
	#endif
	#if	SW_VER == SW_NE2
		/* ERR_FM_NOT_EXIST			*/	"FM not exist",
		/* ERR_FIRM_CODE_PRESET		*/	"Firm code already preset",
		/* ERR_INVALID_TURKEY_CHAR	*/	"Invalid turkey characters",
		/* ERR_INPUT_DIGIT			*/	"Input digits error",
		/* ERR_FM_WRITE				*/	"Failure to write FM",
		/* ERR_FIRM_CODE_ZERO		*/	"Firm code can't zero",
		/* ERR_FIRM_CODE_NOT_PRESET*/	"Firm code not preset",
	#endif
		/*ERR_IC_NO_CARD*/			"No IC Card inputed",
		/*ERR_IC_BAD*/					"IC Card broken",
		/*ERR_IC_ADDR_OVER*/			"IC Card Address overflow",
		/*ERR_IC_WRITE_FALID*/		"IC Card Write Failed",
		/*ERR_PLU_NUM_MATCHED*/	"PLU number in IC Card not matched",
		/*ERR_DEPT_NUM_MATCHED*/	"Dept number in IC Card not matched",
		
		/* ERR_FLASH_DAMAGE   */	"The Flash is damaged",
		/* ERR_FLASH_EXIST   */		"The flash is not exist",
		/* ERR_SRAM_WRONG	*/		"The SRAM's data is wrong"
};

const char	Str_Error[] = {"--- Error code List ---"};
const char	Disp_Err_Calc[] = {"E"};
const char	Disp_Err_Abnormal[] = {"Error"};
const char	Disp_Err_Normal[] = {"Error"};
const char	Disp_Err_SRAM[] = {"SRAM error"};


/* The end of the file */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -