[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-installer: disk partitioner



Glenn McGrath wrote:
> 
> I too am unsure about what is standard with data structures.
> 

I was asking if there are any coding standards about
data structures the Install team is following. It seems
that there aren't, right?

> busybox has utility.c which is where funtions go that are common to a
> few busybox utilitities, i havent looked at publib yet (its pretty old?)
> so i dont really cant compare it.
> 

Well. My problem with C, compared to C++ or other languages, is
that you duplicate data structure code each time you write some
piece of code. And then, interfacing with the code other people
have written will be difficult because you have to use their
routines or hack them. So, large C projects tend to have their
own portable C lib of data structures.. A good example is glib.

Busybox has some utils, all right, but what I mean is a set
of generic data structure stuff like lists, stacks, hash tables...

Taking either libglib or publib and adapting parts of them
for the installer would be pretty good. It would make it easier
to develop and test stuff. These are pretty small things by the
way, so no harm.

I used and modified some parts of publib for a project, and it
had felt good. Not that publib is a state-of-the art or an ultra-cool
thing but it exists and usable. We could also consider glib as
I said. Of course, we can go for the busybox approach, stripping
them as necessary. If you just take the specific parts, then the
resulting code would be really tiny.

> Im stuck with a mongrel of a segfault with my code at the moment :(
> 

Watch the pointers ;)

Thanks,

-- 
Eray (exa) Ozkural
Comp. Sci. Dept., Bilkent University, Ankara
e-mail: erayo@cs.bilkent.edu.tr
www: http://www.cs.bilkent.edu.tr/~erayo



Reply to: