Exemple #1
0
 private static unsafe byte AttConvert_gui(runattinf *b1, runattinf *b2, byte lenth1, byte lenth2)
 {
     if ((b1->attlei != attshulei.Sstr.typevalue) && (b2->attlei == attshulei.Sstr.typevalue))
     {
         if (b2->datafrom != 0xfe)
         {
             myapp.errcode = 0x1b;
             return(0);
         }
         if (lenth1 == 0)
         {
             lenth1 = Strmake.Strmake_GetS32strlen(b1->val);
         }
         if (b2->att.merrylenth <= lenth1)
         {
             lenth1 = (byte)(b2->att.merrylenth - 1);
         }
         Strmake.Strmake_S32ToStr(b1->val, b2->Pz, lenth1, 1);
     }
     else
     {
         if ((b1->attlei == attshulei.Sstr.typevalue) && (b2->attlei != attshulei.Sstr.typevalue))
         {
             b2->val = Strmake.Strmake_StrToS32(b1->Pz, lenth1);
             return(Attmake_SetAtt(b2, b2, 0));
         }
         myapp.errcode = 0x1b;
         return(0);
     }
     return(1);
 }