¥¼§I²{À³(¦¬)²¼¾Ú
½d³ò¿ï¾Ü |
pºâ¾÷ |
¥ª¥k±²°Ê |
ì©lµ{¦¡
ì©lÀɡа_©l /*---------( FSACR071.C )---------*/ #include "W_FSAC.H" #define SX 20 /*¥ª¤º®Ø */ #define SY 10 /*¤W¤º®Ø */ #define SC 36 /*¤º®Ø¼e, ¦h¤Ö¦æ */ /*-----------------------------------------------------------------*/ #define PrHEAD UPrint("#%S-------- ¦C¦L:%M------ ",ChainKi(Ki),Day); \ UPrint("=============================================================================================================="); \ UPrint(" ¬ì ¥Ø ¦W ºÙ §I²{¤é´Á ¤ä²¼¸¹½X ɤèª÷ÃB ¦Xpª÷ÃB ²Öpª÷ÃB ºK n ¶Ç²¼¸¹"); \ UPrint("-------------------- -------- -------- ----------- ----------- ----------- ------------------------- ------"); #define PrSTYLE1 "%S------------------ %M------ %S------ %f,-------- %f,-------- %f,-------- %S----------------------- %S----" #define PrSTYLE0 "%S------------------ %M------ %S------ %f,-------- %S----------------------- %S----" #define PrSPILT UPrint("¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w"); #define PrNULL #define PrSUMUP #define PrSUM #define PrNEXT #define PrEND #define PrDATA1 s,Buf.CYM,Buf.RM,Buf.AMT,Sum,Total,&Buf.RM[8],Buf.KEY #define PrDATA0 s,Buf.CYM,Buf.RM,Buf.AMT, &Buf.RM[8],Buf.KEY /*-----------------------------------------------------------------*/ struct { char KEY[7+6+1]; /*²¼¾Ú+§I²{¤é*/ long IP[2]; /*0ɤè²Ä´Xµ§,1¶U¤è²Ä´Xµ§(±q²Ä1ºâ°_,0ªí¥ÜµL)*/ char AC[3]; /*1141+©ú²Ó*/ char BNO[3]; /*±b¸¹*/ } WORK; void ShowData(); char *ChainKi(char KI); void RmError(int i); /*================================================================*/ FSACF001_T ACF001; FSACF011_T ACF011,Buf,*ptr; double Sum,Total; char Ki; long Sw,Count; /* ¦P¤@¬ì¥Ø¦³´Xµ§*/ int A,B; char *Table="\ \ ¥¼§I²{À³(¦¬)²¼¾Ú \ ================================== \ §I²{´Á¶¡: -------- ¨ì: -------- \ ±Æ§Ç¤è¦¡: ¨Ì ---------- ±Æ§Ç \ \ ¸ê®Æ¿é¥X¸Ë¸m¡G-------- \ "; /*===========================================================================*/ void main() { USetBXYN(Table,SX,SY,SC); OPEN_ACF001; OPEN_ACF011; ACF001Tx(); NamS=GET_NAME; while(1) { Ki='1'; #include <RPT1.H> if(Field==1) UReadM(BXN(1),&Sday,0,V_WUSR,V_READ); if(Field==2) UReadM(BXN(2),&Eday,0,V_WUSR,V_READ); if(Field==3){ UReadTog(BXN(3),&Ki,V_TOG,"12",ChainKi('1'),ChainKi('2')); UShowSL( BXN(3),ChainKi(Ki),V_WUSR); } #include <RPT2.H> /*±ø¥ó³]©w§¹²¦*/ /*------------------------------------------------------------------*/ Ugd_Open("ÀÉ ®× ³B ²z ¤¤ ½Ð µy Ô ....."); OPEN_WORK; READ1(ACF011) { if(memcmp(p->AC,"1141",4)!=0) continue; /*À³¦¬¬ì¥Ø*/ if(UMidDate(Sday,p->CYM,Eday)==OFF) continue; /*¤é´Á½d³ò*/ /* if(p->AC[4]<=SPACE) continue; */ /*n©ú²Ó*/ memset(&WORK,NULL,sizeof(WORK)); USprint(WORK.KEY,"%S-----%M----",p->RM,p->CYM); /*n¤ñ¹ï ²¼¾Ú+§I²{¤é´Á*/ Ufk_Read(WORKK,&WORK,NULL); if(p->DC=='D') I=0; else I=1; /*0=ɤè,1=¶U¤è*/ if(WORK.IP[I]>0){ ptr=p; RmError(I); } /*À³ªÅ¥Õ,§_«h«½Æ,¿ù*/ WORK.IP[I] = L+1; /*°O¿ý²Ä´Xµ§,L¥ÑREAD1()»¼¼W*/ if(WORK.IP[0]!=0L && WORK.IP[1]!=0L) /*¦³É,¦³¶U,ªí¥Ü¤w¹ï¨R±¼*/ { Ufk_Del(WORKK,&WORK); continue; } /*¹ï¨R*/ memcpy(WORK.AC,&p->AC[4],3); /*¤l¬ì¥Ø3½X*/ memcpy(WORK.BNO,&p->RM[8],3); /*»È¦æ±b¸¹3½X*/ Ufk_Write(WORKK,&WORK); } READ2 Ufk_Flush(WORKK); /*------------------------------------------------------------------*/ Sp=Usp_Open(); lseek(WORKK->ffd,0L,SEEK_SET); for(L=0; ; L++) { if(read(WORKK->ffd,&WORK,sizeof(WORK)) < 1) break; if(WORK.KEY[0]<=SPACE) continue; if(WORK.IP[1]!=0L) continue; /*¦³¶U,ªí¤w¹ï¨R,«h¤£¦L*/ if(Ki=='1') USprint(BufS,"%S-%S----",WORK.AC,&WORK.KEY[7]); else USprint(BufS,"%S----%S-",&WORK.KEY[7],WORK.BNO); Usp_InsIp(Sp,BufS,L); } Ugd_Close(); /*------------------------------------------------------------------*/ Ugd_Open("¦C¦L¤¤ Ctr_F7:µ²§ô¦C¦L"); while(RetKey!=ESC) { if(Usp_GetIp(Sp,&L)==OFF) break; lseek(WORKK->ffd,L*sizeof(WORK),SEEK_SET); read(WORKK->ffd,&WORK,sizeof(WORK)); L = WORK.IP[0]-1; lseek(ACF011K->ffd,L*sizeof(ACF011),SEEK_SET); read(ACF011K->ffd,&ACF011,sizeof(ACF011)); if(Buf.KEY[0]>SPACE) { if(Ki=='1') Sw = memcmp(ACF011.AC,Buf.AC,7); else /* ¤é´Á & ±b¸¹ */ { A = UHowDate(ACF011.CYM) - UHowDate(Buf.CYM); B = memcmp(&ACF011.RM[8],&Buf.RM[8],3); Sw = (A || B); } ShowData(); /*¦C¦L¦s¦bbufferùتº¸ê®Æ*/ } Buf=ACF011; /*¥ý¦s¦bbufferùؼȤ£¦L¥X*/ Count ++; if(Psf=='S' && K0>=22){ UWait(OFF,"Esc:«·s¿ï¾Ü ¥ô¤@ÁäÄ~Äò"); UCls(); K0=0; } if(Psf=='P' && K0>=K1){ fprintf(Stream,"%c",12); K0=0; } } ShowLast(); LineReturn(ON); Ufk_Close(WORKK); Usp_Close(Sp); /*nclose¨Ñ¤U¤@LOOP¨Ï¥Î*/ } } /*===========================================================================*/ void ShowHead() { #ifdef HP-5L /*1998/8/27*/ LockItemHead(2,"~I",NamS,"~Z2W1G2X16"); #else LockItemHead(2,"~IZ2G2",NamS,"~Z1"); #endif PrHEAD /*¦C¦L¼ÐÀY*/ } /*===========================================================================*/ void ShowData() { char s[32]; Sum += Buf.AMT; Total += Buf.AMT; Utx_GetS(Tx,s,Buf.AC,8); if(Count>1 && Ki=='1') s[0]=NULL; if(Sw!=0) /*¦L¦Xp,²Öp*/ { UPrint(PrSTYLE1,PrDATA1); /*¦C¦L¤@¦C¸ê®Æ*/ PrSPILT /*¦C¦L¤À¹j½u */ Sum = 0f; Count = 0; } else UPrint(PrSTYLE0,PrDATA0); /*¤£¦L¦Xp,²Öp*/ } /*===========================================================================*/ ShowLast() { if(Buf.KEY[0]>SPACE){ Sw=ON; ShowData(); } /*±N³Ì«á¦bbufferùتº¸ê®Æ¦L¥X*/ Count = Sum = Total = 0f; memset(&Buf,NULL,sizeof(Buf)); } /*===========================================================================*/ void RmError(int i) { FSACF011_T F011; long ip; ip=tell(ACF011K->ffd); lseek(ACF011K->ffd,(WORK.IP[i]-1)*sizeof(F011),SEEK_SET); read(ACF011K->ffd,&F011,sizeof(F011)); UWait(ON,"¶Ç²¼: %S---- »P %S---- ªº¤ä²¼¸¹½X %S----- «´_",F011.KEY,ptr->KEY,ptr->RM); lseek(ACF011K->ffd,ip,SEEK_SET); } /*================================================================*/ char *ChainKi(char KI) { switch(KI) { case '1': return "«È¤á§O"; case '2': return "§I²{¤é§O"; default : return " "; } } ì©lÀɡе²§ô
Byron Wey¡@¡@Oct.21.1998