More modular way to open messages. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
return isn't a function FFS Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Only use fcntl, simplify locking. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Fix compilation issues. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Remove the time module alltogether. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Have a lib-ui/lib-ui.h Signed-off-by: Pierre Habouzit <madcoder@debian.org>
rename a bunch of modules Signed-off-by: Pierre Habouzit <madcoder@debian.org>
style. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
remove antiquated cruft: please, who use MMDF's nowadays ?! Signed-off-by: Pierre Habouzit <madcoder@debian.org>
push username, homedir and tmpdir in lua too. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
more hash code simplifications.
Use better error msgs for tempfile Signed-off-by: Julien Danjou <julien@danjou.info> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
fclose -> m_fclose Signed-off-by: Pierre Habouzit <madcoder@debian.org>
safe_fclose -> m_fclose, and is now inlined.
remove some mutt_mktemp Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Use m_tempfile instead of mutt_mktemp Signed-off-by: Julien Danjou <julien@danjou.info> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
put old m_snsubst into file.c as m_file_fmt. implement m_temp{fd,file} functions to replace mutt_(adv_)mktemp, that work like that: m_tempFOO(dst, dstlen, tmpdir, fmt). it returns either a fd or a FILE* (check it's properly >= 0 or !NULL !!!) and put the chose name in the buffer dst of size dstlen. tmpdir is the directory where to create files. fmp is a file format, where we strip any directory part, then use the remains like that: - if there is a %s specifier, fmt is used as a simple file format specifier, and %s is substituted with a temporary file name. - if there is no %s specifier, fmt is supposed to be a file name we want to take as model, meaning we just want to copy its extension. So if you pass "foo.jpg" as a fmt, the resulting file name will end in .jpg mark mutt_(adv_)?mktemp functions as obsolete, and currently reimplement them with m_temp* functions as a proof of concept. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
create the lib-mx now Signed-off-by: Pierre Habouzit <madcoder@madism.org>