summaryrefslogtreecommitdiff
path: root/usr.bin/mg/fileio.c
AgeCommit message (Expand)Author
2023-08-11Replace use of the old BSD st_*timespec members in struct stat withPhilip Guenther
2023-03-30don't access(conffile)Omar Polo
2023-03-30strncpy -> strlcpy to properly NUL-terminate the copy of the pathOmar Polo
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
2021-03-01Put the hardcoded '\n' character which is found throughout mg into aMark Lumsden
2021-02-23Allow the user to specify a path to the mg startup file on the command line.Mark Lumsden
2019-06-22This diff moves the check for a newline at the end of a buffer (whenMark Lumsden
2018-04-13mg tries to write backups to the wrong directory when run under aFlorian Obser
2017-05-30fix -Wshadow warnings.Florian Obser
2016-07-28strncmp is a more reasonable way to check the beginning of a string.Ted Unangst
2016-07-28these programs probably do not need to use TMPDIR. ok florianTed Unangst
2016-07-04Use fstatat() instead of crafting a filename to use with stat()Philip Guenther
2016-01-26ensure the backup file has the same mtime as the original file, this is in lineJasper Lievisse Adriaanse
2015-03-19Clean up the includes in mg.Brian Callahan
2014-11-16Stop using <sys/param.h>; replace MAXPATHLEN with PATH_MAX, stop using MAX(),Philip Guenther
2014-03-20Add some missing dobeeps.Mark Lumsden
2013-05-18and and -> andlum
2012-11-27- move prototype of expandtilder() to def.h; needed by an upcoming diff.Jasper Lievisse Adriaanse
2012-07-10Fix an outstanding debian bug: #658539lum
2012-06-18- add a pathnames.hJasper Lievisse Adriaanse
2012-06-15Fixes a problem where if you try to open a file that doesn't exist and haslum
2012-06-14Allow mg to save backup files to a users home directory.lum
2012-06-11Change error message to reflect the correct filename: nname is 'Newlum
2012-05-25Remove static FILE pointer used for handling files in fileio.c. Passlum
2012-05-23Change how mg handles files beginning with a '~'.lum
2012-04-12Remove the conditional directives NO_MACRO and NO_STARTUP.lum
2012-03-28Close an opendir(). From Igor Zinovik.lum
2011-08-31On a file write fail:lum
2011-01-21It volates style(9), but in mg, #include"def.h" goes first. 'twas the way it ...Kjell Wooding
2011-01-21Change len+memcmp check to a strncmp for prefix testing onKjell Wooding
2008-09-15Enable dirty buffer detection in mg.Kjell Wooding
2007-11-27typos; ok jmc@Martynas Venckus
2006-12-24Fix a bug where inserting a file resulted in an incorrectKjell Wooding
2006-11-19spacingTheo de Raadt
2006-09-19Use S_IS* macros insted of masking with S_IF* flags. The latter mayOtto Moerbeek
2006-07-25Rename the header line of a buffer to b_headp, from the remarkablyKjell Wooding
2006-06-29- use <dirent.h> not <sys/dir.h> (this appeases FreeBSD's annoying #warning)Jason Wright
2006-06-01fix styleKjell Wooding
2006-06-01make // /~ path rewriting optional in adjustname() and use it everywhereJason Wright
2006-05-03correct one more commentKjell Wooding
2006-05-03Do some KNF, clean up some unused junk that has lying around for 40-oddKjell Wooding
2006-05-03len = strlen(foo); if foo[len - 1]... will do bad things if len == 0.Kjell Wooding
2006-04-03lint love; ok kjellTheo de Raadt
2006-04-02test char against '\0', not 0Kjell Wooding
2005-12-20Clean up the ugly casted frees. In one case, this meant eliminating a nastyKjell Wooding
2005-12-20Do some delinting of strl-type functions. Also, remove a superfluousKjell Wooding
2005-12-13do some silly de-lintingKjell Wooding
2005-11-20#ifdef NO_DIR can go too. From Han Boetes.Kjell Wooding
2005-11-20Kill the NO_BACKUP #ifdefKjell Wooding
2005-11-20toast NO_DIRED #ifdef; ok kjellTheo de Raadt