\gdef\mpxshipout{\shipout\hbox\bgroup%
  \setbox0=\hbox\bgroup}%
\gdef\stopmpxshipout{\egroup  \dimen0=\ht0 \advance\dimen0\dp0
  \dimen1=\ht0 \dimen2=\dp0
  \setbox0=\hbox\bgroup
    \box0
    \ifnum\dimen0>0 \vrule width1sp height\dimen1 depth\dimen2 
    \else \vrule width1sp height1sp depth0sp\relax
    \fi\egroup
  \ht0=0pt \dp0=0pt \box0 \egroup}
\mpxshipout% line 6 ./mpdefs.mp
apples\strut%
\stopmpxshipout
\mpxshipout% line 7 ./mpdefs.mp
oranges\strut%
\stopmpxshipout
\mpxshipout% line 8 ./mpdefs.mp
bananas\strut%
\stopmpxshipout
\mpxshipout% line 9 ./mpdefs.mp
fruits\strut%
\stopmpxshipout
\mpxshipout% line 10 ./mpdefs.mp
potatoes\strut%
\stopmpxshipout
\mpxshipout% line 11 ./mpdefs.mp
peas\strut%
\stopmpxshipout
\mpxshipout% line 12 ./mpdefs.mp
vegetables\strut%
\stopmpxshipout
\mpxshipout% line 13 ./mpdefs.mp
food\strut%
\stopmpxshipout
\end{document}
