Re: [Libbt-devel] Intro and... suggestions
Brought to you by:
ksmathers
From: Alien <ali...@us...> - 2005-04-20 06:51:41
|
Hi, I'm the only one active at this time, and I'm already doing what you descri= be,=20 except i didn't commit yet, because it'll break CVS HEAD. but because you seem interested, i'll commit everything now anyway, the min= ute=20 i get my own version working a little again. I can tell you that i have gotten far and I restructured everything into a= =20 functional system, more or less... this "library" wasn't really a library when I started, they have 3 tools (a= s=20 the release from the 1.03 branch shows) btcheck, btlist & btget... the first 2 work more or less, the third is still not operational, because = i'm=20 working on the peer protocols now. The things i keep in mind: - get rid of libevent - think of generalisation: 64bit, IPv6, torrent protocol deviations - make headers structured and make internal dependencies - see libbt/include/bt/bt.h (it holds a header file that is supposed to ha= ve=20 all functions). - clean up the code I'll clean up my own version and commit, you'll see what i mean, then... Secondly, i've been trying to get in touch with project admin of this proje= ct,=20 and now you've suddenly became one... odd, but what the hell there's a guy that wanted to help (like a month back) and he asked ext CVS= =20 access, but he never got a reply...=20 please set trove categorisation, that's been buggin me, since i got here... I'm here because i wanted a library i could use for my own application... oh yeah: can you read the archives of the mailing list for a month or two=20 back? AL13N Op woensdag 20 april 2005 07:16, schreef Pandora: > Good morning all, Pandora here, aka synx13 on sourceforge. I like the > notion of a bittorrent library, since I'm planning an app that uses both > bittorrent, and other stuff (some sort of feed protocol). Since I'd > therefore be making a bittorrent library anyway, I was hoping to help > you folks out with whatever my twisted little mind could cook up. > > Okay, intros aside. I had some difficulty with the CVS of the code. To > be honest it's gotten quite... messy. I'd like to discuss some > standards here. As I fix the code there are a few things I'm not > certain on; things that could go either way. I have recommendations, > but before acting on those recommendations I'd like to ask other people > here what they'd want. > > 1) Object naming > > Many places (but not all; messy!) I see classes named this way: > | struct btClass; > | typedef struct btClass btClass; > > As elegant as that is, my syntax highlighter likes to see _t at the end > of typenames. It's got a point too: everywhere in C you have to > identify what a type is (struct, union, enum, etc) right by the type > name, except typedefs. So adding a _t makes it easier to identify > something as a type, and also leaves the class's formal name open for > the name of a variable. > > Also, there's a trick we could use so we can even pretend we're not > using pointers, which results in much less * writing, and really seems > to work out elegantly when I've done it. > > So I propose we do this: > | typedef struct btClass *btClass_t; > > instead of this: > | struct btClass; > | typedef struct btClass btClass; > > When we want to get at the implementation of btClass, we can use 'struct > btClass' but otherwise we can toss around btClass_t things like they > were opaque candy. > > | btClass *someFunction(btClass *, btClass **); //The old interface > | btClass_t someFunction(btClass_t, btClass_t*); //The new interface > > So... what about that? Obey my syntax highlighter and use _t? Typedefs > to all opaque structures as pointers, not just aliases? I'm going > forward with this system unless anybody brings forth any issues. Okay? > > > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime > info, new features, or free trial, at: > http://www.businessobjects.com/devxi/728 > _______________________________________________ > Libbt-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libbt-devel |