Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users





STRPTR and stdlib

Joined:
1/20 18:36
From SF Bay Area, California
Group:
Member
Posts: 45
Offline
Is somebody able to explain the reasoning behind STRPTR (and CONST_STRPTR) defined in exec/types.h. I imagine these would be useful for cross-platform development but then I see (or write myself) code to cast into char* or const char* to use clib functions like strlen.

Am I missing something fundamental?

Also a huge thank you to the Zune Paint authors. I'm finding the code to be very instructional on Zune/MUI.

Posted on: 7/17 7:49
Transfer the post to other applications Transfer


Re: STRPTR and stdlib

Joined:
2004/4/12 13:07
Group:
Member
Posts: 532
Offline
STRPTR is an Amiga specific definition defined in the original exec/types.h of AmigaOS includes and taken over by AROS for compatibility.
clib follows the ANSI standard which uses (const) char * as pointer to a string.

Posted on: 7/17 12:29
_________________
......
Transfer the post to other applications Transfer


Re: STRPTR and stdlib

Joined:
1/20 18:36
From SF Bay Area, California
Group:
Member
Posts: 45
Offline
Thanks. So it's totally "normal" to see a bunch of casts to char * and const char * when calling clib string functions.

Posted on: 7/19 8:14
Transfer the post to other applications Transfer


Re: STRPTR and stdlib

Joined:
2009/4/16 23:03
From Liancourt Saint Pierre - France
Group:
Member
Posts: 1144
Offline
First thanks from ZunePaint author, that's one major goal for me, open sourcing my developments under AROS to inspire others.

Then regarding your question, as said mixing Amiga specifics with Ansi/Posix standards is a bit of additional work regarding casting to have a warning free compilation.

Posted on: 7/20 3:25
_________________
Yannick
http://www.dusabledanslherbe.eu/AROSPage
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4439
2 magorium
magorium
4095
3 nikolaos
nikolaos
4072
4 phoenixkonsole
phoenixkonsole
3941
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2807
7 mazze
mazze
2222
8 clusteruk
clusteruk
2112
9 damocles
damocles
1789
10 BSzili
BSzili
1516
© 2004-2018 AROS Exec