Keywords: xcoral

Next: save_file Up: Buffers and files Previous: Buffers and files

### read_file

`int read_file(char * filename)`

Changes the current buffer to the file associated to filename like the Read File menu entry, except that if the current buffer is not saved, its contents is lost (see current_buffer_is_modified() §7.3.8 page ). Returns 0 if there is no file matching filename and `-1` if the file is already loaded in an other buffer of the current session, leaving the buffer unchanged. Otherwise returns 1 and loads filename in the current buffer. The current position becomes the beginning of buffer.