Re: ANSI standards


Subject: Re: ANSI standards
sterwill@abisource.com
Date: Thu Jan 20 2000 - 14:47:45 CST


James Montgomerie wrote:
> Hello all, I've just joined the list, and I am interested in becoming
> involved in development. However, the source to something as large as
> AbiWord is rather daunting to look at and understand in one gulp, so I'm
> looking for something to do that wouldn't be too hard for an AbiWord
> 'newbie', but would give me an overview of the system (this might be too
> much to ask though...).

Great! If you've got any questions, this list is the place to ask.
The tree is organized into areas for each "layer" of our application.
If you've got AbiWord up and running (through the binary packages or
a source build), point it at the file AbiWord_SourceOverview.abw
(found in abi/docs/ or at
http://www.abisource.com/lxr/source/abi/docs/AbiWord_SourceOverview.abw),
which gives an overview of our source tree.

> If they /do/ require replacement I'd be happy to trawl through fixing them,
> if someone points me in the direction of where should the new ANSI-compliant
> replacement functions should go [that's where the actual code for the
> srtcasecmp replacement etc. functions should go - i.e. a utility file - not
> where they should be used, I can find that myself], and the naming
> conventions I should use.

In our source tree, we have the abi/src/af/ut branch, which houses
"utility" code, for use by all levels of the AbiSuite code. In that
directory are ut_string.h and ut_string.cpp. The spirit of this collection
is to insulate AbiWord code from common string-handling routine differences
on each of our platforms.

There is certainly value in using the same string functions wherever we
can in our tree. If you'd like to start on work to unify the string
functions, I'd recommend you work out some "ut" functions to do this
work, and convert the calls to things like stricmp and strcasecmp to
this new "ut_stricmp" (or whatever it's called).

The implementation of these UT functions should aim at correctness first
and speed second; these string functions are called a LOT in a word
processor. If we can find a way to #define these implementations to
standard C library implementations (instead of calling them from our
own functions), we'll gain on speed.

-- 
Shaw Terwilliger



This archive was generated by hypermail 2b25 : Thu Jan 20 2000 - 14:47:46 CST