Re: your mail

2008-07-10 Thread David Laight
calls, you need to do fflush(); ferror(); fclose(). (Testing ferror() in a loop might be useful in order to abort early.) David -- David Laight: [EMAIL PROTECTED]

Re: [patch] fix a few little buglets in mutt HEAD

2008-12-16 Thread David Laight
turned h is positive. David -- David Laight: da...@l8s.co.uk

Re: purging mailboxes

2011-01-29 Thread David Laight
easy' :-) Use 'grep -n '^From ' | tail -n ' extract the line number from the first output line and use sed (or similar) to delete the first of the file. David -- David Laight: da...@l8s.co.uk

Re: [PATCH RFC] Add compiler and configure info to mutt -v output

2012-10-18 Thread David Laight
#include the file in the middle a the C initialser. 2) Arrange to pass -DTEXT="text strings" on the command line to cc. This one requires tricky quoting to get right. Probably using as: #define STR(x) #x char foo[] = STR(TEXT); will work. David -- David Laight: da...@l8s.co.uk

Re: [PATCH RFC] Add compiler and configure info to mutt -v output

2012-10-18 Thread David Laight
s ". The more you can avoid in build tools, the better. Even assuming a working awk, or some obscure grep options/variant can be a problem, never mind monsters like perl and python. David -- David Laight: da...@l8s.co.uk

Re: [PATCH RFC] Add compiler and configure info to mutt -v output

2012-10-18 Thread David Laight
On Thu, Oct 18, 2012 at 09:48:32PM +0100, David Laight wrote: > On Thu, Oct 18, 2012 at 07:06:55PM +0100, Patrick Welche wrote: > > On Thu, Oct 18, 2012 at 12:57:52PM -0500, David Champion wrote: > > > Does anyone else think this is problematic? I could redo it in C if >

Re: [PATCH RFC] Add compiler and configure info to mutt -v output

2012-10-20 Thread David Laight
in whichever order works best > 4. Require "make NATIVECC=..." when cross-compiling > > I'm good with 1 or 4. I'll entertain strong arguments for 2 or 3, > especially if you're buying, but I'm not sure either is a complete > solution. 1 and 4 are, if you accept the transference of the problem to > documented conditions for compilation. Don't add gratuitous build dependencies. David -- David Laight: da...@l8s.co.uk

Re: [PATCH 4/4] version.sh: Get detailed version info from git

2012-12-15 Thread David Laight
d and the '-' replaced with '.' [ "$1" = mutt ] && shift ver="$1" while [ $# -gt 2 ]; do [ "$1" != rel ] && ver="$ver.$1" shift done distance="$1"

Re: [Mutt] #3638: Compilation errors for 1.6

2013-04-26 Thread David Laight
cess. 3) If you give anyone write access you give everyone write access. Most of that is because the permission checks are done by the mount protocol - and then assume the client obeys the rules. (2) Requires a file handle be generated - this used to be very easy! David -- David Laight: da...@l8s.co.uk

Re: [PATCH 5/5] save attachments with a sane umask

2014-02-09 Thread David Laight
g it to be world readable, though. The 'sane' umask is the one that was set by the user before mutt was run. You certainly shouldn't allow permissions that it excluded. David -- David Laight: da...@l8s.co.uk

Re: Fix buffer overrun ...

2014-03-14 Thread David Laight
from fprintf() is probably broken anyway! David -- David Laight: da...@l8s.co.uk

Re: Fix buffer overrun ...

2014-03-14 Thread David Laight
error checking useless. True, but any error is most likely to happen during the fflush() that happens during fclose(); So if you care about errors do "fflush(); err = ferror(); fclose();" Or call ferror() at at appropriate point in a program loop to terminate early. Checking every fprintf() just makes the code unreadable. David -- David Laight: da...@l8s.co.uk

Re: [PATCH] Remove absolute paths from gpg.rc

2007-03-16 Thread David Laight
/bin]) > > I like this. Other paths to consider: > > /usr/sfw/bin Sun Freeware > /opt/sfw/bin Sun Freeware > /opt/csw/bin Blastwave > /opt/bin Common alternative to /usr/local/bin > /local/bin Ditto /usr/pkg/bin NetBSD etc David -- David Laight: [EMAIL PROTECTED]

Re: [PATCH] Add $umask for mailboxes and attachments

2007-03-16 Thread David Laight
ould, Mutt is used PRIMARILY to process > arbitrary untrusted data which comes from the Internet. In which case wouldn't 177 be better? David -- David Laight: [EMAIL PROTECTED]

Re: [PATCH] better header cache versioning

2007-04-05 Thread David Laight
say) a NetBSD system. (And neither will perl) David -- David Laight: [EMAIL PROTECTED]

Re: [PATCH] when using `which` send errors to /dev/null

2007-05-23 Thread David Laight
. Also, since the redirection of {...} will enforce a subshell (at least on some shells), requesting it explicitly by using (...) is better. Also a conformat posix shell should have a 'type' command, and 'command -v' which are builtins that report the location of programs. David -- David Laight: [EMAIL PROTECTED]

Re: Little code cleanup

2008-03-04 Thread David Laight
intain), what > source file and line number Actually these are often easier to debug is the program is allowed to take the SIGSEGV and core dump. Systems that convert segfaults to C++ exceptions make them almost impossible to debug. David -- David Laight: [EMAIL PROTECTED]

Re: Little code cleanup

2008-03-07 Thread David Laight
I did once have to fight a compiler that optimised out the check: extern int foo; if (&foo != NULL) ... David [Hint look up weak elf symbols] -- David Laight: [EMAIL PROTECTED]

Re: Little code cleanup

2008-03-08 Thread David Laight
the constant zero may be assigned to a > pointer, and a pointer may be compared with the constant zero. More particularly any compile time expression that evaluates to zero. So 'if (ptr_var == 1 - 1)' is also valid. David -- David Laight: [EMAIL PROTECTED]