Module: _dbginsp      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:= ""

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

   local Local1, Local2 := array(11), Local3, Local4
   Local4 := {__dbgtext(30), __dbgtext(31), __dbgtext(32), ;
      __dbgtext(33), __dbgtext(34), __dbgtext(35), __dbgtext(36), ;
      __dbgtext(37), __dbgtext(38), __dbgtext(39), __dbgtext(40)}
   for Local1 := 1 to 11
      Local2[ Local1 ] := ["] + Arg1[ Local1 ] + ["]
   next
   inspectmod(inspectnew(Int(MaxRow() / 6), MaxCol() / 2 - 32, ;
      __dbgtext(29), Local4, Local2, Arg1, 5), .T., Local3)
   return Arg1

//---------------------------------------------------[top]-
//  ARRAYINSPE( Arg1, Arg2, Arg3, Arg4, Arg5 )
//
static function ARRAYINSPE( Arg1, Arg2, Arg3, Arg4, Arg5 )

   local Local1, Local2 := Len(Arg4), Local3:= array(Local2), ;
      Local4 := array(Local2)
   if ( Empty(Arg4) )
      alert(__dbgtext(10))
      return ""
   endif
   for Local1 := 1 to Local2
      if ( Len(Local4[ Local1 ] := insptrans(Arg4[ Local1 ])) > 50 )
         Local4[ Local1 ] := Left(Local4[ Local1 ], 50)
      endif
      Local3[ Local1 ] := Arg3 + "[" + LTrim(Str(Local1)) + "]"
   next
   return inspectnew(Arg1, Arg2, Arg3, Local3, Local4, Arg4, Arg5)

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

   local Local1, Local2 := Len(Arg1)
   for Local1 := 1 to Local2
      if ( Left(Arg2, 9) == Arg1[ Local1 ] )
         return .T.
      endif
   next
   return .F.

//---------------------------------------------------[top]-
//  BREAKFAST
//
static function BREAKFAST

   break
   return Nil

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

   local Local1 := .F., Local2:= __dbgpath(), Local3, Local4, Local5, ;
      Local6
   Arg1 := alltrim(Arg1)
   for Local6 := 1 to 2
      if ( Local6 == 2 .AND. !Local1 )
         Local2 := getenv("PATH")
      endif
      do while ( !Empty(Local2) .AND. !Local1 )
         if ( ";" $ Local2 )
            Local3 := SubStr(Local2, 1, At(";", Local2) - 1)
            Local2 := SubStr(Local2, At(";", Local2) + 1)
         else
            Local3 := Local2
            Local2 := ""
         endif
         Local5 := Local3 + "\" + Trim(Arg1)
         Local4 := fopen(Local5, 0)
         if ( Local4 == -1 )
            Local5 := Local5 + ( "." + Arg2 )
            Local4 := fopen(Local5, 0)
         endif
         if ( Local4 != -1 )
            fclose(Local4)
            Local1 := .T.
         endif
      enddo
   next
   if ( Local1 )
      Arg1 := padr(Local5, Max(Len(Arg1), Len(Local5)))
   endif
   return Local1

//---------------------------------------------------[top]-
//  GETAPPLYKE( Arg1, Arg2, Arg3 )
//
static procedure GETAPPLYKE( Arg1, Arg2, Arg3 )

   local Local1, Local2
   do case
   case Arg2 == 5
      Arg1:exitstate(1)
   case Arg2 == 24
      Arg1:exitstate(2)
   case Arg2 == 18
      Arg1:exitstate(256)
   case Arg2 == 3
      Arg1:exitstate(257)
   case Arg2 == 13
      Arg1:exitstate(5)
   case Arg2 == 27
      Arg1:undo()
      Arg1:exitstate(7)
   case Arg2 == 29
      Arg1:exitstate(3)
   case Arg2 == 31
      Arg1:exitstate(3)
   case Arg2 == 23
      Arg1:exitstate(4)
   case Arg2 == 30
      Arg1:exitstate(4)
   case Arg2 == 22
      Arg3 := !Arg3
      setcursor(iif( Arg3, 3, 1 ))
   case Arg2 == 21
      Arg1:undo()
   case Arg2 == 1
      Arg1:home()
   case Arg2 == 6
      Arg1:end()
   case Arg2 == 4
      Arg1:right()
   case Arg2 == 19
      Arg1:left()
   case Arg2 == 2
      Arg1:wordright()
   case Arg2 == 26
      Arg1:wordleft()
   case Arg2 == 8
      Arg1:backspace()
   case Arg2 == 7
      Arg1:delete()
   case Arg2 == 20
      Arg1:delwordrig()
   case Arg2 == 25
      Arg1:delend()
   case Arg2 == 127
   case Arg2 == 1002
      Local1 := mrow()
      Local2 := mcol()
      do case
      case Local1 != Arg1:row()
         Arg1:exitstate(10)
      case Local2 < Arg1:col()
         Arg1:exitstate(10)
      case Local2 >= Arg1:col() + getlen(Arg1)
         Arg1:exitstate(10)
      case Arg1:col() + Arg1:pos() - 1 < Local2
         do while ( Arg1:col() + Arg1:pos() - 1 < Local2 )
            Arg1:right()
         enddo
      case Arg1:col() + Arg1:pos() - 1 > Local2
         do while ( Arg1:col() + Arg1:pos() - 1 > Local2 )
            Arg1:left()
         enddo
      endcase
   otherwise
      if ( Arg2 > 0 .AND. Arg2 <= 255 )
         if ( Arg3 )
            Arg1:insert(Chr(Arg2))
         else
            Arg1:overstrike(Chr(Arg2))
         endif
      endif
   endcase
   return

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

   local Local1, Local2 := eval(Arg1:block()), Local3
   do case
   case ( Local1 := ValType(Local2) ) == "C"
      Local3 := Len(Local2)
   case Local1 == "D"
      Local3 := 8
   case Local1 == "L"
      Local3 := 1
   case ISCHARACTER( Arg1:picture() )
      Local3 := Len(Arg1:picture())
   otherwise
      Local3 := Len(Str(Local2))
   endcase
   return Local3

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

   local Local1 := Arg1[ 4 ]
   RestScreen(Local1:ntop() - 1, Local1:nleft() - 1, ;
      Local1:nbottom() + 2, Local1:nright() + 3, Arg1[ 5 ])
   Arg1[ 5 ] := Nil
   return

//---------------------------------------------------[top]-
//  INSPECT( Arg1, Arg2, Arg3, Arg4, Arg5 )
//
static function INSPECT( Arg1, Arg2, Arg3, Arg4, Arg5 )

   local Local1, Local2
   Local1 := inspectnew(Int(MaxRow() / 6), MaxCol() / 2 - 27, Arg1, ;
      {Arg1}, {Arg2}, {Arg3}, Arg4)
   __dbgsaves()
   inspectmod(Local1, .F., @Arg5)
   __dbgrests()
   if ( Arg4 == 2 )
      Local2 := Local1[ 2 ][ 1 ]
   else
      Local2 := Local1[ 8 ][ 1 ]
      if ( !( Arg4 == 3 ) )
      elseif ( Empty(Local2) )
      elseif ( !isfileext(Local2) )
         Local2 := Local2 + ( "." + Static1 )
      endif
   endif
   return iif( ISCHARACTER( Local2 ) .AND. Empty(Local2), "", Local2 )

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

   local Local1 := .F., Local2:= .F., Local3:= ;
      ValType(Arg1[ 2 ][ Arg1[ 4 ][ 1 ][ 1 ] ]), Local4, Local5, ;
      Local6
   do while ( .T. )
      do case
      case Arg2 == 1002 .OR. Arg2 == 1006
         Local5 := __dbghttst(Arg1[ 4 ]:ntop() - 1, Arg1[ 4 ]:nleft() ;
            - 1, Arg1[ 4 ]:nbottom() + 1, Arg1[ 4 ]:nright() + 1, ;
            mrow(), mcol())
         if ( Local5 == 7 )
            Arg2 := 27
            exit
         elseif ( Local5 != 6 )
         elseif ( Arg2 == 1006 )
            Arg2 := 13
            exit
         else
            _abapplyke(Arg1[ 4 ], Arg2)
            inspforces(Arg1[ 4 ])
         endif
      case Arg2 == 1001
      case Arg2 == 1003
      case Arg2 == 1004
      case Arg2 == 1005
      case Arg2 != 1007
         exit
      endcase
      Arg2 := InKey(0)
   enddo
   do case
   case Arg2 == 13
      if ( Local3 == "A" )
         Local4 := arrayinspe(Row() + 1, Col(), ;
            Arg1[ 7 ][ Arg1[ 4 ][ 1 ][ 1 ] ], ;
            Arg1[ 2 ][ Arg1[ 4 ][ 1 ][ 1 ] ], iif( Arg1[ 3 ] == 6, ;
            6, 2 ))
         Local2 := .T.
      elseif ( Local3 == "O" )
         Local4 := objectinsp(Row() + 1, Col(), ;
            Arg1[ 7 ][ Arg1[ 4 ][ 1 ][ 1 ] ], ;
            Arg1[ 2 ][ Arg1[ 4 ][ 1 ][ 1 ] ], iif( Arg1[ 3 ] == 6, ;
            6, 2 ))
         Local2 := .T.
      elseif ( Local3 == "B" )
      else
         Local1 := .T.
      endif
   case Arg2 == 27
      Arg2 := 7
      Local2 := .T.
   otherwise
      if ( _abapplyke(Arg1[ 4 ], Arg2) )
         Arg2 := 0
         Local2 := .T.
      elseif ( !( Local3 $ "AOB" ) )
         Local1 := .T.
      endif
   endcase
   if ( Local1 .AND. !( Arg1[ 3 ] == 6 ) .AND. !( ;
         !Empty(Arg1[ 8 ][ Arg1[ 4 ][ 1 ][ 1 ] ]) .AND. "Method" == ;
         Left(Arg1[ 8 ][ Arg1[ 4 ][ 1 ][ 1 ] ], 6) ) )
      Arg2 := inspectget(Arg1[ 4 ], 0, Arg1)
   elseif ( !Empty(Local4) )
      inspectmod(Local4, .T., Local6)
   elseif ( !Local2 )
      alert(__dbgtext(11))
   endif
   inspforces(Arg1[ 4 ])
   return Arg2

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

   local Local1, Local2, Local3 := .F., Local4
   inspforces(Arg1)
   Local2 := pad(Arg3[ 8 ][ Arg1[ 1 ][ 1 ] ], 256)
   if ( Len(Arg3[ 7 ]) > 1 )
      Arg1:colpos(2)
   endif
   Arg1:hilite()
   Local1 := getnew(Row(), Col(), { |_1| iif( !( ISNIL( _1 ) ), ;
      Local2 := _1, Local2 ) }, "", "@KS50", __dbgclr(9) + "," + ;
      __dbgclr(10))
   Arg1:colpos(1)
   Local1:exitstate(0)
   setcursor(iif( Local3, 3, 1 ))
   dispbegin()
   Local1:setfocus()
   dispend()
   do case
   case LastKey() == K_ENTER
   case LastKey() == 1001
   case LastKey() == 1002
   case LastKey() == 1003
   case LastKey() == 1006
   case LastKey() == 1004
   case LastKey() == 1005
   case LastKey() != 1007
      keyboard Chr(LastKey())
   endcase
   do while ( Local1:exitstate() == 0 )
      Arg2 := InKey(0)
      if ( Arg2 == 1002 )
         Local4 := __dbghttst(Arg3[ 4 ]:ntop() - 1, Arg3[ 4 ]:nleft() ;
            - 1, Arg3[ 4 ]:nbottom() + 1, Arg3[ 4 ]:nright() + 1, ;
            mrow(), mcol())
         if ( Local4 == 7 )
            Arg2 := 27
         elseif ( Local4 == 15 )
         endif
      endif
      getapplyke(Local1, Arg2, @Local3)
      if ( Local1:exitstate() == 10 .AND. ;
            __dbghttst(Arg3[ 4 ]:ntop() - 1, Arg3[ 4 ]:nleft() - 1, ;
            Arg3[ 4 ]:nbottom() + 1, Arg3[ 4 ]:nright() + 1, mrow(), ;
            mcol()) != 6 )
         Local1:exitstate(0)
      elseif ( !( Local1:exitstate() == 0 ) .AND. !( ;
            Local1:exitstate() == 7 ) .AND. Local1:changed() )
         dispbegin()
         Local1:assign()
         dispend()
         if ( setvaln(Arg3, Arg1[ 1 ][ 1 ], @Local2) )
            Arg3[ 8 ][ Arg1[ 1 ][ 1 ] ] := Trim(Local2)
            Arg1:refreshcur()
         else
            dispbegin()
            Local1:reset()
            dispend()
            Local1:exitstate(0)
         endif
      endif
   enddo
   dispbegin()
   Local1:killfocus()
   dispend()
   setcursor(0)
   if ( Local1:exitstate() == 5 .AND. !( Len(Arg3[ 2 ]) < 2 ) )
      Local1:exitstate(0)
      keyboard Chr(24)
   endif
   return Local1:exitstate()

//---------------------------------------------------[top]-
//  INSPECTMOD( Arg1, Arg2, Arg3 )
//
static procedure INSPECTMOD( Arg1, Arg2, Arg3 )

   dispbegin()
   showinspec(Arg1)
   if ( Arg2 )
      showinspna(Arg1)
   endif
   dispend()
   do while ( !( Arg3 == 7 ) .AND. !( Arg3 == 5 ) )
      Arg3 := inspectapp(Arg1, InKey(0))
      if ( Arg2 )
         showinspna(Arg1)
      endif
   enddo
   dispbegin()
   hideinspec(Arg1)
   dispend()
   return

//---------------------------------------------------[top]-
//  INSPECTNEW( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 )
//
static function INSPECTNEW( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 )

   local Local1 := 2 + Len(Arg5), Local2:= 0, Local3, Local4[8], ;
      Local5, Local6
   if ( Len(Arg4) > 1 )
      aeval(Arg4, { |_1| Local2 := Max(Local2, Len(_1)) })
      if ( !Empty(Local2) )
         Local2 := Min(Local2 + 1, 23)
      endif
   endif
   Local3 := 52 + Local2
   Arg1 := Max(1, Min(Arg1, MaxRow() - ( Local1 + 1 )))
   Arg2 := Max(0, ( MaxCol() + 1 ) / 2 - Local3 / 2)
   if ( !( Local2 == 0 ) )
      Local3++
   endif
   Local4[ 1 ] := alltrim(Arg3)
   Local4[ 7 ] := Arg4
   Local4[ 8 ] := Arg5
   Local4[ 2 ] := Arg6
   Local4[ 3 ] := Arg7
   Local4[ 4 ] := _abnew(Arg1, Arg2, Min(Arg1 + Local1 - 1, MaxRow() ;
      - 2), Arg2 + Local3 - 1, __dbgclr(8) + "," + __dbgclr(9) + "," ;
      + __dbgclr(10))
   Local4[ 4 ]:autolite(.F.)
   Local5 := 1
   if ( !( Local2 == 0 ) )
      Local6 := _absetcolu(Local4[ 4 ], 1, Local4[ 7 ])
      Local6[ 4 ] := {1, 2}
      Local6[ 2 ] := Local2
      Local5 := 2
   endif
   Local6 := _absetcolu(Local4[ 4 ], Local5, Local4[ 8 ])
   Local6[ 4 ] := {1, 3}
   Local6[ 2 ] := 50
   Local4[ 4 ]:configure()
   return Local4

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

   local Local1 := Len(Arg1[ 6 ])
   dispbegin()
   if ( Local1 == 2 )
      Arg1:dehilite():colpos(2)
   endif
   Arg1:dehilite():forcestabl()
   if ( Local1 == 2 )
      Arg1:hilite():colpos(1)
   endif
   Arg1:hilite()
   dispend()
   return

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

   local Local1 := ValType(Arg1)
   do case
   case Local1 == "C"
      return ["] + Arg1 + ["]
   case Local1 == "N"
      return LTrim(Str(Arg1))
   case Local1 == "D"
      return "CTOD("" + DToC(Arg1) + "")"
   case Local1 == "A"
      return "{ ... }"
   case Local1 == "B"
      return "{ || ... }"
   case Local1 == "L"
      return iif( Arg1, ".T.", ".F." )
   case Local1 == "M"
      return "Memo"
   case Local1 == "O"
      return "Object"
   endcase
   return "NIL"

//---------------------------------------------------[top]-
//  INSTANCEVA
//
static function INSTANCEVA

   local Local1, Local2
   parameters o, cname, val
   if ( !( "" == right(cname, 1) ) )
      if ( PCount() == 3 )
         Local1 := "o:_" + cname + "( val )"
      else
         Local1 := "o:" + cname
      endif
      begin sequence
         Local2 := &Local1
      recover
         alert("Error in InstanceVal: " + cname)
         Local2 := Nil
      end sequence
   endif
   return Local2

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

   local Local1 := rat(".", Arg1)
   if ( Local1 == 0 )
      return .F.
   elseif ( Local1 == Len(Arg1) )
   elseif ( SubStr(Arg1, Local1 + 1, 1) $ "\." )
      return .F.
   endif
   return .T.

//---------------------------------------------------[top]-
//  OBJECTINSP( Arg1, Arg2, Arg3, Arg4, Arg5 )
//
static function OBJECTINSP( Arg1, Arg2, Arg3, Arg4, Arg5 )

   local Local1, Local2 := Arg4:classh(), Local3, Local4, Local5, ;
      Local6, Local7, Local8
   if ( Local2 == 0 )
      return ""
   endif
   if ( Empty(Local3 := __classsel(Local2)) )
      return ""
   endif
   Local3 := asort(Local3)
   Local6 := {}
   Local8 := {}
   for Local4 := 1 to Len(Local3)
      if ( Left(Local3[ Local4 ], 1) == "_" )
         AAdd(Local6, SubStr(Local3[ Local4 ], 2))
         adel(Local3, Local4)
         asize(Local3, Len(Local3) - 1)
         Local4--
      endif
   next
   for Local4 := 1 to Len(Local3)
      if ( awithin(Local6, Local3[ Local4 ]) )
         AAdd(Local8, Local3[ Local4 ])
         adel(Local3, Local4)
         asize(Local3, Len(Local3) - 1)
         Local4--
      endif
   next
   for Local4 := 1 to Len(Local3)
      if ( !( Left(Local3[ Local4 ], 1) == "_" ) .AND. !( ;
            Local3[ Local4 ] == "CLASSNAME" ) )
         AAdd(Local8, Local3[ Local4 ] + "")
      endif
   next
   Local5 := Len(Local8)
   Local6 := array(Local5)
   Local7 := array(Local5)
   for Local4 := 1 to Local5
      Local7[ Local4 ] := instanceva(Arg4, Local8[ Local4 ])
      if ( right(Local8[ Local4 ], 1) == "" )
         Local8[ Local4 ] := Lower(SubStr(Local8[ Local4 ], 1, ;
            Len(Local8[ Local4 ]) - 1))
         Local6[ Local4 ] := "Method"
      else
         Local6[ Local4 ] := insptrans(Local7[ Local4 ])
      endif
   next
   if ( !( Arg5 == 6 ) )
      Arg5 := 7
   endif
   Arg3 := Trim(Arg3) + " is of Class: " + Arg4:classname()
   Local1 := inspectnew(Arg1, Arg2, Arg3, Local8, Local6, Local7, Arg5)
   Local1[ 6 ] := Arg4
   return Local1

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

   local Local1, Local2, Local3 := .T., Local4, Local5:= errorblock({ ;
      || breakfast() })
   do case
   case Arg1[ 3 ] == 1
      if ( Type(Arg3) == "UE" )
         alert(__dbgtext(12))
         Local3 := .F.
      endif
   case Arg1[ 3 ] == 2
      Local2 := Arg1[ 2 ][ Arg2 ]
      begin sequence
         Arg1[ 2 ][ Arg2 ] := &Arg3
         Arg3 := insptrans(Arg1[ 2 ][ Arg2 ])
      recover
         alert(__dbgtext(12))
         Arg1[ 2 ][ Arg2 ] := Local2
         Local3 := .F.
      end sequence
   case Arg1[ 3 ] == 3
      Local1 := Arg3
      Local4 := fopen(Local1, 0)
      if ( Local4 == -1 )
         Local4 := fopen(Trim(Local1) + "." + Static1, 0)
         if ( Local4 == -1 )
            if ( !findinpath(@Local1, Static1) )
               alert(__dbgtext(5))
               Local3 := .F.
            endif
         else
            Arg3 := Trim(Arg3) + "." + Static1
            fclose(Local4)
         endif
      else
         fclose(Local4)
      endif
      if ( Local3 )
         Arg3 := Local1
      endif
   case Arg1[ 3 ] == 4
      Local2 := Arg1[ 2 ][ Arg2 ]
      begin sequence
         Arg1[ 2 ][ Arg2 ] := &Arg3
      recover
         alert(__dbgtext(12))
         Arg1[ 2 ][ Arg2 ] := Local2
         Local3 := .F.
      end sequence
      if ( Local3 )
         if ( !( ISNUMBER( Arg1[ 2 ][ Arg2 ] ) ) )
            alert(__dbgtext(13))
            Arg1[ 2 ][ Arg2 ] := Local2
            Local3 := .F.
         else
            Arg3 := insptrans(Arg1[ 2 ][ Arg2 ])
         endif
      endif
   case Arg1[ 3 ] == 5
      Local2 := Arg1[ 2 ][ Arg2 ]
      begin sequence
         Arg1[ 2 ][ Arg2 ] := &Arg3
      recover
         alert(__dbgtext(12))
         Arg1[ 2 ][ Arg2 ] := Local2
         Local3 := .F.
      end sequence
      if ( Local3 )
         if ( !( ISCHARACTER( Arg1[ 2 ][ Arg2 ] ) ) )
            alert(__dbgtext(14))
            Arg1[ 2 ][ Arg2 ] := Local2
            Local3 := .F.
         else
            Local1 := SetColor()
            set color to (Arg1[ 2 ][ Arg2 ])
            if ( SubStr(SetColor(), 1, 3) == "N/N" )
               alert(__dbgtext(15))
               Arg1[ 2 ][ Arg2 ] := Local2
               Local3 := .F.
            endif
            set color to (Local1)
            if ( Local3 )
               Arg3 := insptrans(Arg1[ 2 ][ Arg2 ])
            endif
         endif
      endif
   case Arg1[ 3 ] == 7
      begin sequence
         Local2 := &Arg3
      recover
         alert(__dbgtext(12))
         Local3 := .F.
      end sequence
      if ( Local3 )
         instanceva(Arg1[ 6 ], Arg1[ 7 ][ Arg2 ], Local2)
         Arg1[ 2 ][ Arg2 ] := Local2
         Arg3 := insptrans(Local2)
      endif
   endcase
   errorblock(Local5)
   return Local3

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

   local Local1 := Arg1[ 4 ], Local2
   Arg1[ 5 ] := SaveScreen(Local1[ 2 ] - 1, Local1[ 3 ] - 1, ;
      Local1[ 4 ] + 2, Local1[ 5 ] + 3)
   @ Local1[ 2 ] - 1, Local1[ 3 ] - 1, Local1[ 4 ] + 1, Local1[ 5 ] ;
      + 1 box Nil color __dbgclr(8)
   Local2 := SetColor(__dbgclr(8))
   dispoutat(Local1[ 2 ] - 1, Local1[ 3 ] + 1, " ")
   set color to (__dbgclr(9))
   dispoutat(Local1[ 2 ] - 1, Local1[ 3 ] + 2, "")
   set color to (Local2)
   dbgshadow(Local1[ 2 ] - 1, Local1[ 3 ] - 1, Local1[ 4 ] + 1, ;
      Local1[ 5 ] + 1)
   dispoutat(Local1[ 2 ] - 1, Local1[ 3 ] + Round(( Local1[ 5 ] - ;
      Local1[ 3 ] - Len(" " + Arg1[ 1 ] + " ") ) / 2, 0), " " + ;
      Arg1[ 1 ] + " ", __dbgclr(8))
   inspforces(Local1)
   return

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

   local Local1, Local2, Local3, Local4, Local5, Local6
   if ( !( Arg1[ 3 ] == 7 ) )
      dispbegin()
      Local1 := Arg1[ 4 ]
      Local5 := Row()
      Local6 := Col()
      Local3 := Local1[ 1 ][ 1 ]
      Local4 := Local1[ 4 ] - ( Local1:rowpos() + Local1[ 2 ] ) + ;
         Local3 + 1
      Local2 := " " + Arg1[ 1 ] + "[" + alltrim(Str(Local3)) + ".." + ;
         alltrim(Str(Local4)) + "]" + " "
      dispoutat(Local1[ 2 ] - 1, Local1[ 3 ] + Round(( Local1[ 5 ] - ;
         Local1[ 3 ] - Len(Local2) ) / 2, 0), Local2, __dbgclr(8))
      SetPos(Local5, Local6)
      dispend()
   endif
   return

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

   local Local1, Local2
   Local2 := inspect(__dbgtext(23), insptrans(Val(Arg1)), Val(Arg1), ;
      4, @Local1)
   if ( Local1 == 7 )
      Local2 := Nil
   endif
   return Local2

//---------------------------------------------------[top]-
//  __DBGERROR( Arg1 )
//
procedure __DBGERROR( Arg1 )

   __dbgsaves()
   alert(Val(Arg1))
   __dbgrests()
   return

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

   Static1 := Arg1
   return inspect(__dbgtext(20), "", Nil, 3)

//---------------------------------------------------[top]-
//  __DBGHFILE( Arg1, Arg2, Arg3 )
//
function __DBGHFILE( Arg1, Arg2, Arg3 )

   if ( findinpath(@Arg3, Arg1) )
      return Arg3
   else
      alert("Could not open Help file")
   endif
   Static1 := Arg1
   return inspect(Arg2, Arg3, Nil, 3)

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

   return inspect(Arg1, insptrans(Arg2), Arg2, 2)

//---------------------------------------------------[top]-
//  __DBGLN
//
function __DBGLN

   return inspect(__dbgtext(25), insptrans(1), 1, 4, Nil)

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

   return inspect(Arg1, insptrans(Arg2), Arg2, 6)

//---------------------------------------------------[top]-
//  __DBGNP
//
function __DBGNP

   return "PROCLINE() == 0"

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

   if ( ISCHARACTER( Arg1 ) )
      Static2 := Arg1
   endif
   return Static2

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

   return inspect(__dbgtext(27), Arg1, Nil, 0)

//---------------------------------------------------[top]-
//  __DBGSETS
//
procedure __DBGSETS

   local Local1, Local2 := array(47), Local3:= array(47), Local4, ;
      Local5, Local6, Local7
   Local7 := {"Exact", "Fixed", "Decimals", "DateFormat", "Epoch", ;
      "Path", "Default", "Exclusive", "SoftSeek", "Unique", ;
      "Deleted", "Cancel", "Debug", "TypeAhead", "Color", "Cursor", ;
      "Console", "Alternate", "AltFile", "Device", "Extra", ;
      "ExtraFile", "Printer", "PrintFile", "Margin", "Bell", ;
      "Confirm", "Escape", "Insert", "Exit", "Intensity", ;
      "ScoreBoard", "Delimiters", "DelimChars", "Wrap", "Message", ;
      "MCenter", "ScrollBreak", "EventMask", "VideoMode", ;
      "MBlockSize", "MFileExt", "StrictRead", "Optimize", "Autopen", ;
      "Autorder", "AutoShare"}
   Local5 := __dbgstate()
   if ( Local5 > 0 )
      do while ( __dbgstate() > 0 )
         __dbgrests()
      enddo
   endif
   for Local1 := 1 to 47
      Local2[ Local1 ] := Set(Local1)
      Local3[ Local1 ] := insptrans(Local2[ Local1 ])
   next
   if ( Local5 > 0 )
      do while ( __dbgstate() < Local5 )
         __dbgsaves()
      enddo
   endif
   __dbgsaves()
   inspectmod(inspectnew(2, MaxCol() / 2 - 30, __dbgtext(28), ;
      Local7, Local3, Local2, 2), .T., Local6)
   __dbgrests()
   if ( Local5 > 0 )
      do while ( __dbgstate() > 0 )
         __dbgrests()
      enddo
   endif
   for Local1 := 1 to 47
      if ( ValType(Set(Local1)) != ValType(Local2[ Local1 ]) .OR. ;
            Set(Local1) != Local2[ Local1 ] )
         Set(Local1, Local2[ Local1 ])
      endif
   next
   if ( Local5 > 0 )
      do while ( __dbgstate() < Local5 )
         __dbgsaves()
      enddo
   endif
   return

//---------------------------------------------------[top]-
//  __DBGSS
//
function __DBGSS

   return inspect(__dbgtext(24), "", Nil, 0)

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

   return inspect(__dbgtext(21), insptrans(Val(Arg1)), Val(Arg1), 4, ;
      Nil)

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

   return inspect(__dbgtext(22), insptrans(Val(Arg1)), Val(Arg1), 4, ;
      Nil)

//---------------------------------------------------[top]-
//  __DBGTERMA( Arg1 )
//
procedure __DBGTERMA( Arg1 )

   __dbgsaves()
   commit
   alert(__dbgtext(9) + " (" + LTrim(Str(Arg1)) + ")")
   __dbgrests()
   return

//---------------------------------------------------[top]-
//  __DBGTP
//
function __DBGTP

   return inspect(__dbgtext(19), "", Nil, 1)

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

   return inspect(__dbgtext(20), "", Nil, 0)

//---------------------------------------------------[top]-
//  __DBGWP
//
function __DBGWP

   return inspect(__dbgtext(18), "", Nil, 1)

//---EOF


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