¶Ç ²¼ (§Y®É¹L±b)
wpe62.jpg (54648 bytes)

¬ì¥Ø¬d¸ß
wpe4E.jpg (9940 bytes)

²¼¾Ú¹ï¨R
wpe52.jpg (11703 bytes)

¶Ç²¼¬d¸ß
wpe51.jpg (11968 bytes)



¤@¡Dµe­±»¡©ú¡G

¤G¡A¾Þ§@»¡©ú


¤T¡A­ì©lµ{¦¡

­ì©lÀɡа_©l
/*---------( FSACP011.C )----¶Ç²¼(§Y®É¹L±b)-----*/
#include    "W_FSAC.H"
#define      SX  3             /*¥ª¤º®Ø                             */
#define      SY  4             /*¤W¤º®Ø                             */
#define      SC  76            /*¤º®Ø¼e, ¦h¤Ö¦æ                     */
#define      ANO   120  /*ARRAY  °}¦Cµ§¼Æ*/
#define      TNO     3  /*TITLE  ©ïÀY¶µ¼Æ*/
#define      CNO     5  /*COLUMM ¦U¦C¶µ¼Æ*/
#define      SNO     8  /*¿Ã¹õ°_©l¦C¼Æ,¨Ì©ïÀY¦C¼Æ½Õ¾ã¦¹­È,1¦C=8,2¦C=9,3¦C=10*/
#define      RNO    (22-SNO)  /* ROW    ¿Ã¹õ¦C¼Æ */
/*-----------------------------------------------------------------*/
#define PrHEAD  UPrint("                                   %S----------------  %S--------;                                          ",ChainKI(ACF011.KI),s1);    \
                UPrint("                                                                           ¤é´Á¡G%M------    ½s¸¹:%S--------",ACF011.YM,SelKey);      \
                UPrint("¢z¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢s¢w¢w¢w¢w¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢s¢w¢w¢w¢w¢w¢w¢s¢w¢w¢w¢w¢w¢w¢{");                       \
                UPrint("¢x¬ì¥Ø¸¹      ¬ì  ¥Ø  ¦W  ºÙ    ¢x§I²{¤é´Á¢x        ºK    ­n                  ¢x    ­É¤èª÷ÃB¢x    ¶U¤èª÷ÃB¢x");                       \
                UPrint("¢u¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢t");
#define PrSTYLED       "¢x%S-----  %S------------------ ¢x%M------¢x%S------------------------------- ¢x %f,--------¢x            ¢x"
#define PrSTYLEC       "¢x%S-----  %S------------------ ¢x%M------¢x%S------------------------------- ¢x            ¢x %f,--------¢x"
#define PrSPILT UPrint("¢u¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢q¢w¢w¢w¢w¢w¢w¢t");
#define PrNULL  UPrint("¢x                              ¢x        ¢x                                  ¢x            ¢x            ¢x");
#define PrSUMUP /*     "¢u¢w¢w¢w¢r¢w¢w¢w¢r¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢r¢w¢w¢w¢w¢w¢r¢w¢w¢w¢r¢w¢w¢w¢r¢w¢w¢w¢r¢w¢w¢r¢w¢w¢r¢w¢w¢w¢w¢t"  */
#define PrSUM   UPrint("¢x                              ¢x        ¢x              ¦X        ­p        ¢x %f,--------¢x %f,--------¢x",Dsum,Csum);
#define PrNEXT  UPrint("¢x                              ¢x        ¢x             ** ±µ ¤U ­¶ **       ¢x            ¢x            ¢x");
#define PrEND   UPrint("¢|¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢r¢w¢w¢w¢w¢r¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢r¢w¢w¢w¢w¢w¢w¢r¢w¢w¢w¢w¢w¢w¢}"); \
                UPrint(" ®Ö­ã:             ·|­p:             ÂЮÖ:             ¥X¯Ç:            µn±b:             »s³æ:             ");
#define PrDATA  ACF011A[i].AC,LastKey,ACF011A[i].CYM,ACF011A[i].RM,ACF011A[i].AMT
/*-----------------------------------------------------------------*/
void ACF011Qry();
int  SetCon();
int  AddCash();                 /*¸É²{ª÷¶Ç²¼,¥HACF011.KEY¬°KEY*/
int  CalBalance();
char *ChainKI(char KI);
char *ChainDC(char DC);
void Del1Page();
void EndPage(int sw);
void Field04();
void Print1Page();
void PrintData();
void SetACF011();
void SetMemo();
void ShowData(int i);
void ShowHead1();
void UpdateNew();
void UpdateOld();
void ACF011Help(int r);    /*²¼¾Ú¹ï¨R*/
void ACF011Help2(int r);   /*«D²¼¾Ú¹ï¨R*/
void CopyACFA11();
void ModifyF011();         /*­×§ï¶Ç²¼¸¹*/
/*================================================================*/
FSACF001_T   ACF001;
FSACF002_T   ACF002;
FSACF011_T   ACF011,ACF011A[ANO],ACF011B[ANO];
char        *Table="\
 ¶Ç²¼½s¸¹:------       ¶Ç²¼§O(123):----------------       ¶Ç²¼¤é´Á:-------- \
============================================================================\
¬ì¥Ø¸¹     ¬ì  ¥Ø  ¦W  ºÙ          ºK     ­n        D/C   ª÷   ÃB   §I²{¤é´Á\
------- -------------------- ---------------------- --- ----------- --------\
                                                                            \
============================================================================\
 ²Ä     µ§       ­É:--------------  ¶U:--------------  ®tÃB:--------------  ";

#include    "W_ACP001.C"
void main()
{  USetBXYN(Table,SX,SY,SC);
   UShowTable(3,4,78,SNO-1,Table,V_TABLE);
   for(I=0; I<RNO; I++) UShowSL(3,I+SNO,76,&Table[(SNO-4)*76],V_SHOW);
   UShowTable(3,I+SNO,78,strlen(Table)/76+RNO+2,&Table[(SNO-3)*76],V_TABLE);
   NamS=GET_NAME;   USetXN(&Table[(SNO-5)*76]-2);
   UDrawBox(1,3,80,24,V_BLUE,NO,NO,2);
   OPEN_ACF001; OPEN_ACF002;        /* ·|­p¬ì¥Ø¥DÀÉ;    ºK­nÀÉ;         */
   OPEN_ACF011;                     /* ¶Ç²¼ÀÉ;          ±`¥Î¶Ç²¼®æ¦¡ÀÉ; */
   ACF001Tx();  SetMemo();          /* ¬ì¥Ø¯Á¤Þ;        ºK­n¯Á¤Þ;       */
   Ugd_Open("F3:«Ø¬ì¥Ø F4:¬d¬ì¥Ø.ºK­n F5:¹ï¨R F6:¬d¶Ç²¼ F7:¦C¦L F8:§ï½s¸¹ F9:´¡¤À¿ý PgDn:¦s¤J");
   Ufk_ReadLast(ACF011K,ACF011.KEY); Read1Page(); Field=3;
   while(1)
   {  switch(Field)
      {  case  1: if(UReadS(BXN(1),ACF011.KEY,"NL3",V_SHOW,V_READ))  Read1Page(); break;
         case  2:  UReadTog(BXN(2),&ACF011.KI,V_TOG,"123",ChainKI('1'),ChainKI('2'),ChainKI('3'));
                    UShowSL(BXN(2),ChainKI(ACF011.KI),V_SHOW);  break;
         case  3:    UReadM(BXN(3),&ACF011.YM,8,V_SHOW,V_READ);
                  if(ChkYM(ACF011.YM,ON)==0) break;   /*¦~«×¤£²Å, ĵ§i«á¸õÂ÷*/
                  strcpy(BufS,ACF011.KEY); BufS[3]=NULL; I=atoi(&BufS[1]);
                  if(I!=ACF011.YM.M){ Ugd_Open("·q§i:¤ë¥÷»P¶Ç²¼½s¸¹¤£²Å !"); beep(); getch(); Ugd_Close(); }
                  break;
         default: Field04();                                         break;
      }
      switch(RetKey)
      {  case F6    : UGetTitle(" ¬d ¶Ç ²¼ ");  ACF011Qry();  UPutTitle();  break;
         case A_P   : Pe2=ON;             /*¥Ñ PE2 ¦L¥X, 98/06/16*/
         case F7    : WDO(PrintData);                                break;
         case A_F8  : UGetTitle(" ³]±`¥Î¶Ç²¼ "); CopyACFA11(); UPutTitle(); break;
			/*­ì³]±`¥Î¶Ç²¼,¦]¤Ö¥Î¥B¥\¯à¦C¤wº¡,¬G³]¬°§ï¶Ç²¼½s¸¹¥\¯à,¦ý¤´«O¯d*/
         case F8    : UGetTitle(" §ï¶Ç²¼½s¸¹ "); WDO(ModifyF011); UPutTitle(); Read1Page(); break;
         case F10   : Del1Page();                                    break;
         case PGDN  : if(Update==OFF && Modify==OFF)  /*¥u¶i¤@­¶*/   break;
         case PGUP  :  case C_PGUP: case C_PGDN:
                      ACF011.KEY[6]=NULL;   L=atol(&ACF011.KEY[4])+1; /*«O¯d4¦ì,³Ñ³Ì«á2¦ì¥iÅÜ*/
                      Write1Page();  if(RetKey==ENTER) break; /*­É¶U¤£¥­¿Å*/
                      memcpy(BufS,ACF011.KEY,4);  BufS[4]=NULL;
                      if(BufS[0]<=SPACE) memset(BufS,'0',4);  /*²Ä1¦¸¦Û°Ê¸É"0000"*/
                      if(Ufk_PgUD(ACF011K,ACF011.KEY)==OFF)  /*§¹¥þµL¥ô¦ó¸ê®Æ*/
                          sprintf(ACF011.KEY,"%s%0*ld",BufS,6-4,L);
                      Read1Page();    Field=3;                       break;
         case ESC   : Write1Page();  if(RetKey==ENTER) break; /*­É¶U¤£¥­¿Å*/
                      Ufk_WriteLast(ACF011K);    exit(0);
         default    : UCtrField(ANO,TNO,RNO,CNO);                    break;
      }
      if(Modify==ON) USetColor(SX,SY-1,6,V_MODIFY);
   }
}
/*===========================================================================*/
int  HelpCon(char *ki)
{   int     i=1,md=Modify,x=21,y=SNO-1,no=4;   /* no=³]©w¶µ¥Ø */
    char    Yn='N';

    Wo=Uwo_Open(1,3,80,24);
    UDrawBox(x-6,y,x+51,y+no*2+2,V_WBOX,V_WUSR,YES,YES,2);    *ki='1';                     y+=2;
    UShowSL(x,y,40,"¹ï¨RºØÃþ: 1   (1)À³¦¬²¼¾Ú,(2)À³¥I²¼¾Ú",V_WUSR);     y+=2;
    UShowSL(x,y,10,"§I²{°_©l:",V_WUSR);  UShowM(x+10,y,8,Sday,V_WUSR);  y+=2;
    UShowSL(x,y,10,"§I²{µ²¤î:",V_WUSR);  UShowM(x+10,y,8,Eday,V_WUSR);  y+=2;
    UShowSL(x,y,16,"°õ¦æ(YN): N",V_WUSR);                               x+=10;
    do
    {   y = SNO-1+2*i;
        if(i==1) UReadC(x,y,1,ki,"12",V_WUSR,V_READ);
        if(i==2) UReadM(x,y,8,&Sday,3,V_WUSR,V_READ);
        if(i==3){ if(Eday.D<1) UShowM(x,y,8,Sday,V_WUSR);
                  UReadM(x,y,8,&Eday,3,V_WUSR,V_READ);
                }
        if(i==4) UReadC(x,y,1,&Yn,"YN",V_WUSR,V_READ);
        if(RetKey==LEFT || RetKey==UP)    if(--i<1) i=no;
        if(RetKey==RIGHT || RetKey==DOWN) if(++i>no) i=1;
    }while(Yn!='Y' && RetKey!=ESC);
    Modify=md; Uwo_Close(Wo); return RetKey;
}
/*===========================================================================*/
void ACF011Help(int r)    /*¾ã§å²¼¾Ú¹ï¨R*/
{   TEXT    *t1,*t2;
    char     ki,dc,**s;

    if(HelpCon(&ki)==ESC){ RetKey=NULL; return; }     /*¿é¤J±ø¥ó*/
    if(ki=='1'){ strcpy(SelKey,"1141"); dc='D'; }     /*À³¦¬²¼¾Ú,ÄÝ­É,°£«D¤w¹ï¨R*/
    else       { strcpy(SelKey,"2141"); dc='C'; }     /*À³¥I²¼¾Ú,ÄݶU,°£«D¤w¹ï¨R*/
    t1=Utx_Open(72-89+21,4,78,23,1000,72,OFF);
    t2=Utx_Open(72-89+21,4,10,23,1000,8,OFF);                /*¹ï·Ó¥Î²¼¾Ú¸¹*/
    Utx_AddHead(t1,"§I ±b¸¹ ¦W  ºÙ  §I²{¤é´Á  ²¼¾Ú¸¹    ºK******­n          ª÷ ÃB  ¬ì¥Ø¸¹");
    Utx_AddHead(t1,"-- --- -------- -------- ------- ---------------- ----------- -------");
    strcpy(BufS,   "   %S- %S------ %M------ %S----- %S-------------- %f,-------- %S-----");
    READ1(ACF011)        /*­É¶U¤£¦P,¦ý¤ä²¼¸¹½X7½X¬Û¦P,«hªí¥Ü¹ï¨R*/
    {   if(memcmp(p->AC,SelKey,4)) continue;              /*¬ì¥Ø¤ñ¹ï*/
        if(UMidDate(Sday,p->CYM,Eday)==OFF) continue;     /*¤é´Á¤ñ¹ï*/
        if(p->DC != dc){ Utx_Ins(t2,"%S-----",p->RM); continue; }   /*­É¶U¤£¦P,¥i¯à¤w¹ï¨R,©ñ¤Jt2,¥H«K¤ñ¹ï¤ä²¼¸¹½X(p->RMÀY7½X)*/
        Utx_GetS(Tx,TmpS,p->AC,16);       /*¥HAC°µkey,±q²Ä16¦r¶}©l©ñ¤JTmpS¤¤"1141001 À³¦¬²¼¾Ú¡Ð¥x¶ì*/
        Utx_Ins(t1,BufS,&p->RM[8],TmpS,p->CYM,p->RM,&p->RM[12],p->AMT,p->AC);
    }
    READ2
    for(I=2; I<t1->mem_row; I++)             /*­Yt1»Pt2¦³¬Û¦P¤ä²¼¸¹½X,«h¤w¹ï¨R*/
    {   Utx_Search(t2,&t1->ptr1[I][25]);     /* 3+4+9+9=25=¤ä²¼¸¹½X */
        if(t2->FIND==ON) memcpy(&t1->ptr1[I][0],"£¾",2);
    }
    Utx_Close(t2);
    s=Utx_MtPick(t1,ANO-r,"");
    for(I=0; s[I]; I++,r++)    /*Utx_GetFmt¶ñ­È¤JÅܼƤ¤, USprint¾ã¦XºK­n¤º®e*/
    {   Utx_GetFmt(t1,s[I],"1S 3M 4S 5S 6D 7S",BufS,&ACF011A[r].CYM,&BufS[10],&BufS[20],&ACF011A[r].AMT,ACF011A[r].AC);
        USprint(ACF011A[r].RM,"%S----- %S- %S-------------------",&BufS[10],BufS,&BufS[20]);
        if(dc=='D') ACF011A[r].DC='C';  else ACF011A[r].DC='D';    /*¹ï¨R*/
    }
    Utx_Close(t1); Show1Page(); CalBalance();
}
/*===========================================================================*/
void ACF011Help2(int r)      /*«D²¼¾Ú¹ï¨R*/
{   TEXT    *tx;
    char   **s;

    tx=Utx_Open(72-83+21,4,78,23,1000,90,OFF); /*«D²¼¾Ú*/
    Utx_AddHead(tx,"¹ï¨R¤é´Á       ª÷ ÃB        ºK****­n                   DC ¶Ç²¼¸¹");
    Utx_AddHead(tx,"-------- ----------- --------------------------------- -- ------");
    strcpy(BufS,   "%M------ %F,-------- %S------------------------------- %C %S----");
    READ1(ACF011)
    {   if(memcmp(p->AC,ACF011A[r].AC,7)!=0) continue;
        USprint(TmpS,BufS,p->CYM,p->AMT,p->RM,p->DC,p->KEY);
        I=Utx_Search(tx,TmpS);
        if(tx->FIND==OFF) Utx_Ins(tx,TmpS);                 /* ¥¼§ä¨ì«hIns */
        else if(tx->ptr1[I][55]==p->DC) Utx_Ins(tx,TmpS);   /* §ä¨ì,¦ýD==C */
        else Utx_Del(tx,TmpS);                              /* D!=C «h¨R±¼ */
    }
    READ2
    strcpy(TmpS,ACF011A[r].AC);
    s=Utx_MtPick(tx,ANO-r," «D²¼¾Ú¹ï¨R ");
    for(I=0; s[I]; I++,r++)
    {   Utx_GetFmt(tx,s[I],"0M 1D 2S 3C",&ACF011A[r].CYM,&ACF011A[r].AMT,ACF011A[r].RM,&ACF011A[r].DC);
        if(ACF011A[r].DC=='D') ACF011A[r].DC='C';  else ACF011A[r].DC='D';
        strcpy(ACF011A[r].AC,TmpS);
    }
    Utx_Close(tx);
    Show1Page();
}
/*===========================================================================*/
void ChkBank(int x,int y,char *s)
{   char   tmp[32],buf[32];

    USprint(tmp,"1102%S-",s);                       /*»È¦æ§O 3 ½X*/
    if(Utx_GetS(Tx,buf,tmp,8) && *s>SPACE)
        { UShowSL(x-4,y,3,s,V_SHOW); UShowSL(x,y,18,buf,V_SHOW); }
    else{ UClsField(x-4,y,22,V_SHOW);  memset(s,SPACE,3); }
}
/*===========================================================================*/
void InputRm(int y,int r)
{  int       fi=1,yy=y;

#define  Ix    46
   if(y>17) yy=17; else yy=y;
   Wo=Uwo_Open(X[2],yy-1,80,yy+4);
   USetColor(XN(2),V_READ);
   UShowS(Ix,yy-1," ùï¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢wùñ",V_TABLE);
   UShowS(Ix,yy  ," ùø¤ä²¼:                       ùø",V_TABLE); UShowSL( Ix+9,yy  ,7,ACF011A[r].RM,V_SHOW);
   UShowS(Ix,yy+1," ùø±b¤á:                       ùø",V_TABLE); ChkBank(Ix+13,yy+1,&ACF011A[r].RM[8]);
   UShowS(Ix,yy+2," ùøºK­n:                       ùø",V_TABLE); UShowSL( Ix+9,yy+2,21,&ACF011A[r].RM[12],V_SHOW);
   UShowS(Ix,yy+3," ùø§I²{:                       ùø",V_TABLE); UShowM( Ix+9,yy+3,8,ACF011A[r].CYM,V_SHOW);
   UShowS(Ix,yy+4," ùõ¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢wù÷",V_TABLE);
   while(fi>=1 && fi<=4)
   {  switch(fi)
      {  case 1: UReadS( Ix+9,yy  ,7,ACF011A[r].RM,"NL",V_SHOW,V_READ);           break;
         case 2: UReadS( Ix+9,yy+1,3,&ACF011A[r].RM[8],"NL",V_SHOW,V_READ);
                 ChkBank(Ix+13,yy+1,&ACF011A[r].RM[8]);           break;
         case 3: UReadS( Ix+9,yy+2,21,&ACF011A[r].RM[12],"C",V_SHOW,V_READ);    break;
         case 4: UReadM( Ix+9,yy+3,8,&ACF011A[r].CYM,-1,V_SHOW,V_READ);         break;
      }
      switch(RetKey)
      {  case F4   : if(Utx_Pick(Tx,BufS,0,0,0," ¬ì ¥Ø ¬d ¸ß ",V_SHOW)) memcpy(&ACF011A[r].RM[8],&BufS[4],3);
                     ChkBank(Ix+13,yy+1,&ACF011A[r].RM[8]);   break;
         case LEFT : case UP  : fi--;                     break;
         case RIGHT: case DOWN: fi++;                     break;
         case ESC  : RetKey=RIGHT; fi=10;                 break;
      }
   }
   ACF011A[r].RM[7]=ACF011A[r].RM[11]=SPACE;        /*7=¤ä²¼§À,11=±b¤á§À*/
   Uwo_Close(Wo);
   UShowSL(XN(2),ACF011A[r].RM,V_SHOW);
   UShowM( XN(5),ACF011A[r].CYM,V_SHOW);
}
/*===========================================================================*/
void Field04()
{  int  col=(Field-TNO-1)%CNO,  row=(Field-TNO-1)/CNO;
   int  y=row+SNO, r=row+OffSet;

   USetColor(3,y,76,V_YELLOW);
   UShowI(7,23,3,r+1,"0",V_SHOW);
   switch(col)
   {  case 0: UReadS(XN(0),ACF011A[r].AC,"NL",V_SHOW,V_READ);
              if(Utx_Chain(Tx,ACF011A[r].AC,XY(0),28,V_SHOW)==OFF) UShowSL(3,y,76,&Table[(SNO-4)*76],V_SHOW);
              if(RetKey==F4) Utx_Pick(Tx,ACF011A[r].AC,XY(0),28," ¬ì ¥Ø ¬d ¸ß ",V_SHOW);
              if(strcmp(ACF011A[r].AC,"1101   ")==0 && (ACF011.KI=='1'|| ACF011.KI=='2'))
                 {UWait(ON,"¹ï¤è¬ì¥Ø§A­Ìµ¹,²{ª÷¬ì¥Ø§Ú¸É´N¥i¥H¤F"); UShowSL(3,y,76,&Table[(SNO-4)*76],V_SHOW); }
              /*-----Àˬd­Y¦³©ú²Ó«h¤£¯à¿é¤JÁ`±b,­Y¤£Àˬd,«h§R¦Übreak¤î---*/
              if(ACF011A[r].AC[0]<=SPACE || ACF011A[r].AC[4]>SPACE) break;
              I=Utx_Search(Tx,ACF011A[r].AC)+1;     /*¥i¯à©ú²Ó,©Î¥t¬ì¥Ø*/
              if(memcmp(ACF011A[r].AC,Tx->ptr1[I],4)!=0) break;  /*¸ò¤U¤@µ§¤£¦P*/
              UWait(ON,"<%s> ¬°Á`¬ì¥Ø¡AÀ³¨Ï¥Î©ú²Ó¬ì¥Ø§a¡I",ACF011A[r].AC); ACF011A[r].AC[0]=NULL;
              UShowSL(3,y,76,&Table[(SNO-4)*76],V_SHOW);
              break;
      case 1: if(memcmp(ACF011A[r].AC,"1141",4)==0 || memcmp(ACF011A[r].AC,"2141",4)==0) InputRm(y,r);
              else UReadV(XN(2),ACF011A[r].RM,33,"C",V_SHOW,V_READ);   /*À³¦¬²¼ or À³¥I²¼*/
              if(RetKey==F4) Utx_Pick(TxMemo,ACF011A[r].RM,XN(2)," ºK ­n ¬d ¸ß ",V_SHOW);  break;
      case 2: if(ACF011.KI=='1'){ if(ACF011A[r].AC[0]){ ACF011A[r].DC='C';  UShowSL(XN(3)+1,ChainDC('C'),V_SHOW);}  break; }
              if(ACF011.KI=='2'){ if(ACF011A[r].AC[0]){ ACF011A[r].DC='D';  UShowSL(XN(3)+1,ChainDC('D'),V_SHOW);}  break; }
              I=UReadTog(X[3],y,4,&ACF011A[r].DC,V_TOG,"DC","­É","¶U");
              UShowSL(XN(3)+1,ChainDC(ACF011A[r].DC),V_SHOW);  if(I==ON )  CalBalance();   break;
      case 3: if(UReadD(XN(4),&ACF011A[r].AMT,",",V_SHOW,V_READ)) CalBalance();  break;
      case 4: if(memcmp(ACF011A[r].AC,"1144",4)==0)    /*À³¦¬±b´Ú¤~¿é¤J§I²{¤é*/
                 UReadM(XN(5),&ACF011A[r].CYM,9,V_SHOW,V_READ);
              break;

   }
   USetColor(3,y,76,V_SHOW);
   switch(RetKey)
   {  case F5: if(memcmp(ACF011A[r].AC,"1141",4)==0 || memcmp(ACF011A[r].AC,"2141",4)==0 || ACF011A[r].AC[0]<=SPACE)
                  { UGetTitle(" ²¼ ¾Ú ¹ï ¨R "); ACF011Help(r); UPutTitle(); }
               else  ACF011Help2(r);
               break;
      case F3: ACP001(X[2],y-1,ACF011A[r].AC);
               Utx_Chain(Tx,ACF011A[r].AC,X[0],y,28,V_SHOW);     break;
      case F9: for(I=ANO-2; I>=r; I--) ACF011A[I+1]=ACF011A[I];
               memset(&ACF011A[r],NULL,sizeof(ACF011));
               Show1Page(); Modify=ON;                             break;
   }
}
/*===========================================================================*/
void Show1Page()
{  int   y,r;
   char buf[10];

   UShowSL(BXN(1),ACF011.KEY,V_SHOW);
   UShowSL(BXN(2),ChainKI(ACF011.KI),V_SHOW);
   UShowM( BXN(3),ACF011.YM,V_SHOW);
   for(I=0; I<RNO; I++)
   {  y=I+SNO;  r=I+OffSet;
      memcpy(buf,ACF011A[r].AC,8);
      if(Utx_Chain(Tx,ACF011A[r].AC,XY(0),28,V_SHOW)==OFF)
      {  if(buf[0]>SPACE) UWait(ON,"¤À¿ý:%I< µL <%S-----> ¬ì¥Ø",r+1,buf);
         else{ UShowSL(3,y,76,&Table[(SNO-4)*76],V_SHOW);  continue; }
      }
      UShowSL(XN(2),ACF011A[r].RM,V_SHOW);
      UShowSL(XN(3)+1,ChainDC(ACF011A[r].DC),V_SHOW);
      UShowD( XN(4),ACF011A[r].AMT,",",V_SHOW);
      UShowM( XN(5),ACF011A[r].CYM,V_SHOW);
   }
}
/*===========================================================================*/
void Read1Page()
{
    ACF011.KEY[6]=NULL;                 /*±q¨C±iªºÀY¶}©l,¬G±N¤À¿ý¸¹½X²M¬°NULL*/
    memset(&ACF011A,NULL,sizeof(ACF011A));  /*Ū¸ê®Æ®É­n¥ý±NBuffer²M±¼*/
    for(DiskRec=0; DiskRec<ANO; DiskRec++)
    {   sprintf(BufS,"%s%c",ACF011.KEY,DiskRec+2);       /*±q 2 ¶}©lŪ*/
        if(Ufk_Read(ACF011K,&ACF011A[DiskRec],BufS)==OFF) break;
    }
    memcpy(ACF011B,ACF011A,sizeof(ACF011B));  /*¥H¨Ñ¦s¤J,§R°£®É­×§ï¥Î*/
    if(DiskRec==0)                    /*«O¯d¶Ç²¼¸¹½X,¨ä¥L¸ê®Æ¥þ³¡²M°£*/
    {   memset(&ACF011.KEY[0]+sizeof(ACF011.KEY),NULL,sizeof(ACF011)-sizeof(ACF011.KEY));
        UShowS(SX,SY-1,"(·s¼W)",V_CREATE);   Update=OFF;
        ACF011.KI='2';   /*¤º©w¬°Âà±b¶Ç²¼*/
    }
    else
    {   UShowS(SX,SY-1,"(­×§ï)",V_EDIT);   Update=ON;
        ACF011=ACF011A[0];  ACF011.KEY[6]=NULL; /*³]µ¹ACF011¥H«K¾Þ§@*/
    }
    Modify=OFF; OffSet=0; Show1Page(); CalBalance(); /*Ū¤J®É¤@©w­nModify=OFF*/
    UShowI(7,SNO+RNO+1,3,DiskRec,"0",V_SHOW);
}
/*===========================================================================*/
void Write1Page()
{   int     i,rec;

    if(Modify==OFF) return;
    if(ACF011.KEY[0]<=SPACE) { UWait(ON,".. ½Ð ¥ý ¿é ¤J ¶Ç ²¼ ½s ¸¹ ! .."); RetKey=ENTER; return;}
    if(ChkYM(ACF011.YM,ON)==0){ RetKey=ENTER; return; }     /*¦~«×¤£²Å*/
    if(ACF011.KI=='3' && CalBalance()==OFF){ UWait(ON,"­É ¶U ¤£ ¥­ ¿Å"); RetKey=ENTER; return; }
    if(AddCash()==OFF){ RetKey=ENTER; return; }    /*¸É²{ª÷¶Ç²¼*/
    for(rec=i=0; i<ANO; i++)
    {   if(ACF011A[i].AC[0]==NULL) continue;                /* 1'st byte=NULL*/
        sprintf(ACF011A[i].KEY,"%s%c",ACF011.KEY,rec+2);    /*­«·s±q 2 ¶}©l½s*/
        ACF011A[i].KI=ACF011.KI;
        ACF011A[i].YM=ACF011.YM;
        Ufk_Write(ACF011K,&ACF011A[i]);
        rec++;
    }
    for(i=rec; i<DiskRec; i++)                              /*§R°£¦h¥Xªº¸ê®Æ¶µ*/
    {   sprintf(BufS,"%s%c",ACF011.KEY,i+2);
        Ufk_Del(ACF011K,BufS);
    }
    if(Update) UpdateOld();                        /*¥ý§R°£Âª÷ÃB¸ê®Æ*/
    UpdateNew();                                   /*¦A­«·s¥[¤J·sª÷ÃB¸ê®Æ*/
}
/*===========================================================================*/
void UpdateACF001(FSACF011_T F011,int sw)
{   double   amt;
    int      m,dc;

    if(Ufk_Read(ACF001K,&ACF001,F011.AC)==OFF) return;
    if(sw==OFF) amt = -F011.AMT;                   /* UpdateOld,*/
    else        amt =  F011.AMT;                   /* UpdateNew,*/
    if(F011.DC=='D') dc=0; else dc=1;
    m=ChkYM(F011.YM,OFF);
    ACF001.AMT[dc][m] += amt;                      /* ²Ö¥[¤ë¥÷­É¶U§Oª÷ÃB*/
    ACF001.DC_NO[dc][m] ++;                        /* ­É¶U³B²z¼Æ»¼¼W*/
    Ufk_Write(ACF001K,&ACF001);
}
/*===========================================================================*/
void UpdateNew()
{   int         i;
    FSACF011_T  F011,t;

    for(F011.AMT=0f,i=0; i<ANO; i++)
    {   if(ACF011A[i].AC[0]<=SPACE) continue;   /*µL¬ì¥Ø¥N¸¹*/
        F011.AMT += ACF011A[i].AMT;             /*²Ö¥[*/
        UpdateACF001(ACF011A[i],ON);            /*²Ö¥[¤ë¥÷­É¶U§Oª÷ÃB*/
        if(ACF011A[i].AC[4]<=SPACE) continue;   /*­Y¬°Á`±b¬ì¥Ø«hcontinue*/
        t = ACF011A[i];
        memset(&t.AC[4],SPACE,3);               /*±N©ú²Ó§ï¬°Á`±b*/
        UpdateACF001(t,ON);
    }
    if(ACF011.KI=='3') return;         /*Âà±b¶Ç²¼*/
    strcpy(F011.AC,"1101   ");         /*²{ª÷¶Ç²¼*/
    if(ACF011.KI=='1') F011.DC='D';
    if(ACF011.KI=='2') F011.DC='C';
    F011.YM=ACF011.YM;
    UpdateACF001(F011,ON);             /*²Ö¥[²{ª÷¤ë¥÷­É¶U§Oª÷ÃB*/
}
/*===========================================================================*/
void UpdateOld()
{   int    i;
    FSACF011_T  F011;

    for(F011.AMT=0f,i=0; i<ANO; i++)
    {   if(ACF011B[i].AC[0]<=SPACE) continue;
        F011.AMT += ACF011B[i].AMT;
        UpdateACF001(ACF011B[i],OFF);           /*¦©´î¤ë¥÷­É¶U§Oª÷ÃB*/
        if(ACF011B[i].AC[4]<=SPACE) continue;   /*­Y¬°Á`±b¬ì¥Ø«hcontinue*/
        memset(&ACF011B[i].AC[4],SPACE,3);      /*±N©ú²Ó§ï¬°Á`±b*/
        UpdateACF001(ACF011B[i],OFF);
    }
    if(ACF011B[0].KI=='3') return;         /*Âà±b¶Ç²¼,¨C¤À¿ý³£¤@¼Ë,¬G¬Ý[0]*/
    strcpy(F011.AC,"1101   ");             /*²{ª÷¶Ç²¼*/
    if(ACF011B[0].KI=='1') F011.DC='D';    /*­É*/
    if(ACF011B[0].KI=='2') F011.DC='C';    /*¶U*/
    F011.YM=ACF011B[0].YM;
    UpdateACF001(F011,OFF);                /*¦©´î²{ª÷¤ë¥÷­É¶U§Oª÷ÃB*/
}
/*===========================================================================*/
void Del1Page()
{
    UWait(ON,"­Y ½T ©w ­n §R °£ ¥» µ§ ¸ê ®Æ ¡D½Ð ¦A «ö  F10");
    if(RetKey!=F10) return;
    UpdateOld();                                /*¦©´î¦U¶µ¤ë¥÷­É¶U§Oª÷ÃB*/
    for(I=0; I<ANO; I++)
    {   sprintf(BufS,"%s%c",ACF011.KEY,I+1);    /*±q¸É²{ª÷ 1 ¶}©l§R*/
        if(Ufk_Del(ACF011K,BufS)==OFF && I>0) break;
    }
    if(Ufk_PgUD(ACF011K,ACF011.KEY)==OFF)  /*§R°£«á¸õ¨ì¤U¤@µ§*/
    {   memset(&ACF011,NULL,sizeof(ACF011));
        memset(&ACF011A,NULL,sizeof(ACF011A));
    }
    Read1Page();
}
/*===========================================================================*/
int  AddCash()   /*¸É²{ª÷¶Ç²¼,¥HACF011.KEY¬°KEY*/
{  FSACF011_T  F011;

   memset(&F011,NULL,sizeof(F011));                /* ²M¬° null */
   ACF011.KEY[6]=NULL;
   sprintf(F011.KEY,"%s%c",ACF011.KEY,1);          /*¤À¿ý 1 ¬°¸É²{ª÷¶µ*/
   strcpy(F011.AC,"1101   ");
   F011.KI=ACF011.KI;
   F011.YM=ACF011.YM;
   for(F011.AMT=0f, I=0; I<ANO; I++)
   {  if(ACF011A[I].AC[0]==NULL) continue;         /* 1'st byte=NULL*/
      F011.AMT+=ACF011A[I].AMT;                    /*²Ö¥[¾ã±i¸É²{ª÷¥Î*/
      if(ACF011.KI=='1' && ACF011A[I].DC=='D'){ UWait(ON,"²Ä %d ¤À¿ý¤£¸Ó¬° (­É) §a !!! , ½Ð½T»{¶Ç²¼§O",I+1);  return OFF;}
      if(ACF011.KI=='2' && ACF011A[I].DC=='C'){ UWait(ON,"²Ä %d ¤À¿ý¤£¸Ó¬° (¶U) §a !!! , ½Ð½T»{¶Ç²¼§O",I+1);  return OFF;}
   }
   if(ACF011.KI=='1'){ strcpy(F011.RM,"¸É²{ª÷¦¬¤J¶Ç²¼"); F011.DC='D';  }
   if(ACF011.KI=='2'){ strcpy(F011.RM,"¸É²{ª÷¤ä¥X¶Ç²¼"); F011.DC='C';  }
   if(ACF011.KI=='3' || F011.AMT==0f) Ufk_Del(ACF011K,F011.KEY);  /*©Î³\³Q­×§ï¤~Åܦ¨ 3,©Î¤À¿ý¥[Á`¬°0,ªíµL¤À¿ý,§R±¼¸É²{ª÷¤À¿ý*/
   else Ufk_Write(ACF011K,&F011);
   return ON;
}
/*===========================================================================*/
int  CalBalance()
{  double  sumD=0.0, sumC=0.0;
   int   i, y=23, x=10;

   for(i=0; i<ANO; i++)
   {   if(ACF011A[i].AC[0]==NULL) continue;    /*¬ì¥Ø¥N¸¹¬°NULL,¤£­pºâ*/
       if(ACF011A[i].DC=='D') sumD += ACF011A[i].AMT;
       if(ACF011A[i].DC=='C') sumC += ACF011A[i].AMT;
   }
   UShowD(BX[x+0],y,BN[x+0],sumD,"0,<",V_SHOW);
   UShowD(BX[x+1],y,BN[x+1],sumC,"0,<",V_SHOW);
   UShowD(BX[x+2],y,BN[x+2],fabs(sumD-sumC),"0,<",V_SHOW);
   if(sumD==sumC)  return ON;
   else return OFF;
}
/*===========================================================================*/
char *ChainKI(char KI)
{   switch(KI)
    {   case '1': return " ²{ª÷¦¬¤J¶Ç²¼ ";
        case '2': return " ²{ª÷¤ä¥X¶Ç²¼ ";
        case '3': return " Âà ±b ¶Ç ²¼  ";
        default : return " ";
    }
}
/*===========================================================================*/
char *ChainDC(char DC)
{   switch(DC)
    {   case 'D': return " ­É";
        case 'C': return " ¶U";
        default : return "   ";
    }
}
/*===========================================================================*/
void SetMemo()               /*³]ºK­n¯Á¤Þ¸ê®Æ*/
{
    TxMemo=Utx_Open(37,4,76,23,120,34,OFF);
    lseek(ACF002K->kfd,0L,SEEK_SET);  RetKey=ON;
    while(RetKey)
    {   if(Ufk_SeqRead(ACF002K,&ACF002,"","") != ON) continue;
        Utx_Add(TxMemo,"%S--------------------------------",ACF002.RM);
    }
}
/*===========================================================================*/
int SetCon()
{   int     i=1,md=Modify,x=21,y=SNO-1,no=4;   /* no=³]©w¶µ¥Ø */
    char    Yn='N';

    Wo=Uwo_Open(x-6,y,x+51,y+no*2+2);
    Uwo_DrawBar(Wo,V_WBOX,V_W_IN,YES,3);                                   y+=2;
    UShowSL(x,y,10,"°_©l¤é´Á:",V_W_IN);  UShowM(x+10,y,8,Sday,V_WUSR);     y+=2;
    UShowSL(x,y,10,"µ²¤î¤é´Á:",V_W_IN);  UShowM(x+10,y,8,Eday,V_WUSR);     y+=2;
    UShowSL(x,y,10,"·|­p¬ì¥Ø:",V_W_IN);  UShowSL(x+10,y,7,SelKey,V_WUSR);  y+=2;
    UShowSL(x,y,16,"°õ¦æ(YN): N",V_W_IN);                                     x+=10;
    do
    {   y = SNO-1+2*i;
        if(i==1) UReadM(x,y,8,&Sday,0,V_WUSR,V_READ);
        if(i==2) UReadM(x,y,8,&Eday,0,V_WUSR,V_READ);
        if(i==3){ UReadS(x,y,7,SelKey,"NL",V_WUSR,V_READ);
                  if(RetKey==F4) Utx_Pick(Tx,SelKey,0,0,0,"",V_WUSR);
                  Utx_Chain(Tx,SelKey,x,y,28,V_WUSR);
                }
        if(i==4) UReadC(x,y,1,&Yn,"YN",V_WUSR,V_READ_F);
        if(RetKey==LEFT || RetKey==UP)    if(--i<1) i=no;
        if(RetKey==RIGHT || RetKey==DOWN) if(++i>no) i=1;
    }while(Yn!='Y' && RetKey!=ESC);
    Modify=md; Uwo_Close(Wo); return RetKey;
}
/*===========================================================================*/
void ACF011Qry()
{   double    a,b,d=0f,c=0f;
    TEXT     *tx;
    int       md=Modify;

    if(SetCon()==ESC){ Modify=md; return;  }
    tx=Utx_Open(3,4,76,23,1200,75,OFF);
    Utx_GetS(Tx,TmpS,SelKey,0);
    Utx_AddHead(tx,"%S---------------------------                    %M------ ¨ì %M------ ",TmpS,Sday,Eday);
    Utx_AddHead(tx,"======================================================================");
    Utx_AddHead(tx,"¶Ç²¼¸¹ ¶Ç²¼¤é´Á        ºK    ­n                   ­É¤èª÷ÃB    ¶U¤èª÷ÃB");
    Utx_AddHead(tx,"------ -------- ------------------------------ =========== ===========");
    READ1(ACF011)
    {   if(memcmp(p->AC,SelKey,7)!=0) continue;
        if(UMidDate(Sday,p->YM,Eday)==OFF) continue;
        if(p->DC=='D'){ a=p->AMT;  b=0f;  d+=a; }
        else          { b=p->AMT;  a=0f;  c+=b; }
        Utx_Ins(tx,"%S---- %M------ %S---------------------------- %f,-------- %f,--------",p->KEY,p->YM,p->RM,a,b);
    }
    READ2
    Utx_Add(tx    ,"----------------------------------------------------------------------");
    Utx_Add(tx    ,"                                      (¦X­p)  %f,--------- %f,--------",d,c);
    Str=Utx_Pick(tx,TmpS,0,0,0,"",V_SHOW);  Modify=md;
    if(Str){ Write1Page();
           if(RetKey!=ENTER)      /*­É¶U¥­¿Å*/
           {  Utx_GetFmt(tx,TmpS,"0S",ACF011.KEY); Read1Page(); }
         }
    Utx_Close(tx);
}
/*===========================================================================*/
void CopyACFA11()
{   static  TEXT  *tx;
    static  int    HasRead=OFF;
    FSACFA11_T     ACFA11;

    if(ACF011.KEY[0]<=SPACE){ UWait(ON,"µL¶Ç²¼½s¸¹"); return; }
    for(I=0; I<ANO; I++) if(ACF011A[I].AC[0]>SPACE) break;
    if(I<ANO){ UWait(ON,"¥Ø«e¤w¦³¤À¿ý, ­Y½T©w­n¨ú¾P¸ê®Æ.½Ð¦A«ö F8"); if(RetKey!=F8) return; }
    if(HasRead==OFF)
    {   OPEN_ACFA11;
        tx=Utx_Open(43,4,76,23,300,5,OFF);
        READ1(ACFA11)
        {   Utx_Search(tx,p->KEY);
            if(tx->FIND==OFF) Utx_Ins(tx,"%S-- %S------------------",p->KEY,p->NAM);
        }
        READ2
        HasRead=ON;
    }
    if(Utx_Pick(tx,SelKey,0,0,0,"",V_SHOW)==OFF) return;
    memset(&ACF011A,NULL,sizeof(ACF011A));
    Modify=ON;    Write1Page();  if(RetKey==ENTER) return;  /*­É¶U¤£¥­¿Å*/
    for(I=0; I<ANO; I++)
    {   sprintf(BufS,"%s%c",SelKey,I+2);
        if(Ufk_Read(ACFA11K,&ACFA11,BufS)==OFF) break;
        strcpy(ACF011A[I].AC,ACFA11.AC);
        strcpy(ACF011A[I].RM,ACFA11.RM);
        ACF011.KI=ACFA11.KI;
        ACF011A[I].DC =ACFA11.DC;
        ACF011A[I].AMT=ACFA11.AMT;
    }
    Modify=ON; OffSet=0; Show1Page();
}
/*===========================================================================*/
int      Half=OFF;
#ifdef   HP-5L          /*1998/9/07*/
#define  RowN   8             /*¨C¥b­¶´X¦C¬ì¥Ø¤À¿ý*/
#define  K0n   (RowN*2+6)     /*K0­p¼Æ,§PÂ_¬O§_º¡¥b­¶ªº¦C¼Æ(§t¤À³Î½u)*/
#define  MaxK0 35             /*§t¦X­p,ñ¦W¥H«á,¤p©ó¥b­¶MaxK0,³£¸ÉªÅ¥Õ¦C*/
#else
#define  RowN  12
#define  K0n   30
#define  MaxK0 37
#endif
void PrintData()
{
   Write1Page(); if(RetKey==ENTER) return;  Modify=OFF;   /*RetKey==ENTER,­É¶U¤£¥­¿Å*/
   UGetTitle(" ¸ê ®Æ ¦C ¦L ");
   Ugd_Open("F7:¦C¦L                  Esc:©ñ±ó");
   UDrawBox(21,8,64,12,V_WBOX, V_W_IN, YES, 3);
   UShowS(25,10,       "¶Ç²¼½s¸¹¦Û:        ¡÷ ",V_W_IN);
   UShowSL(37,10,6,ACF011.KEY,V_WUSR); strcpy(Ekey,ACF011.KEY); UShowSL(47,10,6,Ekey,V_WUSR);
   do UReadS(47,10,6,Ekey,"NL3",V_WUSR,V_READ);
   while(RetKey!=F7 && RetKey!=ESC);
   if(RetKey==ESC){ Ugd_Close(); return;}
   if(Pe2) Stream=fopen("TMP.$$$","w+");   /*¥Ñ PE2 ¦L¥X, 98/06/16*/
   else { if(UInitLpt()==OFF){ Ugd_Close(); return; }  Stream=stdprn; }
   Psf='P';
   Print1Page(); RetKey=PGDN;  Field=1;
   while(1)
   {   if(Ufk_PgUD(ACF011K,ACF011.KEY)==OFF) break;
       Read1Page();
       if(memcmp(ACF011.KEY,Ekey,6)>0) break;
       Print1Page();
   }
   if(Half==ON){ fprintf(Stream,"%c",12);  Half=OFF; } /*´«­¶,§K±o¯d¦bbuffer*/
   Ugd_Close();
   if(Pe2){ fclose(Stream);  system("pe2 tmp.$$$");  Pe2=OFF; }
}
/*===========================================================================*/
double   Dsum,Csum;
void Print1Page()
{  int   i,j;

    P0=K0=1; Dsum=Csum=0f;
    for(i=0; i<ANO && P0; i+=RowN)
    {   K0=1;  ShowHead();
        for(j=i; j<i+RowN && P0; j++)
        {   if(ACF011A[j].AC[0]<=SPACE){ EndPage(OFF); return; }  /*µ²§ô¦C¦L*/
            ShowData(j);
        }
    }
}
/*===========================================================================*/
void ShowHead()
{  char s1[20];

   sprintf(SelKey,"%06s(%d)",ACF011.KEY,P0++);
#ifdef   HP-5L          /*1998/8/27*/
   fprintf(Stream,"~IL0G2;");   strcpy(s1,"~Z2W1X20");
   PrHEAD;
#else
   fprintf(Stream,"~IL0Z2W1G2X3;");   strcpy(s1,"~Z1");
   UPrint(" ");   PrHEAD;              /*¥[¦L¤@ªÅ¥Õ¦C,98/09/07*/
#endif
}
/*===========================================================================*/
void ShowData(int i)
{
   Utx_GetS(Tx,LastKey,ACF011A[i].AC,8);
   if(ACF011A[i].DC=='D'){ UPrint(PrSTYLED,PrDATA);  Dsum+=ACF011A[i].AMT; }
   else                  { UPrint(PrSTYLEC,PrDATA);  Csum+=ACF011A[i].AMT; }
   PrSPILT                                      /*¦C¦L¤À¹j½u  */
   if(K0>=K0n)          /*º¡¥b­¶ªº¦C¼Æ*/
   {   if(ACF011A[i+1].AC[0]>SPACE) EndPage(ON);
       else { EndPage(OFF);  P0=0; }
   }
}
/*===========================================================================*/
void EndPage(int sw)
{
   while(K0<16)
      {  PrNULL;  PrSPILT; }
   if(sw==OFF)
      PrSUM
   else
      PrNEXT               /*31*/
   PrEND                   /*32,33*/
#ifdef   HP-5L          /*1998/8/27*/
   if(Half==OFF)        /*«e¥b­¶*/
      { while(K0<=MaxK0) UPrint(" ");  Half=ON; }    /*¤p©ó¥b­¶,³£¸ÉªÅ¥Õ¦C*/
   else                 /*«á¥b­¶*/
      { fprintf(Stream,"%c",12);  Half=OFF; }
#else
   while(K0<=MaxK0) UPrint(" ");          /*¤p©ó¥b­¶,³£¸ÉªÅ¥Õ¦C*/
   fprintf(Stream," ~L5; \n");
#endif
}
/*===========================================================================*/
void ModifyF011()
{  FSACF011_T   F011;
   int x1=17, x2=x1+43, y1=16, y2=y1+4;
   Ugd_Open("F7:°õ¦æ         Esc:©ñ±ó");
   UDrawBox(x1,y1,x2,y2,V_WARNING, V_W_IN, YES, 3);
   UShowS(x1+4,y1+2,       "¶Ç²¼½s¸¹¥Ñ:        §ï¬° ",V_W_IN);
   UShowSL(x1+16,y1+2,6,ACF011.KEY,V_WUSR); strcpy(Ekey,ACF011.KEY); UShowSL(x1+28,y1+2,6,Ekey,V_WUSR);
   do UReadS(x1+28,y1+2,6,Ekey,"NL3",V_WUSR,V_READ);
   while(RetKey!=F7 && RetKey!=ESC);
   Ugd_Close();
   if(RetKey==ESC) return;
   sprintf(BufS,"%s%c",Ekey,2);              /*±q 2 ¶}©lŪ,Àˬd¬O§_¤w¦s¦b*/
   if(Ufk_Read(ACF011K,&F011,BufS)==ON)
      {  UWait(ON,"¶Ç²¼ <%s> ¤w¦³¸ê®Æ",Ekey); Field=3; return; }
   strcpy(Skey,ACF011.KEY);                  /*«O¦s­ìKEY­È,§R°£°Ñ¦Ò*/
   strcpy(ACF011.KEY,Ekey);  Write1Page();   /*§ïÅÜKEY­È,¼g¤J,UpdateOld()¦©´î¦U¶µ¤ë¥÷­É¶U§Oª÷ÃB*/
   for(I=0; I<ANO; I++)
   {   sprintf(BufS,"%s%c",Skey,I+1);  /*±q¸É²{ª÷ 1 ¶}©l§R*/
       if(Ufk_Del(ACF011K,BufS)==OFF && I>0) break;
   }
}

­ì©lÀɡе²§ô

Byron Wey¡@¡@Oct.21.1998


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