À³¥I²¼¾Ú(§I²{¤é)
½d³ò¿ï¾Ü |
¤é´Á±Æ§Ç |
¥ª¥k±²¶ |
ì©lµ{¦¡
ì©lÀɡа_©l /*---------( FSACRA72.C )--------*/ #include "W_FSAC.H" #define SX 20 /*¥ª¤º®Ø */ #define SY 10 /*¤W¤º®Ø */ #define SC 36 /*¤º®Ø¼e, ¦h¤Ö¦æ */ /*-----------------------------------------------------------------*/ #define PrHEAD UPrint("#¦Û %M------ ¨ì %M------ %S-------- ",Sday,Eday,ChainKi(Ki)); \ UPrint("===================================================================================================================="); \ UPrint(" ¬ì ¥Ø ¦W ºÙ §I²{¤é´Á ¤ä²¼¸¹½X ¶U¤èª÷ÃB ·í¤Ñ¤pp ²Öp ¤J²¼±b¸¹ ºK n ¶Ç²¼¸¹"); \ UPrint("-------------------- -------- -------- ---------- ----------- ----------- ------------ --------------------- ------"); #define PrSTYLE1 "%S------------------ %M------ %S----- %f,-------- %f,-------- %f,-------- %S---------- %S------------------- %S----" #define PrSTYLE0 "%S------------------ %M------ %S----- %f,-------- %S---------- %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¢w¢w¢w"); #define PrNULL #define PrSUMUP #define PrSUM #define PrNEXT #define PrEND #define PrDATA1 s[0],Buf.CYM,Buf.RM,Buf.AMT,Sum,Total,s[1],&Buf.RM[12],Buf.KEY #define PrDATA0 s[0],Buf.CYM,Buf.RM,Buf.AMT, s[1],&Buf.RM[12],Buf.KEY /*-----------------------------------------------------------------*/ void ShowData(); char *ChainKi(char Ki); /*================================================================*/ FSACF001_T ACF001; FSACF011_T ACF011,Buf,*p; double Sum,Total; char Ki; long Sw,Count; /* ¦P¤@¬ì¥Ø¦³´Xµ§*/ int A,B; char *Table="\ \ À³¥I²¼¾Ú(§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 Ô ....."); Sp=Usp_Open(); READ1(ACF011) { if(memcmp(p->AC,"2141",4)!=0) continue; if(p->DC=='D') continue; /* if(p->AC[4]<=SPACE) continue; */ /*Á`±b*/ if(UMidDate(Sday,p->CYM,Eday)==OFF) continue; if(Ki=='1') USprint(BufS,"%S-%M------",&p->AC[4],p->CYM); else USprint(BufS,"%M------%S-",p->CYM,&p->AC[4]); Usp_InsIp(Sp,BufS,L); } READ2 Ugd_Close(); /*------------------------------------------------------------------*/ Ugd_Open("¦C¦L¤¤ Ctr_F7:µ²§ô¦C¦L"); while(RetKey!=ESC) { if(Usp_GetIp(Sp,&L)==OFF) break; 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>=20){ UWait(OFF,"Esc:«·s¿ï¾Ü ¥ô¤@ÁäÄ~Äò"); UCls(); K0=0; } if(Psf=='P' && K0>=K1){ fprintf(Stream,"%c",12); K0=0; } } ShowLast(); Usp_Close(Sp); LineReturn(ON); } } /*===========================================================================*/ 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[2][32]; s[0][0]=s[1][0]=NULL; if(Buf.RM[8]>SPACE) /*Ū»È¦æ¦WºÙ*/ { USprint(BufS,"1102%S-",&Buf.RM[8]); Utx_GetS(Tx,s[1],BufS,8+8); /*À³¥I²¼¾Ú¡Ð*/ } Sum += Buf.AMT; Total += Buf.AMT; Utx_GetS(Tx,s[0],Buf.AC,8); if(Count>1 && Ki=='1') s[0][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)); } /*================================================================*/ char *ChainKi(char Ki) { switch(Ki) { case '1': return "¼t°Ó§O"; case '2': return "§I²{¤é§O"; default : return " "; } } ì©lÀɡе²§ô
Byron Wey¡@¡@Oct.21.1998