Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      Buffer Primitives
         Changing Buffer Contents
         Moving Text Between Buffers
         Getting Text from a Buffer
         Spots
         . . .
      Display Primitives
         Creating & Destroying Windows
         Window Resizing Primitives
         Preserving Window Arrangements
         . . .
         Colors
      . . .

Previous   Up    Next
Changing Buffer Contents  Primitives and EEL Subroutines   Getting Text from a Buffer


Epsilon User's Manual and Reference > Primitives and EEL Subroutines > Buffer Primitives >

Moving Text Between Buffers

xfer(char *buf, int from, int to)
buf_xfer(int bnum, int from, int to) /* buffer.e */
raw_xfer(int bnum, int from, int to)
buf_xfer_colors(int bnum, int from, int to)
grab_buffer(int bnum)       /* buffer.e */

The xfer( ) subroutine transfers characters from one buffer to another. It copies the characters between from and to in the current buffer and inserts them at point in the named buffer. It positions the mark in the named buffer just before the inserted characters, and positions its point right after the insertion. The current buffer doesn't change. The buf_xfer( ) subroutine works similarly, but accepts a buffer number instead of a name. Both use the raw_xfer( ) primitive to transfer the text.

The buf_xfer_colors( ) subroutine is like buf_xfer( ), but copies any colors set by set_character_color( ) as well.

The grab_buffer( ) subroutine copies text in the other direction. It inserts the text of buffer number bnum into the current buffer before point, setting the mark before the inserted text.



Previous   Up    Next
Changing Buffer Contents  Primitives and EEL Subroutines   Getting Text from a Buffer


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.