Click Here
home features news forums classifieds faqs links search
6155 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
22 crawler(s) on-line.
 95 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!

/  Forum Index
   /  Classic Amiga Software
      /  C support libraries
Register To Post

PosterThread
zara 
C support libraries
Posted on 21-May-2026 7:13:01
#1 ]
Member
Joined: 26-Nov-2022
Posts: 31
From: Unknown

Hi,

just wanted to say I started making additions to the C library.
Here's the source code of the first library :
http://sf.net/p/libportc/

(v0.1.13)

Last edited by zara on 21-May-2026 at 07:16 AM.
Last edited by zara on 21-May-2026 at 07:13 AM.

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: C support libraries
Posted on 21-May-2026 8:00:12
#2 ]
Super Member
Joined: 13-Dec-2019
Posts: 1444
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

@zara

Quote:

int search_list_for_data(struct list *l, id search_data)
{
struct list *l2 = l;
while(idcmp(l->void_data, search_data) != 0)
if (l->next == NULL)
return -1;

return 0;
}



This is quality code friend zara,
quality code.

But now please provide the function
void create_castlevania_level(struct vampire *dracula)

PROVIDE IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


/mega

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: C support libraries
Posted on 21-May-2026 8:33:28
#3 ]
Super Member
Joined: 3-Aug-2015
Posts: 1510
From: Germany

@zara

Please post a readme or change-log on sourceforge listing the function with a short description of it.
I don't know if people would like to download and inspecting the source for an overview.
And please provide a short information about your license.

I once had an idea to do something similar, 'C' has poor string handling and functions like toupper() tolower() should also be available as string functions.

Functions for reading/scanning csv, xml or json might be a good idea too.

 Status: Offline
Profile     Report this post  
DaveN 
Re: C support libraries
Posted on 21-May-2026 13:28:43
#4 ]
Member
Joined: 7-Mar-2003
Posts: 22
From: Grimsby, UK

@zara

I agree with your code is good. It`s making me feel like coding for the Amiga again :)

 Status: Offline
Profile     Report this post  
alpyre 
Re: C support libraries
Posted on 25-May-2026 19:16:34
#5 ]
Member
Joined: 30-Oct-2008
Posts: 25
From: Samsun / Turkey

@zara

This meant absolutely zero sense to me. Especially cytpes.h. You just typedef signed types to unsigned types. And type of an id is a void pointer. WTF!?

You really should provide some proper readme for what this really is.

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: C support libraries
Posted on 26-May-2026 2:43:38
#6 ]
Super Member
Joined: 13-Dec-2019
Posts: 1444
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

Quote:

alpyre wrote:
@zara

This meant absolutely zero sense to me. Especially cytpes.h. You just typedef signed types to unsigned types. And type of an id is a void pointer. WTF!?


Friend alpyre,
I am glad zara's posted elicited the rational, logical response in at least someone else.
See, temporarily dearest of my friends,
this is Amigaworld's derangement syndrome in full effect:

someone, anyone showcases some pointless, completely amateurish nonsense (or below amateurish, like in this case) and others run to clap hands and encourage the author, because "that's what nice people do" I SUPPOSE.

Even with the garbage has nothing to do with Amiga, either.
A shiny example just in this very thread:

Quote:

DaveN where the N is for "Nimrod" I think wrote:

I agree with your code is good. It`s making me feel like coding for the Amiga again :)


OBSERVE!!!! zara's previous exploit here
https://amigaworld.net/modules/newbb/viewtopic.php?topic_id=45853&forum=9



FRIENDS!!!!!!!!!!!!!
FOSTERING CREATIVITY THIS ISN'T!!!!!!
All the opposite, this is rewarding lameness, laziness, punjabi-factory quality production as the new standards.

FIRE UP THAT AMITORRENT PRONTO!!!
Download "Whiplash" (2014) and watch asap.





/MEGA!



Last edited by MEGA_RJ_MICAL on 26-May-2026 at 03:10 AM.

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
kriz 
Re: C support libraries
Posted on 26-May-2026 5:11:54
#7 ]
Regular Member
Joined: 20-Mar-2005
Posts: 251
From: No (R) Way

@zara

Why tar.gz an Amiga archive ?

 Status: Offline
Profile     Report this post  
kriz 
Re: C support libraries
Posted on 26-May-2026 5:12:51
#8 ]
Regular Member
Joined: 20-Mar-2005
Posts: 251
From: No (R) Way

@MEGA_RJ_MICAL

Yeah this is some "demo" of Castlevania and Python ? How useful :D

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: C support libraries
Posted on 2-Jun-2026 5:58:31
#9 ]
Super Member
Joined: 3-Aug-2015
Posts: 1510
From: Germany

@Thread

Quote:

MEGA_RJ_MICAL wrote:


int search_list_for_data(struct list *l, id search_data)
{
struct list *l2 = l;
while(idcmp(l->void_data, search_data) != 0)
if (l->next == NULL)
return -1;

return 0;
}



This is quality code friend zara, quality code.


Just for the thread, it is of course not quality code

Possible error:
'l' is checked in the while loop, but never changed, so if the first data is not search_data it might run forever.
Warning: l2 defined but never used.

Last edited by OneTimer1 on 03-Jun-2026 at 12:08 PM.
Last edited by OneTimer1 on 03-Jun-2026 at 12:06 PM.
Last edited by OneTimer1 on 03-Jun-2026 at 12:06 PM.

 Status: Offline
Profile     Report this post  
geit 
Re: C support libraries
Posted on 2-Jun-2026 11:17:23
#10 ]
Regular Member
Joined: 20-May-2006
Posts: 107
From: Germany

@OneTimer1

Whaat? I stopped looking at it due to the lack of {}, () and general formatting. That's where good code starts.

Last edited by geit on 02-Jun-2026 at 11:18 AM.

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: C support libraries
Posted on 3-Jun-2026 12:09:37
#11 ]
Super Member
Joined: 3-Aug-2015
Posts: 1510
From: Germany

@geit

I tried it again with the right tags for pre-formatted text.

BTW.: This might be a better version (not tested):


int search_list_for_data(struct list *l, id search_data)
{
while (l != NULL) {
if (idcmp(l->void_data, search_data) == 0)
return 0;
l = l->next;
}
return -1;
}

Last edited by OneTimer1 on 03-Jun-2026 at 02:12 PM.
Last edited by OneTimer1 on 03-Jun-2026 at 02:11 PM.

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: C support libraries
Posted on 4-Jun-2026 2:42:46
#12 ]
Super Member
Joined: 13-Dec-2019
Posts: 1444
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

Friends,
this thread truly succeeds at capturing the spirit of Amigaworld:

1) Someone crawls out from nowhere and posts something he made. Something totally amateurish, unfinished, useless, and broken. Also unrelated to Amiga.

2) Others jump in and go all "hmmm.... ammm... ummmm" about how that thing could be improved, or pointing out some minor detail. Like looking at a butchered corpse and saying "nice tie" or "oh your pocket square is a bit off".

3) Someone comments about something completely unrelated and derails the conversation.

All along, no one bothers to simply point out "LOL WTF IS THIS, GO AWAY",
as the youth would put it.

AND THE WHEELS KEEP GOING ROUND AND ROUND





my oh my
~ mega

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
simplex 
Re: C support libraries
Posted on 4-Jun-2026 8:42:45
#13 ]
Cult Member
Joined: 5-Oct-2003
Posts: 913
From: Unknown

@MEGA_RJ_MICAL

Quote:
All along, no one bothers to simply point out "LOL WTF IS THIS, GO AWAY",
as the youth would put it.

Correct me if I'm wrong, but wasn't the very first comment more or less to that effect?

If it wasn't, I will have lost some respect for that commenter.

But not much. Perhaps his subsequent comment(s) was/were a desperate cry for attention?

Last edited by simplex on 04-Jun-2026 at 08:43 AM.

_________________

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: C support libraries
Posted on 4-Jun-2026 9:34:11
#14 ]
Super Member
Joined: 13-Dec-2019
Posts: 1444
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

@simplex

Friend Simplex,
you mean friend OneTimer1's comment?

I sadly believe he was being sincere.



/m!

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
simplex 
Re: C support libraries
Posted on 4-Jun-2026 10:24:43
#15 ]
Cult Member
Joined: 5-Oct-2003
Posts: 913
From: Unknown

@MEGA_RJ_MICAL

Not at all! I mean the first one I see when I look at the page, which includes these piercing insights:
Quote:
This is quality code friend zara, quality code.
But now please provide the function
void create_castlevania_level(struct vampire *dracula)

PROVIDE IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I honestly cannot imagine a more poetic expression of the somewhat uncouth, "LOL WTF IS THIS, GO AWAY"

Well, OK maybe not the "GO AWAY" part. But still.

_________________

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: C support libraries
Posted on 4-Jun-2026 10:33:23
#16 ]
Super Member
Joined: 13-Dec-2019
Posts: 1444
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

@simplex

The, ALAS, lost art of sarcasm, friend simplex.
The lost art of sarcasm.


/m++

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
OldFart 
Re: C support libraries
Posted on 4-Jun-2026 15:58:56
#17 ]
Elite Member
Joined: 12-Sep-2004
Posts: 3080
From: Stad; en d'r is moar ain stad en da's Stad. Makkelk zat!

@OneTimer1

Although currently my 'coding season' is at an end, I sank my falsies into it anyway.

Here's my version:

int search_list_for_data(struct list *l, id search_data)
{
while (
(l != NULL) &&
(idcmp(l->void_data, search_data) != 0)
)
{
l = l->next;
}

return (int)((l != NULL) - 1);
}


Edit:
But this manipulates the value of a pointer passed as an argument, so i think this version eliminates possible side effects:

int search_list_for_data(struct list *l, id search_data)
{
struct list *l2 = l;

while (
(l2 != NULL) &&
(idcmp(l2->void_data, search_data) != 0)
)
{
l2 = l2->next;
}

return (int)((l2 != NULL) - 1);
}


What I don't like is the superfluous use of underscores and the lack of capitals.
More to *MY* (personal, mind) liking is:
int Search_ListForData(struct list *l, id SearchData)
{
struct list *L2 = l;

while (
(L2 != NULL) &&
(idcmp(L2->void_data, SearchData) != 0)
)
{
L2 = L2->next;
}

return (int)((L2 != NULL) - 1);
}


Hope you like it.



OldFart

Last edited by OldFart on 04-Jun-2026 at 04:09 PM.

_________________
Life is a waste of time.
Time is a waste of life.
Get wasted all the time
and you'll have the time of your life!

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: C support libraries
Posted on 12-Jun-2026 7:19:15
#18 ]
Super Member
Joined: 3-Aug-2015
Posts: 1510
From: Germany

@OldFart

Quote:
Hope you like it.


No problem with your code, you should tell this to the OP (original poster).

To be honest, I looked at MEGA_RJ_MICAL posting and thought he is right, some parts of the code are looking wrong, it assured me how his ironic compliment was meant (be careful using irony on the web).

Normally I would had to load the code it into a compiler and try everything out in an Amiga environment, but I was to lazy to do it, so I presented it to ChatGPT and the AI confirmed my doubts and made a suggestion for a fixed version.

Last edited by OneTimer1 on 12-Jun-2026 at 11:20 AM.
Last edited by OneTimer1 on 12-Jun-2026 at 08:49 AM.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle