diff -u dbu53ori/dbu.prg dbu53pat/dbu.prg --- dbu53ori/dbu.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbu.prg 2010-09-29 16:45:18.000000000 +0200 @@ -9,8 +9,8 @@ * ***/ -#include "Inkey.Ch" -#include "Set.Ch" +#include "inkey.ch" +#include "set.ch" // Uncomment to update the obsolete declaration: #xtranslate DECLARE => PRIVATE @@ -71,6 +71,9 @@ SET SCOREBOARD OFF // who's keeping score, anyhow SET KEY 28 TO // some folks need help + SET DATE ANSI + SET CENTURY ON + IF (ISCOLOR() .OR. "/C" $ UPPER(param2)) .AND. .NOT. "/M" $ UPPER(param2) // make it pretty color1 := "W+/B,N/W,B" // normal @@ -360,14 +363,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 @@ -392,13 +395,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 @@ -409,7 +412,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 @@ -708,18 +711,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 diff -u dbu53ori/dbucopy.prg dbu53pat/dbucopy.prg --- dbu53ori/dbucopy.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbucopy.prg 2010-09-29 16:47:43.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')" @@ -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) @@ -742,7 +742,7 @@ cur_el = 1 rel_row = 0 files = "dbf_list" - def_ext = ".DBF" + def_ext = ".dbf" filelist(1) && display new list ELSE @@ -757,7 +757,7 @@ cur_el = 1 rel_row = 0 files = "txt_list" - def_ext = ".TXT" + def_ext = ".txt" filelist(1) && display new list ENDIF @@ -820,7 +820,7 @@ cur_el = 1 rel_row = 0 files = "dbf_list" - def_ext = ".DBF" + def_ext = ".dbf" filelist(1) && display new list ELSE @@ -835,7 +835,7 @@ cur_el = 1 rel_row = 0 files = "txt_list" - def_ext = ".TXT" + def_ext = ".txt" filelist(1) && display new list ENDIF diff -u dbu53ori/dbuedit.prg dbu53pat/dbuedit.prg --- dbu53ori/dbuedit.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbuedit.prg 2010-09-29 16:37:37.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) @@ -95,7 +95,7 @@ /* create TBrowse object */ nColorSave := SetColor(color7) - oB := TBrowseDB(10, 1, 23, 78) + oB := TBrowseDB(10, 1, MaxRow()-1, MaxCol()-1) oB:headSep := "حرح" oB:colSep := " ³ " @@ -139,10 +139,10 @@ /* initialize parts of screen not handled by TBrowse */ stat_msg("") - scroll(8, 0, 23, 79, 0) - @ 8, 0, 23, 79 BOX frame + scroll(8, 0, MaxRow()-1, MaxCol(), 0) + @ 8, 0, MaxRow()-1, MaxCol() BOX frame @ nHsepRow, 0 SAY "ئ" - @ nHsepRow, 79 SAY "µ" + @ nHsepRow, MaxCol() SAY "µ" /* init rest of locals */ cAlias := "" @@ -353,11 +353,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) @@ -365,7 +365,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 */ @@ -397,7 +397,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 */ @@ -467,7 +467,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) @@ -930,8 +930,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 dbu53ori/dbuindx.prg dbu53pat/dbuindx.prg --- dbu53ori/dbuindx.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbuindx.prg 2010-09-29 16:48:24.000000000 +0200 @@ -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 dbu53ori/dbustru.prg dbu53pat/dbustru.prg --- dbu53ori/dbustru.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbustru.prg 2009-06-10 01:43:02.000000000 +0200 @@ -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 @@ -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 @@ -1236,11 +1236,11 @@ * establish temp filespec and dbt specs in same directory name_temp = SUBSTR(filename, 1, RAT("\", filename)) +; - "DDBBUUUU.TMP" + "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 dbu53ori/dbuutil.prg dbu53pat/dbuutil.prg --- dbu53ori/dbuutil.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbuutil.prg 2010-09-29 16:49:39.000000000 +0200 @@ -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 @@ -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 diff -u dbu53ori/dbuview.prg dbu53pat/dbuview.prg --- dbu53ori/dbuview.prg 1996-05-20 05:31:00.000000000 +0200 +++ dbu53pat/dbuview.prg 2009-06-12 14:43:06.000000000 +0200 @@ -1102,7 +1102,7 @@ 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) @@ -1110,7 +1110,7 @@ IF .NOT. (RAT(".", M->filename) > RAT("\", 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,7 +1269,7 @@ 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 @@ -2789,7 +2789,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 @@ -2798,7 +2798,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 @@ -2840,7 +2840,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 @@ -3009,8 +3009,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 @@ -3080,7 +3080,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