Hi Klas,
Actually, the sources are included with both CA-Clipper 5.2(e) and 5.3(b)
SOURCE/SYS/LBLBACK.PRG for LABEL FORM
and SOURCE/SYS/FRMBACK.PRG for REPORT FORM
I confirm there's no SET( _SET_PATH ) in LBLBACK.PRG - while yes in FRMBACK.PRG
LBLBACK.PRG 5.2e
FUNCTION __LblLoad( cLblFile )
LOCAL i, j := 0 // Counters
LOCAL cBuff := SPACE(BUFFSIZE) // File buffer
LOCAL nHandle := 0 // File handle
LOCAL nReadCount := 0 // Bytes read from file
LOCAL lStatus := .F. // Status
LOCAL nOffset := FILEOFFSET // Offset into file
LOCAL nFileError := F_OK // File error
LOCAL cFieldText := "" // Text expression container
LOCAL err // error object
LOCAL cDefPath // contents of SET DEFAULT string
LOCAL aPaths // array of paths
LOCAL nPathIndex := 0 // iteration counter
// Create and initialize default label array
LOCAL aLabel[ LB_COUNT ]
aLabel[ LB_REMARK ] := SPACE(60) // Label remark
aLabel[ LB_HEIGHT ] := 5 // Label height
aLabel[ LB_WIDTH ] := 35 // Label width
aLabel[ LB_LMARGIN ] := 0 // Left margin
aLabel[ LB_LINES ] := 1 // Lines between labels
aLabel[ LB_SPACES ] := 0 // Spaces between labels
aLabel[ LB_ACROSS ] := 1 // Number of labels across
aLabel[ LB_FIELDS ] := {} // Array of label fields
// Open the label file
nHandle := FOPEN( cLblFile )
IF ( ! EMPTY( nFileError := FERROR() ) ) .AND. !( "\" $ cLblFile .OR. ":" $ cLblFile )
// Search through default path; attempt to open label file
cDefPath := SET( _SET_DEFAULT ) /// line 79
cDefPath := STRTRAN( cDefPath, ",", ";" )
aPaths := ListAsArray( cDefPath, ";" )
LBLBACK.PRG 5.3b
FUNCTION __LblLoad( cLblFile )
LOCAL i, j := 0 // Counters
LOCAL cBuff := SPACE(BUFFSIZE) // File buffer
LOCAL nHandle := 0 // File handle
LOCAL nReadCount := 0 // Bytes read from file
LOCAL lStatus := .F. // Status
LOCAL nOffset := FILEOFFSET // Offset into file
LOCAL nFileError := F_OK // File error
LOCAL cFieldText := "" // Text expression container
LOCAL err // error object
LOCAL cDefPath // contents of SET DEFAULT string
LOCAL aPaths // array of paths
LOCAL nPathIndex := 0 // iteration counter
// Create and initialize default label array
LOCAL aLabel[ LB_COUNT ]
aLabel[ LB_REMARK ] := SPACE(60) // Label remark
aLabel[ LB_HEIGHT ] := 5 // Label height
aLabel[ LB_WIDTH ] := 35 // Label width
aLabel[ LB_LMARGIN ] := 0 // Left margin
aLabel[ LB_LINES ] := 1 // Lines between labels
aLabel[ LB_SPACES ] := 0 // Spaces between labels
aLabel[ LB_ACROSS ] := 1 // Number of labels across
aLabel[ LB_FIELDS ] := {} // Array of label fields
// Open the label file
nHandle := FOPEN( cLblFile )
IF ( ! EMPTY( nFileError := FERROR() ) ) .AND. !( "\" $ cLblFile .OR. ":" $ cLblFile )
// Search through default path; attempt to open label file
cDefPath := SET( _SET_DEFAULT ) /// line 79
cDefPath := STRTRAN( cDefPath, ",", ";" )
aPaths := ListAsArray( cDefPath, ";" )
FRMBACK.PRG 5.2e
FUNCTION __FrmLoad( cFrmFile )
LOCAL cFieldsBuff
LOCAL cParamsBuff
LOCAL nFieldOffset := 0
LOCAL cFileBuff := SPACE(SIZE_FILE_BUFF)
LOCAL cGroupExp := SPACE(200)
LOCAL cSubGroupExp := SPACE(200)
LOCAL nColCount := 0 // Number of columns in report
LOCAL nCount
LOCAL nFrmHandle // (.frm) file handle
LOCAL nBytesRead // Read/write and content record counter
LOCAL nPointer := 0 // Points to an offset into EXPR_BUFF string
LOCAL nFileError // Contains current file error
LOCAL cOptionByte // Contains option byte
LOCAL aReport[ RP_COUNT ] // Create report array
LOCAL err // error object
LOCAL cDefPath // contents of SET DEFAULT string
LOCAL aPaths // array of paths
LOCAL nPathIndex := 0 // iteration counter
LOCAL s, paths
LOCAL i
LOCAL aHeader // temporary storage for report form headings
LOCAL nHeaderIndex // index into temporary header array
// Initialize STATIC buffer values
cLengthsBuff := ""
cOffsetsBuff := ""
cExprBuff := ""
// Default report values
aReport[ RP_HEADER ] := {}
aReport[ RP_WIDTH ] := 80
aReport[ RP_LMARGIN ] := 8
aReport[ RP_RMARGIN ] := 0
aReport[ RP_LINES ] := 58
aReport[ RP_SPACING ] := 1
aReport[ RP_BEJECT ] := .T.
aReport[ RP_AEJECT ] := .F.
aReport[ RP_PLAIN ] := .F.
aReport[ RP_SUMMARY ] := .F.
aReport[ RP_COLUMNS ] := {}
aReport[ RP_GROUPS ] := {}
aReport[ RP_HEADING ] := ""
// Open the report file
nFrmHandle := FOPEN( cFrmFile )
IF ( !EMPTY( nFileError := FERROR() ) ) .AND. !( "\" $ cFrmFile .OR. ":" $ cFrmFile )
// Search through default path; attempt to open report file
cDefPath := SET( _SET_DEFAULT ) + ";" + SET( _SET_PATH ) /// line 158
cDefPath := STRTRAN( cDefPath, ",", ";" )
aPaths := ListAsArray( cDefPath, ";" )
FRMBACK.PRG 5.3b
FUNCTION __FrmLoad( cFrmFile )
LOCAL cFieldsBuff
LOCAL cParamsBuff
LOCAL nFieldOffset := 0
LOCAL cFileBuff := SPACE(SIZE_FILE_BUFF)
LOCAL cGroupExp := SPACE(200)
LOCAL cSubGroupExp := SPACE(200)
LOCAL nColCount := 0 // Number of columns in report
LOCAL nCount
LOCAL nFrmHandle // (.frm) file handle
LOCAL nBytesRead // Read/write and content record counter
LOCAL nPointer := 0 // Points to an offset into EXPR_BUFF string
LOCAL nFileError // Contains current file error
LOCAL cOptionByte // Contains option byte
LOCAL aReport[ RP_COUNT ] // Create report array
LOCAL err // error object
LOCAL cDefPath // contents of SET DEFAULT string
LOCAL aPaths // array of paths
LOCAL nPathIndex := 0 // iteration counter
LOCAL s, paths
LOCAL i
LOCAL aHeader // temporary storage for report form headings
LOCAL nHeaderIndex // index into temporary header array
// Initialize STATIC buffer values
cLengthsBuff := ""
cOffsetsBuff := ""
cExprBuff := ""
// Default report values
aReport[ RP_HEADER ] := {}
aReport[ RP_WIDTH ] := 80
aReport[ RP_LMARGIN ] := 8
aReport[ RP_RMARGIN ] := 0
aReport[ RP_LINES ] := 58
aReport[ RP_SPACING ] := 1
aReport[ RP_BEJECT ] := .T.
aReport[ RP_AEJECT ] := .F.
aReport[ RP_PLAIN ] := .F.
aReport[ RP_SUMMARY ] := .F.
aReport[ RP_COLUMNS ] := {}
aReport[ RP_GROUPS ] := {}
aReport[ RP_HEADING ] := ""
// Open the report file
nFrmHandle := FOPEN( cFrmFile )
IF ( !EMPTY( nFileError := FERROR() ) ) .AND. !( "\" $ cFrmFile .OR. ":" $ cFrmFile )
// Search through default path; attempt to open report file
cDefPath := SET( _SET_DEFAULT ) + ";" + SET( _SET_PATH ) /// line 159
cDefPath := STRTRAN( cDefPath, ",", ";" )
aPaths := ListAsArray( cDefPath, ";" )
HTH
Best regards,
Frank
Op vrijdag 5 juni 2015 21:37:43 UTC+2 schreef Klas Engwall:
...[snip]