summaryrefslogtreecommitdiff
path: root/src/fileio.c
Commit message (Collapse)AuthorAgeFilesLines
* (Finsert_file_contents): Do call signal_after_changeRichard M. Stallman1997-04-111-2/+7
| | | | | | when REPLACE is handled by reading directly from the file. Use insert_1 to insert replacement text, to avoid query about whether to modify the buffer.
* (Fcopy_file): Fix error message.Richard M. Stallman1997-04-021-1/+1
|
* (Finsert_file_contents): Handle non-regular files.Richard M. Stallman1997-04-021-19/+47
|
* (Finsert_file_contents): When handling REPLACE,Richard M. Stallman1997-04-021-55/+77
| | | | | first try comparing block by block; if we discover a need for nontrivial code conversion, give up and try convert-whole-file method.
* (Finsert_file_contents): Determine the character codingRichard M. Stallman1997-04-011-35/+198
| | | | | | | before we see if REPLACE can be handled. Do handle REPLACE even if code conversion is needed. (Fcopy_file): Fix previous change.
* (Fcopy_file): Use Qfile_date_error if can't set file date.Richard M. Stallman1997-04-011-2/+12
| | | | | (Qfile_date_error): New variable. (syms_of_fileio): Set it up.
* (Finsert_file_contents, Fwrite_region): Do not performKenichi Handa1997-02-271-2/+4
| | | | character code conversion if enable-multibyte-characters is nil.
* Include charset.h and coding.h.Karl Heuer1997-02-221-54/+234
| | | | | | | | | | | | | | | | (READ_BUF_SIZE): New macro. (Finsert_file_contents): Refer to a coding system in the docstring. Perform character code conversion of a text read in. (Fwrite_region): Refer to a coding system in the docstring. Setup a coding system for character code conversion. Pass a new arg `pre_write_conversion' (Lisp function) to build_annotations. Pass a new arg `coding' to a_write. (build_annotations): Handle the new arg. (a_write): Handle the new arg `coding' by passing it to e_write. (WRITE_BUF_SIZE): New macro. (e_write): Perform character code conversion of a text to write out according to the new arg `coding'.
* Fix previous change.Richard M. Stallman1996-12-161-1/+4
|
* (Finsert_file_contents): Handle BEG and END non-nilRichard M. Stallman1996-12-161-6/+11
| | | | when REPLACE is non-nil.
* (Fwrite_region): Be careful not to destroy contents ofRichard M. Stallman1996-12-111-1/+1
| | | | existing file when appending.
* (Fread_file_name_internal): Verify STRING is a string.Richard M. Stallman1996-12-091-2/+4
| | | | (Fread_file_name): Don't insert DIR or INITIAL if it isn't a string.
* (USG5 or BSD_SYSTEM or LINUX): Include fcntl.h.Richard M. Stallman1996-11-071-1/+22
| | | | | (Ffile_readable_p): Return immediately if stat fails. Call S_ISFIFO correctly.
* (Fexpand_file_name): No longer discard .../ before another / or ~.Richard M. Stallman1996-10-261-23/+0
| | | | That is now only in Fsubstitute_in_file_name.
* (Vuser_login_name): Declared extern.Richard M. Stallman1996-09-251-2/+12
| | | | | | (minibuf_level): extern decl moved to top level. (Fwrite_region): Query before writing to a file that is locked, even if it is locked by the same user.
* (syms_of_fileio): staticpro Qset_visited_file_modtime.Erik Naggum1996-09-171-0/+1
|
* Change all references from point to PT.Karl Heuer1996-09-111-7/+7
|
* (Faccess_file): New function.Richard M. Stallman1996-09-101-3/+33
| | | | | (Qaccess_file): New variable. (syms_of_fileio): defsubr function; init and staticpro Qaccess_file.
* (build_annotations): Remember original buffer that theRichard M. Stallman1996-09-011-1/+5
| | | | region came from; pass this to `format-annotate-function'.
* (check_writable): Use euidaccess, not eaccess.Karl Heuer1996-07-201-2/+2
|
* (Fcopy_file): Use st_ino under DJGPP v2 and later toKarl Heuer1996-07-071-4/+4
| | | | | | | prevent copying file into itself. (check_executable): DJGPP v2 `stat' doesn't need to be augmented in case of executable files. (Ffile_modes): Use `stat' results as is in DJGPP v2 and later.
* (DRIVE_LETTER) [WINDOWSNT]: Lower-case drive letters.Miles Bader1996-07-071-6/+4
|
* (DRIVE_LETTER) [MSDOS]: Lower-case drive letters.Miles Bader1996-07-021-1/+4
|
* (check_executable): Use euidaccess, not eaccess.Richard M. Stallman1996-06-281-2/+2
|
* (Fexpand_file_name): When simplifying /foo/.., keep the initial slash.Richard M. Stallman1996-06-131-0/+2
|
* (Ffile_name_directory) [WINDOWSNT]: Remove previousRichard M. Stallman1996-06-061-6/+0
| | | | change, which was incorrect and isn't strictly required.
* (DRIVE_LETTER): [DOS_NT] New macro.Richard M. Stallman1996-06-031-3/+6
| | | | (expand_file_name): Apply DRIVE_LETTER macro to drive names.
* (Fexpand_file_name) [WINDOWSNT]: Don't strip trailing /Richard M. Stallman1996-06-011-2/+13
| | | | | | when newdir is just "//". (Ffile_name_directory) [WINDOWSNT]: Return Qnil if filename is a partial UNC name such as "//foo".
* (Fexpand_file_name) [DOS_NT]: Correct the `if' clauseRichard M. Stallman1996-05-011-3/+3
| | | | to compile on all platforms.
* (Fexpand_file_name) [DOS_NT]: Keep dir sep following ~Richard M. Stallman1996-04-291-7/+4
| | | | or ~user, but don't collapse the newdir prefix in that case.
* (Fexpand_file_name, Ffile_name_absolute_p): Doc fixes.Richard M. Stallman1996-04-271-233/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Ffile_exists_p, Ffile_executable_p, Ffile_readable_p) (Ffile_writable_p, Ffile_directory_p, Ffile_regular_p) (Ffile_modes, Fset_file_modes, Ffile_newer_than_file_p) (expand_and_dir_to_file): Rename abspath to absname. (CORRECT_DIR_SEPS) [DOS_NT]: New macro. (IS_DRIVE) [DOS_NT]: Added separate definitions for DOS and NT. (Ffile_name_directory) [DOS_NT]: Simplify code to match change in getdefdir in msdos.c. Ignore embedded colons. Correct dir seps. (Ffile_name_nondirectory) [DOS_NT]: Ignore embedded colons. Correct IS_ANY_SEP to IS_DIRECTORY_SEP. (file_name_as_directory) [DOS_NT]: Correct dir seps. Correct IS_ANY_SEP to IS_DIRECTORY_SEP. (directory_file_name) [DOS_NT]: Correct dir seps. (Fmake_temp_name) [DOS_NT: Correct dir seps. (Fexpand_file_name) [mostly DOS_NT]: Remove relpath, tmp and defdir variables; init drive to 0. Correctly detect when default_directory is absolute. Be strict when looking for MSDOS drive specifier; defer calling getdefdir. Ignore drive specifier if name now has UNC prefix. Correctly recognise if name is not absolute when trying simple method to expand; return original string if possible. Skip dir sep after ~ or ~user. Use getpwnam instead of HOME for ~user on NT. Handle error return from getdefdir. Correctly detect if newdir is absolute before using default_directory. Handle case where newdir is not absolute - expand relative to current working dir if necessary (instead of calling getdisk later). Only keep UNC prefix if nm starts with dir sep. Replace kludgy handling of drive spec in newdir. Correct dir seps. (Fexpand_file_name) [!DOS_NT]: Fix incorrect expansion of "/foo/../bar" -> "//bar". (Fsubstitute_in_file_name) [DOS_NT]: Correct dir seps for NT as well. Merge equivalent #ifdef APOLLO and WINDOWSNT cases. Ignore embedded colons and be strict about drive specs. (Fcopy_file) [DOS_NT]: Do dev/inode check on NT. (Ffile_name_absolute_p) [DOS_NT]: Be strict about drive specs. (check_executable) [DOS_NT]: Test st_mode on NT. (Ffile_readable_p) [DOS_NT]: Use access instead of open on NT. (Ffile_modes) [DOS_NT]: Don't embelish st_mode value on NT. (Fread_file_name) [DOS_NT]: Correct dir seps in HOME. (syms_of_fileio): Add Vdirectory_sep_char.
* (syms_of_fileio): Doc fix.Richard M. Stallman1996-04-251-2/+4
|
* [MSDOS]: If DJGPP version 2, include fcntl.h and string.h.Richard M. Stallman1996-04-101-0/+4
|
* (Frename_file) [WINDOWSNT]: Remove conditional code.Richard M. Stallman1996-03-281-10/+0
|
* (Fexpand_file_name): Fix confusion in detectingRichard M. Stallman1996-02-271-3/+8
| | | | that default_directory is already absolute so need not be expanded.
* (Fdo_auto_save): Pause before restoring old message.Karl Heuer1996-02-211-1/+4
|
* (Fmake_temp_name) [MSDOS]: Make sure there is at leastKarl Heuer1996-02-161-2/+2
| | | | | one character before the dot, in case `prefix' is only a directory name.
* (Fmake_temp_name) [MS-DOS]: Allow upto 8 characters inRichard M. Stallman1996-02-081-0/+6
| | | | the prefix of the temporary file name.
* Update FSF's address in the preamble.Erik Naggum1996-01-151-1/+2
|
* (do_auto_save_unwind): Don't close DESC if DESC < 0.Karl Heuer1996-01-091-3/+3
| | | | (Fdo_auto_save): Unconditionally set up unwind-protect.
* (Ffile_name_directory, Ffile_name_nondirectory, Ffile_name_as_directory,Erik Naggum1996-01-091-131/+131
| | | | | | | | Fdirectory_file_name, Fexpand_file_name, Fsubstitute_in_file_name, Fcopy_file, Fmake_directory_internal, Fdelete_directory, Fdelete_file, Frename_file, Fadd_name_to_file, Fdefine_logical_name, Ffile_modes, Fset_file_modes, Fset_default_file_modes, Fdo_auto_save, Fread_file_name): Harmonize arguments with documentation.
* Comment fixes.Karl Heuer1996-01-051-3/+3
|
* (Ffile_readable_p) [MSDOS]: Use access rather than open.Richard M. Stallman1995-12-311-0/+8
|
* (syms_of_fileio): Doc fix.Karl Heuer1995-12-211-1/+4
|
* (check_executable) [DOS_NT]: Treat all dirs as executable.Richard M. Stallman1995-11-141-1/+13
| | | | | (Fcopy_file): Don't chmod output file on MSDOS unless we have DJGPP version 2.
* (Fwrite_region): Move the code that writes annotations for empty files.Richard M. Stallman1995-11-101-7/+6
|
* (Finsert_file_contents): If replacing,Richard M. Stallman1995-10-141-0/+4
| | | | set selected_window->start_at_line_beg.
* (barf_or_query_if_file_exists): New arg STATPTR. Callers changed.Richard M. Stallman1995-10-011-9/+37
| | | | (Fcopy_file): Error if input and output are the same file.
* (Fmake_symbolic_link, Fadd_name_to_file):Richard M. Stallman1995-09-021-0/+14
| | | | Look for handler for the new name as well as for the target.
* (Fwrite_region): New arg lockname.Richard M. Stallman1995-08-141-11/+16
| | | | (auto_save_1): Pass new arg.