Files
harbour-core/extras/dbu/dbu52.patch
Przemysław Czerpak 8230fcc258 2018-09-14 15:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * include/hbchksum.h
  * src/harbour.def
  * src/rtl/hbmd5.c
    + added new C function
         void hb_hmac_md5( const void * key, HB_SIZE nKeyLen,
                           const void * message, HB_SIZE nMsgLen,
                           char * digest );
    + added new PRG function
         HB_HMAC_MD5( <cMessage>, <cKey> ) -> <cMAC>
    ; HMAC MD5 is used in some authentication methods i.e. CRAM-MD5
      authentication in SMTP protocol

  * src/rtl/gttrm/gttrm.c
    + enable extended XTERM colors automatically when xterm-16color,
      xterm-256color, xterm+256color, xterm-88color, rxvt-16color,
      rxvt-256color, rxvt-98color or putty terminal is detected
    + added support for HB_GTI_SCREENDEPTH

  * contrib/gtqtc/gtqtc1.cpp
    + set clipboard data also into selection buffer on platforms which
      support it
    + when main clipboard buffer is empty retrieve clipboard data from
      selection buffer and if it's empty too from find buffer

  * include/harbour.hbx
  * src/harbour.def
  * src/vm/memvars.c
    + added new PRG function
         __mvGetDef( <cMemvar> [, <xDefault> ] ) -> <xValue>
      it works in similar way to __mvGet() but if <cMemvar> does
      not exist then it returns <xDefault> or NIL instead of RTE

  * contrib/hbwin/hbwin.hbx
    + added missing declarations for win_osIs10() and win_osIs81()

  * contrib/hbssl/ssl.c
    ! fixed compilation with OpenSSL < 0.9.8k

  * contrib/sddodbc/core.c
    * pacified warning

  * contrib/xhb/hbxml.c
  * contrib/xhb/hbxml.h
    ! fixed CDATA terminator, it should be "]]>" instead of " ]]>"
    + added support for HBXML_STYLE_NONEWLINE flag

  * src/3rd/pcre/Makefile
    ! typo wince -> wce

  * src/main/Makefile
    * use harbour.rc only in MS-Windows builds - it fixes OS2 OpenWatcom
      builds

  * config/global.mk
    ! in DOS builds check if the 'uname' exists before running it

  * include/hbapigt.h
  * include/hbgtcore.h
  * src/rtl/hbgtcore.c
  * src/rtl/inkey.c
  * src/rtl/inkeyapi.c
  * contrib/xhb/xhbfunc.c
    + added 3-rd parameter to hb_inkeySetText() function. When this parameter
      is true then ';' is not translated to Chr( 13 ) but DOS and UNIX EOLs
      are translated to Chr( 13 )
    + added logical parameter to HB_GTI_CLIPBOARDPASTE which allows to set
      text without ';' translation but with platform independent EOLs

  * src/rtl/memoedit.prg
  * utils/hbmk2/hbmk2.prg
  * contrib/hbnetio/utils/hbnetio/_console.prg
  * extras/dbu/dbu52.patch
  * extras/dbu/dbu53.patch
    * use hb_gtInfo( HB_GTI_CLIPBOARDPASTE, .T. ) instead of
      hb_gtInfo( HB_GTI_CLIPBOARDPASTE ) for pasting data from clipboard
      with platform independent EOLs and ';' characters
2018-09-14 15:36:21 +02:00

722 lines
23 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
diff -u dbu52ori/dbu.prg dbu52pat/dbu.prg
--- dbu52ori/dbu.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbu.prg 2013-03-02 02:00:25.000000000 +0100
@@ -9,6 +9,10 @@
*
*/
+#include "hbgtinfo.ch"
+#include "hbextcdp.ch"
+#include "inkey.ch"
+
PROCEDURE Dbu( param1, param2, param3 )
PUBLIC n_files,keystroke,lkey,frame,sframe,cur_dir,more_up,more_down,;
@@ -60,6 +64,14 @@
SAVE SCREEN && the screen you save...
SET SCOREBOARD OFF && who's keeping score, anyhow
SET KEY 28 TO && some folks need help
+
+ Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
+
+ IF "-utf" $ Lower( hb_cmdLine() )
+ hb_cdpSelect( "UTF8EX" )
+ hb_gtInfo( HB_GTI_BOXCP, "UTF8EX" )
+ ENDIF
+ SetKey( K_ALT_V, {|| hb_gtInfo( HB_GTI_CLIPBOARDPASTE, .T. ) } )
IF (ISCOLOR() .OR. "/C" $ UPPER(param2)) .AND. .NOT. "/M" $ UPPER(param2)
* make it pretty
@@ -100,10 +112,10 @@
* system constants
more_up = CHR(24) && visual up arrow
more_down = CHR(25) && visual down arrow
- frame = "Õ͸³¾ÍÔ³" && box characters
- lframe = "Ñ͸³¾Íϳ"
- mframe = "ÂijÙÄÀ³"
- sframe = "ÚÄ¿³ÙÄÀ³"
+ frame = hb_UTF8ToStr( "â•â•<C3A2>â••â”â•â•<C3A2>╘â”" ) && box characters
+ lframe = hb_UTF8ToStr( "╤â•<C3A2>â••â”â•â•<C3A2>â•§â”" )
+ mframe = hb_UTF8ToStr( "┬─┬│┘─└│" )
+ sframe = hb_UTF8ToStr( "┌─â”<C3A2>â”┘─└â”" )
* global variables
STORE .F. TO need_field,need_ntx,need_relat,need_filtr,box_open
@@ -250,7 +262,7 @@
@ 0,0 SAY " F1 F2 F3 F4 F5 F6 " +;
"F7 F8 "
show_keys()
- @ 2,0 SAY REPLICATE("Ä", 80)
+ @ 2,0 SAY REPLICATE(hb_UTF8ToStr( "─" ), 80)
error_msg(view_err)
* when to bubble up
@@ -346,14 +358,14 @@
help_title[22] = "REPLACE"
* arrays for file names in default directory
- DECLARE dbf_list[adir("*.DBF") + 20] && directory of data files
+ DECLARE dbf_list[adir("*.dbf") + 20] && directory of data files
DECLARE ntx_list[adir("*" + INDEXEXT()) + 20] && directory of index files
- DECLARE vew_list[adir("*.VEW") + 20] && directory of view files
+ DECLARE vew_list[adir("*.vew") + 20] && directory of view files
* fill the arrays with filenames
- array_dir("*.DBF",dbf_list)
+ array_dir("*.dbf",dbf_list)
array_dir("*" + INDEXEXT(),ntx_list)
- array_dir("*.VEW",vew_list)
+ array_dir("*.vew",vew_list)
* default to set view
local_func = 0 && local menu
@@ -370,7 +382,7 @@
DO CASE
- CASE RAT(".", com_line) > RAT("\", com_line)
+ CASE RAT(".", com_line) > RAT(hb_ps(), com_line)
* file extension entered
IF .NOT. FILE(com_line)
* file must exist
@@ -378,13 +390,13 @@
ENDIF
- CASE FILE(com_line + ".VEW")
+ CASE FILE(com_line + ".vew")
* look for file name with .VEW extension
- com_line = com_line + ".VEW"
+ com_line = com_line + ".vew"
- CASE FILE(com_line + ".DBF")
+ CASE FILE(com_line + ".dbf")
* look for file name with .DBF extension
- com_line = com_line + ".DBF"
+ com_line = com_line + ".dbf"
OTHERWISE
* file not found..ignore command line
@@ -395,7 +407,7 @@
IF .NOT. EMPTY(com_line)
* command line file exists
- IF RAT(".VEW", com_line) = LEN(com_line) - 3
+ IF RAT(".vew", Lower( com_line ) ) = LEN(com_line) - 3
* assume a valid .VEW file
view_file = com_line
set_from(.F.) && restore view
@@ -616,8 +628,8 @@
@ 0,0 SAY " F1 F2 F3 F4 " +;
"F5 F6 F7 F8 "
show_keys()
- @ 2,0 SAY REPLICATE("Ä", 80)
- @ 24,0 SAY "Run Í" + CHR(16) + " "
+ @ 2,0 SAY REPLICATE(hb_UTF8ToStr( "─" ), 80)
+ @ 24,0 SAY "Run " + hb_UTF8ToStr( "â•<C3A2>âº" ) + " "
* accept command entry
run_com = enter_rc(M->com_line,24,7,127,"@KS73",M->color1)
@@ -646,18 +658,18 @@
@ 3,0 CLEAR
* rebuild directory arrays..must keep current
- DECLARE dbf_list[adir("*.DBF") + 20]
+ DECLARE dbf_list[adir("*.dbf") + 20]
DECLARE ntx_list[adir("*" + INDEXEXT()) + 20]
- DECLARE vew_list[adir("*.VEW") + 20]
+ DECLARE vew_list[adir("*.vew") + 20]
* fill the arrays with filenames..data files
- array_dir("*.DBF",dbf_list)
+ array_dir("*.dbf",dbf_list)
* index files
array_dir("*" + INDEXEXT(),ntx_list)
* view files
- array_dir("*.VEW",vew_list)
+ array_dir("*.vew",vew_list)
cur_area = 0 && re-draw view screen
sysfunc = 0 && back to the main view screen
@@ -736,10 +748,10 @@
nPos := AT( ";", cPath )
// Account for backslash in path
- IF ( SUBSTR( cPath, nPos - 1, 1 ) == "\" )
+ IF ( SUBSTR( cPath, nPos - 1, 1 ) == hb_ps() )
cFile := SUBSTR( cPath, 1, IF( nPos == 0, LEN( cPath ), nPos - 1 )) + "dbu.hlp"
ELSE
- cFile := SUBSTR( cPath, 1, IF( nPos == 0, LEN( cPath ), nPos - 1 )) + "\dbu.hlp"
+ cFile := SUBSTR( cPath, 1, IF( nPos == 0, LEN( cPath ), nPos - 1 )) + hb_ps() + "dbu.hlp"
ENDIF
IF FILE( cFile )
diff -u dbu52ori/dbucopy.prg dbu52pat/dbucopy.prg
--- dbu52ori/dbucopy.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbucopy.prg 2012-05-02 16:47:47.000000000 +0200
@@ -62,8 +62,8 @@
filename = ""
* only copy and append use a list of text files
- DECLARE txt_list[adir("*.TXT") + 20] && directory of text files
- array_dir("*.TXT",txt_list) && fill array with filenames
+ DECLARE txt_list[adir("*.txt") + 20] && directory of text files
+ array_dir("*.txt",txt_list) && fill array with filenames
* set up for multi-box
DECLARE boxarray[10]
@@ -104,7 +104,7 @@
* DBF for normal mode
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
* when is a filename acceptable?
fi_done = "not_empty('filename')"
@@ -138,7 +138,7 @@
PARAMETERS sysparam
RETURN box_title(M->sysparam, "Copy " +;
- SUBSTR(M->cur_dbf, RAT("\", M->cur_dbf) + 1) +;
+ SUBSTR(M->cur_dbf, RAT(hb_ps(), M->cur_dbf) + 1) +;
" to...")
@@ -208,7 +208,7 @@
SELECT (M->cur_area)
- IF RAT(M->def_ext, M->filename) = LEN(M->filename) - 3
+ IF RAT(Lower( M->def_ext ), Lower( M->filename )) = LEN(M->filename) - 3
* target has default extension..does it exists in current dir?
add_name = .NOT. FILE(name(M->filename) + M->def_ext)
@@ -301,7 +301,7 @@
PARAMETERS sysparam
RETURN box_title(M->sysparam, "Append to " +;
- SUBSTR(M->cur_dbf, RAT("\", M->cur_dbf) + 1) +;
+ SUBSTR(M->cur_dbf, RAT(hb_ps(), M->cur_dbf) + 1) +;
" from")
@@ -433,7 +433,7 @@
PARAMETERS sysparam
RETURN box_title(M->sysparam, "Replace in " +;
- SUBSTR(M->cur_dbf, RAT("\", M->cur_dbf) + 1) +;
+ SUBSTR(M->cur_dbf, RAT(hb_ps(), M->cur_dbf) + 1) +;
"...")
@@ -735,7 +735,7 @@
cur_el = 1
rel_row = 0
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
filelist(1) && display new list
ELSE
@@ -750,7 +750,7 @@
cur_el = 1
rel_row = 0
files = "txt_list"
- def_ext = ".TXT"
+ def_ext = ".txt"
filelist(1) && display new list
ENDIF
@@ -813,7 +813,7 @@
cur_el = 1
rel_row = 0
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
filelist(1) && display new list
ELSE
@@ -828,7 +828,7 @@
cur_el = 1
rel_row = 0
files = "txt_list"
- def_ext = ".TXT"
+ def_ext = ".txt"
filelist(1) && display new list
ENDIF
diff -u dbu52ori/dbuedit.prg dbu52pat/dbuedit.prg
--- dbu52ori/dbuedit.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbuedit.prg 2012-05-02 16:47:53.000000000 +0200
@@ -47,7 +47,7 @@
nHelpSave := help_code
/* save, clear, and frame the window */
- cBrowseBuf := SaveScreen(8, 0, 23, 79)
+ cBrowseBuf := SaveScreen(8, 0, MaxRow()-1, MaxCol())
/* array to save move_ptr expressions */
aMoveExp := Array(4)
@@ -63,14 +63,14 @@
cFieldArray := "field_n" + Substr("123456", cur_area, 1)
cNtx := "ntx" + Substr("123456", cur_area, 1)
cur_ntx := &cNtx[1]
- cPrimeDbf := Substr(cur_dbf, Rat("\", cur_dbf) + 1)
+ cPrimeDbf := Substr(cur_dbf, Rat(hb_ps(), cur_dbf) + 1)
lCanAppend := .T.
else
/* browse the entire view */
nPrimeArea := 1
cFieldArray := "field_list"
cur_ntx := ntx1[1]
- cPrimeDbf := Substr(dbf[1], Rat("\", dbf[1]) + 1)
+ cPrimeDbf := Substr(dbf[1], Rat(hb_ps(), dbf[1]) + 1)
lCanAppend := .F.
if ( "->" $ field_list[afull(field_list)] )
@@ -95,11 +95,11 @@
/* create TBrowse object */
nColorSave := SetColor(color7)
- oB := TBrowseDB(10, 1, 23, 78)
+ oB := TBrowseDB(10, 1, MaxRow()-1, MaxCol()-1)
- oB:headSep := "ÍÑÍ"
- oB:colSep := " ³ "
- oB:footSep := "ÍÏÍ"
+ oB:headSep := hb_UTF8ToStr( "â•<C3A2>╤â•<C3A2>" )
+ oB:colSep := hb_UTF8ToStr( " │ " )
+ oB:footSep := hb_UTF8ToStr( "â•<C3A2>â•§â•<C3A2>" )
oB:skipBlock := {|x| Skipped(x, lAppend)}
/* put columns into browse */
@@ -135,10 +135,10 @@
/* initialize parts of screen not handled by TBrowse */
stat_msg("")
- scroll(8, 0, 23, 79, 0)
- @ 8, 0, 23, 79 BOX frame
- @ nHsepRow, 0 SAY "Æ"
- @ nHsepRow, 79 SAY "µ"
+ scroll(8, 0, MaxRow()-1, MaxCol(), 0)
+ @ 8, 0, MaxRow()-1, MaxCol() BOX frame
+ @ nHsepRow, 0 SAY hb_UTF8ToStr( "╞" )
+ @ nHsepRow, MaxCol() SAY hb_UTF8ToStr( "â•¡" )
/* init rest of locals */
cAlias := ""
@@ -349,11 +349,11 @@
box_open := .t.
/* save, clear, and frame window for memoedit */
- cMemoBuff := SaveScreen(10, 10, 22, 69)
+ cMemoBuff := SaveScreen(10, 10, MaxRow()-2, 69)
SetColor(color8)
- Scroll(10, 10, 22, 69, 0)
- @ 10, 10, 22, 69 BOX frame
+ Scroll(10, 10, MaxRow()-2, 69, 0)
+ @ 10, 10, MaxRow()-2, 69 BOX frame
/* use fieldspec for title */
SetColor(color9)
@@ -361,7 +361,7 @@
/* edit the memo field */
SetColor(color8)
- cMemo := MemoEdit(&cEditField, 11, 11, 21, 68,.T.,"xmemo")
+ cMemo := MemoEdit(&cEditField, 11, 11, MaxRow()-3, 68,.T.,"xmemo")
if Lastkey() == K_CTRL_END
/* ^W..new memo confirmed */
@@ -393,7 +393,7 @@
end
/* restore the window */
- RestScreen(10, 10, 22, 69, cMemoBuff)
+ RestScreen(10, 10, MaxRow()-2, 69, cMemoBuff)
box_open := .F.
else
/* regular data entry */
@@ -461,7 +461,7 @@
end
/* restore the screen */
- RestScreen(8, 0, 23, 79, cBrowseBuf)
+ RestScreen(8, 0, MaxRow()-1, MaxCol(), cBrowseBuf)
SetColor(nColorSave)
SetCursor(nCType)
curs_on := (nCType != 0)
@@ -924,8 +924,8 @@
"mGetVar")
/* setup a scrolling GET if it's too long to fit on the screen */
- if oGet:type == "C" .AND. LEN( oGet:varGet() ) > 78
- oGet:picture := "@S78"
+ if oGet:type == "C" .AND. LEN( oGet:varGet() ) > MaxCol() - 1
+ oGet:picture := "@S" + hb_ntos( MaxCol() - 1 )
endif
/* refresh flag */
diff -u dbu52ori/dbuhelp.prg dbu52pat/dbuhelp.prg
--- dbu52ori/dbuhelp.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbuhelp.prg 2012-05-02 16:29:55.000000000 +0200
@@ -113,11 +113,11 @@
FREAD(M->hhandle, @htbuf, 512)
* isolate the correct 4 byte table entry
- htbuf = SUBSTR(M->htbuf, (4 * (M->hnum - 1)) + 1, 4)
+ htbuf = HB_BSUBSTR(M->htbuf, (4 * (M->hnum - 1)) + 1, 4)
* convert binary numbers (LSB, MSB) to Clipper numerics
- hoff = ASC(M->htbuf) + (256 * ASC(SUBSTR(M->htbuf, 2)))
- hlen = ASC(SUBSTR(M->htbuf, 3)) + (256 * ASC(SUBSTR(M->htbuf, 4)))
+ hoff = HB_BPEEK(M->htbuf, 1) + (256 * HB_BPEEK(M->htbuf, 2))
+ hlen = HB_BPEEK(M->htbuf, 3) + (256 * HB_BPEEK(M->htbuf, 4))
* allocate buffer
htbuf = SPACE(M->hlen)
diff -u dbu52ori/dbuindx.prg dbu52pat/dbuindx.prg
--- dbu52ori/dbuindx.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbuindx.prg 2012-05-02 16:48:03.000000000 +0200
@@ -117,7 +117,7 @@
PARAMETERS sysparam
RETURN box_title(M->sysparam, "Index " +;
- SUBSTR(M->cur_dbf, RAT("\", M->cur_dbf) + 1) +;
+ SUBSTR(M->cur_dbf, RAT(hb_ps(), M->cur_dbf) + 1) +;
" to...")
@@ -240,7 +240,7 @@
INDEX ON &k_exp TO &filename
CLOSE INDEX
- IF AT(INDEXEXT(), M->filename) = LEN(M->filename) - 3 .AND.;
+ IF AT(Lower( INDEXEXT() ), Lower( M->filename )) = LEN(M->filename) - 3 .AND.;
FILE(name(M->filename) + INDEXEXT()) .AND. M->add_name
* add only .ntx files in the current directory
diff -u dbu52ori/dbunet.prg dbu52pat/dbunet.prg
--- dbu52ori/dbunet.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbunet.prg 2012-05-02 16:48:07.000000000 +0200
@@ -333,7 +333,7 @@
LOCAL nPos // Used to locate position of search characters in string
// Strip out the drive and path information, if any
- IF (( nPos := RAT( "\", cString )) != 0 )
+ IF (( nPos := RAT( hb_ps(), cString )) != 0 )
cString := SUBSTR( cString, ++nPos )
ENDIF
diff -u dbu52ori/dbustru.prg dbu52pat/dbustru.prg
--- dbu52ori/dbustru.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbustru.prg 2012-05-02 16:48:16.000000000 +0200
@@ -74,8 +74,8 @@
filename = "" && variable for "filebox" function
* sigle row templates
-empty_row = " ³ ³ ³ "
-not_empty = " ³ Character ³ 10 ³ "
+empty_row = hb_UTF8ToStr( " │ │ │ " )
+not_empty = hb_UTF8ToStr( " │ Character │ 10 │ " )
IF .NOT. EMPTY(M->cur_dbf)
* modify structure
@@ -133,11 +133,11 @@
* establish window heading
@ 9,field_col[1];
SAY "Structure of " + pad(IF(EMPTY(stru_name), "<new file>",;
- SUBSTR(stru_name, RAT("\", stru_name) + 1)), 13)
+ SUBSTR(stru_name, RAT(hb_ps(), stru_name) + 1)), 13)
@ 11,22 SAY "Field Name Type Width Dec"
-@ 12,20 SAY "ÆÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÑÍÍÍÍ͵"
-@ 23,33 SAY "ÏÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏ"
+@ 12,20 SAY hb_UTF8ToStr( "╞â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>╤â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>╤â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>╤â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•¡" )
+@ 23,33 SAY hb_UTF8ToStr( "â•§â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•§â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•§" )
DO WHILE .NOT. q_check()
* the big switch
@@ -811,7 +811,7 @@
is_insert = .F.
filename = stru_name
- IF filebox(".DBF", "dbf_list", "stru_title",;
+ IF filebox(".dbf", "dbf_list", "stru_title",;
"do_modstru", .T., 13) <> 0
* structure created or altered
stru_name = filename
@@ -819,7 +819,7 @@
* re-write name at top of window
@ 9,field_col[1] + 13;
SAY pad(IF(EMPTY(stru_name), "<new file>",;
- SUBSTR(stru_name, RAT("\", stru_name) + 1)), 13)
+ SUBSTR(stru_name, RAT(hb_ps(), stru_name) + 1)), 13)
IF aseek(dbf, filename) = 0
* bring new file into view
@@ -904,16 +904,16 @@
PARAMETERS fill_row
@ fill_row,field_col[1];
-SAY field_name + " ³ " + data_type[AT(field_type, "CNDLM")] + " ³ "
+SAY field_name + hb_UTF8ToStr( " │ " ) + data_type[AT(field_type, "CNDLM")] + hb_UTF8ToStr( " │ " )
IF field_type = "C"
* display Clipper extended field length
@ fill_row,field_col[3] SAY STR(((256 * field_dec) + field_len), 4) +;
- " ³ "
+ hb_UTF8ToStr( " │ " )
ELSE
* normal field length
- @ fill_row,field_col[3] SAY STR(field_len, 4) + " ³ "
+ @ fill_row,field_col[3] SAY STR(field_len, 4) + hb_UTF8ToStr( " │ " )
IF field_type = "N"
* display decimals for numeric field
@@ -1215,7 +1215,7 @@
USE
* remember if file existed in current directory before
- add_name = .NOT. FILE(name(filename) + ".DBF")
+ add_name = .NOT. FILE(name(filename) + ".dbf")
IF FILE(filename)
* file exists..modify structure and save old data
@@ -1235,12 +1235,12 @@
ENDIF
* establish temp filespec and dbt specs in same directory
- name_temp = SUBSTR(filename, 1, RAT("\", filename)) +;
- "DDBBUUUU.TMP"
+ name_temp = SUBSTR(filename, 1, RAT(hb_ps(), filename)) +;
+ "ddbbuuuu.tmp"
dbt_spec = SUBSTR(filename, 1, RAT(".", filename)) +;
- "DBT"
+ "dbt"
dbt_temp = SUBSTR(name_temp, 1, RAT(".", name_temp)) +;
- "DBT"
+ "dbt"
IF FILE(dbt_spec)
* data file contains memo fields
@@ -1320,8 +1320,8 @@
CREATE &filename FROM ddbbuuuu.ext ALIAS cAlias
USE
- IF AT(".DBF", filename) = LEN(filename) - 3 .AND.;
- FILE(name(filename) + ".DBF") .AND. add_name
+ IF AT(".dbf", Lower(filename)) = LEN(filename) - 3 .AND.;
+ FILE(name(filename) + ".dbf") .AND. add_name
* add only .dbf files in the current directory
i = afull(dbf_list) + 1
diff -u dbu52ori/dbuutil.prg dbu52pat/dbuutil.prg
--- dbu52ori/dbuutil.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbuutil.prg 2012-05-02 16:48:24.000000000 +0200
@@ -716,9 +716,9 @@
BOX M->lframe
* format the list title
- i_title = REPLICATE("Ä", ((46 - M->l_rel - LEN(M->i_title)) / 2) - 1);
+ i_title = REPLICATE(hb_UTF8ToStr( "─" ), ((46 - M->l_rel - LEN(M->i_title)) / 2) - 1);
+ " " + M->i_title + " "
- i_title = M->i_title + REPLICATE("Ä", (46 - M->l_rel - LEN(M->i_title)))
+ i_title = M->i_title + REPLICATE(hb_UTF8ToStr( "─" ), (46 - M->l_rel - LEN(M->i_title)))
* display the list title
@ M->wt + 1, M->wl + M->l_rel - 1 SAY M->i_title
@@ -950,7 +950,7 @@
SET KEY 24 TO clear_gets
* call entry in place function
- name_temp = enter_rc(M->filename,M->irow,M->wl+9,64,"@K!S20",M->color9)
+ name_temp = enter_rc(M->filename,M->irow,M->wl+9,64,"@KS20",M->color9)
* release down arrow
SET KEY 24 TO
@@ -958,7 +958,7 @@
IF .NOT. EMPTY(M->name_temp)
* something entered
- IF .NOT. (RAT(".", M->name_temp) > RAT("\", M->name_temp))
+ IF .NOT. (RAT(".", M->name_temp) > RAT(hb_ps(), M->name_temp))
* extnesion not entered..provide default
name_temp = M->name_temp + M->def_ext
@@ -1963,7 +1963,7 @@
PRIVATE p
* isolate filename and extension from path
-p = SUBSTR(M->spec, RAT("\", M->spec) + 1)
+p = SUBSTR(M->spec, RAT(hb_ps(), M->spec) + 1)
IF "." $ M->p
* there is an extension..chop it off
@@ -2152,7 +2152,7 @@
IF FILE(M->filename)
* only if the file exists
- IF INDEXEXT() = ".NTX"
+ IF Lower( INDEXEXT() ) = ".ntx"
* Clipper index file format
k_pos = 23
@@ -2173,10 +2173,10 @@
FREAD(M->handle, @buffer, 512)
* discard all bytes before the key expression
- k = SUBSTR(M->buffer, M->k_pos)
+ k = HB_BSUBSTR(M->buffer, M->k_pos)
* the expression is terminated with a zero byte (chr(0))
- k = TRIM(SUBSTR(M->k, 1, AT(CHR(0), M->k) - 1))
+ k = TRIM(HB_BSUBSTR(M->k, 1, AT(CHR(0), M->k) - 1))
ENDIF
diff -u dbu52ori/dbuview.prg dbu52pat/dbuview.prg
--- dbu52ori/dbuview.prg 1993-03-04 04:20:00.000000000 +0100
+++ dbu52pat/dbuview.prg 2012-05-02 16:53:34.000000000 +0200
@@ -906,15 +906,15 @@
ENDIF
* the first slot is diferent than the rest
-bar_line = "ÍÍÍÍÍÍÍÍÍÍÍÍ"
+bar_line = hb_UTF8ToStr( "â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>" )
empty_line = ""
k = 1
DO WHILE M->k < M->num_slots
* each new slot separated from previous by a vertical line
- bar_line = M->bar_line + "ÑÍÍÍÍÍÍÍÍÍÍÍÍ"
- empty_line = M->empty_line + SPACE(12) + "³"
+ bar_line = M->bar_line + hb_UTF8ToStr( "╤â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>â•<C3A2>" )
+ empty_line = M->empty_line + SPACE(12) + hb_UTF8ToStr( "│" )
* next
k = M->k + 1
@@ -1102,15 +1102,15 @@
KEYBOARD CHR(M->keystroke)
* entry in place
- filename = enter_rc(dbf[M->cur_area],M->f_row,M->d_col,64,"@K!S8",;
+ filename = enter_rc(dbf[M->cur_area],M->f_row,M->d_col,64,"@KS8",;
M->color1)
IF .NOT. EMPTY(M->filename)
* something entered
- IF .NOT. (RAT(".", M->filename) > RAT("\", M->filename))
+ IF .NOT. (RAT(".", M->filename) > RAT(hb_ps(), M->filename))
* no extension entered..provide default
- filename = M->filename + ".DBF"
+ filename = M->filename + ".dbf"
ENDIF
@@ -1141,7 +1141,7 @@
ELSE
* insert or enter or menu selection..use filebox
- ret_val = filebox(".DBF", "dbf_list", "dopen_titl",;
+ ret_val = filebox(".dbf", "dbf_list", "dopen_titl",;
"do_opendbf", .F., 8) <> 0
ENDIF
@@ -1269,12 +1269,12 @@
KEYBOARD CHR(M->keystroke)
* entry in place
- filename = enter_rc(M->org_file,M->d_row,M->d_col,64,"@K!S8",M->color1)
+ filename = enter_rc(M->org_file,M->d_row,M->d_col,64,"@KS8",M->color1)
IF .NOT. EMPTY(M->filename)
* something entered
- IF .NOT. (RAT(".", M->filename) > RAT("\", M->filename))
+ IF .NOT. (RAT(".", M->filename) > RAT(hb_ps(), M->filename))
* extension not entered..provide default
filename = filename + INDEXEXT()
@@ -2120,7 +2120,7 @@
* draw line and arrow pointing to target alias
@ M->row_n,M->pos_c;
- SAY REPLICATE("Ä", column[M->j] - M->pos_c + 1) + CHR(16)
+ SAY REPLICATE(hb_UTF8ToStr( "─" ), column[M->j] - M->pos_c + 1) + CHR(16)
* display target alias as intense
SetColor(M->color12)
@@ -2225,7 +2225,7 @@
SetColor(M->cNorm)
* display an arrow (always normal color)
-?? REPLICATE("Ä", column[M->k] - COL() + 1) + CHR(16)
+?? REPLICATE(hb_UTF8ToStr( "─" ), column[M->k] - COL() + 1) + CHR(16)
* display the target alias in the specified color
SetColor(M->cSpecial)
@@ -2363,7 +2363,7 @@
* title includes filename.ext but no path
RETURN box_title(M->sysparam, "Set filter for " +;
- SUBSTR(M->cur_dbf, RAT("\", M->cur_dbf) + 1) +;
+ SUBSTR(M->cur_dbf, RAT(hb_ps(), M->cur_dbf) + 1) +;
" to...")
@@ -2790,7 +2790,7 @@
* get user entered file name..will default to primary + ".VEW"
IF EMPTY(M->view_file) .AND. .NOT. EMPTY(dbf[1])
* default to name of primary data file
- filename = name(dbf[1]) + ".VEW"
+ filename = name(dbf[1]) + ".vew"
ELSE
* whatever the last view was
@@ -2799,7 +2799,7 @@
ENDIF
* it's better in a box
-filebox(".VEW", "vew_list", "vcrea_titl", "do_creavew", .T., 8)
+filebox(".vew", "vew_list", "vcrea_titl", "do_creavew", .T., 8)
* restore help code
help_code = M->old_help
@@ -2841,7 +2841,7 @@
stat_msg("Generating View File")
* add new .VEW files to vew_list if created in current directory only
-add_name = .NOT. FILE(name(filename) + ".VEW")
+add_name = .NOT. FILE(name(filename) + ".vew")
* create structure extended template
CREATE ddbbuuuu.ext
@@ -3010,8 +3010,8 @@
USE
* add file name to array of view files
-IF AT(".VEW", filename) = LEN(filename) - 3 .AND.;
- FILE(name(filename) + ".VEW") .AND. add_name
+IF AT(".vew", Lower(filename)) = LEN(filename) - 3 .AND.;
+ FILE(name(filename) + ".vew") .AND. add_name
* add only new .VEW files in the current directory
* determine number of first empty element
@@ -3081,7 +3081,7 @@
IF M->from_view
* called from set_view
- IF filebox(".VEW", "vew_list", "vopen_titl", "do_openvew", .F., 8) <> 0
+ IF filebox(".vew", "vew_list", "vopen_titl", "do_openvew", .F., 8) <> 0
* indicate new View has been set
keystroke = 13