To: vim-dev@vim.org Subject: Patch 5.6.034 (extra) Fcc: outbox From: Bram Moolenaar ------------ Patch 5.6.034 (extra) Problem: Compiling with Borland C++ 5.5 fails on tolower() and toupper(). Solution: Use TO_LOWER() and TO_UPPER() instead. Also adjust the Makefile to make using bcc 5.5 easier. Files: src/edit.c, src/ex_docmd.c, src/misc1.c, src/Makefile.bor *** ../vim-5.6.33/src/edit.c Sat Mar 25 17:08:58 2000 --- src/edit.c Mon Mar 27 10:30:45 2000 *************** *** 3085,3091 **** { if (!vim_isdigit(nc) && !isxdigit(nc)) break; ! nc = tolower(nc); if (nc >= 'a') nc = 10 + nc - 'a'; else --- 3085,3091 ---- { if (!vim_isdigit(nc) && !isxdigit(nc)) break; ! nc = TO_LOWER(nc); if (nc >= 'a') nc = 10 + nc - 'a'; else *************** *** 4394,4400 **** (char_u)AIN /*y*/, (char_u)ZADI /*z*/}; if (c == 'N' || c == 'M' || c == 'P' || c == 'C' || c == 'Z') ! return (int)(map[tolower(c) - 'a'] - 1 + p_aleph);/* '-1'='sofit' */ else if (c == 'x') return 'X'; else if (c == 'q') --- 4394,4400 ---- (char_u)AIN /*y*/, (char_u)ZADI /*z*/}; if (c == 'N' || c == 'M' || c == 'P' || c == 'C' || c == 'Z') ! return (int)(map[TO_LOWER(c) - 'a'] - 1 + p_aleph);/* '-1'='sofit' */ else if (c == 'x') return 'X'; else if (c == 'q') *** ../vim-5.6.33/src/ex_docmd.c Sat Jan 8 13:45:47 2000 --- src/ex_docmd.c Mon Mar 27 10:35:46 2000 *************** *** 6796,6802 **** { if (islower(*eap->arg)) /* make register empty */ write_reg_contents(*eap->arg, (char_u *)""); ! redir_reg = toupper(*eap->arg); } else EMSG(e_invarg); --- 6796,6802 ---- { if (islower(*eap->arg)) /* make register empty */ write_reg_contents(*eap->arg, (char_u *)""); ! redir_reg = TO_UPPER(*eap->arg); } else EMSG(e_invarg); *** ../vim-5.6.33/src/misc1.c Thu Mar 23 17:46:04 2000 --- src/misc1.c Mon Mar 27 10:32:19 2000 *************** *** 2949,2955 **** { while (len > 0 && *x && *y) { ! if (tolower(*x) != tolower(*y) && !(*x == '/' && *y == '\\') && !(*x == '\\' && *y == '/')) break; --- 2949,2955 ---- { while (len > 0 && *x && *y) { ! if (TO_LOWER(*x) != TO_LOWER(*y) && !(*x == '/' && *y == '\\') && !(*x == '\\' && *y == '/')) break; *** ../vim-5.6.33/src/Makefile.bor Fri Jun 11 21:43:15 1999 --- src/Makefile.bor Mon Mar 27 10:55:10 2000 *************** *** 14,19 **** --- 14,23 ---- # It builds on Windows 95 and NT-Intel, producing the same binary in either # case. To build using Microsoft Visual C++, use Makefile.w32. # + # This should work with the free Borland command line compiler, version 5.5. + # Use a command like this: + # \bin\make /f Makefile.bor BOR= LINK=\bin\ilink32 + # # let the make utility do the hard work: .AUTODEPEND *************** *** 33,39 **** --- 37,45 ---- # OS - DOS16 or WIN32 # # Change this to point to the root of *your* BC installation: + !if ("$(BOR)"=="") BOR = c:\bc5 + !endif # # PERL STUFF # 'USEDLL' doesn't seem to work with perl, don't know why. *************** *** 42,54 **** --- 48,64 ---- PERLLIB=c:\perl\lib # # OS Target - can be DOS16 or WIN32 + !if ("$(OS)"=="") OS = WIN32 + !endif # # Uncomment to make an executable for debugging: #DEBUG = -v # # Comment out to make a console-mode only version: + !if ("$(GUI)"=="") GUI = 1 + !endif # # Uncomment to make an OLE-capable version: #OLE = 1 *************** *** 201,214 **** --- 211,228 ---- ##### BASE COMPILER/TOOLS RULES ##### !if ($(OS)==DOS16) BRC = + !if ("$(LINK)"=="") LINK = $(BOR)\BIN\TLink + !endif CC = $(BOR)\BIN\Bcc LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG) $(LINK2) LFLAGSDLL = CFLAGS = -w- -w-aus -w-par -I$(INCLUDE) -H- -P- $(HEADERS) !else BRC = brc32 + !if ("$(LINK)"=="") LINK = $(BOR)\BIN\TLink32 + !endif CC = $(BOR)\BIN\Bcc32 LFLAGS = -OS -r -Tpe -c -m -L$(LIB) $(DEBUG) $(LINK2) LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG) $(LINK2) *** ../vim-5.6.33/src/version.c Mon Mar 27 13:36:17 2000 --- src/version.c Mon Mar 27 13:35:57 2000 *************** *** 420,421 **** --- 420,423 ---- { /* Add new patch number below this line */ + /**/ + 34, /**/ -- GUARD #1: What, ridden on a horse? ARTHUR: Yes! GUARD #1: You're using coconuts! ARTHUR: What? GUARD #1: You've got two empty halves of coconut and you're bangin' 'em together. The Quest for the Holy Grail (Monty Python) /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\ \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/