C (199/257)

From:
Date:20 Feb 2001 at 23:37:44
Subject:Amiga types and strings

Hello,

First of all i would like to thank all the people that helped me with
include&organizing problem. I think i have got it now: in the headerfile
you only put info the user would need to use the functions in it. And in
the .c file you put everything that's needed to make the function run.

I also looked at the OO things but they got a little to far for what i
needed, i will use such stuff when i need to do some JAVA or Delphi at
college :) But thanks anyway.

Now a question again: i'm quit confused with all the types there are in the
AmigaOS in comparison to the ansi-c types, and how to cast/ change them or
whatever. I'll give an example that's with my function i was writing:

the proto for it is: char* getFilename(char* title, char* location)
It's about those last two, i want to use them to give the user some abillty
to change the "look" of the ASLRequester, the first one is the title of the
Requester and the second one is the place where the requester should start,
for example in the dir "Libs".

In want to use them in the part where i init my asl struct, it looks like
this:
if (fr = (struct FileRequester *)
AllocAslRequest(ASL_FileRequest,
ASLFR_TitleText, title,
ASLFR_InitialDrawer,
location, TAG_DONE))
I first tried it this way, but StormC gave an error: title is an illegal
argument. So i did some sniffing in the includes and found out that the two
items in question should be of the type STRPTR.
AFAIK this i just an Amiga version of the char * type? Or is it something
else?

So i tried it with a cast--> ASLFR_TitleText, (STRPTR) title, but no
effort. I don't know what to do now... isn't there a place on the Dev2.1 CD
where i can read about all these types and how to handle with them
correctly.... :)
I even tried changing the prototype to (STRPTR title, STRPT location)
doesn't help at all...

More suggestions please :) Let's make this maillinglist a little bit more
alive:) and sorry i can't help you with some things, have lot of learning
to do with the AmigaOS:(
(In the end i hope i can write some usefull and fun things in C:)



Groeten,

Joris Kempen - webmaster
visit www.detrekkers.com

Always remember that you are unique. Just like everyone else.

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://us.click.yahoo.com/kWP7PD/pYNCAA/4ihDAA/d8AVlB/TM
---------------------------------------------------------------------_->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/