pk.h
上传用户:sdtbys
上传日期:2009-12-06
资源大小:13k
文件大小:3k
- #define DEBUG
- #define PKIP "148.4.254.67"
- #define PKPORT 6004
- typedef struct f_stru1
- {
- char apcode[5]; /* 交易码*/
- char acno[16]; /* 帐号*/
- char pktyp[2]; /* 支付密码类型*/
- char mach[9]; /* 机器号*/
- char chip[7]; /* 芯片号*/
- char fore2[17]; /* 随机码*/
- char fore1[17]; /* 预留码*/
- char bk[49]; /* bk码 */
- char mmcode[13]; /* 支付密码*/
- char acdate[9]; /* 会计日期*/
- char vchdate[9]; /* 票据日期*/
- double amount; /* 金额*/
- double limit; /* 限额*/
- char vchtyp[3]; /* 凭证种类*/
- char vchno[9]; /* 凭证号码*/
- char vchstart[9]; /* 起始号码*/
- char vchend[9]; /* 终止号码*/
- char tlid[5]; /* 柜员号*/
- char name[11];
- char idcard[21];
- char brno[5];
- }F_STRU1;
- #define F_FMT1 "%4s%15s%1s%8s%6s%16s%16s%48s%12s%8s%8s%19.2lf%19.2lf%2s%8s%8s%8s%4s%10s%20s%4s"
- #define F_VAR1 f_datap1->apcode,f_datap1->acno,f_datap1->pktyp,f_datap1->mach,f_datap1->chip,f_datap1->fore2,f_datap1->fore1,f_datap1->bk,f_datap1->mmcode,f_datap1->acdate,f_datap1->vchdate,&f_datap1->amount,&f_datap1->limit,f_datap1->vchtyp,f_datap1->vchno,f_datap1->vchstart,f_datap1->vchend,f_datap1->tlid,f_datap1->name,f_datap1->idcard,f_datap1->brno
- typedef struct b_stru1
- {
- char vflag[2];
- char payacc[20];
- char accept[17];
- char clieno[17];
- char machno[9];
- char chipno[7];
- char passwd[17];
- char proofind[3];
- char chequeno[9];
- char incomacc[20];
- char monies[14];
- char limonies[14];
- char signdate[9];
- char bk[49];
- char bk2[49];
- char usrpasswd[7];
- char payno[13];
- char openo[7];
- }B_STRU1;
- #define B_FMT1 "%1s%19s%16s%16s%8s%6s%16s%2s%8s%19s%13s%13s%8s%48s%48s%6s%12s%6s"
- #define B_VAR1 b_datap1->vflag,b_datap1->payacc,b_datap1->accept,b_datap1->clieno,b_datap1->machno,b_datap1->chipno,b_datap1->passwd,b_datap1->proofind,b_datap1->chequeno,b_datap1->incomacc,b_datap1->monies,b_datap1->limonies,b_datap1->signdate,b_datap1->signdate,b_datap1->bk,b_datap1->bk2,b_datap1->usrpasswd,b_datap1->payno,b_datap1->openo
- typedef struct b_stru2
- {
- char vflag[2];
- char payacc[20];
- char machno[9];
- char chipno[7];
- char bankpasswd[49];
- char bk2[49];
- char okflag[2];
- }B_STRU2;
- #define B_FMT2 "%1s%19s%8s%6s%48s%48s%1s"
- #define B_VAR2 b_datap2->vflag,b_datap2->payacc,b_datap2->machno,
- b_datap2->chipno,b_datap2->bankpasswd,b_datap2->bk2,b_datap2->okflag
- typedef struct f_stru2
- {
- char retcode[5];
- char bk[49];
- }F_STRU2;
- #define F_FMT2 "%4s%48s"
- #define F_VAR2 f_datap2->retcode,f_datap2->bk
- #define FLEN1 sizeof(struct f_stru1)
- #define FLEN2 sizeof(struct f_stru2)
- #define BLEN1 sizeof(struct b_stru1)
- #define BLEN2 sizeof(struct b_stru2)
- int reterr( int id,char * buf);
- int initbdata1();
- extern F_STRU1 *f_datap1;
- extern F_STRU2 *f_datap2;
- extern B_STRU1 *b_datap1;
- extern B_STRU2 *b_datap2;