#include #include #include #include "PidfAnsi.h" #include "PidfStr.h" #include "PidfDefs.h" #include "UDFCDF_Str.h" #include "UDFCDF_Ansi.h" ByTe_4 ColSizes () { extern struct UserDefs InFo; struct SrcInfo *S; register ReaL_8 *d1, *d2; ByTe_4 MaxLen = 0, N, M, L, Jmp, Len; ByTe_4 EnD; ByTe_1 Blk[45]; S = (struct SrcInfo *)InFo.Src; if (S->UDFSrc == 2) EnD = (InFo.NAnc > 1) ? S->DLen : 1; else EnD = S->DLen; for (M = 0; M < EnD; ++M) { S = (struct SrcInfo *)InFo.Src; for (N = 0; N < InFo.EmptySrc; ++N, ++S) { for (L = 0; L < S->TotMCols; ++L) { Jmp = L * S->DLen; d1 = (ReaL_8 *)S->Pri + M + Jmp; d2 = (ReaL_8 *)S->Alt + M; if ((S->AltUN >= 0 && N == 0 && L == 0) || (S->DType == 1) || (S->DType == 2 && N == 0 && L == 0)) { sprintf (Blk, InFo.OutFmt, *d2); Len = strlen(Blk); if (Len > MaxLen) MaxLen = Len; } if (S->DType != 1) { sprintf (Blk, InFo.OutFmt, *d1); Len = strlen(Blk); if (Len > MaxLen) MaxLen = Len; } } } } if (MaxLen < 3) MaxLen = 3; return (MaxLen); }