commit -- Re: [patch] bugs 508 and 531

Shaw Terwilliger (
Tue, 17 Aug 1999 14:35:58 -0500

Richard Jefts wrote:
> This only works for unix. It's a simple matter to fix the other platforms
> though, just take a look at the ap_UnixFrame.cpp changes and do the same
> for the others. I also modified FV_View::moveInsPtTo() so that it won't
> work unless the cursor is at the beginning of the document, which is fine
> for now (since its only called in one place), but might cause problems
> later on. Besides it makes the zoom better.

I've committed the patch, with relavent changes to the Win32 and BeOS
sides of the tree.

> Index: wp/ap/unix/ap_UnixFrame.cpp
> ===================================================================
> RCS file: /u2/cvsroot/abi/src/wp/ap/unix/ap_UnixFrame.cpp,v
> retrieving revision 1.46
> diff -r1.46 ap_UnixFrame.cpp
> 89a90
> > int point = 0;
> > [... more path deleted ... ]

There's a slight bug in this patch, which I fixed in the committed code.
FV_View->getPoint() returns a point in the form of a UT_uint32, our
special type for a 32-bit int. Using C's "int" might throw off some
compilers depending on what UT_uint32 is typed to mean there. Some
other compilers might complain about types not matching, if strong
type checking is enabled (maybe GCC 2.95, for example).

Try to always use the returned type from functions that are
prototyped to return specific types, sometimes our data structures
depend on having a specific number of bits available for storage.

Shaw Terwilliger

This archive was generated by hypermail 1.03b2.