Index: anchor.c
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/anchor.c,v
retrieving revision 1.57
diff -a -u -r1.57 anchor.c
--- anchor.c	29 Dec 2003 20:44:18 -0000	1.57
+++ anchor.c	20 Jan 2004 12:59:35 -0000
@@ -58,6 +58,8 @@
     UInt16          image;              /* The image to link to */
     Int16           paragraphOffset;    /* The offset to named anchor
                                            paragraph */
+    Int16           characterOffset;    /* The character offset to the
+                                           character-offset anchor */
     AnchorStateType state;
     Int16           anchorId;
     Boolean         underline;
@@ -84,7 +86,9 @@
 static Boolean AnchorInViewport(AnchorType *anchor) ANCHOR_SECTION;
 static void AnchorCreate(const TextContext *tContext,
                 const UInt16 reference, const UInt16 image,
-                const Int16 offset, const Int16 anchorId) ANCHOR_SECTION;
+                const Int16 paragraphOffset, 
+                const Int16 characterOffset,
+                const Int16 anchorId) ANCHOR_SECTION;
 
 
 /* initialize new list of anchors */
@@ -149,7 +153,8 @@
     const TextContext*  tContext,   /* pointer to text context */
     const UInt16        reference,  /* record reference */
     const UInt16        image,      /* image reference */
-    const Int16         offset,     /* offset to first paragraph */
+    const Int16         paragraphOffset, /* offset to first paragraph */
+    const Int16         characterOffset, /* character offset */
     const Int16         anchorId    /* unique ID for anchor */
     )
 {
@@ -166,7 +171,8 @@
     anchor->anchorId            = anchorId;
     anchor->reference           = reference;
     anchor->image               = image;
-    anchor->paragraphOffset     = offset;
+    anchor->paragraphOffset     = paragraphOffset;
+    anchor->characterOffset     = characterOffset;
     anchor->underline           = true;
     anchor->state               = ANCHOR_LIMBO;
 
@@ -181,13 +187,15 @@
     (
     const TextContext* tContext,    /* pointer to text context */
     const UInt16 reference,         /* record reference */
-    const Int16 offset              /* offset to first paragraph */
+    const Int16 paragraphOffset,    /* offset to first paragraph */
+    const Int16 characterOffset     /* character offset */
     )
 {
     if ( ! DO_ANCHORS( tContext->writeMode ) )
         return;
 
-    AnchorCreate( tContext, reference, NO_IMAGE, offset, anchorId++ );
+    AnchorCreate( tContext, reference, NO_IMAGE, paragraphOffset, 
+        characterOffset, anchorId++ );
 }
 
 
@@ -207,7 +215,8 @@
         lastAnchor = ListLast( anchorList );
 
         AnchorCreate( tContext, lastAnchor->reference, lastAnchor->image,
-            lastAnchor->paragraphOffset, lastAnchor->anchorId );
+            lastAnchor->paragraphOffset, lastAnchor->characterOffset,
+            lastAnchor->anchorId );
     }
 }

@@ -247,7 +256,8 @@
         lastAnchor = ListLast( anchorList );
 
         AnchorCreate( tContext, lastAnchor->reference, image,
-            lastAnchor->paragraphOffset, lastAnchor->anchorId );
+            lastAnchor->paragraphOffset, lastAnchor->characterOffset,
+            lastAnchor->anchorId );
     }
 }
 
@@ -401,8 +411,8 @@
 
 
 
-/* Return the offset of a visible anchor */
-Int16 GetVisibleOffset
+/* Return the paragraph offset of a visible anchor */
+Int16 GetVisibleParagraphOffset
     (
     const Int16 index   /* index of visible anchor */
     )
@@ -416,6 +426,21 @@
 
 

+/* Return the character offset of a visible anchor */
+Int16 GetVisibleCharacterOffset
+    (
+    const Int16 index   /* index of visible anchor */
+    )
+{
+    AnchorType* anchor;
+
+    anchor = ListGet( anchorList, index );
+
+    return anchor->characterOffset;
+}
+
+
+
 /* Return the image reference for a visible anchor */
 UInt16 GetVisibleImage
     (
Index: anchor.h
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/anchor.h,v
retrieving revision 1.29
diff -a -u -r1.29 anchor.h
--- anchor.h	12 Jul 2003 14:57:02 -0000	1.29
+++ anchor.h	20 Jan 2004 12:59:35 -0000
@@ -45,7 +45,10 @@
 extern UInt16 GetVisibleImage(const Int16 index) ANCHOR_SECTION;
 
 /* Return the paragraph offset of a visible anchor */
-extern Int16 GetVisibleOffset(const Int16 index) ANCHOR_SECTION;
+extern Int16 GetVisibleParagraphOffset(const Int16 index) ANCHOR_SECTION;
+
+/* Return the paragraph offset of a visible anchor */
+extern Int16 GetVisibleCharacterOffset(const Int16 index) ANCHOR_SECTION;
 
 /* Return the reference of a visible anchor */
 extern UInt16 GetVisibleReference(const Int16 index) ANCHOR_SECTION;
@@ -75,7 +78,8 @@
 /* Initialize a new visible anchor */
 extern void AnchorStart(const TextContext *tContext,
                         const UInt16 reference,
-                        const Int16 offset) ANCHOR_SECTION;
+                        const Int16 paragraphOffset,
+                        const Int16 characterOfset) ANCHOR_SECTION;
 
 /* Mark the end of a visible anchor */
 extern void AnchorStop(const TextContext *tContext,
Index: control.c
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/control.c,v
retrieving revision 1.124
diff -a -u -r1.124 control.c
--- control.c	10 Jan 2004 17:11:35 -0000	1.124
+++ control.c	20 Jan 2004 12:59:43 -0000
@@ -483,12 +483,14 @@
     if ( 0 < control ) {
         Int16   anchorIndex;
         UInt16  reference;
-        Int16   offset;
+        Int16   pOffset;
+        Int16   cOffset;
         UInt16  image;
 
         anchorIndex = control - 1;
         reference   = GetVisibleReference( anchorIndex );
-        offset      = GetVisibleOffset( anchorIndex );
+        pOffset     = GetVisibleParagraphOffset( anchorIndex );
+        cOffset     = GetVisibleCharacterOffset( anchorIndex );
         image       = GetVisibleImage( anchorIndex );
 
         SndPlaySystemSound( sndClick );
@@ -524,7 +526,7 @@
                 reference = image;
             }
         }
-        JumpToRecord( reference, offset, NO_OFFSET );
+        JumpToRecord( reference, pOffset, cOffset );
 
         return;
     }
Index: paragraph.c
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/paragraph.c,v
retrieving revision 1.151
diff -a -u -r1.151 paragraph.c
--- paragraph.c	16 Jan 2004 16:08:17 -0000	1.151
+++ paragraph.c	20 Jan 2004 13:00:07 -0000
@@ -188,6 +188,8 @@
                         TextContext* tContext, Int16* width ) PARAGRAPH_SECTION;
 static FunctionType DoNamedAnchor( ParagraphContext* pContext,
                         TextContext* tContext, Int16* width ) PARAGRAPH_SECTION;
+static FunctionType DoExactAnchor( ParagraphContext* pContext,
+                        TextContext* tContext, Int16* width ) PARAGRAPH_SECTION;
 static FunctionType DoAnchorEnd( ParagraphContext* pContext,
                         TextContext* tContext, Int16* width ) PARAGRAPH_SECTION;
 static FunctionType DoSetStyle( ParagraphContext* pContext,
@@ -286,7 +288,8 @@
     { 0x78, DoStrikeEnd },
     { 0x83, DoUnicode16 },
     { 0x85, DoUnicode32 },
-    { 0x92, DoTable }
+    { 0x92, DoTable },
+    { 0x9C, DoExactAnchor }
 };
 
 /* variables for link list*/
@@ -1153,7 +1156,7 @@
         functionArgs    = pContext->function + 1;
         reference       = *functionArgs * 256 + *( functionArgs + 1 );
 
-        AnchorStart( tContext, reference, TOP_OFFSET );
+        AnchorStart( tContext, reference, TOP_OFFSET, NO_OFFSET );
         ForceDefaultColor( tContext, true );
     }
     return ANCHOR;
@@ -1181,7 +1184,34 @@
         reference       = *functionArgs * 256 + *( functionArgs + 1 );
         paragraphOffset = *( functionArgs + 2 ) * 256 + *( functionArgs + 3 );
 
-        AnchorStart( tContext, reference, paragraphOffset );
+        AnchorStart( tContext, reference, paragraphOffset, NO_OFFSET );
+        ForceDefaultColor( tContext, true );
+    }
+    return ANCHOR;
+}
+
+
+/* Handle exact position anchor */
+static FunctionType DoExactAnchor
+    (
+    ParagraphContext*   pContext,
+    TextContext*        tContext,
+    Int16*              width
+    )
+{
+    if ( tContext != NULL ) {
+        UInt8*  functionArgs;
+        UInt16  reference;
+        Int16   characterOffset;
+
+        tContext->activeAnchor  = true;
+        multiline.Anchor        = true;
+
+        functionArgs    = pContext->function + 1;
+        reference       = *functionArgs * 256 + *( functionArgs + 1 );
+        characterOffset = *( functionArgs + 2 ) * 256 + *( functionArgs + 3 );
+
+        AnchorStart( tContext, reference, NO_OFFSET, characterOffset );
         ForceDefaultColor( tContext, true );
     }
     return ANCHOR;
@@ -1236,7 +1266,7 @@
     }
     else {
         /* draw inlined image that links to the alternate image */
-        AnchorStart( tContext, alternateImage, TOP_OFFSET );
+        AnchorStart( tContext, alternateImage, TOP_OFFSET, NO_OFFSET );
         DrawInlineImage( inlinedImage, tContext, width );
         AnchorStopImage( tContext, pContext->fontHeight, *width );
         AnchorStop( tContext, pContext->fontHeight );
@@ -2837,7 +2867,7 @@
         functionArgs    = pContext->function + 1;
         reference       = *functionArgs * 256 + *( functionArgs + 1 );
 
-        AnchorStart( tContext, reference, TOP_OFFSET );
+        AnchorStart( tContext, reference, TOP_OFFSET, NO_OFFSET );
         if ( InsideCopyRegion( tContext ) )
             refNo = FindLink( reference );
         else
Index: table.c
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/table.c,v
retrieving revision 1.49
diff -a -u -r1.49 table.c
--- table.c	9 Jan 2004 19:15:01 -0000	1.49
+++ table.c	20 Jan 2004 13:00:17 -0000
@@ -385,7 +385,8 @@
                                 ListAppend( tableAnchorList, tableAnchor );
                             }
                         } else {
-                            AnchorStart( &tContext, reference, NO_OFFSET );
+                            AnchorStart( &tContext, reference, NO_OFFSET, 
+                                NO_OFFSET );
                             tContext.cursorX = x + width;
                             tContext.cursorY = y + height;
                             AnchorStop( &tContext, height );
@@ -509,7 +510,7 @@
                 ListAppend( tableAnchorList, tableAnchor );
             }
         } else {
-            AnchorStart( &tContext, reference, TOP_OFFSET );
+            AnchorStart( &tContext, reference, TOP_OFFSET, NO_OFFSET );
             tContext.cursorX = x + width;
             tContext.cursorY = y + height;
             AnchorStop( &tContext, height );
@@ -1405,7 +1406,8 @@
             if ( anchorBounds.extent.x && anchorBounds.extent.y ) {
                 tContext.cursorX = anchorBounds.topLeft.x - x;
                 tContext.cursorY = anchorBounds.topLeft.y - y;
-                AnchorStart( &tContext, tableAnchor->reference, TOP_OFFSET );
+                AnchorStart( &tContext, tableAnchor->reference, TOP_OFFSET, 
+                    NO_OFFSET );
                 tContext.cursorX = tContext.cursorX + anchorBounds.extent.x;
                 tContext.cursorY = tContext.cursorY + anchorBounds.extent.y;
                 AnchorStop( &tContext, anchorBounds.extent.y );

