Module: _frmback      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

//---------------------------------------------------[top]-
//  GETCOLUMN( Arg1, Arg2 )
//
static function GETCOLUMN( Arg1, Arg2 )

   local Local1 := 0, Local2:= 0, Local3[8], Local4
   Local3[ 5 ] := bin2w(SubStr(Arg1, Arg2 + 1, 2))
   Local3[ 7 ] := iif( SubStr(Arg1, Arg2 + 6, 1) $ "YyTt", .T., .F. )
   Local3[ 6 ] := bin2w(SubStr(Arg1, Arg2 + 7, 2))
   Local1 := bin2w(SubStr(Arg1, Arg2 + 9, 2))
   Local3[ 2 ] := getexpr(Local1)
   Local3[ 1 ] := &( "{ || " + getexpr(Local1) + "}" )
   Local1 := bin2w(SubStr(Arg1, Arg2 + 11, 2))
   Local3[ 4 ] := listasarra(getexpr(Local1), ";")
   if ( used() )
      Local4 := ValType(eval(Local3[ 1 ]))
      Local3[ 3 ] := Local4
      do case
      case Local4 = "C" .OR. Local4 = "M"
         Local3[ 8 ] := Replicate("X", Local3[ 5 ])
      case Local4 = "D"
         Local3[ 8 ] := "@D"
      case Local4 = "N"
         if ( Local3[ 6 ] != 0 )
            Local3[ 8 ] := Replicate("9", Local3[ 5 ] - Local3[ 6 ] - ;
               1) + "." + Replicate("9", Local3[ 6 ])
         else
            Local3[ 8 ] := Replicate("9", Local3[ 5 ])
         endif
      case Local4 = "L"
         Local3[ 8 ] := "@L" + Replicate("X", Local3[ 5 ] - 1)
      endcase
   endif
   Arg2 := Arg2 + 12
   return Local3

//---------------------------------------------------[top]-
//  GETEXPR( Arg1 )
//
static function GETEXPR( Arg1 )

   local Local1 := 0, Local2:= 0, Local3:= 0, Local4:= ""
   if ( Arg1 != 65535 )
      Arg1++
      if ( Arg1 > 1 )
         Local3 := Arg1 * 2 - 1
      endif
      Local1 := bin2w(SubStr(Static2, Local3, 2))
      Local2 := bin2w(SubStr(Static3, Local3, 2))
      Local1++
      Local2--
      Local4 := SubStr(Static1, Local1, Local2)
      if ( Chr(0) == SubStr(Local4, 1, 1) .AND. Len(SubStr(Local4, ;
            1, 1)) = 1 )
         Local4 := ""
      endif
   endif
   return Local4

//---------------------------------------------------[top]-
//  LISTASARRA( Arg1, Arg2 )
//
static function LISTASARRA( Arg1, Arg2 )

   local Local1, Local2 := {}, Local3:= .F.
   default Arg2 to ","
   do while ( Len(Arg1) != 0 )
      Local1 := At(Arg2, Arg1)
      if ( Local1 == 0 )
         Local1 := Len(Arg1)
      endif
      if ( SubStr(Arg1, Local1, 1) == Arg2 )
         Local3 := .T.
         AAdd(Local2, SubStr(Arg1, 1, Local1 - 1))
      else
         Local3 := .F.
         AAdd(Local2, SubStr(Arg1, 1, Local1))
      endif
      Arg1 := SubStr(Arg1, Local1 + 1)
   enddo
   if ( Local3 )
      AAdd(Local2, "")
   endif
   return Local2

//---------------------------------------------------[top]-
//  PARSEHEADE( Arg1, Arg2 )
//
function PARSEHEADE( Arg1, Arg2 )

   local Local1, Local2 := 0, Local3:= {}, Local4:= 254, Local5
   do while ( ++Local2 <= Arg2 )
      Local1 := SubStr(Arg1, 1, Local4)
      Local5 := At(";", Local1)
      if ( !Empty(Local5) )
         AAdd(Local3, SubStr(Local1, 1, Local5 - 1))
      else
         if ( Empty(Local1) )
            AAdd(Local3, "")
         else
            AAdd(Local3, Local1)
         endif
         Local5 := Local4
      endif
      Arg1 := SubStr(Arg1, Local5 + 1)
   enddo
   return Local3

//---------------------------------------------------[top]-
//  __FRMLOAD( Arg1 )
//
function __FRMLOAD( Arg1 )

   local Local1, Local2, Local3 := 0, Local4:= Space(1990), Local5:= ;
      Space(200), Local6 := Space(200), Local7:= 0, Local8, Local9, ;
      Local10, Local11 := 0, Local12, Local13, Local14[13], Local15, ;
      Local16, Local17, Local18 := 0, Local19, Local20, Local21, ;
      Local22, Local23
   Static3 := ""
   Static2 := ""
   Static1 := ""
   Local14[ 1 ] := {}
   Local14[ 2 ] := 80
   Local14[ 3 ] := 8
   Local14[ 4 ] := 0
   Local14[ 5 ] := 58
   Local14[ 6 ] := 1
   Local14[ 7 ] := .T.
   Local14[ 8 ] := .F.
   Local14[ 9 ] := .F.
   Local14[ 10 ] := .F.
   Local14[ 11 ] := {}
   Local14[ 12 ] := {}
   Local14[ 13 ] := ""
   Local9 := fopen(Arg1)
   if ( !Empty(Local12 := ferror()) .AND. !( "\" $ Arg1 .OR. ":" $ ;
         Arg1 ) )
      Local16 := Set(_SET_DEFAULT) + ";" + Set(_SET_PATH)
      Local16 := strtran(Local16, ",", ";")
      Local17 := listasarra(Local16, ";")
      for Local18 := 1 to Len(Local17)
         Local9 := fopen(Local17[ Local18 ] + "\" + Arg1)
         if ( Empty(Local12 := ferror()) )
            exit
         endif
      next
   endif
   if ( Local12 != 0 )
      Local15 := errornew()
      Local15:severity(2)
      Local15:gencode(21)
      Local15:subsystem("FRMLBL")
      Local15:oscode(Local12)
      Local15:filename(Arg1)
      eval(errorblock(), Local15)
   endif
   if ( Local12 == 0 )
      fseek(Local9, 0)
      Local12 := ferror()
      if ( Local12 == 0 )
         Local10 := fread(Local9, @Local4, 1990)
         if ( Local10 == 0 )
            Local12 := -3
         else
            Local12 := ferror()
         endif
         if ( Local12 == 0 )
            if ( bin2w(SubStr(Local4, 1, 2)) = 2 .AND. ;
                  bin2w(SubStr(Local4, 1989, 2)) = 2 )
               Local12 := 0
            else
               Local12 := -1
            endif
         endif
      endif
      if ( !fclose(Local9) )
         Local12 := ferror()
      endif
   endif
   if ( Local12 == 0 )
      Static3 := SubStr(Local4, 5, 110)
      Static2 := SubStr(Local4, 115, 110)
      Static1 := SubStr(Local4, 225, 1440)
      Local1 := SubStr(Local4, 1665, 300)
      Local2 := SubStr(Local4, 1965, 24)
      Local14[ 2 ] := bin2w(SubStr(Local2, 11, 2))
      Local14[ 5 ] := bin2w(SubStr(Local2, 13, 2))
      Local14[ 3 ] := bin2w(SubStr(Local2, 15, 2))
      Local14[ 4 ] := bin2w(SubStr(Local2, 17, 2))
      Local7 := bin2w(SubStr(Local2, 19, 2))
      Local14[ 6 ] := iif( SubStr(Local2, 21, 1) $ "YyTt", 2, 1 )
      Local14[ 10 ] := iif( SubStr(Local2, 22, 1) $ "YyTt", .T., .F. )
      Local13 := Asc(SubStr(Local2, 24, 1))
      if ( Int(Local13 / 4) == 1 )
         Local14[ 9 ] := .T.
         Local13 := Local13 - 4
      endif
      if ( Int(Local13 / 2) == 1 )
         Local14[ 8 ] := .T.
         Local13 := Local13 - 2
      endif
      if ( Int(Local13 / 1) == 1 )
         Local14[ 7 ] := .F.
         Local13 := Local13 - 1
      endif
      Local11 := bin2w(SubStr(Local2, 1, 2))
      Local23 := 4
      Local22 := parseheade(getexpr(Local11), Local23)
      do while ( Local23 > 0 )
         if ( !Empty(Local22[ Local23 ]) )
            exit
         endif
         Local23--
      enddo
      Local14[ 1 ] := iif( Empty(Local23), {}, asize(Local22, ;
         Local23) )
      Local11 := bin2w(SubStr(Local2, 3, 2))
      if ( !Empty(Local5 := getexpr(Local11)) )
         AAdd(Local14[ 12 ], array(5))
         Local14[ 12 ][ 1 ][ 2 ] := Local5
         Local14[ 12 ][ 1 ][ 1 ] := &( "{ || " + Local5 + "}" )
         if ( used() )
            Local14[ 12 ][ 1 ][ 3 ] := ;
               ValType(eval(Local14[ 12 ][ 1 ][ 1 ]))
         endif
         Local11 := bin2w(SubStr(Local2, 7, 2))
         Local14[ 12 ][ 1 ][ 4 ] := getexpr(Local11)
         Local14[ 12 ][ 1 ][ 5 ] := iif( SubStr(Local2, 23, 1) $ ;
            "YyTt", .T., .F. )
      endif
      Local11 := bin2w(SubStr(Local2, 5, 2))
      if ( !Empty(Local6 := getexpr(Local11)) )
         AAdd(Local14[ 12 ], array(5))
         Local14[ 12 ][ 2 ][ 2 ] := Local6
         Local14[ 12 ][ 2 ][ 1 ] := &( "{ || " + Local6 + "}" )
         if ( used() )
            Local14[ 12 ][ 2 ][ 3 ] := ;
               ValType(eval(Local14[ 12 ][ 2 ][ 1 ]))
         endif
         Local11 := bin2w(SubStr(Local2, 9, 2))
         Local14[ 12 ][ 2 ][ 4 ] := getexpr(Local11)
         Local14[ 12 ][ 2 ][ 5 ] := .F.
      endif
      Local3 := 12
      for Local8 := 1 to Local7
         AAdd(Local14[ 11 ], getcolumn(Local1, @Local3))
      next
   endif
   return Local14

//---EOF


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