Pre-Alpha CLC标准容器API提案...... [英] Pre-Alpha CLC Standard Container API Proposal...

查看:101
本文介绍了Pre-Alpha CLC标准容器API提案......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是该组使用的容器API的示例代码:

http://appcore.home.comcast.net/web/

按照以下帖子:

http://groups.google.com/group/comp。 ... 2427988fd2d7ba

http://groups.google.com/group/comp....5b682969ce746d

到目前为止,它只有单/双链表。在我发布任何更多

的实现之前,我想看看我们是否能就他们的API达成一致。

有什么想法吗?

Here is some example code for a container API for this group to use:

http://appcore.home.comcast.net/web/
as-per the following posts:

http://groups.google.com/group/comp....2427988fd2d7ba

http://groups.google.com/group/comp....5b682969ce746d
So far, it only has single/double linked list. Before I post any more
implementations, I want to see if we can agree on their API''s.
Any thoughts?

推荐答案

Chris Thomasson< cr ***** @ comcast.netwrote:
Chris Thomasson <cr*****@comcast.netwrote:

这是一些此组使用的容器API的示例代码:

http://appcore.home.comcast.net/web/



< snip>

<snip>


到目前为止,它只有单/双链表。在我发布任何更多

的实现之前,我想看看我们是否可以就他们的API达成一致。


有什么想法吗?
So far, it only has single/double linked list. Before I post any more
implementations, I want to see if we can agree on their API''s.

Any thoughts?



为什么要重新创建方向盘:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h
http:// cvsweb。 netbsd.org/bsdweb.cgi/src/sys/sys/tree.h


前者就像20岁,可能是最广泛的使用

源代码存在。


在所有可能的情况下,如果您使用的是Unix或Unix衍生产品,那么您实际上是

有一个文件/usr/include/sys/queue.h。重点是,认为它不标准

C本身,它与C中的普遍实现一样接近

将会得到。

Why are you re-creating the wheel:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/tree.h

The former is like 20 years old, and possibly one of the most widely re-used
source code in existence.

In all likely hood, if you''re on a Unix or Unix derivative, you actually
have a file /usr/include/sys/queue.h. Point being, thought it''s not standard
C per se, its about as close to a universal implementation in C as anybody
will ever get.


" William Ahern" < wi ***** @ wilbur.25thandClement.com写信息

新闻:gd ************ @ wilbur.25thandClement.com ...
"William Ahern" <wi*****@wilbur.25thandClement.comwrote in message
news:gd************@wilbur.25thandClement.com...

Chris Thomasson< cr ***** @ comcast.netwrote:
Chris Thomasson <cr*****@comcast.netwrote:

>这是一些此组使用的容器API的示例代码:

http://appcore.home.comcast.net/web/



< snip>

<snip>


>到目前为止,它只有单/双链表。在我发布任何更多
实现之前,我想看看我们是否可以就他们的API达成一致。

有什么想法吗?
>So far, it only has single/double linked list. Before I post any more
implementations, I want to see if we can agree on their API''s.

Any thoughts?



为什么要重新创建方向盘:


Why are you re-creating the wheel:



它可能是新手的好资源我要学习如何在标准C中定义

API和各种集合原语的实现。

此外,它可能会吸收一些投诉wrt C没有标准的

容器库。这似乎让人误以为C是过分复杂的......

It could possibly be a good resource for newbie''s to learn how to define
API''s and implementations of various collection primitives, in Standard C.
Also, it might soak up some of the complaints wrt C not having standard
container library. This seems to confuse people into thinking that C is
overly complicated...

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h
http:// cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/tree.h



哇;那就是很多宏!

http://groups.google.com/group/comp....00ced20ca06399


:^ 0

Wow; Thats a lot of macros!

http://groups.google.com/group/comp....00ced20ca06399

:^0


前者就像20岁,可能是最广泛使用的b $ b b源代码之一。

在所有可能的情况下,如果你使用的是Unix或Unix衍生产品,那么你实际上是b $ b有一个文件/usr/include/sys/queue.h。重点是,认为它不是

标准

C本身,它与C中的普遍实现一样接近

永远都会得到。
The former is like 20 years old, and possibly one of the most widely
re-used
source code in existence.
In all likely hood, if you''re on a Unix or Unix derivative, you actually
have a file /usr/include/sys/queue.h. Point being, thought it''s not
standard
C per se, its about as close to a universal implementation in C as anybody
will ever get.



好​​的。


Okay.


类型:

clc_slist,clc_slink

clc_dlist,clc_dlink

API:

void * clc_slink_init(clc_slink *,clc_slink *);

void * clc_slink_next(clc_slink const *);

void * clc_slist_init(clc_slist *,clc_slink *);

void * clc_slist_head(clc_slist const *);

void * clc_slist_push(clc_slist *,clc_slink *);

void * clc_slist_pop(clc_slist *);

void * clc_dlink_init(clc_dlink *,clc_dlink *, clc_dlink *);

void * clc_dlink_next(clc_dlink const *);

void * clc_dlink_prev(clc_dlist const *);

void * clc_dlist_init( clc_dlist *,clc_dlink *,clc_dlink *);

void * clc_dlist_head(clc_dlist const *);

void * clc_dlist_tail(clc_dlist const *);

void * clc_dlist_push_head(clc_dlist *,clc_dlink *);

void * clc_dlist_push_tail(clc_dlist *,clc_dlink *);

void * clc_dlist_pop_head(clc_dlis t *,clc_dlink *);

void * clc_dlist_pop_tail(clc_dlist *,clc_dlink *);

void * clc_dlist_pop(clc_dlist *);
Types:
clc_slist, clc_slink
clc_dlist, clc_dlink

API:
void* clc_slink_init(clc_slink*, clc_slink*);
void* clc_slink_next(clc_slink const*);
void* clc_slist_init(clc_slist*, clc_slink*);
void* clc_slist_head(clc_slist const*);
void* clc_slist_push(clc_slist*, clc_slink*);
void* clc_slist_pop(clc_slist*);
void* clc_dlink_init(clc_dlink*, clc_dlink*, clc_dlink*);
void* clc_dlink_next(clc_dlink const*);
void* clc_dlink_prev(clc_dlist const*);
void* clc_dlist_init(clc_dlist*, clc_dlink*, clc_dlink*);
void* clc_dlist_head(clc_dlist const*);
void* clc_dlist_tail(clc_dlist const*);
void* clc_dlist_push_head(clc_dlist*, clc_dlink*);
void* clc_dlist_push_tail(clc_dlist*, clc_dlink*);
void* clc_dlist_pop_head(clc_dlist*, clc_dlink*);
void* clc_dlist_pop_tail(clc_dlist*, clc_dlink*);
void* clc_dlist_pop(clc_dlist*);


这篇关于Pre-Alpha CLC标准容器API提案......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆