FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 05-06-2011, 08:18 AM
sean finney
 
Default Split some useful functions from help.c to (new) util.c

Hiya,

Once again, everything prefixed with IIRC and it may no longer
be the case.

On Fri, May 06, 2011 at 02:49:30AM -0500, Jonathan Nieder wrote:
> debug is now part of libdpkg so I left that one out.
>
> help.c describes itself as "help.c - various helper routines", which
> doesn't seem so far from util.c. Do I understand correctly that the
> main purpose is to make ensure_pathname_nonexisting et al usable as
> a separate translation unit that doesn't depend on too much else?

Basically, it's a pain to try and use anythign from help.c because of
the numerous intertwined static/global/extern variables involved.
for example if you wanted to link against it in a unit test i think
there were a couple dozen local static variables and possibly other
functions you'd have to define, even if you weren't going to use them,
because they are otherwise defined in the dpkg binary's main code and
you'd get linker errors without them.

I think this was largely because the code in help.c is fairly "legacy"
and was written long before someone came up with the idea of libdpkg,
unit testing, etc.

So I think the "util.c" name was suggested by Guillem as a "help.c-like"
filename, where something could be put until it was decided to either move
it into libdpkg or move more help.c code over to it.

sean

--


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110506081824.GB13869@cobija.connexer.com">http://lists.debian.org/20110506081824.GB13869@cobija.connexer.com
 

Thread Tools




All times are GMT. The time now is 07:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org