Re: [AD] dat util diff thingie

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Calvin French <frenchc@xxxxxxxxxx> writes:
> I made a modification to the datafile util, it implements recursive
> updating ``properly'' via the -r switch.

Thanks, that looks like a nicely made diff :-)

> I'm a tad hesitant to release it only because I've not tested it for a 
> specific problem that might be coming up. In particular I think there 
> may be a bug with it not detecting what needs updating quite properly.

It looks ok to me at first glance, but I'll try to test it a bit more.

One thing that does occur to me though, is whether this really needs to 
bother loading/saving the intermediate datafiles. eg. let's say you 
imported test.bmp into child.dat, then child.dat into data.dat, then 
later you edited test.bmp, added another test2.bmp to child.dat, and did 
a recursive update on data.dat. Obviously this needs to merge the 
TEST2_BMP from child.dat into data.dat, and should also update the 
TEST_BMP in data.dat with the new contents of test.bmp, but what should 
it do about the version of TEST_BMP in the child.dat file? If I'm reading 
it right, your code will modify child.dat as well as data.dat, which I 
think is probably a good thing (everyone agree?) but does open up the 
possibility for a slightly simpler implementation: what if, instead of 
needing new code to read in, update, and save out that nested file, the 
first version of dat.exe was just to invoke a second copy of itself with 
a system() call?


-- 
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/