Ticket #22321: whatcheck.patch

File whatcheck.patch, 25.4 KB (added by howarth@…, 15 years ago)

whatcheck patch file

  • Makefile_whatcheck

    old new  
    33
    44DEFINES=-DUNIX -DCTEXT -DF2C -DGLX11 -DX11 -DDX4 -DLITE -DWHATCHECK
    55OPTFLAGS=-O0
    6 LIBS= -L/usr/X11R6/lib -lX11 -lm -lcrypt
     6LIBS= -L@PREFIX@/lib -lX11 -lm
    77ANSICC=cc
    88KRCC=cc
    9 INCLUDES= -I/usr/X11R6/include -I.
    10 F77=g77 -xf77-cpp-input -Wsurprising
    11 LD=g77
     9INCLUDES= -I@PREFIX@/include -I.
     10F77=gfortran-mp-4.4 -xf77-cpp-input -Wsurprising -fbackslash
     11LD=gfortran-mp-4.4
    1212
     
    5555        @echo please ignore error message and re-execute make
    5656        exit 3
    5757
    58 SRCFILES = $(addprefix ../whatif/src/, $(OBJECTS:%.o=%.f))
     58SRCFILES = $(addprefix ., $(OBJECTS:%.o=%.f))
    5959DSTFILES = $(notdir $(SRCFILES:%.f=%.F))
    6060
    61 %.F: ../whatif/src/%.f
     61%.F: ./%.f
    6262        sed -r "s/^[Cc].+//" $< | g77  -xf77-cpp-input -E $(DEFINES) - | sed -r "s/^#.+//" > $@
    6363
    6464%.INC: ../whatif/src/%.INC
     
    6868        cat $(DSTFILES) > obfuscated.f
    6969
    7070support.o: support.c
    71         gcc $(DEFINES) -c -o $@ $<
     71        gcc -O3 -I /usr/include $(DEFINES) -c -o $@ $<
    7272
    7373version.f: $(OBJECTS)
    7474        ./mkversion
  • WHATIF.FIG

    old new  
    1 /home/vriend/whatcheck/dbdata/
     1@PREFIX@/share/whatcheck/dbdata/
    22YES DATABASE
    3 /home/vriend/whatcheck/qualty/
     3@PREFIX@/share/whatcheck/qualty/
    44IRIF  FFTFFFTFFFFFFFTFFFFF
  • scatter/support.c

    old new  
    1515#endif
    1616#if !defined(ESV)
    1717#include <unistd.h>
    18 #include <malloc.h>
     18#include <sys/malloc.h>
     19#include <stdio.h>
    1920#else
    2021#include "/usr/include/unistd.h"
    2122#endif
  • scatter/Makefile

    old new  
    55OBJS = data.o general_fit.o figfile.o lines.o\
    66       polyno.o recipes.o scatter.o tools.o support.o
    77
    8 FFLAGS = -O2 #-automatic
    9 CFLAGS = -O2 #-DF2C
     8FFLAGS = -std=legacy -O3 #-automatic
     9CFLAGS = -O3 #-DF2C
    1010
    1111LIBS= #-lf2c
    1212
  • DO_WHATCHECK.COM

    old new  
    11#!/bin/sh
    2 DIR=/home/vriend/whatcheck
     2DIR=@PREFIX@/share/whatcheck
    33umask 001
    44stty intr '^C' > /dev/null
    55[ -f WHATIF.FIG -a ! $DIR = `pwd` ] && /bin/rm WHATIF.FIG
  • supertab.sty

    old new  
     1% @stylefile{Super tabular
     2% shortpackagename = {supertab},
     3% longpackagename  = {supertabular},
     4% baseformats      = {\LaTeX 2.09},
     5% version          = {3.6h},
     6% date             = {1992-07-03},
     7% author           = {Theo Jurriens,
     8%                     TAJ@HGRRUG5,
     9%                     P.O Box 800,
     10%                     9700 AV Groningen},
     11% abstract         = {This file provides the supertabular environment, which
     12%                     is an extension to the standard tabular environment.
     13%                     Large tabulars are automatically split across pages.
     14%                     Seperate commands for the table-head and table-tail
     15%                     are provided, in order to repeat these on each page.}
     16% infauthor        = {Johannes Braams,
     17%                     J.L.Braams@research.ptt.nl,
     18%                     PTT Research,
     19%                     P.O. Box 421,
     20%                     2260 AK Leidschendam}
     21% infdate           = {1990-10-16}}
     22%
     23%----------------------------------------------------------------------------
     24%
     25% supertabular sty
     26% original idea:  Theo Jurriens 1988
     27%                 TAJ@hgrrug5        P.O Box 800, 9700 AV Groningen
     28%
     29% revised by:     Johannes Braams
     30%                 J.L.Braams@research.ptt.nl   PTT Research Leidschendam (NL)
     31%
     32% 10.07.92  - Still a problem in the combination of supertabular with array.sty
     33% V 3.6h      I overlooked the fact that array doesn't use \@tabulacr anymore
     34%             and it behaves differently with respect to \@startparbox.
     35% 03.07.92  - A problem in the combination of supertabular with array.sty
     36% V 3.6g      It can be solved by removing the \string from \def\tableformat
     37%             and passing \tableformat expanded to \tabular.
     38% 11.02.92  - Bug found by Michael Heissmeier when p{...} is used.
     39% V 3.6f      A change in LaTeX.tex didn't find its way into supertabular.
     40% 01.08.91  - Take height of tabletail into account when computing the
     41% V 3.6e      maximum tableheight; add tolerance on first (partial) page
     42%             of the supertabular.
     43% 27.06.91  - Cured bug that made the first part of the table one line
     44% V 3.6d      shorter than the others. Appeared when supertabular was
     45%             used in a twocolumn environment.
     46% 26.06.91  - Made \@process@tablecaption a global macro. Previous caption
     47% V 3.6c      turned up on a table without one.
     48% 27.05.91  - Replaced \clearpage with \newpage to make supertabulars work
     49% V 3.6b      in a twocolumn environment. This also prevents all floats
     50%             from being printed.
     51% 15.02.91  - Because of the check for the use of tablefirsthead the
     52% V 3.6a      combination of an \hline in the head and an \hline as the first
     53%             thing in the data went wrong. The \futurelet in the definition
     54%             of \hline found \fi instead of \hline, so no \doublerulesep
     55%             was added.
     56%             Also had to modify the way the environments were defined.
     57%             The blank space (from the CR after the argument of \supertabular)
     58%             has to be gobbled. This can only be done using a construction
     59%             like \def\command#1 {...}. So removed the use of \newenvironment
     60% 04.02.91  - Added the commands \topcaption, \bottomcaption and \tablecaption
     61% V 3.6       to include a caption within the supertabular environment. The
     62%             default behaviour is to put the caption before the actual start
     63%             of the table.
     64%           - Also added \tablefirsthead and \tablelasttail to let the
     65%             user specify a different head for the first page of the table
     66%             and for consecutive pages as well as different tails for first
     67%             pages and the last one. If these commands are not used, the
     68%             default behaviour will be to use the value of \tablehead end
     69%             \tabletail
     70%           - Removed the need for the \noalign{\global\let\\=\@stabularcr}
     71%             commands by storing and resetting \@stabularcr
     72%
     73% 16.10.90  Added the supertabular* environment that was in an earlier
     74% V 3.5     version (2.0) by the original author
     75%           Reintroduced the version numbering
     76%
     77% revised by:     Gabriele Kruljac
     78%                 kruljac@ds0mpi11   Max-Planck-Institute Stuttgart
     79%
     80%
     81% 06.06.89  Correction: now care is taken of probably existing onecolumn
     82%           head (title or tables ...) in twocolumn sty.
     83%
     84% 10.05.89  Correction: the new \\ definition has been added to the
     85%           begin of each `sub'-tabular
     86%           Added: algorithm to produce the tabulars in twocolumn style
     87%
     88% 06.04.89  Correction: put \global statement in \end{supertabular}
     89%           into \noalign
     90%
     91% 22.02.89  Correction: restore the original meaning of \\ with
     92%           \end{supertabular}
     93%
     94% (Feb 89) The whole algorithm has been changed, so that I can use
     95%          the most features of a normal tabular:
     96%          \\  for new line, including  \\[#1]
     97%          p{...} in the preamble ...
     98%          Account is taken to \baselinestretch and \arraystretch
     99%         -I'm not counting the lines because of too much rounding errors
     100%          but instead I add the (estimated) used space in pt.
     101%         -The tablehead is taken into this algorithm of proofing, so
     102%          I really know how much space the head uses.
     103%         -When no p-arg is given I add a variable \midlineheight to
     104%          calculate the used space. To calculate \midlineheight I
     105%          take the \baselineskip, which is active when the supertabular
     106%          starts (\baselineskip includes the \value of \baselinestretch)
     107%          and multiply it with \arraystretch.
     108%         -When a p-arg is given the text will be stored in a box. So
     109%          I know the height I have to add. Also I reduce the maximum
     110%          pagesize, so that the last parbox on a page can get up to
     111%          max 4 lines without producing an overfull vbox.
     112%         -To do so I had to make some additions to LaTeX's tabular
     113%          commands. These new commands got a leading `s'.
     114%
     115%          Weak points:
     116%          -When the material of a normal entry (not a p-arg) becomes
     117%           larger than the estimated \midlineheight, overfull vboxes
     118%           will be produced at all.
     119%          -When the last p-arg on a page gets more than 4 lines
     120%           (probably even more than 3 lines) it will result in an
     121%           overfull vbox.
     122%           Also some combinations of \baselinestretch \arraystretch and
     123%           a large font may lead to one line too much.
     124%          -if accidentally the last line of the tabular produces
     125%           a newpage, on the next page the tabletail will be written
     126%           immediately after the tablehead. Depending on the contents
     127%           this may result in an error message regarding misplaced
     128%           \noalign.
     129%
     130%           A quick but not very elegant solution: shrink \maxsize by
     131%           \noalign{\global\maxsize=...pt} after the first \\ of the
     132%           supertabular.
     133%
     134%------------------------------------------------------------------------------
     135% Added the user-commands \topcaption and \bottomcaption which set the boolean
     136% @topcaption to determine where to put the tablecaption. The default
     137% is to put the caption on the top of the table
     138%
     139\newif\if@topcaption \@topcaptiontrue
     140\def\topcaption{\@topcaptiontrue\tablecaption}
     141\def\bottomcaption{\@topcaptionfalse\tablecaption}
     142%
     143% Added the command \tablecaption, with the use of the definition
     144% of the \caption and \@caption commands from latex.tex.
     145% This command has to function exactly like \caption does except it
     146% has to store its argument (and the optional argument) for later
     147% processing WITHIN the supertabular environment
     148% JB
     149%
     150\long\def\tablecaption{\refstepcounter{table} \@dblarg{\@xtablecaption}}
     151\long\def\@xtablecaption[#1]#2{%
     152  \long\gdef\@process@tablecaption{\@stcaption{table}[#1]{#2}}}
     153\global\let\@process@tablecaption\relax
     154%
     155%
     156% This is a redefinition of LaTeX's \@caption, \@makecaption is
     157% called within a group so as not to return to \normalsize globally.
     158% also a fix is made for the `feature' of the \@makecaption of article.sty and
     159% friends that a caption ALWAYS gets a \vskip 10pt at the top and NONE at the
     160% bottom. If a user wants to precede his table with a caption this results
     161% in a collision.
     162%
     163\long\def\@stcaption#1[#2]#3{\par%
     164    \addcontentsline{\csname ext@#1\endcsname}{#1}%
     165        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}
     166  \begingroup
     167    \@parboxrestore
     168    \normalsize
     169    \if@topcaption \vskip -10pt \fi % 'fix'
     170    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
     171    \if@topcaption \vskip 10pt \fi % 'fix'
     172  \endgroup}
     173%
     174%                             % \tablehead activates the new tabular \cr
     175%                             % commands
     176\def\@tablehead{}
     177\def\tablehead#1{\gdef\@tablehead{#1}}
     178\def\tablefirsthead#1{\gdef\@table@first@head{#1}}
     179%
     180%+
     181%     If the user uses an extra amount of tabular-data (like \multicolumn)
     182%     in \verb=\tabletail= \TeX\ starts looping because of the definition
     183%     of \verb=\nextline=. So make \verb=\\= act like just a \verb=\cr=
     184%     inside this tail to prevent the loop.
     185%     Save and restore the value of \verb=\\=
     186%-
     187\def\@tabletail{}
     188\def\tabletail#1{%
     189    \gdef\@tabletail{\noalign{\global\let\@savcr=\\\global\let\\=\cr}%
     190                     #1\noalign{\global\let\\=\@savcr}}}
     191\def\tablelasttail#1{\gdef\@table@last@tail{#1}}
     192%
     193\newdimen\maxsize            % maximum pagesize
     194\newdimen\actsize            % actual pagesize
     195\newdimen\twocolsize         % needed for correct max height if twocolumn
     196\newdimen\parboxheight       % height plus depth of a parbox-argument
     197\newdimen\addspace           % stores the value of \\[#1]
     198\newdimen\midlineheight      % estimated size of a normal line
     199\newdimen\pargcorrection     % to set page height tolerance if p-arg
     200\newdimen\computedimens      % computation variable
     201\newbox\tabparbox
     202%
     203%         %%%%  Redefine original LaTeX tabular \cr commands. %%%%
     204%         %%%%  New tabular \cr commands get a leading `s'    %%%%
     205%
     206%                             % Insert  \nextline command for counting
     207\def\@stabularcr{{\ifnum0=`}\fi\@ifstar{\@sxtabularcr}{\@sxtabularcr}}
     208\def\@sxtabularcr{\@ifnextchar[{\@sargtabularcr}%
     209                 {\ifnum0=`{\fi}\cr\nextline}}
     210%
     211%                             % contents of command unchanged
     212\def\@sargtabularcr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
     213    \unskip\@sxargarraycr{#1}\else \@syargarraycr{#1}\fi}
     214%
     215%                             % here copy the value #1 of [ ] of \\
     216%                             % to \addspace
     217\def\@sxargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox
     218    \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr
     219    \noalign{\global\addspace=#1}\nextline}
     220%
     221%                             % command will be called when \\[0pt]
     222\def\@syargarraycr#1{\cr\noalign{\vskip #1\global\addspace=#1}\nextline}
     223%
     224%         %%%%  Redefine original LaTeX p-arg commands.       %%%%
     225%         %%%%  New commands get a leading `s'                %%%%
     226%
     227%                                      % reduce maximum pagesize to have
     228%                                      % a small tolerance for last entry
     229\def\@sstartpbox#1{\global\advance\maxsize by -\pargcorrection
     230                   \global\pargcorrection=0pt
     231%                                      % put text into box to save height
     232                   \setbox\tabparbox%
     233                          \vtop\bgroup\hsize#1\@arrayparboxrestore}
     234\def\@sastartpbox#1{\bgroup\hsize#1%
     235                    \global\advance\maxsize by -\pargcorrection
     236                    \global\pargcorrection=0pt
     237                    \setbox\tabparbox
     238                          \vtop\bgroup\hsize#1\@arrayparboxrestore}
     239%
     240% 11/03/92 JB: The following change didn't find its way into the
     241%              \@sendpbox command. This caused a difference in linespacing
     242%              between a supertabular and a normal tabular.
     243% \def\@endpbox{\unskip\strut\par\egroup\hfil}
     244% % 14 Jan 89: Def of \@endpbox changed from
     245% %    \def\@endpbox{\par\vskip\dp\@arstrutbox\egroup\hfil}
     246% % so vertical spacing works out right if the last line of a `p' entry
     247% % has a descender.
     248\def\@sendpbox{\unskip\strut\par\egroup
     249               \computedimens=\ht\tabparbox
     250               \advance\computedimens by \dp\tabparbox
     251               \ifnum\parboxheight<\computedimens
     252                  \global\parboxheight=\computedimens
     253               \fi
     254               \computedimens=\z@
     255               \box\tabparbox\hfil}
     256\def\@saendpbox{\unskip\strut\par\egroup
     257                \computedimens=\ht\tabparbox
     258                \advance\computedimens by \dp\tabparbox
     259                \ifnum\parboxheight<\computedimens
     260                   \global\parboxheight=\computedimens
     261                \fi
     262                \computedimens=\z@
     263                \unvbox\tabparbox\egroup}
     264%
     265%         %%%%  Here start really new supertabular commands   %%%%
     266%
     267%                                 % estimate height of normal line
     268%                                 % regarding \array- and \baselinestretch
     269\def\calmidlineheight{\midlineheight=\arraystretch \baslineskp
     270                      \global\advance\midlineheight by 1\p@
     271                      \global\pargcorrection=4\midlineheight}
     272%
     273\def\calpage{\global\actsize=\pagetotal  % where am I on the actual page?
     274             \twocolsize=\textheight            %  added 06.06.89
     275             \advance\twocolsize by -\@colroom  %        "
     276             \advance\actsize by \twocolsize    %        "
     277             \global\advance\actsize by \midlineheight
     278             \maxsize=\textheight        % start a new page when 90% of
     279             \multiply \maxsize by 9     % the page are used
     280             \divide\maxsize by 10
     281% Add a litle tolerance on the firsat (partial) page V3.6e
     282             \advance\actsize 2\midlineheight
     283             \ifnum\actsize > \maxsize
     284                   \clearpage
     285                   \global\actsize=\pagetotal
     286             \fi
     287             \maxsize=\textheight       % now set \maxsize with tolerance
     288%+
     289%     measure the height of the tabletail and substract from \maxsize
     290%-
     291             \setbox\@tempboxa=\vbox{\@arrayparboxrestore%
     292                    \expandafter\tabular\expandafter{\tableformat}
     293                    \@tabletail\endtabular}
     294             \global\advance\maxsize by-\ht\@tempboxa}
     295                             % Here is the definition of supertabular
     296% modified JB (15.2.91)
     297\def\supertabular#1 {\def\tableformat{#1}         % store preamble
     298    \global\starfalse % remember this is the normal version
     299%
     300%                                 % Check if we have to insert a caption
     301    \if@topcaption\@process@tablecaption
     302    \fi
     303%                                 % save old \\ moved from below V3.6e
     304    \global\let\@oldcr=\\
     305%
     306    \def\baslineskp{\baselineskip}%
     307    \calmidlineheight% estimate height of a normal line
     308    \calpage         % calculate max. pagesize and startpoint
     309%
     310    \ifx\undefined\@classix      % then array.sty is not loaded
     311%                                 % save old \@tabularcr
     312      \let\@@tabularcr\@tabularcr%             Added JB 4/2/91
     313%                                % Now insert the definition of \@stabularcr
     314      \let\@tabularcr\@stabularcr
     315%                                 % activate new parbox algorithm
     316      \let\@@startpbox=\@sstartpbox
     317      \let\@@endpbox=\@sendpbox
     318    \else
     319      \let\@@tabularcr\@arraycr
     320      \let\@arraycr\@stabularcr
     321      \let\org@startpbox=\@startpbox
     322      \let\org@endpbox=\@endpbox
     323      \let\@startpbox=\@sastartpbox
     324      \let\@endpbox=\@saendpbox
     325    \fi
     326%
     327%    Moved the check for the use of \tablefirsthead to befor the start of
     328%    the tabular environment in order to make the \futurelet inside \hline
     329%    do its work correctly (15.02.91)
     330%
     331    \ifx\@table@first@head\undefined
     332        \let\@@tablehead=\@tablehead
     333    \else
     334        \let\@@tablehead=\@table@first@head
     335    \fi%                                     Added JB 4/2/91
     336%                                 % start normal tabular environment
     337    \expandafter\tabular\expandafter{\tableformat}
     338    \@@tablehead}%   Added JB 15/2/91
     339%
     340%                                 % this is \end{supertabular}
     341\def\endsupertabular{%
     342    \ifx\@table@last@tail\undefined
     343        \@tabletail
     344    \else
     345        \@table@last@tail
     346    \fi%                                     Added JB 4/2/91
     347    \endtabular
     348%                                 % restore old \@tabularcr
     349    \ifx\undefined\@classix      % then array.sty is not loaded
     350      \let\@tabularcr\@@tabularcr             % Added JB 4/2/91
     351    \else
     352      \let\@arraycr\@@tabularcr
     353      \let\@startpbox=\org@startpbox
     354      \let\@endpbox=\org@endpbox
     355    \fi
     356%                                 % Check if we have to insert a caption
     357    \if@topcaption
     358    \else
     359        \@process@tablecaption
     360%                                 % restore to default behaviour
     361        \@topcaptiontrue
     362    \fi
     363%+
     364%    Restore the meaning of \verb=\\= to the one it had before the start
     365%    of this environment. Also re-initialize some control-sequences
     366%-
     367    \global\let\\=\@oldcr
     368    \let\@table@first@head\undefined        % For the next ocurrence
     369    \let\@table@last@tail\undefined         % of this environment
     370    \global\let\@process@tablecaption\relax
     371}
     372%
     373%                             % Here is the definition of supertabular*
     374\newif\ifstar
     375\newdimen\tabularwidth
     376\@namedef{supertabular*}#1#2 {\def\tableformat{#2}          % store preamble
     377    \tabularwidth=#1 % The total width of the tabular
     378    \global\startrue % remember this is the *-version
     379%
     380%                                 % Check if we have to insert a caption
     381    \if@topcaption\@process@tablecaption\fi
     382%
     383    \def\baslineskp{\baselineskip}%
     384    \calmidlineheight% estimate height of a normal line
     385    \calpage         % calculate max. pagesize and startpoint
     386%
     387%
     388    \ifx\undefined\@classix      % then array.sty is not loaded
     389%                                 % save old \@tabularcr
     390      \let\@@tabularcr\@tabularcr%             Added JB 4/2/91
     391%                                % Now insert the definition of \@stabularcr
     392      \let\@tabularcr\@stabularcr
     393%                                 % activate new parbox algorithm
     394      \let\@@startpbox=\@sstartpbox
     395      \let\@@endpbox=\@sendpbox
     396    \else
     397      \let\@@tabularcr\@arraycr
     398      \let\@arraycr\@stabularcr
     399      \let\org@startpbox=\@startpbox
     400      \let\org@endpbox=\@endpbox
     401      \let\@startpbox=\@sastartpbox
     402      \let\@endpbox=\@saendpbox
     403    \fi
     404%
     405%    The same modification as for \tabular 15.2.91
     406    \ifx\@table@first@head\undefined
     407        \let\@@tablehead\@tablehead
     408    \else
     409        \let\@@tablehead\@table@first@head
     410    \fi%                                     Added JB 4/2/91
     411%                                 % start normal tabular environment
     412    \expandafter\csname tabular*\expandafter\endcsname
     413    \expandafter{\expandafter\tabularwidth\expandafter}%
     414    \expandafter{\tableformat}%
     415%
     416    \@@tablehead}%
     417%                                 % this is \end{supertabular*}
     418\@namedef{endsupertabular*}{%
     419    \ifx\@table@last@tail\undefined
     420        \@tabletail
     421    \else
     422        \@table@last@tail
     423    \fi%                                     Added JB 4/2/91
     424    \csname endtabular*\endcsname
     425%                                 % restore old \@tabularcr
     426    \ifx\undefined\@classix      % then array.sty is not loaded
     427      \let\@tabularcr\@@tabularcr             % Added JB 4/2/91
     428    \else
     429      \let\@arraycr\@@tabularcr
     430      \let\@startpbox=\org@startpbox
     431      \let\@endpbox=\org@endpbox
     432    \fi
     433                                 % Check if we have to insert a caption
     434    \if@topcaption
     435    \else
     436        \@process@tablecaption
     437                                 % restore to default behaviour
     438        \@topcaptiontrue
     439    \fi
     440%+
     441%    Restore the meaning of \verb=\\= to the one it had before the start
     442%    of this environment. Also re-initialize some control-sequences
     443%-
     444    \global\let\\=\@oldcr
     445    \let\@table@first@head\undefined        % For the next ocurrence
     446    \let\@table@last@tail\undefined         % of this environment
     447    \global\let\@process@tablecaption\relax}
     448%
     449\def\nextline{%           %%% algorithm to calculate the pagebreaks %%%
     450    \noalign{\ifnum\parboxheight<\midlineheight
     451% V3.6e, non-empty line, but empty parbox, then \parboxheight might
     452% be non-zero, but too small thereby breaking the algorithm.
     453%                                 % if no p-arg add `normal' line height
     454                   \advance\actsize by \midlineheight
     455%                                      % \addspace is value #1 of \\[#1]
     456                   \global\advance\actsize by \addspace
     457             \else
     458%                                 % if p-arg add height of box and more
     459                   \global\advance\actsize by \parboxheight
     460                   \divide\parboxheight by 11\relax
     461                   \global\advance\actsize by \parboxheight%
     462                   \global\parboxheight=0pt
     463             \fi
     464             \global\addspace=0pt}%
     465%                                      % when page becomes full:
     466    \ifnum\actsize<\maxsize
     467%
     468%    This line is necessary because the tablehead has to be inserted *after*
     469%    the \if\else\fi-clause. For this purpose \next is used. In the middle
     470%    of tableprocessing it shoud be an *empty* macro (*not* \relax).
     471%    (15.2.91)
     472    \noalign{\global\let\next\@empty}%
     473    \else
     474%                                      % output \tabletail, close tabular
     475%                                      % output all material and start a
     476%                                      % fresh new page
     477         \@tabletail
     478         \ifstar%                     % Added 16-10-90
     479           \csname endtabular*\endcsname
     480         \else
     481           \endtabular
     482         \fi
     483         \if@twocolumn%                        % added 10.05.89
     484            \if@firstcolumn%                   %
     485               \newpage%                       %
     486            \else%                             %
     487               \clearpage%                     %
     488            \fi%                               %
     489            \twocolsize=\textheight%           % added 06.06.89
     490            \advance\twocolsize by -\@colroom% %       "
     491            \global\actsize=\twocolsize%       %       "
     492% The following lined added 27/6/91 like in the definition of \calpage
     493            \global\advance\actsize by \midlineheight
     494         \else                                 %
     495            \clearpage                         %
     496            \global\actsize=\midlineheight
     497         \fi                                   %
     498         \let\next\@tablehead%                 % Added 15.2.91
     499         \ifstar%                              % Added 16-10-90
     500           \expandafter\csname tabular*\expandafter\endcsname
     501           \expandafter{\expandafter\tabularwidth\expandafter}%
     502           \expandafter{\tableformat}%
     503         \else
     504           \expandafter\tabular\expandafter{\tableformat}%
     505         \fi
     506    \fi\next}%                                % Added \next 15.2.91