Change buffer contents

next up previous contents index
Next: Search and substitution Up: Functions Previous: Get buffer contents

Change buffer contents



  void delete_char();

Removes the current character, does nothing at the end of file or if the buffer is empty. Obviously the buffer number of lines is updated if the current character was newline.


    void replace_char(int newchar);

Replaces the current character by newchar. At the end of file or if the file is empty the new character is inserted at the current position and the buffer size is incremented. Obviously the number of lines of the buffer is updated if one of the current or the new character is newline. Its definition is equivalent to:


  void insert_char(int newchar);

Inserts newchar before the current character and goes to the next position, therefore the current character remains the same. Obviously the number of lines of the buffer is updated if the inserted character is newline.


  void insert_string(char * str);

Inserts all the str chars, except the final 0, as each character being inserted by insert\_char:


   int wprintf(char * format, ...);

wprintf is equivalent to printf except that the output characters are inserted in the current window starting at the current position. See also display\_message7.3.12 page gif).

See also the following functions: global\_replace(), (§7.3.5 page gif), insert\_file()7.3.8 page gif), read\_file()7.3.8 page gif) and kill\_current\_buffer()7.3.8 page gif).

Lionel Fournigault
Mon Mar 6 13:33:34 MET 1995