Module: _lblrun      Library: Clipper 5.3


This module contains the following functions and procedures:



Note: Because this is raw decompiler output, the code is closer
to that seen in a .PPO file, rather than a .PRG file. In other
words, you must allow for the preprocessor conversions normally 
performed based on the contents of STD.CH and other .CH files
 
#include "common.ch"
#include "inkey.ch"

//-----------------------------------------------------------------
//  file-wide static variables
//
static Static1:= {}, Static2:= {}, Static3:= "", Static4:= .T., ;
   Static5 := 1

//---------------------------------------------------[top]-
//  EXECUTELAB
//
static procedure EXECUTELAB

   local Local1, Local2, Local3 := {}, Local4, Local5
   for Local1 := 1 to Len(Static1[ 8 ])
      if ( Static1[ 8 ][ Local1 ] != Nil )
         Local5 := eval(Static1[ 8 ][ Local1 ][ 1 ])
         Local4 := padr(Local5, Static1[ 3 ])
         Local4 := Local4 + Space(Static1[ 6 ])
         if ( Static1[ 8 ][ Local1 ][ 3 ] )
            if ( !Empty(Local4) )
               AAdd(Local3, Local4)
            endif
         else
            AAdd(Local3, Local4)
         endif
      else
         AAdd(Local3, Nil)
      endif
   next
   asize(Local3, Len(Static1[ 8 ]))
   for Local1 := 1 to Len(Static1[ 8 ])
      if ( ISNIL( Local3[ Local1 ] ) )
         Static2[ Local1 ] := Static2[ Local1 ] + Static3
      else
         Static2[ Local1 ] := Static2[ Local1 ] + Local3[ Local1 ]
      endif
   next
   if ( Static5 == Static1[ 7 ] )
      for Local1 := 1 to Len(Static2)
         Static2[ Local1 ] := Trim(Static2[ Local1 ])
      next
      Static4 := .F.
      Static5 := 1
      aeval(Static2, { |_1| printit(_1) })
      Local2 := Static1[ 2 ] - Len(Static2)
      if ( Local2 > 0 )
         for Local1 := 1 to Local2
            printit()
         next
      endif
      if ( Static1[ 5 ] > 0 )
         for Local1 := 1 to Static1[ 5 ]
            printit()
         next
      endif
      afill(Static2, Space(Static1[ 4 ]))
   else
      Static4 := .T.
      Static5++
   endif
   return

//---------------------------------------------------[top]-
//  PRINTIT( Arg1 )
//
static procedure PRINTIT( Arg1 )

   default Arg1 to ""
   ?? Arg1
   ? 
   return

//---------------------------------------------------[top]-
//  SAMPLELABE
//
static procedure SAMPLELABE

   local Local1, Local2 := .T., Local3, Local4:= {}
   asize(Local4, Static1[ 2 ])
   afill(Local4, Space(Static1[ 4 ]) + Replicate(Replicate("*", ;
      Static1[ 3 ]) + Space(Static1[ 6 ]), Static1[ 7 ]))
   do while ( Local2 )
      aeval(Local4, { |_1| printit(_1) })
      if ( Static1[ 5 ] > 0 )
         for Local3 := 1 to Static1[ 5 ]
            printit()
         next
      endif
      @ Row(),  0 say nationmsg(2) + " (" + nationmsg(12) + ")"
      Local1 := InKey(0)
      @ Row(), Col() say Chr(Local1)
      if ( Row() == MaxRow() )
         Scroll(0, 0, MaxRow(), MaxCol(), 1)
         @ MaxRow(),  0 say ""
      else
         @ Row() + 1,  0 say ""
      endif
      if ( isnegative(Chr(Local1)) )
         Local2 := .F.
      endif
   enddo
   return

//---------------------------------------------------[top]-
//  __LABELFOR( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, ;
//
procedure __LABELFOR( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, ;
   Arg8, Arg9, Arg10 )

   local Local1 := .F., Local2, Local3, Local4, Local5, Local6:= .F., ;
      Local7, Local8
   if ( ISNIL( Arg1 ) )
      Local7 := errornew()
      Local7:severity(2)
      Local7:gencode(1)
      Local7:subsystem("FRMLBL")
      eval(errorblock(), Local7)
   elseif ( At(".", Arg1) == 0 )
      Arg1 := Trim(Arg1) + ".LBL"
   endif
   default Arg2 to .F.
   default Arg10 to .F.
   if ( Arg2 )
      Local1 := Set(_SET_PRINTER, Arg2)
   endif
   Local2 := Set(_SET_CONSOLE)
   set console (!( Arg4 .OR. !Local2 ))
   if ( !Empty(Arg3) )
      Local4 := Set(_SET_EXTRA, .T.)
      Local3 := Set(_SET_EXTRAFILE, Arg3)
   endif
   Local8 := Set(_SET_MARGIN, 0)
   begin sequence
      Static1 := __lblload(Arg1)
      Static1[ 4 ] := Static1[ 4 ] + Local8
      asize(Static2, Len(Static1[ 8 ]))
      afill(Static2, Space(Static1[ 4 ]))
      Static3 := Space(Static1[ 3 ] + Static1[ 6 ])
      if ( Arg10 )
         samplelabe()
      endif
      DBEval({ || executelab() }, Arg5, Arg6, Arg7, Arg8, Arg9)
      if ( Static4 )
         aeval(Static2, { |_1| printit(_1) })
      endif
   recover using Local5
      Local6 := .T.
   end sequence
   Static1 := {}
   Static2 := {}
   Static5 := 1
   Static3 := ""
   Static4 := .T.
   set printer (Local1)
   set console (Local2)
   if ( !Empty(Arg3) )
      Set(_SET_EXTRAFILE, Local3)
      Set(_SET_EXTRA, Local4)
   endif
   if ( Local6 )
      break( Local5 )
   endif
   set margin to
   return

//---EOF


Use your Browser's BACK button to return to Function Listings