Hello. Several times I used C/C++ project for inspiration, especially for
opening multimedia
files.
I used my own program to 'convert' the C files in Pascal/Delphi files. Later
I've found a tool
that was (it said) able to convert the full C program in Pascal but only if the
C program was
compileable. I never made it to work. The C language is very 'non-standard' and
allway it asked
for more 'make' or 'include' files.
So anybody know a program that can convert a C to Delphi?
I don't ask for a 100% conversion.
I know is imposible.
My conversion strings (you can use them with a regular text replacer tool):
SearchFor=!=
ReplaceWith=<>
SearchFor==
ReplaceWith=:=
SearchFor=:=:=
ReplaceWith==
SearchFor===
ReplaceWith==
SearchFor=#include <stdio.h>
ReplaceWith=unit xxx;
SearchFor=#include
ReplaceWith=uses
SearchFor={
ReplaceWith= begin
SearchFor= }
ReplaceWith= end;
SearchFor=||
ReplaceWith= OR
SearchFor=&&
ReplaceWith= AND
SearchFor=&
ReplaceWith= AND
SearchFor=function void
ReplaceWith=procedure
SearchFor=void __fastcall
ReplaceWith=procedure
SearchFor=void
ReplaceWith=Nil
SearchFor=null
ReplaceWith=Nil
SearchFor=main
ReplaceWith=function main
SearchFor=__fastcall
ReplaceWith=
SearchFor=return;
ReplaceWith=
SearchFor=return
ReplaceWith=Result:=
SearchFor=()
ReplaceWith=
SearchFor=
ReplaceWith=
SearchFor=#define
ReplaceWith=type
SearchFor=struct
ReplaceWith=record
SearchFor={Variabile INTEGER}
ReplaceWith=
SearchFor=int
ReplaceWith= : Integer;
SearchFor=char
ReplaceWith=: Char;
SearchFor=unsigned char
ReplaceWith=: Byte;
SearchFor=signed char
ReplaceWith=: Shortint;
SearchFor=unsigned int
ReplaceWith=: Word;
SearchFor=signed int
ReplaceWith=: Smallint:
SearchFor=short int
ReplaceWith=: Smallint;
SearchFor=unsigned short int
ReplaceWith=: Word;
SearchFor=signed short int
ReplaceWith=: Smallint;
SearchFor=long
ReplaceWith=: Longint;
SearchFor=long int
ReplaceWith=: Longint;
SearchFor=signed long int
ReplaceWith=: Longint;
SearchFor=unsigned long int
ReplaceWith=: Longword;
SearchFor=unsigned long
ReplaceWith=: Longword;
SearchFor={Variabile FLOAT}
ReplaceWith=
SearchFor=float
ReplaceWith=: Real48;
SearchFor=double
ReplaceWith=: Double;
SearchFor=long double
ReplaceWith=: Extended;
SearchFor=
ReplaceWith=
SearchFor=::
ReplaceWith=.
SearchFor=->
ReplaceWith=.
SearchFor=.h"
ReplaceWith=;
SearchFor="
ReplaceWith='
SearchFor=\n
ReplaceWith=+CRLF
SearchFor=>>
ReplaceWith=>
SearchFor=<<
ReplaceWith=<
SearchFor=fprintf
ReplaceWith=Memo.Lines.Add
SearchFor=printf
ReplaceWith=Memo.Lines.Add
SearchFor=cout <<
ReplaceWith=Memo.Lines.Add
SearchFor=cout
ReplaceWith=Memo.Lines.Add
SearchFor=strcmp
ReplaceWith=Pos
SearchFor=if (!
ReplaceWith=if (NOT
SearchFor=+=
ReplaceWith=inc( , )
SearchFor=++)
ReplaceWith=inc
SearchFor=for (
ReplaceWith=for
SearchFor=0x
ReplaceWith=$
...and the traveler died, stroked by the beauty of the landscape.
THE MORNING OF THE MAGICIANS
Louis Pawels & Jacques Bergier
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk