home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR8
/
123EXP.ZIP
/
WYSIFILE.CLA
< prev
next >
Wrap
Text File
|
1993-07-13
|
23KB
|
454 lines
wysifile PROCEDURE(op_code)
!══════════════════════════════════════════════════════════════════════════════
! RED - 06/22/93
!
! This procedure performs all of the WYSIWYG file I/O.
!
!══════════════════════════════════════════════════════════════════════════════
op_code EXTERNAL
INCLUDE('c:\cla\wysiwyg.inc')
pos BYTE
ASCIIZ STRING(SIZE(wys:string))
atrx BYTE ! General use index for attr_tab_no and/or wys:attr_tab
attr_no BYTE ! General purpose counter
font_idx BYTE ! Index for the wyv:fonts_to_use table
font_no BYTE
!──────────────────────────────────────────────────────────────────────────────
CODE
CASE op_code ! Perform the requested function
OF wyf:row_end_lump ! Test first - performed most often
DO row_end_lump
OF wyf:write_clustr
DO write_clustr
OF wyf:setup
DO setup_file
OF wyf:std_init
DO std_init
OF wyf:std_attr
DO std_attr
OF wyf:first_clustr
DO first_clustr
OF wyf:flush_clustr
DO flush_clustr
OF wyf:prt_settings
DO prt_settings
OF wyf:eof
DO close_file
ELSE
err_msg(op_code & ' is an invalid WYSIFILE op-code!')
mem:status = false
RETURN
.
mem:status = true
RETURN
!──Routines────────────────────────────────────────────────────────────────────────────
setup_file ROUTINE
pos = INSTRING('.WK1',wyv:filename,1) - 1 ! Format the name from
IF pos < 2 ! the spreadsheet
err_msg('Invalid WYSIWYG filename format.') ! filename. wys_filename
mem:status = false ! should start out equal
RETURN ! to the spreadsheet
. ! filename.
wyv:filename = RIGHT(wyv:filename,pos) & '.FMT'
CREATE(wys_file) ! Create (or re-create) the WYSIWYG file.
IF ERRORCODE()
err_msg('Unable to create the WYSIWYG format file.')
mem:status = false
RETURN
.
CLEAR(wys:record) ! Initialize the spreadsheet record
wys:opcode = wyf:bof ! BOF op code
wys:version1 = wys_version1 ! Set to FMT 2
wys:version2 = wys_version2 ! version file
wys:length = 2 ! Record size (2 bytes)
ADD(wys_file,wys:length +4) ! Write the BOF record (length = data + op code + length)
std_init ROUTINE ! Write out the initial WYSIWYG records used for a
! standard spreadsheet. If this function is not
! performed, the records generated here must be
! written individually by the caller using the
! seperate function codes and calls.
DO prt_cart_on
ASCIIZ = '' ! No printer cartridges defined
wys:opcode = wyf:cartridge_1
DO write_ASCIIZ
wys:opcode = wyf:cartridge_2
DO write_ASCIIZ
ASCIIZ = 'HP Laserjet III, IIID, and IIIP Wysiwyg' ! Use the 123 2.3 printer name text
wys:opcode = wyf:printer_name
DO write_ASCIIZ
CASE cfg:device ! Set the port according to the current
OF 'LPT1' ! application's setting
wys:port_code = wyp:DOS_LPT1
OF 'LPT2'
wys:port_code = wyp:DOS_LPT2
OF 'LPT3'
wys:port_code = wyp:DOS_LPT3
ELSE
wys:port_code = wyp:DOS_LPT1
.
wys:opcode = wyf:port_code
DO write_2_byte
wys:baud = wyb:baud_9600 ! Even though it's not used, set the
wys:opcode = wyf:baud ! printer baud rate to 9,600.
DO write_2_byte
ASCIIZ = 'XHPLJ3' ! Use the 123 2.3 driver name text
wys:opcode = wyf:driver_name
DO write_ASCIIZ
wys:line_color = rcc:black ! Lines are black
DO line_color
wys:color_neg = rcc:red ! Negative numbers are red
DO color_neg
wys:shadow_color = rcc:black ! Shadows are black
DO shadow_color
! Generate the fonts that are used as the
! standard 123 2.3 WYSIWYG fonts:
! 1 = HLV 12 pt 5 = TMS 8 pt
! 2 = HLV 14 pt 6 = TMS 10 pt
! 3 = HLV 24 pt 7 = TMS 12 pt
ASCIIZ = 'HLV' ! 4 = TMS 6 pt 8 = SYM 12 pt
LOOP wys:font_number = 1 TO 3
DO font_face ! First 3 fonts
.
ASCIIZ = 'TMS'
LOOP wys:font_number = 4 TO 7
DO font_face ! Next 4 fonts
.
wys:font_number = 8
DO font_face ! Last font
wys:opcode = wyf:font_pitch ! Set the font PITCH size (same as the
wys:length = 16 ! point size below)
wys:font_pitch[1] = 12
wys:font_pitch[2] = 14
wys:font_pitch[3] = 24
wys:font_pitch[4] = 6
wys:font_pitch[5] = 8
wys:font_pitch[6] = 10
wys:font_pitch[7] = 12
wys:font_pitch[8] = 12
ADD(wys_file,wys:length +4)
wys:opcode = wyf:font_type ! Set the font types
wys:length = 16
wys:font_type[1] = wft:helv
wys:font_type[2] = wft:helv
wys:font_type[3] = wft:helv
wys:font_type[4] = wft:TMS
wys:font_type[5] = wft:TMS
wys:font_type[6] = wft:TMS
wys:font_type[7] = wft:TMS
wys:font_type[8] = wft:symbol
ADD(wys_file,wys:length +4)
wys:opcode = wyf:font_points ! Set the font POINT sizes
wys:length = 16
wys:font_points[1] = 12
wys:font_points[2] = 14
wys:font_points[3] = 24
wys:font_points[4] = 6
wys:font_points[5] = 8
wys:font_points[6] = 10
wys:font_points[7] = 12
wys:font_points[8] = 12
ADD(wys_file,wys:length +4)
!──────────────────────────────────────────────────────────────────────────────
std_attr ROUTINE ! Create a standard attrbute record for the fonts listed
! in wys:fonts_to_use.
CLEAR(wys:attr_tab) ! Clear the attribute table record area
CLEAR(attr_tab_nos) ! Clear the attribute number assignments
attr_no = 17 ! Set to 1st available user-defined attribute
LOOP font_idx = 1 TO MAXIMUM(wyv:font_to_use[],1)
font_no = wyv:font_to_use[font_idx]
IF font_no = 0
BREAK
.
LOOP atrx = 1 TO MAXIMUM(wat:attr_tab_no[],2) ! Build the list of attribute
wat:attr_tab_no[font_no,atrx] = attr_no ! table number assignments to
attr_no += 1 ! be used for the font.
. .
wys:length = (attr_no - 1) * 4 ! Compute the required record length (the
! highest entry used in the table times
! 4 bytes per entry)
! Build the attribute table in the WYSIWYG record using the table#
! assignments generated above. Do it once for each of the fonts to use.
LOOP font_idx = 1 TO MAXIMUM(wyv:font_to_use[],1)
font_no = wyv:font_to_use[font_idx]
IF font_no = 0
BREAK
.
wys:char_attr[wat:no_attr [font_no] ] = wya:use_font[font_no] ! Set font only
wys:char_attr[wat:no_attr_t[font_no] ] = wya:use_font[font_no] ! Set font only - in text range
LOOP atrx = wat:n_l[font_no] TO wat:n_lrt_db[font_no] ! Normal
wys:char_attr[atrx] = wya:use_font[font_no] ! Set font
.
LOOP atrx = wat:nt_l[font_no] TO wat:nt_lrt_db[font_no] ! Normal, In text range
wys:char_attr[atrx] = wya:use_font[font_no] ! Set font
.
LOOP atrx = wat:b[font_no] TO wat:bs_lrt_db[font_no] ! Set font and bold
wys:char_attr[atrx] = BOR(wya:use_font[font_no], wya:bold)
.
LOOP atrx = wat:bt[font_no] TO wat:bts_lrt_db[font_no] ! In text range
wys:char_attr[atrx] = BOR(wya:use_font[font_no], wya:bold) ! Set font and bold
.
LOOP atrx = wat:bs[font_no] TO wat:bs_lrt_db[font_no] ! Set light shading
wys:bg_attr [atrx] = wya:light_shade
.
LOOP atrx = wat:bts[font_no] TO wat:bts_lrt_db[font_no] ! In text range values
wys:bg_attr [atrx] = wya:light_shade ! Set light shading
.
! Setup the border attributes
wys:border_attr[wat:n_l [font_no]] = wya:left_sngl
wys:border_attr[wat:n_r [font_no]] = wya:right_sngl
wys:border_attr[wat:n_wt [font_no]] = wya:top_wide
wys:border_attr[wat:n_wb [font_no]] = wya:bottom_wide
wys:border_attr[wat:n_lr [font_no]] = BOR(wys:border_attr[wat:n_l [font_no]], wya:right_sngl)
wys:border_attr[wat:n_lrt [font_no]] = BOR(wys:border_attr[wat:n_lr [font_no]], wya:top_sngl)
wys:border_attr[wat:n_lrb [font_no]] = BOR(wys:border_attr[wat:n_lr [font_no]], wya:bottom_sngl)
wys:border_attr[wat:n_lrtb [font_no]] = BOR(wys:border_attr[wat:n_lrb[font_no]], wya:top_sngl)
wys:border_attr[wat:n_lr_wb [font_no]] = BOR(wys:border_attr[wat:n_lr [font_no]], wya:bottom_wide)
wys:border_attr[wat:n_lr_db [font_no]] = BOR(wys:border_attr[wat:n_lr [font_no]], wya:bottom_dbl)
wys:border_attr[wat:n_lr_wt [font_no]] = BOR(wys:border_attr[wat:n_lr [font_no]], wya:top_wide)
wys:border_attr[wat:n_l_wt [font_no]] = BOR(wys:border_attr[wat:n_l [font_no]], wya:top_wide)
wys:border_attr[wat:n_l_wb [font_no]] = BOR(wys:border_attr[wat:n_l [font_no]], wya:bottom_wide)
wys:border_attr[wat:n_r_wt [font_no]] = BOR(wys:border_attr[wat:n_r [font_no]], wya:top_wide)
wys:border_attr[wat:n_r_wb [font_no]] = BOR(wys:border_attr[wat:n_r [font_no]], wya:bottom_wide)
wys:border_attr[wat:n_lrt_wb[font_no]] = BOR(wys:border_attr[wat:n_lrt[font_no]], wya:bottom_wide)
wys:border_attr[wat:n_lrt_db[font_no]] = BOR(wys:border_attr[wat:n_lrt[font_no]], wya:bottom_dbl)
wys:border_attr[wat:b_l [font_no]] = wya:left_sngl
wys:border_attr[wat:b_r [font_no]] = wya:right_sngl
wys:border_attr[wat:b_lr [font_no]] = BOR(wys:border_attr[wat:b_l [font_no]], wya:right_sngl)
wys:border_attr[wat:b_lrt [font_no]] = BOR(wys:border_attr[wat:b_lr [font_no]], wya:top_sngl)
wys:border_attr[wat:b_lrb [font_no]] = BOR(wys:border_attr[wat:b_lr [font_no]], wya:bottom_sngl)
wys:border_attr[wat:b_lrtb [font_no]] = BOR(wys:border_attr[wat:b_lrb[font_no]], wya:top_sngl)
wys:border_attr[wat:b_lr_wb [font_no]] = BOR(wys:border_attr[wat:b_lr [font_no]], wya:bottom_wide)
wys:border_attr[wat:b_lr_db [font_no]] = BOR(wys:border_attr[wat:b_lr [font_no]], wya:bottom_dbl)
wys:border_attr[wat:b_lr_wt [font_no]] = BOR(wys:border_attr[wat:b_lr [font_no]], wya:top_wide)
wys:border_attr[wat:b_l_wt [font_no]] = BOR(wys:border_attr[wat:b_l [font_no]], wya:top_wide)
wys:border_attr[wat:b_l_wb [font_no]] = BOR(wys:border_attr[wat:b_l [font_no]], wya:bottom_wide)
wys:border_attr[wat:b_r_wt [font_no]] = BOR(wys:border_attr[wat:b_r [font_no]], wya:top_wide)
wys:border_attr[wat:b_r_wb [font_no]] = BOR(wys:border_attr[wat:b_r [font_no]], wya:bottom_wide)
wys:border_attr[wat:b_lrt_wb[font_no]] = BOR(wys:border_attr[wat:b_lrt[font_no]], wya:bottom_wide)
wys:border_attr[wat:b_lrt_db[font_no]] = BOR(wys:border_attr[wat:b_lrt[font_no]], wya:bottom_dbl)
wys:border_attr[wat:nt_l [font_no]] = wys:border_attr[wat:n_l [font_no]]
wys:border_attr[wat:nt_r [font_no]] = wys:border_attr[wat:n_r [font_no]] ! Copy borders to "in
wys:border_attr[wat:nt_lr [font_no]] = wys:border_attr[wat:n_lr [font_no]] ! in text range" areas
wys:border_attr[wat:nt_lrt [font_no]] = wys:border_attr[wat:n_lrt [font_no]]
wys:border_attr[wat:nt_lrb [font_no]] = wys:border_attr[wat:n_lrb [font_no]]
wys:border_attr[wat:nt_lrtb [font_no]] = wys:border_attr[wat:n_lrtb [font_no]]
wys:border_attr[wat:nt_lr_wb [font_no]] = wys:border_attr[wat:n_lr_wb [font_no]]
wys:border_attr[wat:nt_lr_db [font_no]] = wys:border_attr[wat:n_lr_db [font_no]]
wys:border_attr[wat:nt_lr_wt [font_no]] = wys:border_attr[wat:n_lr_wt [font_no]]
wys:border_attr[wat:nt_l_wt [font_no]] = wys:border_attr[wat:n_l_wt [font_no]]
wys:border_attr[wat:nt_l_wb [font_no]] = wys:border_attr[wat:n_l_wb [font_no]]
wys:border_attr[wat:nt_r_wt [font_no]] = wys:border_attr[wat:n_r_wt [font_no]]
wys:border_attr[wat:nt_r_wb [font_no]] = wys:border_attr[wat:n_r_wb [font_no]]
wys:border_attr[wat:nt_lrt_wb[font_no]] = wys:border_attr[wat:n_lrt_wb[font_no]]
wys:border_attr[wat:nt_lrt_db[font_no]] = wys:border_attr[wat:n_lrt_db[font_no]]
wys:border_attr[wat:bt_l [font_no]] = wys:border_attr[wat:n_l [font_no]]
wys:border_attr[wat:bt_r [font_no]] = wys:border_attr[wat:n_r [font_no]]
wys:border_attr[wat:bt_lr [font_no]] = wys:border_attr[wat:n_lr [font_no]]
wys:border_attr[wat:bt_lrt [font_no]] = wys:border_attr[wat:n_lrt [font_no]]
wys:border_attr[wat:bt_lrb [font_no]] = wys:border_attr[wat:n_lrb [font_no]]
wys:border_attr[wat:bt_lrtb [font_no]] = wys:border_attr[wat:n_lrtb [font_no]]
wys:border_attr[wat:bt_lr_wb [font_no]] = wys:border_attr[wat:n_lr_wb [font_no]]
wys:border_attr[wat:bt_lr_db [font_no]] = wys:border_attr[wat:n_lr_db [font_no]]
wys:border_attr[wat:bt_lr_wt [font_no]] = wys:border_attr[wat:n_lr_wt [font_no]]
wys:border_attr[wat:bt_l_wt [font_no]] = wys:border_attr[wat:n_l_wt [font_no]]
wys:border_attr[wat:bt_r_wt [font_no]] = wys:border_attr[wat:n_r_wt [font_no]]
wys:border_attr[wat:bt_lrt_wb[font_no]] = wys:border_attr[wat:n_lrt_wb[font_no]]
wys:border_attr[wat:bt_lrt_db[font_no]] = wys:border_attr[wat:n_lrt_db[font_no]]
wys:border_attr[wat:bs_l [font_no]] = wys:border_attr[wat:n_l [font_no]]
wys:border_attr[wat:bs_r [font_no]] = wys:border_attr[wat:n_r [font_no]] ! Bold border attributes
wys:border_attr[wat:bs_lr [font_no]] = wys:border_attr[wat:n_lr [font_no]] ! are the same as above
wys:border_attr[wat:bs_lrt [font_no]] = wys:border_attr[wat:n_lrt [font_no]]
wys:border_attr[wat:bs_lrb [font_no]] = wys:border_attr[wat:n_lrb [font_no]]
wys:border_attr[wat:bs_lrtb [font_no]] = wys:border_attr[wat:n_lrtb [font_no]]
wys:border_attr[wat:bs_lr_wb [font_no]] = wys:border_attr[wat:n_lr_wb [font_no]]
wys:border_attr[wat:bs_lr_db [font_no]] = wys:border_attr[wat:n_lr_db [font_no]]
wys:border_attr[wat:bs_lr_wt [font_no]] = wys:border_attr[wat:n_lr_wt [font_no]]
wys:border_attr[wat:bs_l_wt [font_no]] = wys:border_attr[wat:n_l_wt [font_no]]
wys:border_attr[wat:bs_l_wb [font_no]] = wys:border_attr[wat:n_l_wb [font_no]]
wys:border_attr[wat:bs_r_wt [font_no]] = wys:border_attr[wat:n_r_wt [font_no]]
wys:border_attr[wat:bs_r_wb [font_no]] = wys:border_attr[wat:n_r_wb [font_no]]
wys:border_attr[wat:bs_lrt_wb[font_no]] = wys:border_attr[wat:n_lrt_wb[font_no]]
wys:border_attr[wat:bs_lrt_db[font_no]] = wys:border_attr[wat:n_lrt_db[font_no]]
wys:border_attr[wat:bts_l [font_no]] = wys:border_attr[wat:n_l [font_no]]
wys:border_attr[wat:bts_r [font_no]] = wys:border_attr[wat:n_r [font_no]]
wys:border_attr[wat:bts_lr [font_no]] = wys:border_attr[wat:n_lr [font_no]]
wys:border_attr[wat:bts_lrt [font_no]] = wys:border_attr[wat:n_lrt [font_no]]
wys:border_attr[wat:bts_lrb [font_no]] = wys:border_attr[wat:n_lrb [font_no]]
wys:border_attr[wat:bts_lrtb [font_no]] = wys:border_attr[wat:n_lrtb [font_no]]
wys:border_attr[wat:bts_lr_wb [font_no]] = wys:border_attr[wat:n_lr_wb [font_no]]
wys:border_attr[wat:bts_lr_db [font_no]] = wys:border_attr[wat:n_lr_db [font_no]]
wys:border_attr[wat:bts_lr_wt [font_no]] = wys:border_attr[wat:n_lr_wt [font_no]]
wys:border_attr[wat:bts_l_wt [font_no]] = wys:border_attr[wat:n_l_wt [font_no]]
wys:border_attr[wat:bts_l_wb [font_no]] = wys:border_attr[wat:n_l_wb [font_no]]
wys:border_attr[wat:bts_r_wt [font_no]] = wys:border_attr[wat:n_r_wt [font_no]]
wys:border_attr[wat:bts_r_wb [font_no]] = wys:border_attr[wat:n_r_wb [font_no]]
wys:border_attr[wat:bts_lrt_wb[font_no]] = wys:border_attr[wat:n_lrt_wb[font_no]]
wys:border_attr[wat:bts_lrt_db[font_no]] = wys:border_attr[wat:n_lrt_db[font_no]]
LOOP atrx = wat:no_attr_t[font_no] TO wat:bts_lrt_db[font_no] ! Set "in text range" flags
wys:bg_attr[atrx] = BOR(wys:bg_attr[atrx], wya:text_range)
. .
DO write_attr
LOOP font_idx = 1 TO MAXIMUM(wyv:font_to_use[],1)
font_no = wyv:font_to_use[font_idx]
IF font_no = 0 ! Adjust the global attribute
BREAK ! table reference index
. ! so that they are
LOOP atrx = 1 TO MAXIMUM(wat:attr_tab_no[],2) ! relative to 0 - the way
wat:attr_tab_no[font_no,atrx] -= 1 ! 1-2-3 expects them!
. .
!──────────────────────────────────────────────────────────────────────────────
! Cluster I/O routines
first_clustr ROUTINE ! Setup the 1st cluster record
wys:cluster_no = 0 ! # is relative to 0
DO init_clustr
flush_clustr ROUTINE ! Write out the final cluster record if it is pending
IF wyv:cluster_row > 1 ! Cluster record pending?
LOOP wyv:cluster_row = wyv:cluster_row TO 16 ! Fill out the rows in the cluster
wys:row_height[wyv:cluster_row] = 14 ! Default row height
wys:row_lumps [wyv:cluster_row] = 0 ! 1 LUMP for this row (relative to 0!)
wys:col_count [wyv:cluster_lump] = 255 ! All columns for the row
wys:attr_style[wyv:cluster_lump] = 0 ! Set to no attributes
wyv:cluster_lump += 1
.
DO write_clustr
.
row_end_lump ROUTINE ! Setup the last lump for the row with no attributes
! for the remaining (empty) columns and "write"
! the cluster.
wys:attr_style[wyv:cluster_lump] = 0
wyv:cluster_lump += 1
DO write_clustr
write_clustr ROUTINE ! Write out the cluster if it is full (16 rows).
IF wyv:cluster_row > 15 ! Is the cluster full?
wys:opcode = wyf:cluster_info
wys:length = 51 + (wyv:cluster_lump * 2) - 1 ! Base record size is 51 bytes plus
! the number of LUMPs defined
ADD(wys_file,wys:length +4) ! Write out the record
DO init_clustr
wys:cluster_no += 1 ! Set the next cluster number
ELSE
wyv:cluster_row += 1 ! Not full - just increment the row#
.
init_clustr ROUTINE ! Initialize the WYSIWYG cluster record
CLEAR(wys:cluster_rec)
wyv:cluster_row = 1 ! Init the cluster's row count
wyv:cluster_lump = 1 ! Init the cluster record's lump count
!──────────────────────────────────────────────────────────────────────────────
write_attr ROUTINE ! Write out the attribute table record. wys:length must
! be computed by the caller!
wys:opcode = wyf:attr_tab
ADD(wys_file,wys:length +4) ! Write out the record
!──────────────────────────────────────────────────────────────────────────────
prt_settings ROUTINE ! Write out the print settings record. The caller must
! initialize the settings record and move the settings
! directly into the WYSIWYG record.
! Be sure to write out any pending cluster_info record
! BEFORE this function is performed!
IF wys:copies = 0 ! Be sure the defaults are set. The
wys:copies = 1 ! FMT file will not load if
. ! these values are not supplied.
IF wys:compression = 0
wys:compression = 100
.
wys:opcode = wyf:prt_settings
wys:length = 79 ! Simply write a standard
ADD(wys_file,wys:length +4) ! print settings record
close_file ROUTINE
DO flush_clustr ! Write out any pending cluster_info record, if needed
wys:opcode = wyf:eof ! EOF op code
wys:length = 2 ! Record size (2 bytes)
ADD(wys_file,wys:length) ! Write the EOF record
CLOSE(wys_file) ! Close the file
!──Standard Record I/O routines────────────────────────────────────────────────────────
prt_cart_on ROUTINE ! Write out the printer cartridge
wys:prt_cart = true ! flag record with the flag set
wys:opcode = wyf:prt_cart ! to "yes" (on).
DO write_1_byte
line_color ROUTINE ! Write out the Line Color Record
wys:opcode = wyf:line_color
DO write_1_byte
color_neg ROUTINE ! Write out the Negative color record
wys:opcode = wyf:color_neg
DO write_1_byte
shadow_color ROUTINE ! Write out the Shadow color record
wys:opcode = wyf:shadow_color
DO write_1_byte
font_face ROUTINE ! Write out a font face record (text name
wys:opcode = wyf:font_face ! in ASCIIZ and wys:number should be set)
wys:font_name = CLIP(ASCIIZ) & '<00>'
wys:length = LEN(CLIP(wys:font_name)) + 1 ! Record size = the size of name plus 1 byte for the font number
ADD(wys_file,wys:length +4)
write_1_byte ROUTINE ! Write out a 1-byte record
wys:length = 1
ADD(wys_file,5)
write_2_byte ROUTINE ! Write out a 2-byte record
wys:length = 2
ADD(wys_file,6)
write_ASCIIZ ROUTINE ! Write out a variable ASCIIZ record
wys:string = CLIP(ASCIIZ) & '<00>' ! Add the null terminator (using only '' doesn't work)
wys:length = LEN(CLIP(wys:string)) ! Record size = the size of the
! string (with the null terminator!)
ADD(wys_file,wys:length +4)