473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problems with getvect/setvect under Borland C 3.1

I have an old DOS serial communication program which I want to
compile.
The program I told was designed under Borland C 3.1 and therefore I am
trying to compile it under Borland C 3.1.
During compilation I have a error for the line oldvect =
getvect(comp.intr):
Error: Cannot convert 'void (interrupt *)(...)' to 'void (interrupt
*)()'

The same problem for setvect.
I don't understand this. The help shows that everything should be
right - getvect takes one integer parameter.
What's wrong with that?

Could somebody please help me with this, may be I am missing
something.

Thank you
Nov 14 '05 #1
4 7283
Dmytro Bablinyuk wrote:
I have an old DOS serial communication program which I want to
compile.
The program I told was designed under Borland C 3.1 and therefore I am
trying to compile it under Borland C 3.1.
During compilation I have a error for the line oldvect =
getvect(comp.intr):
Error: Cannot convert 'void (interrupt *)(...)' to 'void (interrupt
*)()'

The same problem for setvect.
I don't understand this. The help shows that everything should be
right - getvect takes one integer parameter.
What's wrong with that?

Could somebody please help me with this, may be I am missing
something.

You're dealing with non-standard extensions here, so news:comp.lang.c is
the wrong place to ask.

Try one of the Borland groups (or their website).

HTH,
--ag

[BTW, you should *really* read the FAQ for c.l.c, at:
http://www.eskimo.com/~scs/C-faq/top.html]

--
Artie Gold -- Austin, Texas
Nov 14 '05 #2
"Dmytro Bablinyuk" <dm**************@tait.co.nz> wrote in message
news:77**************************@posting.google.c om...
I have an old DOS serial communication program which I want to
compile.
The program I told was designed under Borland C 3.1 and therefore I am
trying to compile it under Borland C 3.1.
During compilation I have a error for the line oldvect =
getvect(comp.intr):
Error: Cannot convert 'void (interrupt *)(...)' to 'void (interrupt
*)()'

The same problem for setvect.
I don't understand this. The help shows that everything should be
right - getvect takes one integer parameter.
What's wrong with that?


As Artie Gold told you, this is OT on comp.lang.c, but my guess is that
your oldvect is declared as 'void (interrupt *)()' whereas getvect() has
a type 'void (interrupt *)(...)'. Try delaring oldvect according to the
getvect()'s prototype.
Nov 14 '05 #3
On 29 Jan 2004 20:11:53 -0800, dm**************@tait.co.nz (Dmytro
Bablinyuk) wrote:
I have an old DOS serial communication program which I want to
compile.
The program I told was designed under Borland C 3.1 and therefore I am
trying to compile it under Borland C 3.1.
During compilation I have a error for the line oldvect =
getvect(comp.intr):
Error: Cannot convert 'void (interrupt *)(...)' to 'void (interrupt
*)()'

The same problem for setvect.
I don't understand this. The help shows that everything should be
right - getvect takes one integer parameter.
What's wrong with that?


You are mixing languages. In Borland C an "interrupt" has type

void (interrupt*)()

while in Borland C++ it has type

void (interrupt*)(...)

This affects the parameter type of setvect and the return type of
getvect which change in the same way according to the language used.
You obviously compiled your program as a C++ program and not as a C
program because according to the compiler's message 'oldvec' is
declared as a "C interrupt" and getvect returns a "C++ interrupt".

--
Horst

Nov 14 '05 #4
Hi,
My project is written in 'C' to interface serial port (UART). I have used getvect() and setvect() functions. Now I am porting 'C' to VC++. I have faced the problem with the above mention functions.

Can anybody help me to find the equivalent function in VC++.

Regards,
Barani.
Jun 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Victor Hannak | last post by:
I have the following 2 files as part of my project: GenFuncs.h ------------ #ifndef GenFuncsH #define GenFuncsH #include <iostream.h> #include <strstream.h> using namespace std;
17
by: Axel | last post by:
Hiho, here my Newbie question (Win32 GUI): I'm reading a file in binary mode to a char* named buffer. I used malloc(filesize) to make the needed space avaiable. The filedata in the buffer...
0
by: Kenneth Gomez | last post by:
Hello, I have tried many avenues (web search, borland website, libxml website) before deciding to post here. I'm trying to install libxml2 on windows ME to work with my Borland C++ 5 Compiler...
43
by: J.K. Becker | last post by:
Hi there, I am trying to multiply doubles with floats (actually I tried every possible combination by now) and it never works (well, it does something but it is always wrong). I have no idea...
3
by: Thomas Matthews | last post by:
Is there anything technically wrong with the code below? I compiled it with g++ 3.3.1 and it executes with no errors. I compiled it with bcc32 5.6 and it executes with "This program has performed...
17
by: Ziggi | last post by:
Hi. I want to get a C++ IDE, but I dont know whether to go for Bill Gate's solution or Borland's. Could any kind folks detail the relative strength and weaknesses of both, and also tell me which...
1
by: Travis Stewart | last post by:
Hi, I've been working on some software to control an older GPIB card for the past couple of weeks. I have function prototypes in a header file pc-mate2.h and the functions are defined in...
4
by: Che | last post by:
Hello, I am trying to build ucip stack using Borland 4.5. I have a problem in building the stack, where in one of the ".c" files refers to (netifdev.h) I am getting an error message which...
5
by: nagehan | last post by:
hi all, I try to write setvect and getvect functions of dos.h, but I don't know how can I return a far pointer to a function? if anybody know it, or where I can find this information, please send...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.