← Back to team overview

cuneiform team mailing list archive

Re: code cleanup

 

On Thu, Dec 18, 2008 at 3:52 AM, zani0005
<zani0005@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Inside many cuneiform files, there is a support for dos (or win16)
> and compilers such as borland c and watcom c. It seems a good idea to
> get rid of them, since they just pollute code.

Yes. Originally there were even more of these (original Mac OS etc)
and I have been getting rid of them at a steady pace. But there are a
lot of these still.

I suggest that only the following platforms are kept

- general unix (Linux, FreeBSD etc) using GCC
- OS X
- MinGW
- MSVC

> Also, there is a whole directory std, the only purpose of which is to
> replace standard functions (such as malloc) with cognitive-written
> ones. What about return back to standard functions?

You have found only one instance of many. Almost every single dll has
its own wrappers for memory allocation etc. Some of the wrappers have
the same name, some don't (malloc is aliased at least to std_alloc,
my_malloc, function pointer called my_malloc etc). I guess this made
some sort of sense at a time when there was no memory protection or
Valgrind.

Getting rid of these would be great. I have not spent much effort on
them, because even though they are ugly, they work. I'd rather work on
the part that does not work yet. But if you or anyone else wants to do
it, go right ahead.



References