¥¼§I²{À³(¥I)²¼¾Ú

wpe29.jpg (52864 bytes)

½d³ò¿ï¾Ü
wpe26.jpg (5670 bytes)

¼t°Ó±Æ§Ç
wpe27.jpg (7019 bytes)

¥ª¥k±²­¶
wpe28.jpg (7031 bytes)


­ì©lµ{¦¡

­ì©lÀɡа_©l
/*---------( FSACR072.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    ¶U¤èª÷ÃB    ¦X­pª÷Ã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¤è²Ä´Xµ§(±q²Ä1ºâ°_,0ªí¥ÜµL)*/
    char     AC[3];       /*2141+©ú²Ó*/
    char     BNO[3];      /*±b¸¹*/
} WORK;

void ShowData();
void RmError(int i);
char *ChainKi(char KI);
/*================================================================*/
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)²¼¾Ú          \
 ================================== \
   §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,"2141",4)!=0) continue;         /*À³¥I¬ì¥Ø*/
            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); /*²¼¾Ú+¤é´Á*/
            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µ§*/
            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);              /*·s¸ê®Æ*/
            memcpy(WORK.BNO,&p->RM[8],3);
            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[0]!=0L) continue;
            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[1]-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¦X­p,²Ö­p*/
   {  UPrint(PrSTYLE1,PrDATA1);                    /*¦C¦L¤@¦C¸ê®Æ*/
      PrSPILT                                      /*¦C¦L¤À¹j½u  */
      Sum = 0f;   Count = 0;
   }
   else UPrint(PrSTYLE0,PrDATA0);                  /*¤£¦L¦X­p,²Ö­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 "¼t°Ó§O";
      case '2': return "§I²{¤é§O";
      default : return " ";
   }
}
­ì©lÀɡе²§ô

Byron Wey¡@¡@Oct.21.1998


¦^­º­¶¡D¢Ñ¤§«°