English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 11 December 2005, 19:35   #1
_ThEcRoW
Amiga NetRunner
_ThEcRoW's Avatar
 
Join Date: Apr 2005
Location: Spain
Age: 40
Posts: 932
Equivalent libraries from standard c to amiga c

Hello mates, i have just recently installed storm c, but have few problems trying to get my programs to work. I get some libraries(i.e conio.h) missing on storm c, so i am looking ofr a list of equivalences in libraries from those compilers.
Thanks in advance!!!!!!!
_ThEcRoW is offline  
Old 11 December 2005, 22:29   #2
Npl
Registered User
 
Join Date: Aug 2004
Location: Vienna / Austria
Age: 40
Posts: 257
conio.h is actually a MSDOS "library". No surprise its missing
best way would be to code C-Style with scanf and printf, but I know it can be a pain for some purposes.
If not I think you`d have to communicate with Messages over the "CON" Device.
Npl is offline  
Old 12 December 2005, 01:03   #3
_ThEcRoW
Amiga NetRunner
_ThEcRoW's Avatar
 
Join Date: Apr 2005
Location: Spain
Age: 40
Posts: 932
Yeah i know that conio.h it's a borland exclusive lib, but i was looking for libraries that perform like it more or less. But well, i will have to manage how to do it.
Very thanks mate!!
_ThEcRoW is offline  
Old 12 December 2005, 05:37   #4
OddbOd
Registered User
 
Join Date: Jul 2005
Location: Australia
Age: 42
Posts: 663
It would help if you could tell us what exactly you need to do, what functions do you require? I assume you already understand that many of the conio functions would not make any sense under AmigaOS, e.g. Screen handling, video mode switching, text windows are all handled completely differently and are not practically portable.
OddbOd is offline  
Old 12 December 2005, 22:15   #5
_ThEcRoW
Amiga NetRunner
_ThEcRoW's Avatar
 
Join Date: Apr 2005
Location: Spain
Age: 40
Posts: 932
I was thinking about getch(). I need a similar function that performs more or less like it, because getchar() isn't the same exactly.
Thanks!!!
_ThEcRoW is offline  
Old 13 December 2005, 09:51   #6
OddbOd
Registered User
 
Join Date: Jul 2005
Location: Australia
Age: 42
Posts: 663
Ahhhh you want a character from a console window without the Enter key being pressed don't you? In that case I would cheat and use vbcc which includes a getch() function, simply change #include <conio.h> to #include <extra.h> and compile it with the -lextra switch.

Since you are using StormC it's probably worth mentioning that there are much better ways of handling character I/O under C++ in this case the istream::get member functions are much more flexible, easier to use and will do exactly what you want.

Yet another method which is Amiga specific is to use the RAW: device which supports unbuffered character input, from what I understand you can switch a CON: window to Raw mode using the SetMode() function from the DOS library and then use Read() to get characters one at a time. This is the option that I know the least about, someone with more experience will be able to provide a much better explanation.

Edit: Some of these usenet posts might be helpful as you are not the first person to get stuck with this problem.
OddbOd is offline  
Old 14 December 2005, 18:01   #7
_ThEcRoW
Amiga NetRunner
_ThEcRoW's Avatar
 
Join Date: Apr 2005
Location: Spain
Age: 40
Posts: 932
Thanks for this last reply, seems that using vbcc i will be allowed to use that extra.h libray. I will look at it for sure. By the way, at the moment i don't know c++ coding, only c, but in a future would learn it, as it seems to be more powerful than standard c on some areas.
Will check also the usenet posts.
Thanks a lot for your help!!!!!
_ThEcRoW is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WinUAE and real Amiga networked as standard? ancalimon support.WinUAE 3 31 December 2011 10:48
TCP/IP on standard Amiga 1200 leehanken support.Other 4 25 July 2009 08:44
Using a standard Amiga keyboard with an A1200 TheRogue support.Hardware 1 07 May 2009 10:12
Skate Or Die - Amiga Equivalent? Fingerlickin_B Retrogaming General Discussion 18 01 July 2007 15:47
Standard Amiga Models / Configs Feltzkrone Retrogaming General Discussion 8 10 January 2003 10:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08439 seconds with 14 queries