20000213-23:59 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-02-13 23:29:07 +00:00
parent 7fd3fd4c5e
commit 5d372f22a4
12 changed files with 774 additions and 707 deletions

View File

@@ -1,3 +1,31 @@
20000213-23:59 GMT+1 Victor Szakats <info@szelvesz.hu>
! makefile.bc
! Fixed again.
* source/rtl/Makefile
+ treport.prg and tlabel.prg added.
* tests/testrpt.prg
tests/testlbl.prg
! CVS ID added.
* include/rptdef.ch
include/hbrptlbl.ch
include/Makefile
source/rtl/tlabel.prg
source/rtl/treport.prg
! rptdef.ch renamed to hbrptlbl.ch
+ hbrptlbl.ch added to Makefile
! Small corrections to hbrptlbl.ch
+ Indentation fixed.
! .FRM/.LBL changed to lowercase.
! RETURNs without value fixed.
! RG_ changed to RGT_
+ #include "error.ch" added.
! One mistyped variable name fixed.
* "=" changed to ":=" and "=="
* source/rtl/fm.c
! // comments changed to /**/
* include/hbtrace.h
! Minor correction.
20000213-15:50 GMT-3 Luiz Rafael Culik <culik@sl.conex.net>
*makefile.bc
*added the treport and tlabel to the makefile
@@ -16,6 +44,7 @@
+tests/ee.frm
+tests/ee.lbl
*report and label files for the examples
20000213-16:15 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*source/compiler/harbour.y

View File

@@ -51,6 +51,7 @@ PRG_HEADERS=\
hbextern.ch \
hbmemory.ch \
hbmemvar.ch \
hbrptlbl.ch \
hbsetup.ch \
inkey.ch \
memoedit.ch \

175
harbour/include/hbrptlbl.ch Normal file
View File

@@ -0,0 +1,175 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Header file for TLabelForm and TReportForm Classes
*
* Copyright 1999 {list of individual authors and e-mail addresses}
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version, with one exception:
*
* The exception is that if you link the Harbour Runtime Library (HRL)
* and/or the Harbour Virtual Machine (HVM) with other files to produce
* an executable, this does not by itself cause the resulting executable
* to be covered by the GNU General Public License. Your use of that
* executable is in no way restricted on account of linking the HRL
* and/or HVM code into it.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*
*/
#ifndef HB_RPTLBL_CH_
#define HB_RPTLBL_CH_
#define _RFRM_PAGENO 3 // "Page No."
#define _RFRM_SUBTOTAL 4 // "** Subtotal **"
#define _RFRM_SUBSUBTOTAL 5 // "* Subsubtotal *"
#define _RFRM_TOTAL 6 // "*** Total ***"
#define RPT_HEADER 1 // Array of header strings
#define RPT_WIDTH 2 // Numeric, report page width
#define RPT_LMARGIN 3 // Numeric, report page offset
#define RPT_RMARGIN 4 // NIL, Not used
#define RPT_LINES 5 // Numeric, number of lines per page
#define RPT_SPACING 6 // Numeric, single=1, double=2
#define RPT_BEJECT 7 // Logical, eject before 1st page, .T.=Yes .F.=No
#define RPT_AEJECT 8 // Logical, eject after last page, .T.=Yes .F.=No
#define RPT_PLAIN 9 // Logical, plain report, .T.=Yes .F.=No
#define RPT_SUMMARY 10 // Logical, no detail lines, .T.=Yes .F.=No
#define RPT_COLUMNS 11 // Array of Column arrays
#define RPT_GROUPS 12 // Array of Group arrays
#define RPT_HEADING 13 // Character, heading for the report
#define RPT_COUNT 13 // Number of elements in the Report array
// Column array definitions ( one array per column definition )
#define RCT_EXP 1 // Block, contains compiled column expression
#define RCT_TEXT 2 // Character, contains text column expression
#define RCT_TYPE 3 // Character, type of expression
#define RCT_HEADER 4 // Array of column heading strings
#define RCT_WIDTH 5 // Numeric, column width including decimals and
// decimal point
#define RCT_DECIMALS 6 // Numeric, number of decimal places
#define RCT_TOTAL 7 // Logical, total this column, .T.=Yes .F.=No
#define RCT_PICT 8 // Character, picture string
#define RCT_COUNT 8 // Number of elements in the Column array
// Group array definitions ( one array per group definition )
#define RGT_EXP 1 // Block, contains compiled group expression
#define RGT_TEXT 2 // Character, contains text group expression
#define RGT_TYPE 3 // Character, type of expression
#define RGT_HEADER 4 // Character, column heading string
#define RGT_AEJECT 5 // Logical, eject after group, .T.=Yes .F.=No
#define RGT_COUNT 5 // Number of elements in the Group array
#define SIZE_FILE_BUFF 1990 // Size of report file
#define SIZE_LENGTHS_BUFF 110
#define SIZE_OFFSETS_BUFF 110
#define SIZE_EXPR_BUFF 1440
#define SIZE_FIELDS_BUFF 300
#define SIZE_PARAMS_BUFF 24
// Definitions for offsets into the FILE_BUFF string
#define LENGTHS_OFFSET 5 // Start of expression length array
#define OFFSETS_OFFSET 115 // Start of expression position array
#define EXPR_OFFSET 225 // Start of expression data area
#define FIELDS_OFFSET 1665 // Start of report columns (fields)
#define PARAMS_OFFSET 1965 // Start of report parameters block
// These are offsets into the FIELDS_BUFF string to actual values
// Values are added to a block offset FLD_OFFSET that is moved in
// increments of 12
#define FIELD_WIDTH_OFFSET 1
#define FIELD_TOTALS_OFFSET 6
#define FIELD_DECIMALS_OFFSET 7
// These are offsets into FIELDS_BUFF which are used to 'point' into
// the EXPR_BUFF string which contains the textual data
#define FIELD_CONTENT_EXPR_OFFSET 9
#define FIELD_HEADER_EXPR_OFFSET 11
// These are actual offsets into the PARAMS_BUFF string which
// are used to 'point' into the EXPR_BUFF string
#define PAGE_HDR_OFFSET 1
#define GRP_EXPR_OFFSET 3
#define SUB_EXPR_OFFSET 5
#define GRP_HDR_OFFSET 7
#define SUB_HDR_OFFSET 9
// These are actual offsets into the PARAMS_BUFF string to actual values
#define PAGE_WIDTH_OFFSET 11
#define LNS_PER_PAGE_OFFSET 13
#define LEFT_MRGN_OFFSET 15
#define RIGHT_MGRN_OFFSET 17
#define COL_COUNT_OFFSET 19
#define DBL_SPACE_OFFSET 21
#define SUMMARY_RPT_OFFSET 22
#define PE_OFFSET 23
#define OPTION_OFFSET 24
// File error definitions
#define F_OK 0 // No error
#define F_EMPTY -3 // File is empty
#define F_ERROR -1 // Some kind of error
#define F_NOEXIST 2 // File does not exist
#define _LF_SAMPLES 2 // "Do you want more samples?"
#define _LF_YN 12 // "Y/N"
#define LBL_REMARK 1 // Character, remark from label file
#define LBL_HEIGHT 2 // Numeric, label height
#define LBL_WIDTH 3 // Numeric, label width
#define LBL_LMARGIN 4 // Numeric, left margin
#define LBL_LINES 5 // Numeric, lines between labels
#define LBL_SPACES 6 // Numeric, spaces between labels
#define LBL_ACROSS 7 // Numeric, number of labels across
#define LBL_FIELDS 8 // Array of Field arrays
#define LBL_COUNT 8 // Numeric, number of label fields
// Field array definitions ( one array per field )
#define LF_EXP 1 // Block, field expression
#define LF_TEXT 2 // Character, text of field expression
#define LF_BLANK 3 // Logical, compress blank fields, .T.=Yes .F.=No
#define LF_COUNT 3 // Numeric, number of elements in field array
#define BUFFSIZE 1034 // Size of label file
#define FILEOFFSET 74 // Start of label content descriptions
#define FIELDSIZE 60
#define REMARKOFFSET 2
#define REMARKSIZE 60
#define HEIGHTOFFSET 62
#define HEIGHTSIZE 2
#define WIDTHOFFSET 64
#define WIDTHSIZE 2
#define LMARGINOFFSET 66
#define LMARGINSIZE 2
#define LINESOFFSET 68
#define LINESSIZE 2
#define SPACESOFFSET 70
#define SPACESSIZE 2
#define ACROSSOFFSET 72
#define ACROSSSIZE 2
#endif /* HB_RPTLBL_CH_ */

View File

@@ -121,7 +121,7 @@
* filename/linenum information - this is usefull if we want to
* trace the source of unreleased memory blocks
*/
#define HB_ECHO_STEALTH( l, x ) do \
#define HB_ECHO_STEALTH( l, x ) do \
{ \
if( hb_tr_level() >= l ) \
{ \

View File

@@ -1,172 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Header file for TLabelForm and TReportForm Classes
*
* Copyright 1999 {list of individual authors and e-mail addresses}
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version, with one exception:
*
* The exception is that if you link the Harbour Runtime Library (HRL)
* and/or the Harbour Virtual Machine (HVM) with other files to produce
* an executable, this does not by itself cause the resulting executable
* to be covered by the GNU General Public License. Your use of that
* executable is in no way restricted on account of linking the HRL
* and/or HVM code into it.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*
*/
#ifndef __RPTDEF_CH__
#define _RFRM_PAGENO 3 // "Page No."
#define _RFRM_SUBTOTAL 4 // "** Subtotal **"
#define _RFRM_SUBSUBTOTAL 5 // "* Subsubtotal *"
#define _RFRM_TOTAL 6 // "*** Total ***"
#define RPT_HEADER 1 // Array of header strings
#define RPT_WIDTH 2 // Numeric, report page width
#define RPT_LMARGIN 3 // Numeric, report page offset
#define RPT_RMARGIN 4 // NIL, Not used
#define RPT_LINES 5 // Numeric, number of lines per page
#define RPT_SPACING 6 // Numeric, single=1, double=2
#define RPT_BEJECT 7 // Logical, eject before 1st page, .T.=Yes .F.=No
#define RPT_AEJECT 8 // Logical, eject after last page, .T.=Yes .F.=No
#define RPT_PLAIN 9 // Logical, plain report, .T.=Yes .F.=No
#define RPT_SUMMARY 10 // Logical, no detail lines, .T.=Yes .F.=No
#define RPT_COLUMNS 11 // Array of Column arrays
#define RPT_GROUPS 12 // Array of Group arrays
#define RPT_HEADING 13 // Character, heading for the report
#define RPT_COUNT 13 // Number of elements in the Report array
// Column array definitions ( one array per column definition )
#define RCT_EXP 1 // Block, contains compiled column expression
#define RCT_TEXT 2 // Character, contains text column expression
#define RCT_TYPE 3 // Character, type of expression
#define RCT_HEADER 4 // Array of column heading strings
#define RCT_WIDTH 5 // Numeric, column width including decimals and
// decimal point
#define RCT_DECIMALS 6 // Numeric, number of decimal places
#define RCT_TOTAL 7 // Logical, total this column, .T.=Yes .F.=No
#define RCT_PICT 8 // Character, picture string
#define RCT_COUNT 8 // Number of elements in the Column array
// Group array definitions ( one array per group definition )
#define RGT_EXP 1 // Block, contains compiled group expression
#define RGT_TEXT 2 // Character, contains text group expression
#define RGT_TYPE 3 // Character, type of expression
#define RGT_HEADER 4 // Character, column heading string
#define RGT_AEJECT 5 // Logical, eject after group, .T.=Yes .F.=No
#define RGT_COUNT 5 // Number of elements in the Group array
#define SIZE_FILE_BUFF 1990 // Size of report file
#define SIZE_LENGTHS_BUFF 110
#define SIZE_OFFSETS_BUFF 110
#define SIZE_EXPR_BUFF 1440
#define SIZE_FIELDS_BUFF 300
#define SIZE_PARAMS_BUFF 24
// Definitions for offsets into the FILE_BUFF string
#define LENGTHS_OFFSET 5 // Start of expression length array
#define OFFSETS_OFFSET 115 // Start of expression position array
#define EXPR_OFFSET 225 // Start of expression data area
#define FIELDS_OFFSET 1665 // Start of report columns (fields)
#define PARAMS_OFFSET 1965 // Start of report parameters block
// These are offsets into the FIELDS_BUFF string to actual values
// Values are added to a block offset FLD_OFFSET that is moved in
// increments of 12
#define FIELD_WIDTH_OFFSET 1
#define FIELD_TOTALS_OFFSET 6
#define FIELD_DECIMALS_OFFSET 7
// These are offsets into FIELDS_BUFF which are used to 'point' into
// the EXPR_BUFF string which contains the textual data
#define FIELD_CONTENT_EXPR_OFFSET 9
#define FIELD_HEADER_EXPR_OFFSET 11
// These are actual offsets into the PARAMS_BUFF string which
// are used to 'point' into the EXPR_BUFF string
#define PAGE_HDR_OFFSET 1
#define GRP_EXPR_OFFSET 3
#define SUB_EXPR_OFFSET 5
#define GRP_HDR_OFFSET 7
#define SUB_HDR_OFFSET 9
// These are actual offsets into the PARAMS_BUFF string to actual values
#define PAGE_WIDTH_OFFSET 11
#define LNS_PER_PAGE_OFFSET 13
#define LEFT_MRGN_OFFSET 15
#define RIGHT_MGRN_OFFSET 17
#define COL_COUNT_OFFSET 19
#define DBL_SPACE_OFFSET 21
#define SUMMARY_RPT_OFFSET 22
#define PE_OFFSET 23
#define OPTION_OFFSET 24
// File error definitions
#define F_OK 0 // No error
#define F_EMPTY -3 // File is empty
#define F_ERROR -1 // Some kind of error
#define F_NOEXIST 2 // File does not exist
#define LBL_REMARK 1 // Character, remark from label file
#define LBL_HEIGHT 2 // Numeric, label height
#define LBL_WIDTH 3 // Numeric, label width
#define LBL_LMARGIN 4 // Numeric, left margin
#define LBL_LINES 5 // Numeric, lines between labels
#define LBL_SPACES 6 // Numeric, spaces between labels
#define LBL_ACROSS 7 // Numeric, number of labels across
#define LBL_FIELDS 8 // Array of Field arrays
#define LBL_COUNT 8 // Numeric, number of label fields
// Field array definitions ( one array per field )
#define LF_EXP 1 // Block, field expression
#define LF_TEXT 2 // Character, text of field expression
#define LF_BLANK 3 // Logical, compress blank fields, .T.=Yes .F.=No
#define LF_COUNT 3 // Numeric, number of elements in field array
#define BUFFSIZE 1034 // Size of label file
#define FILEOFFSET 74 // Start of label content descriptions
#define FIELDSIZE 60
#define REMARKOFFSET 2
#define REMARKSIZE 60
#define HEIGHTOFFSET 62
#define HEIGHTSIZE 2
#define WIDTHOFFSET 64
#define WIDTHSIZE 2
#define LMARGINOFFSET 66
#define LMARGINSIZE 2
#define LINESOFFSET 68
#define LINESSIZE 2
#define SPACESOFFSET 70
#define SPACESSIZE 2
#define ACROSSOFFSET 72
#define ACROSSSIZE 2
#define __RPTDEF_CH__
#endif

View File

@@ -4,13 +4,33 @@
# makefile for Borland C/C++ compilers
# Borland C/C++ (Windows 32 bits)
BCC_EXE = bcc32
TASM_EXE = tasm32
OBJ_DIR = obj\b32
LIB_DIR = lib\b32
# Borland C/C++ 5.x
BCC_OPT = -O2 -DHARBOUR_USE_WIN_GTAPI
!if $d(B16)
# Borland C/C++ (DOS 16 bits)
# Don't indent these.
BCC_OPT = -mh -DHARBOUR_USE_DOS_GTAPI
BCC_EXE = bcc
TASM_EXE = tasm
OBJ_DIR = obj\b16
LIB_DIR = lib\b16
!else
# Borland C/C++ (Windows 32 bits)
BCC_EXE = bcc32
TASM_EXE = tasm32
OBJ_DIR = obj\b32
LIB_DIR = lib\b32
!if $d(B40)
# Borland C/C++ 4.x (Avoid optimizer bug)
BCC_OPT = -DHARBOUR_USE_WIN_GTAPI
!else
# Borland C/C++ 5.x
BCC_OPT = -O2 -DHARBOUR_USE_WIN_GTAPI
!endif
!endif
HARBOUR_OPT = -q
@@ -322,26 +342,26 @@ $(OBJ_DIR)\hbpplib.obj : $(PP_DIR)\hbpplib.c
#
$(HARBOUR_EXE) : $(HARBOUR_EXE_OBJS)
echo $(BCC_OPT) > temp.bld
echo -e$(HARBOUR_EXE) >> temp.bld
echo -I$(INCLUDE_DIR) >> temp.bld
echo $(OBJ_DIR)\harbour.obj >> temp.bld
echo $(OBJ_DIR)\harboury.obj >> temp.bld
echo $(OBJ_DIR)\harbourl.obj >> temp.bld
echo $(OBJ_DIR)\cmdcheck.obj >> temp.bld
echo $(OBJ_DIR)\hbusage.obj >> temp.bld
echo $(OBJ_DIR)\hbgenerr.obj >> temp.bld
echo $(OBJ_DIR)\hbpcode.obj >> temp.bld
echo $(OBJ_DIR)\genc.obj >> temp.bld
echo $(OBJ_DIR)\genjava.obj >> temp.bld
echo $(OBJ_DIR)\genpas.obj >> temp.bld
echo $(OBJ_DIR)\genrc.obj >> temp.bld
echo $(OBJ_DIR)\genhrb.obj >> temp.bld
echo $(OBJ_DIR)\expropt.obj >> temp.bld
echo $(OBJ_DIR)\hbfunchk.obj >> temp.bld
echo $(COMMON_LIB) $(PP_LIB) >> temp.bld
$(BCC_EXE) @temp.bld
del temp.bld
echo $(BCC_OPT) > make.tmp
echo -e$(HARBOUR_EXE) >> make.tmp
echo -I$(INCLUDE_DIR) >> make.tmp
echo $(OBJ_DIR)\harbour.obj >> make.tmp
echo $(OBJ_DIR)\harboury.obj >> make.tmp
echo $(OBJ_DIR)\harbourl.obj >> make.tmp
echo $(OBJ_DIR)\cmdcheck.obj >> make.tmp
echo $(OBJ_DIR)\hbusage.obj >> make.tmp
echo $(OBJ_DIR)\hbgenerr.obj >> make.tmp
echo $(OBJ_DIR)\hbpcode.obj >> make.tmp
echo $(OBJ_DIR)\genc.obj >> make.tmp
echo $(OBJ_DIR)\genjava.obj >> make.tmp
echo $(OBJ_DIR)\genpas.obj >> make.tmp
echo $(OBJ_DIR)\genrc.obj >> make.tmp
echo $(OBJ_DIR)\genhrb.obj >> make.tmp
echo $(OBJ_DIR)\expropt.obj >> make.tmp
echo $(OBJ_DIR)\hbfunchk.obj >> make.tmp
echo $(COMMON_LIB) $(PP_LIB) >> make.tmp
$(BCC_EXE) @make.tmp
del make.tmp
$(OBJ_DIR)\harbour.obj : $(COMPILER_DIR)\harbour.c
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$@ $**
@@ -397,13 +417,13 @@ $(OBJ_DIR)\hbfunchk.obj : $(COMPILER_DIR)\hbfunchk.c
$(PP_EXE) : $(PP_LIB_OBJS) $(COMMON_LIB_OBJS)
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$(OBJ_DIR)\hbpp.obj $(PP_DIR)\stdalone\hbpp.c
echo $(BCC_OPT) > temp.bld
echo -e$(PP_EXE) >> temp.bld
echo -I$(INCLUDE_DIR) >> temp.bld
echo $(OBJ_DIR)\hbpp.obj >> temp.bld
echo $(COMMON_LIB) $(PP_LIB) >> temp.bld
$(BCC_EXE) @temp.bld
del temp.bld
echo $(BCC_OPT) > make.tmp
echo -e$(PP_EXE) >> make.tmp
echo -I$(INCLUDE_DIR) >> make.tmp
echo $(OBJ_DIR)\hbpp.obj >> make.tmp
echo $(COMMON_LIB) $(PP_LIB) >> make.tmp
$(BCC_EXE) @make.tmp
del make.tmp
#
# harbour.lib
@@ -1226,22 +1246,22 @@ $(RUNNER_EXE) : $(RUNNER_DIR)\stdalone\external.prg \
$(HARBOUR_EXE) -i$(INCLUDE_DIR) -i$(RUNNER_DIR)\stdalone -n $(HARBOUR_OPT) -o$(OBJ_DIR)\ $(RUNNER_DIR)\stdalone\hbrun.prg
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$(OBJ_DIR)\hbrun.obj $(OBJ_DIR)\hbrun.c
echo $(BCC_OPT) > temp.bld
echo -e$(RUNNER_EXE) >> temp.bld
echo -I$(INCLUDE_DIR) >> temp.bld
echo $(OBJ_DIR)\hbrun.obj >> temp.bld
echo $(OBJ_DIR)\external.obj >> temp.bld
echo $(HARBOUR_LIB) >> temp.bld
echo $(PP_LIB) >> temp.bld
echo $(COMMON_LIB) >> temp.bld
echo $(TERMINAL_LIB) >> temp.bld
echo $(MACRO_LIB) >> temp.bld
echo $(TOOLS_LIB) >> temp.bld
echo $(RUNNER_LIB) >> temp.bld
echo $(DBFNTX_LIB) >> temp.bld
echo $(DBFCDX_LIB) >> temp.bld
$(BCC_EXE) @temp.bld
del temp.bld
echo $(BCC_OPT) > make.tmp
echo -e$(RUNNER_EXE) >> make.tmp
echo -I$(INCLUDE_DIR) >> make.tmp
echo $(OBJ_DIR)\hbrun.obj >> make.tmp
echo $(OBJ_DIR)\external.obj >> make.tmp
echo $(HARBOUR_LIB) >> make.tmp
echo $(PP_LIB) >> make.tmp
echo $(COMMON_LIB) >> make.tmp
echo $(TERMINAL_LIB) >> make.tmp
echo $(MACRO_LIB) >> make.tmp
echo $(TOOLS_LIB) >> make.tmp
echo $(RUNNER_LIB) >> make.tmp
echo $(DBFNTX_LIB) >> make.tmp
echo $(DBFCDX_LIB) >> make.tmp
$(BCC_EXE) @make.tmp
del make.tmp
#
# debug.lib
@@ -1267,28 +1287,28 @@ $(OBJ_DIR)\tbrwtext.obj : $(OBJ_DIR)\tbrwtext.c
#
$(REGRESS_EXE) : $(REGRESS_EXE_OBJS)
echo $(BCC_OPT) > temp.bld
echo -e$(BIN_DIR)\rt_main.exe >> temp.bld
echo -I$(INCLUDE_DIR) >> temp.bld
echo $(OBJ_DIR)\rt_main.obj >> temp.bld
echo $(OBJ_DIR)\rt_hvm.obj >> temp.bld
echo $(OBJ_DIR)\rt_math.obj >> temp.bld
echo $(OBJ_DIR)\rt_date.obj >> temp.bld
echo $(OBJ_DIR)\rt_str.obj >> temp.bld
echo $(OBJ_DIR)\rt_trans.obj >> temp.bld
echo $(OBJ_DIR)\rt_array.obj >> temp.bld
echo $(OBJ_DIR)\rt_file.obj >> temp.bld
echo $(OBJ_DIR)\rt_misc.obj >> temp.bld
echo $(HARBOUR_LIB) >> temp.bld
echo $(PP_LIB) >> temp.bld
echo $(COMMON_LIB) >> temp.bld
echo $(TERMINAL_LIB) >> temp.bld
echo $(MACRO_LIB) >> temp.bld
echo $(TOOLS_LIB) >> temp.bld
echo $(DBFNTX_LIB) >> temp.bld
echo $(DBFCDX_LIB) >> temp.bld
$(BCC_EXE) @temp.bld
del temp.bld
echo $(BCC_OPT) > make.tmp
echo -e$(BIN_DIR)\rt_main.exe >> make.tmp
echo -I$(INCLUDE_DIR) >> make.tmp
echo $(OBJ_DIR)\rt_main.obj >> make.tmp
echo $(OBJ_DIR)\rt_hvm.obj >> make.tmp
echo $(OBJ_DIR)\rt_math.obj >> make.tmp
echo $(OBJ_DIR)\rt_date.obj >> make.tmp
echo $(OBJ_DIR)\rt_str.obj >> make.tmp
echo $(OBJ_DIR)\rt_trans.obj >> make.tmp
echo $(OBJ_DIR)\rt_array.obj >> make.tmp
echo $(OBJ_DIR)\rt_file.obj >> make.tmp
echo $(OBJ_DIR)\rt_misc.obj >> make.tmp
echo $(HARBOUR_LIB) >> make.tmp
echo $(PP_LIB) >> make.tmp
echo $(COMMON_LIB) >> make.tmp
echo $(TERMINAL_LIB) >> make.tmp
echo $(MACRO_LIB) >> make.tmp
echo $(TOOLS_LIB) >> make.tmp
echo $(DBFNTX_LIB) >> make.tmp
echo $(DBFCDX_LIB) >> make.tmp
$(BCC_EXE) @make.tmp
del make.tmp
$(OBJ_DIR)\rt_main.c : $(REGRESS_DIR)\rt_main.prg
$(HARBOUR_EXE) $** -i$(INCLUDE_DIR) -n $(HARBOUR_OPT) -o$@
@@ -1349,27 +1369,27 @@ $(OBJ_DIR)\rt_misc.obj : $(OBJ_DIR)\rt_misc.c
#
$(HBDOC_EXE) : $(HBDOC_EXE_OBJS)
echo $(BCC_OPT) > temp.bld
echo -e$(BIN_DIR)\hbdoc.exe >> temp.bld
echo -I$(INCLUDE_DIR) >> temp.bld
echo $(OBJ_DIR)\hbdoc.obj >> temp.bld
echo $(OBJ_DIR)\genasc.obj >> temp.bld
echo $(OBJ_DIR)\genhpc.obj >> temp.bld
echo $(OBJ_DIR)\genhtm.obj >> temp.bld
echo $(OBJ_DIR)\genng.obj >> temp.bld
echo $(OBJ_DIR)\genos2.obj >> temp.bld
echo $(OBJ_DIR)\genrtf.obj >> temp.bld
echo $(OBJ_DIR)\gentrf.obj >> temp.bld
echo $(HARBOUR_LIB) >> temp.bld
echo $(PP_LIB) >> temp.bld
echo $(COMMON_LIB) >> temp.bld
echo $(TERMINAL_LIB) >> temp.bld
echo $(MACRO_LIB) >> temp.bld
echo $(TOOLS_LIB) >> temp.bld
echo $(DBFNTX_LIB) >> temp.bld
echo $(DBFCDX_LIB) >> temp.bld
$(BCC_EXE) @temp.bld
del temp.bld
echo $(BCC_OPT) > make.tmp
echo -e$(BIN_DIR)\hbdoc.exe >> make.tmp
echo -I$(INCLUDE_DIR) >> make.tmp
echo $(OBJ_DIR)\hbdoc.obj >> make.tmp
echo $(OBJ_DIR)\genasc.obj >> make.tmp
echo $(OBJ_DIR)\genhpc.obj >> make.tmp
echo $(OBJ_DIR)\genhtm.obj >> make.tmp
echo $(OBJ_DIR)\genng.obj >> make.tmp
echo $(OBJ_DIR)\genos2.obj >> make.tmp
echo $(OBJ_DIR)\genrtf.obj >> make.tmp
echo $(OBJ_DIR)\gentrf.obj >> make.tmp
echo $(HARBOUR_LIB) >> make.tmp
echo $(PP_LIB) >> make.tmp
echo $(COMMON_LIB) >> make.tmp
echo $(TERMINAL_LIB) >> make.tmp
echo $(MACRO_LIB) >> make.tmp
echo $(TOOLS_LIB) >> make.tmp
echo $(DBFNTX_LIB) >> make.tmp
echo $(DBFCDX_LIB) >> make.tmp
$(BCC_EXE) @make.tmp
del make.tmp
$(OBJ_DIR)\hbdoc.c : $(HBDOC_DIR)\hbdoc.prg
$(HARBOUR_EXE) $** -i$(INCLUDE_DIR) -n $(HARBOUR_OPT) -o$@

View File

@@ -92,6 +92,8 @@ PRG_SOURCES=\
text.prg \
tget.prg \
tgetlist.prg \
tlabel.prg \
treport.prg \
wait.prg \
xsavescr.prg \

View File

@@ -71,11 +71,12 @@
#define HB_TR_LEVEL HB_TR_ERROR
#endif
//#if HB_TR_LEVEL >= HB_TR_DEBUG
//extern char * hb_tr_file_;
//extern int hb_tr_line_;
//#endif
/*
#if HB_TR_LEVEL >= HB_TR_DEBUG
extern char * hb_tr_file_;
extern int hb_tr_line_;
#endif
*/
#ifdef HB_FM_STATISTICS

View File

@@ -33,26 +33,26 @@
*
*/
#include 'hbclass.ch'
#include 'inkey.ch'
#include 'rptdef.ch'
#define _LF_SAMPLES 2 // "Do you want more samples?"
#define _LF_YN 12 // "Y/N"
#include "hbclass.ch"
#include "hbrptlbl.ch"
#include "error.ch"
#include "inkey.ch"
CLASS TLabelForm
DATA aLabelData AS {}
DATA aBandToPrint
DATA cBlank AS ""
DATA lOneMoreBand AS .T.
DATA nCurrentCol // The current column in the band
METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample )
METHOD ExecuteLabel()
METHOD SampleLabels()
METHOD LoadLabel(cLblFile)
DATA aLabelData AS {}
DATA aBandToPrint
DATA cBlank AS ""
DATA lOneMoreBand AS .T.
DATA nCurrentCol // The current column in the band
METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample )
METHOD ExecuteLabel()
METHOD SampleLabels()
METHOD LoadLabel(cLblFile)
ENDCLASS
METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample ) CLASS TLabelForm
@@ -61,10 +61,11 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
LOCAL cExtraFile, lExtraState // EXTRA file status
LOCAL xBreakVal, lBroke := .F.
LOCAL err
Local OldMargin
LOCAL OldMargin
LOCAL nLen
::aBandToPrint:={} // ARRAY(5)
::nCurrentCol := 1
::aBandToPrint:={} // ARRAY(5)
::nCurrentCol := 1
// Resolve parameters
IF cLBLName == NIL
err := ErrorNew()
@@ -75,19 +76,19 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
ELSE
IF AT( ".", cLBLName ) == 0
cLBLName := TRIM( cLBLName ) + ".LBL"
cLBLName := TRIM( cLBLName ) + ".lbl"
ENDIF
ENDIF
IF lPrinter == NIL
lPrinter := .F.
ENDIF
IF lSample == NIL
lSample := .F.
ENDIF
// Set output devices
IF lPrinter // To the printer
lPrintOn := SET( _SET_PRINTER, lPrinter )
@@ -95,50 +96,50 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
lConsoleOn := SET( _SET_CONSOLE )
SET( _SET_CONSOLE, ! ( lNoConsole .OR. !lConsoleOn ) )
IF (!Empty(cAltFile)) // To file
lExtraState := SET( _SET_EXTRA, .T. )
cExtraFile := SET( _SET_EXTRAFILE, cAltFile )
ENDIF
OldMargin := SET( _SET_MARGIN, 0)
BEGIN SEQUENCE
::aLabelData := ::LoadLabel( cLBLName ) // Load the (.lbl) into an array
// Add to the left margin if a SET MARGIN has been defined
::aLabelData[ LBL_LMARGIN ] := ::aLabelData[ LBL_LMARGIN ] + OldMargin
// Size the ::aBandToPrint array to the number of fields
// nLen := LEN( ::aLabelData[ LBL_FIELDS ] )
// nLen := LEN( ::aLabelData[ LBL_FIELDS ] )
ASIZE( ::aBandToPrint, LEN( ::aLabelData[ LBL_FIELDS ]))
AFILL( ::aBandToPrint, SPACE( ::aLabelData[ LBL_LMARGIN ] ) )
// Create enough space for a blank record
::cBlank := SPACE( ::aLabelData[ LBL_WIDTH ] + ::aLabelData[ LBL_SPACES ] )
// Handle sample labels
IF lSample
::SampleLabels()
ENDIF
// Execute the actual label run based on matching records
DBEval( { || ::ExecuteLabel() }, bFor, bWhile, nNext, nRecord, lRest )
// Print the last band if there is one
IF ::lOneMoreBand
// Print the band
AEVAL( ::aBandToPrint, { | BandLine | PrintIt( BandLine ) } )
ENDIF
RECOVER USING xBreakVal
lBroke := .T.
END SEQUENCE
// Clean up and leave
@@ -147,28 +148,28 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
::nCurrentCol := 1
::cBlank := ""
::lOneMoreBand :=.T.
// clean up
SET( _SET_PRINTER, lPrintOn ) // Set the printer back to prior state
SET( _SET_CONSOLE, lConsoleOn ) // Set the console back to prior state
IF (!Empty(cAltFile)) // Set extrafile back
SET( _SET_EXTRAFILE, cExtraFile )
SET( _SET_EXTRA, lExtraState )
ENDIF
IF lBroke
BREAK xBreakVal // continue breaking
ENDIF
SET( _SET_MARGIN, OldMargin)
RETURN Self
METHOD ExecuteLabel() CLASS TLabelForm
METHOD ExecuteLabel() CLASS TLabelForm
LOCAL nField, nMoreLines, aBuffer := {}, cBuffer
LOCAL v
// Load the current record into aBuffer
FOR nField := 1 TO LEN( ::aLabelData[ LBL_FIELDS ] )
@@ -196,7 +197,7 @@ METHOD ExecuteLabel() CLASS TLabelForm
NEXT
ASIZE( aBuffer, LEN( ::aLabelData[ LBL_FIELDS ] ) )
// Add aBuffer to ::aBandToPrint
FOR nField := 1 TO LEN( ::aLabelData[ LBL_FIELDS ] )
IF aBuffer[ nField ] == NIL
@@ -205,18 +206,18 @@ METHOD ExecuteLabel() CLASS TLabelForm
::aBandToPrint[ nField ] := ::aBandToPrint[ nField ] + aBuffer[ nField ]
ENDIF
NEXT
IF ::nCurrentCol == ::aLabelData[ LBL_ACROSS ]
// trim
FOR nField := 1 TO LEN( ::aBandToPrint )
::aBandToPrint[ nField ] := Trim( ::aBandToPrint[ nField ] )
NEXT
// trim
FOR nField := 1 TO LEN( ::aBandToPrint )
::aBandToPrint[ nField ] := Trim( ::aBandToPrint[ nField ] )
NEXT
::lOneMoreBand := .F.
::nCurrentCol := 1
// Print the band
AEVAL( ::aBandToPrint, { | BandLine | PrintIt( BandLine ) } )
@@ -227,27 +228,27 @@ METHOD ExecuteLabel() CLASS TLabelForm
NEXT
ENDIF
IF ::aLabelData[ LBL_LINES ] > 0
// Add the spaces between the label lines
FOR nField := 1 TO ::aLabelData[ LBL_LINES ]
PrintIt()
NEXT
ENDIF
// Clear out the band
AFILL( ::aBandToPrint, SPACE( ::aLabelData[ LBL_LMARGIN ] ) )
ELSE
::lOneMoreBand := .T.
::nCurrentCol := ::nCurrentCol + 1
ENDIF
RETURN Self
METHOD SampleLabels() CLASS TLabelForm
LOCAL nGetKey, lMoreSamples := .T., nField
LOCAL aBand := {}
// Create the sample label row
ASIZE( aBand, ::aLabelData[ LBL_HEIGHT ] )
AFILL( aBand, SPACE( ::aLabelData[ LBL_LMARGIN ] ) +;
@@ -255,10 +256,10 @@ METHOD SampleLabels() CLASS TLabelForm
::aLabelData[ LBL_WIDTH ] ) + ;
SPACE( ::aLabelData[ LBL_SPACES ] ), ;
::aLabelData[ LBL_ACROSS ] ) )
// Prints sample labels
DO WHILE lMoreSamples
// Print the samples
AEVAL( aBand, { | BandLine | PrintIt( BandLine ) } )
@@ -268,7 +269,7 @@ METHOD SampleLabels() CLASS TLabelForm
PrintIt()
NEXT nField
ENDIF
// Prompt for more
@ ROW(), 0 SAY NationMsg(_LF_SAMPLES)+" ("+Nationmsg(_LF_YN)+")"
nGetKey := INKEY(0)
@@ -283,8 +284,8 @@ METHOD SampleLabels() CLASS TLabelForm
lMoreSamples := .F.
ENDIF
ENDDO
RETURN Self
RETURN Self
METHOD LoadLabel( cLblFile ) CLASS TLabelForm
LOCAL i, j := 0 // Counters
@@ -386,9 +387,9 @@ METHOD LoadLabel( cLblFile ) CLASS TLabelForm
// Compression option
AADD( aLabel[ LBL_FIELDS, i ], .T. )
ELSE
ELSE
AADD( aLabel[ LBL_FIELDS ], NIL )
AADD( aLabel[ LBL_FIELDS ], NIL )
ENDIF
@@ -396,18 +397,18 @@ METHOD LoadLabel( cLblFile ) CLASS TLabelForm
// Close file
FCLOSE( nHandle )
nFileError = FERROR()
nFileError := FERROR()
ENDIF
RETURN( aLabel )
RETURN aLabel
FUNCTION __LabelForm( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample )
RETURN TLabelForm():New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample )
RETURN TLabelForm():New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
bWhile, nNext, nRecord, lRest, lSample )
STATIC PROCEDURE PrintIt( cString )
@@ -424,16 +425,16 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
LOCAL nPos
LOCAL aList := {} // Define an empty array
LOCAL lDelimLast := .F.
IF cDelimiter == NIL
cDelimiter := ","
ENDIF
DO WHILE ( LEN(cList) <> 0 )
DO WHILE LEN(cList) <> 0
nPos := AT(cDelimiter, cList)
IF ( nPos == 0 )
IF nPos == 0
nPos := LEN(cList)
ENDIF
@@ -449,8 +450,9 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
ENDDO
IF ( lDelimLast )
IF lDelimLast
AADD(aList, "")
ENDIF
RETURN aList // Return the array

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,6 @@
/*
* $Id$
*/
FUNCTION MAIN()

View File

@@ -1,3 +1,7 @@
/*
* $Id$
*/
FUNCTION() MAIN
USE Test New