home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 02a / pull55.zip / PULLDATA.PAS < prev    next >
Pascal/Delphi Source File  |  1989-08-24  |  20KB  |  651 lines

  1. { =========================================================================== }
  2. { PullData.pas - User Statistics for data-entry windows.    ver 5.5, 08-24-89 }
  3. {                                                                             }
  4. { This file contains all the data to configure the data-entry fields in       }
  5. { data windows or work windows.                                               }
  6. {   Copyright (c) 1987-1989 James H. LeMay, All rights reserved.              }
  7. { =========================================================================== }
  8.  
  9. { R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }         { TP4 directives }
  10. {$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}    { TP5 directives }
  11.  
  12. {$define UseMsgLineCode }
  13.  
  14. UNIT PullData;
  15.  
  16. INTERFACE
  17.  
  18. uses
  19.   Crt,Qwik,Strs,Wndw,Pull,PullDir,PullStat;
  20.  
  21. { ================ Set up variables for data windows here: ================== }
  22. { Place your variables names here to interface with the menus.                }
  23. { Careful! -- there's NO type checking for parameters in Transfer.  You MUST  }
  24. { be certain case statement, DataWndw, and TypeOfData all match.  Be          }
  25. { especially careful of string lengths that are too long.  They can be no     }
  26. { longer than DataStrSize.                                                    }
  27. { --------------------------------------------------------------------------- }
  28.  
  29. const
  30.   aByte:      byte      =    129;
  31.   aWord:      word      =  50000;
  32.   aShortInt:  shortint  =    -10;
  33.   aInteger:   integer   = -31456;
  34.   aLongInt:   longint   = -123456789;
  35.   aReal:      real      = -24.34565E06;
  36.   aHex:       string[4] = 'FF03';
  37.   aChar:      char      = 'Q';
  38.   aString:    CrtStrType = 'This is a string';
  39.  
  40.   aByte2:     byte      =    219;
  41.   aWord2:     word      =  45600;
  42.   aShortInt2: shortint  =    -34;
  43.   aInteger2:  integer   =  -1100;
  44.   aLongInt2:  longint   = -98765432;
  45.   aReal2:     real      = -19.07070E12;
  46.   aHex2:      string[4] = 'FFFF';
  47.   aChar2:     char      = 'W';
  48.   aString2:   CrtStrType = 'This is another string';
  49.  
  50.   Seats:      byte      =      4;
  51.   Years:      byte      =     30;
  52.   Month:      byte      =      1;
  53.   Day:        byte      =     12;
  54.   Year:       integer   =   1989;
  55.   PriceLimit: integer   =   2000;
  56.  
  57. type
  58.   DataEntryNames = (
  59.     NoDE,aByte2DE,aWord2DE,aShortInt2DE,aInteger2DE,aLongInt2DE,aReal2DE,
  60.     aHex2DE,aChar2DE,aString2DE,FileNameDE);
  61.  
  62. var
  63.   PathName: string[67];    { for the pull-down directory }
  64.   DataEntryOattr,          { Output attribute }
  65.   DataEntryIattr,          { Input  attribute }
  66.   DataWndwIattr,           { Input  attribute }
  67.   DataWndwOattr,           { Output attribute }
  68.   DataWndwBattr:  byte;    { Border attribute }
  69.   DataWndwBrdr:   Borders;
  70.  
  71.  
  72. IMPLEMENTATION
  73.  
  74. { ================ Set up your Error Message Lines here: ================== }
  75. { Error Messages are used for indicating that data entry was invalid or out }
  76. { of range.  ErrMsgLine[1] is reserved for custom error messages that you   }
  77. { can create at runtime.  Messages up to InvalidEM are reserved and must    }
  78. { match those in PULL.PAS.                                                  }
  79. { ------------------------------------------------------------------------- }
  80. type
  81.   ErrMsgNames = (NoEM,UserEM,InvalidEM,PathEM,RealEM,CharEM,StrEM);
  82.  
  83. {$ifdef UseMsgLineCode }
  84. procedure GetErrMsgs;
  85. begin
  86.   AutoNumLock := false;   { If true, turns on NumLock on with data entry }
  87.   CapsLockCol := 41;      { First column for ' CAPS NUM SCROLL ' on MsgLine. }
  88.  
  89.   ErrMsgLine[ord(InvalidEM)]:=' Invalid entry.             ESC-acknowledge';
  90.   ErrMsgLine[ord(PathEM)]   :=' Invalid path.  Use [d:][path].  Press ESC.';
  91.   ErrMsgLine[ord(RealEM)]   :=' Range: <=4.0e12            ESC-acknowledge';
  92.   ErrMsgLine[ord(CharEM)]   :=' "?" not allowed            ESC-acknowledge';
  93.   ErrMsgLine[ord(StrEM)]    :=' At least 3 chars required. ESC-acknowledge';
  94. end;
  95.  
  96. {$endif UseMsgLineCode }
  97.  
  98. procedure MakeErrMsg (Low,High: longint);
  99. begin
  100.   {$ifdef UseMsgLineCode }
  101.   DataPad.ErrMsg := ord(UserEM);
  102.   ErrMsgLine[ord(UserEM)] :=
  103.     'Range: '+StrL(Low)+' to '+StrL(High)+'.  Press ESC';
  104.   {$endif }
  105. end;
  106.  
  107. { ====================== Data Entry Range Checking ========================== }
  108. { These procedures are completely defined by the user.  They may not even be  }
  109. { necessary if the string entered is satisfactory as a valid number.  The     }
  110. { calls must be forced to FAR because they are called indirectly.             }
  111. { "Translate" can alter each key from the keyboard before it gets evaluated.  }
  112. { "Verify" will check the range or even completely alter the entire string.   }
  113. { --------------------------------------------------------------------------- }
  114.  
  115. {$F+}
  116. procedure VerifyPath;
  117. begin
  118.   with DataPad do
  119.     begin
  120.       {$I-} ChDir (Sdata); {$I+}     { Check for valid directory }
  121.       if IOresult<>0 then
  122.         ErrMsg := ord(PathEM)
  123.       else GetDir (0,PathName);      { Have DOS parrot the path name }
  124.     end;
  125. end;
  126.  
  127. procedure VerifyFileMask;
  128. begin
  129.   with DataPad do
  130.     if Sdata='' then
  131.       Sdata:='*.*';
  132. end;
  133.  
  134. procedure VerifyPriceLimit;
  135. begin
  136.   with DataPad do
  137.     if ((Idata>25000) or (Idata<=0)) then
  138.       MakeErrMsg (1,25000);
  139. end;
  140.  
  141. procedure VerifyMonth;
  142. begin
  143.   with DataPad do
  144.     if ((Bdata=0) or (Bdata>12)) then
  145.       MakeErrMsg (1,12);
  146. end;
  147.  
  148. procedure VerifyDay;
  149. begin
  150.   with DataPad do
  151.     if ((Bdata=0) or (Bdata>31)) then
  152.       MakeErrMsg (1,31);
  153. end;
  154.  
  155. procedure VerifyYear;
  156. begin
  157.   with DataPad do
  158.     if ((Idata<1960) or (Idata>2010)) then
  159.       MakeErrMsg (1960,2010);
  160. end;
  161.  
  162. procedure VerifyYears;
  163. begin
  164.   with DataPad do
  165.     if ((Idata<4) or (Idata>30)) then
  166.       MakeErrMsg (4,30);
  167. end;
  168.  
  169. { -------------------- Work Window Data Entry Checking ---------------------- }
  170.  
  171. procedure TranslateCase;
  172. begin
  173.   if not ExtKey then
  174.     Key := upcase(Key);        { Simple upper case translation }
  175. end;
  176.  
  177. procedure VerifyByte2;
  178. begin
  179.   with DataPad do
  180.     if ((Bdata>200) or (Bdata=0)) then
  181.       MakeErrMsg (1,200);
  182. end;
  183.  
  184. procedure VerifyWord2;
  185. begin
  186.   with DataPad do
  187.     if ((Wdata>45000) or (Wdata=0)) then
  188.       MakeErrMsg (1,45000);
  189. end;
  190.  
  191. procedure VerifyShortInt2;
  192. begin
  193.   with DataPad do
  194.     if ((SIdata>101) or (SIdata<-50)) then
  195.       MakeErrMsg (-50,101);
  196. end;
  197.  
  198. procedure VerifyInteger2;
  199. begin
  200.   with DataPad do
  201.     if ((Idata>20000) or (Idata<-10000)) then
  202.       MakeErrMsg (-10000,20000);
  203. end;
  204.  
  205. procedure VerifyLongInt2;
  206. begin
  207.   with DataPad do
  208.     if ((Ldata>850000) or (Ldata<-1000000)) then
  209.       MakeErrMsg (-1000000,850000);
  210. end;
  211.  
  212. procedure VerifyReal2;
  213. begin
  214.   with DataPad do
  215.     if (Rdata>4.0e12) then
  216.       ErrMsg := ord(RealEM);
  217. end;
  218.  
  219. procedure VerifyChar2;
  220. begin
  221.   with DataPad do
  222.     if (Cdata='?') then
  223.       ErrMsg := ord(CharEM);
  224. end;
  225.  
  226. procedure VerifyString2;
  227. begin
  228.   with DataPad do
  229.     if ord(Sdata[0])<3 then
  230.       ErrMsg := ord(StrEM);
  231. end;
  232.  
  233. {$F-}
  234.  
  235. { ======================== GetUserDataEntry ================================= }
  236. { The major configurations for all menus go here.  The program first clears   }
  237. { all RECORD values to $00.  The values below will set new values. Therefore, }
  238. { setting RECORD values to "false", nil, or the like is not necessary.        }
  239. { --------------------------------------------------------------------------- }
  240.  
  241. { Code saving utilities: }
  242. procedure GetDataWndw (Index: word);
  243. begin
  244.   DWI := Index;
  245.   TopDataWndw := DataWndw^[DWI];
  246. end;
  247.  
  248. procedure SaveDataWndw;
  249. begin
  250.   DataWndw^[DWI] := TopDataWndw;
  251. end;
  252.  
  253. procedure GetDataEntry (Index: word);
  254. begin
  255.   DEI := Index;
  256.   TopEntry := DataEntry^[DEI];
  257. end;
  258.  
  259. procedure SaveDataEntry;
  260. begin
  261.   DataEntry^[DEI] := TopEntry;
  262. end;
  263.  
  264. procedure GetDataEntryStats;
  265. begin
  266.  
  267.   { ------------- Set up your PULL-DOWN Data Windows here: ------------------ }
  268.   { Justification will default with numbers right justified and string to  }
  269.   { the left if none is specified.                                         }
  270.  
  271.   with TopDataWndw,TopDataWndw.Entry do
  272.     begin
  273.  
  274.       GetDataWndw (ord(BytesDW));        { Just gets cleared TopDataWndw }
  275.       VarAddr       := @aByte;
  276.     { TypeOfData    := Bytes; }          { This is the default }
  277.       Field         := 3;
  278.     { JustifyOutput := Right; }          { This is the default }
  279.     { MsgLineNum  := ord(DE_ML); }       { This is the default }
  280.       HelpWndwNum   := ord(NumericHW);
  281.       SaveDataWndw;                   { Saves it in the heap }
  282.  
  283.       GetDataWndw (ord(WordsDW));
  284.       VarAddr     := @aWord;
  285.       TypeOfData  := Words;
  286.       Field       := 5;
  287.     { JustifyOutput := Right; }        { This is the default for numbers }
  288.       HelpWndwNum := ord(NumericHW);
  289.       SaveDataWndw;
  290.  
  291.       GetDataWndw (ord(IntegersDW));
  292.       VarAddr     := @aInteger;
  293.       TypeOfData  := Integers;
  294.       Field       := 6;
  295.       HelpWndwNum := ord(NumericHW);
  296.       SaveDataWndw;
  297.  
  298.       GetDataWndw (ord(LongIntsDW));
  299.       VarAddr     := @aLongInt;
  300.       TypeOfData  := LongInts;
  301.       Field       := 11;
  302.       HelpWndwNum := ord(NumericHW);
  303.       SaveDataWndw;
  304.  
  305.       GetDataWndw (ord(RealsDW));
  306.       VarAddr     := @aReal;
  307.       TypeOfData  := Reals;
  308.       Field       := 17;
  309.       Decimals    :=  8;          { Neg value uses R:F.  Pos value - R:F:D. }
  310.       HelpWndwNum := ord(NumericHW);
  311.       SaveDataWndw;
  312.  
  313.       GetDataWndw (ord(CharsDW));
  314.       VarAddr     := @aChar;
  315.       TypeOfData  := Chars;
  316.       Field       := 1;
  317.       HelpWndwNum := ord(TextHW);
  318.       SaveDataWndw;
  319.  
  320.       GetDataWndw (ord(HexDW));
  321.       VarAddr     := @aHex;
  322.       TypeOfData  := UserNums;
  323.       Field       := 4;
  324.       SetName     := HexSet;     { Specify set name for custom sets }
  325.       TranslateProc := @TranslateCase;
  326.       HelpWndwNum := ord(NumericHW);
  327.       SaveDataWndw;
  328.  
  329.       GetDataWndw (ord(StringsDW));
  330.       Title       := 'Enter string';
  331.       VarAddr     := @aString;
  332.       TypeOfData  := Strings;
  333.       Field       := 25;
  334.       MaxField    := pred(SizeOf(aString));
  335.     { JustifyOutput := Left; }         { This is the default for strings }
  336.       HelpWndwNum := ord(TextHW);
  337.       SaveDataWndw;
  338.  
  339.       GetDataWndw (ord(PathDW));
  340.       Title       := 'Enter path';
  341.       VarAddr     := @PathName;
  342.       TypeOfData  := Strings;
  343.       Field       := 40;
  344.       MaxField    := pred(SizeOf(PathName));
  345.       SetName     := PathSet;
  346.       CheckRangeProc := @VerifyPath;
  347.       HelpWndwNum := ord(TextHW);
  348.       SaveDataWndw;
  349.  
  350.       GetDataWndw (ord(FileMaskDW));
  351.       Title       := 'Enter Mask';
  352.       VarAddr     := @FileMask;
  353.       TypeOfData  := Strings;
  354.       Field       := 12;
  355.       MaxField    := pred(SizeOf(FileMask));
  356.       SetName     := MaskSet;
  357.       CheckRangeProc := @VerifyFileMask;
  358.       HelpWndwNum := ord(TextHW);
  359.       SaveDataWndw;
  360.  
  361.       GetDataWndw (ord(SeatsDW));
  362.       VarAddr     := @Seats;
  363.     { TypeOfData  := Bytes; }        { This is the default. }
  364.       Field       := 2;
  365.       HelpWndwNum := ord(NumericHW);
  366.       SaveDataWndw;
  367.  
  368.       GetDataWndw (ord(PriceDW));
  369.       VarAddr     := @PriceLimit;
  370.       TypeOfData  := Words;
  371.       Field       := 6;
  372.       HelpWndwNum := ord(NumericHW);
  373.       SaveDataWndw;
  374.  
  375.       GetDataWndw (ord(MonthDW));
  376.       VarAddr     := @Month;
  377.       Field       := 2;
  378.       CheckRangeProc := @VerifyMonth;
  379.       HelpWndwNum := ord(NumericHW);
  380.       SaveDataWndw;
  381.  
  382.       GetDataWndw (ord(DayDW));
  383.       VarAddr     := @Day;
  384.     { TypeOfData  := Bytes; }        { This is the default. }
  385.       Field       := 2;
  386.       CheckRangeProc := @VerifyDay;
  387.       HelpWndwNum := ord(NumericHW);
  388.       SaveDataWndw;
  389.  
  390.       GetDataWndw (ord(YearDW));
  391.       VarAddr     := @Year;
  392.       TypeOfData  := Integers;
  393.       Field       := 4;
  394.       CheckRangeProc := @VerifyYear;
  395.       HelpWndwNum := ord(NumericHW);
  396.       SaveDataWndw;
  397.  
  398.       GetDataWndw (ord(YearsDW));
  399.       VarAddr     := @Years;
  400.       TypeOfData  := Integers;
  401.       Field       := 2;
  402.       CheckRangeProc := @VerifyYears;
  403.       HelpWndwNum := ord(NumericHW);
  404.       SaveDataWndw;
  405.  
  406.   end;  { with }
  407.  
  408.   { ------------------------ Work Window Data Entry ------------------------- }
  409.   AutoTab := true;    { After entry, tabs to next one in sequence }
  410.   with DataPad do
  411.     if QvideoMode=Mono then
  412.          Hattr := LightGrayBG
  413.     else Hattr := White+CyanBG; { Optional Attribute of Data Entry hilite }
  414.                                 { Use SameAttr if not desired }
  415.   with TopEntry do
  416.     begin
  417.  
  418.       GetDataEntry (ord(aByte2DE));
  419.       VarAddr     := @aByte2;
  420.       TypeOfData  := Bytes;
  421.       Row         := 14;
  422.       Col         := 20;
  423.       Field       := 4;
  424.       MaxField    := 3;
  425.       CheckRangeProc := @VerifyByte2;
  426.     { MsgLineNum  := ord(DE_ML); }     { This is the default }
  427.       HelpWndwNum := ord(NumericHW);
  428.       SaveDataEntry;
  429.  
  430.       GetDataEntry (ord(aWord2DE));
  431.       VarAddr     := @aWord2;
  432.       TypeOfData  := Words;
  433.       Row         := 15;
  434.       Col         := 20;
  435.       Field       := 6;
  436.       CheckRangeProc := @VerifyWord2;
  437.       HelpWndwNum := ord(NumericHW);
  438.       SaveDataEntry;
  439.  
  440.       GetDataEntry (ord(aShortInt2DE));
  441.       VarAddr     := @aShortInt2;
  442.       TypeOfData  := ShortInts;
  443.       Row         := 16;
  444.       Col         := 20;
  445.       Field       := 4;
  446.       CheckRangeProc := @VerifyShortInt2;
  447.       HelpWndwNum := ord(NumericHW);
  448.       SaveDataEntry;
  449.  
  450.       GetDataEntry (ord(aInteger2DE));
  451.       VarAddr     := @aInteger2;
  452.       TypeOfData  := Integers;
  453.       Row         := 17;
  454.       Col         := 20;
  455.       Field       := 6;
  456.       CheckRangeProc := @VerifyInteger2;
  457.       HelpWndwNum := ord(NumericHW);
  458.       SaveDataEntry;
  459.  
  460.       GetDataEntry (ord(aLongInt2DE));
  461.       VarAddr     := @aLongInt2;
  462.       TypeOfData  := LongInts;
  463.       Row         := 18;
  464.       Col         := 20;
  465.       Field       := 12;
  466.       CheckRangeProc := @VerifyLongInt2;
  467.       HelpWndwNum := ord(NumericHW);
  468.       SaveDataEntry;
  469.  
  470.       GetDataEntry (ord(aReal2DE));
  471.       VarAddr     := @aReal2;
  472.       TypeOfData  := Reals;
  473.       Row         := 19;
  474.       Col         := 20;
  475.       Field       := 17;
  476.       CheckRangeProc := @VerifyReal2;
  477.       HelpWndwNum := ord(NumericHW);
  478.       SaveDataEntry;
  479.  
  480.       GetDataEntry (ord(aHex2DE));
  481.       VarAddr     := @aHex2;
  482.       TypeOfData  := UserNums;
  483.       Row         := 14;
  484.       Col         := 50;
  485.       Field       := 4;
  486.       SetName     := HexSet;
  487.       TranslateProc := @TranslateCase;
  488.       HelpWndwNum := ord(NumericHW);
  489.       SaveDataEntry;
  490.  
  491.       GetDataEntry (ord(aChar2DE));
  492.       VarAddr     := @aChar2;
  493.       TypeOfData  := Chars;
  494.       Row         := 15;
  495.       Col         := 50;
  496.       Field       := 1;
  497.       CheckRangeProc := @VerifyChar2;
  498.       HelpWndwNum := ord(TextHW);
  499.       SaveDataEntry;
  500.  
  501.       GetDataEntry (ord(aString2DE));
  502.       VarAddr     := @aString2;
  503.       TypeOfData  := Strings;
  504.       Row         := 16;
  505.       Col         := 50;
  506.       Field       := 20;
  507.       MaxField    := pred(sizeof(aString2));
  508.       CheckRangeProc := @VerifyString2;
  509.       HelpWndwNum := ord(TextHW);
  510.       SaveDataEntry;
  511.  
  512.       GetDataEntry (ord(FileNameDE));
  513.       VarAddr     := @FileName;
  514.       TypeOfData  := Strings;
  515.       Row         := 17;
  516.       Col         := 50;
  517.       Field       := 12;
  518.       MaxField    := pred(sizeof(FileName));
  519.       SetName     := FileNameSet;
  520.       HelpWndwNum := ord(TextHW);
  521.       SaveDataEntry;
  522.     end;
  523.  
  524. end;  { procedure GetDataEntryStats }
  525.  
  526. { =================== Data Entry Initialization Code ======================== }
  527. { The following code initializes all of the stats for the data entry windows  }
  528. { and the work window data entry fields.  There is no need to edit this       }
  529. { Except for the default colors in SetDefaultColors.                          }
  530. { --------------------------------------------------------------------------- }
  531.  
  532. procedure AllocateHeap;
  533. begin
  534.   if HeapOK (sizeof(DataWndws)) then
  535.     GetMem (DataWndw,SizeOf(DataWndws));
  536.   fillchar (DataWndw^,SizeOf(DataWndws),0);
  537.   if HeapOK (sizeof(DataEntries)) then
  538.     GetMem (DataEntry,SizeOf(DataEntries));
  539.   fillchar (DataEntry^,SizeOf(DataEntries),0);
  540. end;
  541.  
  542. procedure SetDefaultColors;
  543. begin
  544.   { ------------------ Set up your colors and borders here: ---------------- }
  545.   if QvideoMode=Mono then
  546.     begin
  547.       DataEntryIattr := LightGray;         { Input  attribute }
  548.       DataEntryOattr := White;             { Output attribute }
  549.       DataWndwIattr  := White;             { Input  attribute }
  550.       DataWndwOattr  := LightGrayBG;       { Output attribute }
  551.     end
  552.   else
  553.     begin
  554.       DataEntryIattr := Yellow+MagentaBG;  { Input  attribute }
  555.       DataEntryOattr := Black+LightGrayBG; { Output attribute }
  556.       DataWndwIattr  := Black+BrownBG;     { Input  attribute }
  557.       DataWndwOattr  := Yellow+BlackBG;    { Output attribute }
  558.     end;
  559.   DataWndwBattr  := Black+BrownBG;     { Border attribute }
  560.   DataWndwBrdr   := HdoubleBrdr;
  561. end;
  562.  
  563. procedure InitDataColors;
  564. var  i: word;
  565. begin
  566.   for i:=1 to NumOfDataWndws do
  567.     with TopDataWndw,TopDataWndw.Entry do
  568.       begin
  569.         GetDataWndw (i);
  570.         Iattr := DataWndwIattr;   { Input  attribute }
  571.         Oattr := DataWndwOattr;   { Output attribute }
  572.         Battr := DataWndwBattr;   { Border attribute }
  573.         SaveDataWndw;
  574.       end;
  575.   for i:=1 to NumOfDataEntries do
  576.     with TopEntry do
  577.       begin
  578.         GetDataEntry (i);
  579.         Iattr := DataEntryIattr;  { Input  attribute }
  580.         Oattr := DataEntryOattr;  { Output attribute }
  581.         SaveDataEntry;
  582.       end;
  583. end;
  584.  
  585. function GetJustify (Justify: DirType; TOD: TypeOfDataType): DirType;
  586. begin
  587.   if Justify=NoDir then
  588.     begin
  589.       if TOD<=UserNums then
  590.            GetJustify := Right   { for nums }
  591.       else GetJustify := Left;   { for chars and strings }
  592.     end
  593.   else GetJustify:=Justify;
  594. end;
  595.  
  596. function GetSetName (SN: SetNames; TOD: TypeOfDataType): SetNames;
  597. begin
  598.   if SN=NoSet then
  599.     case TOD of
  600.       Bytes,Words:         GetSetName := UnsignedSet;
  601.       ShortInts..LongInts: GetSetName := SignedSet;
  602.       Reals:               GetSetName := RealSet;
  603.     else
  604.       GetSetName := CharSet;
  605.     end
  606.   else GetSetName:=SN;
  607. end;
  608.  
  609. procedure InitDataDefaults;
  610. var i: word;
  611. begin
  612.   for i:=1 to NumOfDataWndws do
  613.     with TopDataWndw,TopDataWndw.Entry do
  614.       begin
  615.         GetDataWndw (i);
  616.         Border  := DataWndwBrdr;
  617.         SetName := GetSetName (SetName,TypeOfData);
  618.         Row := 1;
  619.         Col := 2;
  620.         if MaxField=0 then
  621.           MaxField := Field;
  622.         JustifyOutput := GetJustify (JustifyOutput,TypeOfData);
  623.         if MsgLineNum=0 then
  624.           MsgLineNum := ord(DW_ML);
  625.         SaveDataWndw;
  626.       end;
  627.   for i:=1 to NumOfDataEntries do
  628.     with TopEntry do
  629.       begin
  630.         GetDataEntry (i);
  631.         SetName := GetSetName (SetName,TypeOfData);
  632.         if MaxField=0 then
  633.           MaxField := Field;
  634.         JustifyOutput := GetJustify (JustifyOutput,TypeOfData);
  635.         if MsgLineNum=0 then
  636.           MsgLineNum := ord(DE_ML);
  637.         SaveDataEntry;
  638.       end;
  639. end;
  640.  
  641. BEGIN
  642.   AllocateHeap;
  643.   SetDefaultColors;
  644.   InitDataColors;
  645.   {$ifdef UseMsgLineCode }
  646.   GetErrMsgs;
  647.   {$endif }
  648.   GetDataEntryStats;
  649.   InitDataDefaults;
  650. END.
  651.