À³¦¬²¼¾Ú(¶Ç²¼¤é)
½d³ò¿ï¾Ü |
«È¤á±Æ§Ç |
¥ª¥k±²¶ |
ì©lµ{¦¡
ì©lÀɡа_©l /*---------( FSACRB71.C )--------*/ #include "W_FSAC.H" #define SX 20 /*¥ª¤º®Ø */ #define SY 10 /*¤W¤º®Ø */ #define SC 42 /*¤º®Ø¼e, ¦h¤Ö¦æ */ /*-----------------------------------------------------------------*/ #define PrHEAD UPrint("#¦Û %M------ ¨ì %M------ %S------ ",Sday,Eday,ChainKi(Ki)); \ UPrint("===================================================================================================================="); \ UPrint(" ¬ì¥Ø¦WºÙ §I²{¤é´Á ¤ä²¼¸¹½X ɤèª÷ÃB ¤pp ²Öp ºKn ¶Ç²¼ ¶Ç²¼¤é´Á"); \ UPrint("-------------------- -------- -------- ---------- ----------- ----------- ------------------------- ------ --------"); #define PrSTYLE1 "%S------------------ %M------ %S----- %f,-------- %f,-------- %f,-------- %S----------------------- %S---- %M------" #define PrSTYLE0 "%S------------------ %M------ %S----- %f,-------- %S----------------------- %S---- %M------" #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,Buf.CYM,Buf.RM,Buf.AMT,Sum,Total,&Buf.RM[8],Buf.KEY,Buf.YM #define PrDATA0 s,Buf.CYM,Buf.RM,Buf.AMT, &Buf.RM[8],Buf.KEY,Buf.YM /*-----------------------------------------------------------------*/ char *ChainKi(char KI); void ShowData(); void ShowLast(); /*================================================================*/ FSACF001_T ACF001; FSACF011_T ACF011,Buf; double Sum,Total; char Ki; long Sw,Count; /* ¦P¤@¬ì¥Ø¦³´Xµ§*/ int A,B; char *Table="\ \ À³¦¬²¼¾Ú(¶Ç²¼¤é) \ ======================================== \ ¶Ç²¼°_©l¤é: -------- º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,"1141",4)!=0) continue; if(p->DC=='C') continue; /* if(p->AC[4]<=SPACE) continue; */ if(UMidDate(Sday,p->YM,Eday)==OFF) continue; if(Ki=='1') USprint(BufS,"%S-%M----%M----",&p->AC[4],p->YM,p->CYM); else USprint(BufS,"%M----%S-%M----",p->YM,&p->RM[8],p->CYM); 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.YM) - UHowDate(Buf.YM); 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[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*/ } /*===========================================================================*/ void 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 "«È¤á§O"; case '2': return "¶Ç²¼¤é§O"; default : return " "; } } ì©lÀɡе²§ô
Byron Wey¡@¡@Oct.21.1998