How do I rename Alert() to _Alert()

How do I rename Alert() to _Alert()

Postby paulrhanson » Fri Dec 19, 2008 10:23 am

I have a large project I've inherited and it uses extensively my own version of Alert(), BUT my Alert() calls the normal clipper (or FiveWin in this case) which had been renamed by my predicessor to _Alert(). So, I need both my own Alert() and the FW normal Alert() renamed to _Alert().

By the way, I found the fwh\source\function\alert.prg and I see that it builds to use _Alert if not using windows. I need the name for windows.

Can someone help me with how to rename and rebuild the FWH lib's? I've never done that before. Or, how do I go about this.

Thanks!

B2B,
Paul
-Paul
paulrhanson
 
Posts: 13
Joined: Fri Sep 12, 2008 2:40 am

Postby RAMESHBABU » Fri Dec 19, 2008 12:51 pm

Hello Mr.Paul

Just copy the ALERT.PRG located in FWH\SOURCE\FUNCTIONS directory
to a new directory where you can have your modified copy of FWH source.

And make the changes shown as under:


Code: Select all  Expand view
#ifdef __CLIPPER__
   #ifndef __C3__
      function _Alert( cMsg, aOptions, cTitle, nDefault, xIcon )
   #else
      function Alert( cMsg, aOptions, cTitle, nDefault, xIcon )
   #endif
#else
   function _Alert( cMsg, aOptions, cTitle, nDefault, xIcon ) // CHANGED
#endif


Then use the following EDITED.BAT located in the same directory where
you have your modified version of your program.

usage :
EDITED <yourcopy.prg>

The following EDITED.BAT will compile the modified copy and automatically replace the FIVEHX.LIB located in FWH\LIB directory with
the modified program.

Code: Select all  Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 8.06 - June 2008            Harbour development power  ³Ü
ECHO ³ (c) FiveTech, 1993-2008      for Microsoft Windows 95/98/NT/2000/ME and XP ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO  ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

if %1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=c:\xharbour
set bcdir=c:\bcc55

%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

rem COPY C:\FWH\LIB\FIVEHX.LIB FIVEHX.LI

IF EXIST %1.obj TLIB C:\FWH\LIB\FIVEHX.LIB -+%1.obj

DEL clip.log
DEL b32.bc
DEL %1.obj
DEL %1.ppo
DEL %1.c



Thats all

Regards,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests