apps/madmutt.git
17 years agosmall oopsies in the cpgk2c generator.
Pierre Habouzit [Mon, 26 Mar 2007 22:30:51 +0000 (00:30 +0200)]
small oopsies in the cpgk2c generator.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosmall fix in Makefile
Pierre Habouzit [Mon, 26 Mar 2007 22:20:05 +0000 (00:20 +0200)]
small fix in Makefile

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoupdate source to use our brand new source generator. Update automakes.
Pierre Habouzit [Mon, 26 Mar 2007 22:14:30 +0000 (00:14 +0200)]
update source to use our brand new source generator. Update automakes.

Yes the current state of affairs is completely hacky, using unbearable hacks
in tools/Makefile, I f***ing don't care, it works (for now).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agocosmetics.
Pierre Habouzit [Mon, 26 Mar 2007 21:40:26 +0000 (23:40 +0200)]
cosmetics.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoFinish the caml lua<->C bindings generator.
Pierre Habouzit [Mon, 26 Mar 2007 21:37:55 +0000 (23:37 +0200)]
Finish the caml lua<->C bindings generator.

Surprisingly enough, it works, don't look at the code, it hurts.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoUse proper tools when we want to do powerful things.
Pierre Habouzit [Sun, 25 Mar 2007 23:02:04 +0000 (01:02 +0200)]
Use proper tools when we want to do powerful things.

  * exit perl the dumbass. Have a bindings ocaml(lex) generator. Distributed
    tarballs will contain the generated files so that having ocaml is not
    absolutely required.

  * for now on, guess how to compile it...
    (hint: ocamllex cpkg2c.mll; ocamlopt -o cpkg2c str.cmxa cpkg2c.ml)

There has been many improvements wrt the old perl thing, so it won't work on
current cpkg files yet.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agodrop old code.
Pierre Habouzit [Tue, 20 Mar 2007 07:44:45 +0000 (08:44 +0100)]
drop old code.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomake luaM_checkquadopt accept some string arguments. ("yes", "no", "ask-yes", "ask...
Pierre Habouzit [Sun, 18 Mar 2007 23:50:30 +0000 (00:50 +0100)]
make luaM_checkquadopt accept some string arguments. ("yes", "no", "ask-yes", "ask-no")

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomake it build
Pierre Habouzit [Sun, 18 Mar 2007 23:29:55 +0000 (00:29 +0100)]
make it build

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomissing dependency on the lib-sys.
Pierre Habouzit [Sun, 18 Mar 2007 23:19:31 +0000 (00:19 +0100)]
missing dependency on the lib-sys.
Hall of Shame in mutt_gecos_name.

17 years agomake lua packages interfaces be *.li.
Pierre Habouzit [Sun, 18 Mar 2007 23:06:53 +0000 (00:06 +0100)]
make lua packages interfaces be *.li.
make our lua packages support regexps, needed some bindings enhancements.

fixes fixes fixes

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agorx enhancements.
Pierre Habouzit [Sun, 18 Mar 2007 23:05:46 +0000 (00:05 +0100)]
rx enhancements.

17 years agomake Alias be a module as well.
Pierre Habouzit [Sun, 18 Mar 2007 21:53:59 +0000 (22:53 +0100)]
make Alias be a module as well.

update luapkg2c to deal with "static" modules.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoallow the [cd]tor to take $L as an arcument as well
Pierre Habouzit [Sun, 18 Mar 2007 16:41:15 +0000 (17:41 +0100)]
allow the [cd]tor to take $L as an arcument as well

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agolua bindings: add ctor/dtor.
Pierre Habouzit [Sun, 18 Mar 2007 16:36:35 +0000 (17:36 +0100)]
lua bindings: add ctor/dtor.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agopush username, homedir and tmpdir in lua too.
Pierre Habouzit [Sun, 18 Mar 2007 14:08:54 +0000 (15:08 +0100)]
push username, homedir and tmpdir in lua too.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosplit ml_core into MCore and MTransport modules.
Pierre Habouzit [Sun, 18 Mar 2007 13:41:28 +0000 (14:41 +0100)]
split ml_core into MCore and MTransport modules.

move more settings to MTransport

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoLua improvements:
Pierre Habouzit [Sun, 18 Mar 2007 13:15:15 +0000 (14:15 +0100)]
Lua improvements:

  * remove old lib-lua cruft.
  * make luapkg2c support bool type.
  * make luapkg2c support C bit-fields.
  * import beep{,_new}, and hcache_backend.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofix build-system wrt lua things.
Pierre Habouzit [Sun, 18 Mar 2007 12:26:10 +0000 (13:26 +0100)]
fix build-system wrt lua things.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agonew lua implementation.
Pierre Habouzit [Sun, 18 Mar 2007 12:20:06 +0000 (13:20 +0100)]
new lua implementation.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomore hash code simplifications.
Pierre Habouzit [Wed, 14 Mar 2007 00:15:21 +0000 (01:15 +0100)]
more hash code simplifications.

17 years agosimplify hashes.
Pierre Habouzit [Tue, 13 Mar 2007 23:46:38 +0000 (00:46 +0100)]
simplify hashes.

17 years agocomments
Pierre Habouzit [Mon, 12 Mar 2007 01:10:08 +0000 (02:10 +0100)]
comments

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agostylish updates.
Pierre Habouzit [Sun, 11 Mar 2007 23:23:29 +0000 (00:23 +0100)]
stylish updates.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomove OPT_QUIT into the lua registry
Pierre Habouzit [Sun, 11 Mar 2007 22:41:43 +0000 (23:41 +0100)]
move OPT_QUIT into the lua registry

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoNow deal with EDITOR from lua as well.
Pierre Habouzit [Sun, 11 Mar 2007 21:44:09 +0000 (22:44 +0100)]
Now deal with EDITOR from lua as well.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agorationalize settings into a central registry.
Pierre Habouzit [Sun, 11 Mar 2007 21:22:23 +0000 (22:22 +0100)]
rationalize settings into a central registry.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops
Pierre Habouzit [Sun, 11 Mar 2007 18:25:04 +0000 (19:25 +0100)]
oops

17 years agodeal with sendmail and dotlock in LUA.
Pierre Habouzit [Sun, 11 Mar 2007 18:22:55 +0000 (19:22 +0100)]
deal with sendmail and dotlock in LUA.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agovarious cleanups.
Pierre Habouzit [Sun, 11 Mar 2007 18:07:03 +0000 (19:07 +0100)]
various cleanups.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoDeal with $shell from lua from now on.
Pierre Habouzit [Sun, 11 Mar 2007 17:06:11 +0000 (18:06 +0100)]
Deal with $shell from lua from now on.

(also remove other cruft)

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years ago[lua] More madmutt package upgrades:
Pierre Habouzit [Sun, 11 Mar 2007 15:29:28 +0000 (16:29 +0100)]
[lua] More madmutt package upgrades:

  * make madmutt be a table where we deal with __index to only allow a few
    updates.
  * add a lua-token thing, to recognize efficiently fields we often work
    with.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agobye bye DT_SYS variables.
Pierre Habouzit [Sun, 11 Mar 2007 13:49:00 +0000 (14:49 +0100)]
bye bye DT_SYS variables.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agonow this is slightly better.
Pierre Habouzit [Sun, 11 Mar 2007 01:55:43 +0000 (02:55 +0100)]
now this is slightly better.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomissing add
Pierre Habouzit [Sat, 10 Mar 2007 01:58:45 +0000 (02:58 +0100)]
missing add

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoMove things around: more DT_SYS variables into the lua !
Pierre Habouzit [Sat, 10 Mar 2007 01:58:33 +0000 (02:58 +0100)]
Move things around: more DT_SYS variables into the lua !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoremove $user_* values, those will eventually not be needed anymore, as they will...
Pierre Habouzit [Sat, 10 Mar 2007 01:09:01 +0000 (02:09 +0100)]
remove $user_* values, those will eventually not be needed anymore, as they will be replaced by local lua variables.

Add some PoC values in the madmutt module.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoPoC support for lua.
Pierre Habouzit [Fri, 9 Mar 2007 23:29:31 +0000 (00:29 +0100)]
PoC support for lua.

just source ~/.madmutt.lua or ~/.madmutt/cfg.lua

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoadd placeholders for the liblua
Pierre Habouzit [Fri, 9 Mar 2007 21:42:18 +0000 (22:42 +0100)]
add placeholders for the liblua

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoavoid stupid conflicts with core libraries due to too common names for our libraries.
Pierre Habouzit [Fri, 9 Mar 2007 21:35:52 +0000 (22:35 +0100)]
avoid stupid conflicts with core libraries due to too common names for our libraries.

just use the full .a name on the command line.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomore cleanse
Pierre Habouzit [Fri, 9 Mar 2007 20:29:07 +0000 (21:29 +0100)]
more cleanse

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agolua is the way to go. drop the lemon things.
Pierre Habouzit [Fri, 9 Mar 2007 20:21:05 +0000 (21:21 +0100)]
lua is the way to go. drop the lemon things.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofix stupid problem with encrypted gpg mails.
Pierre Habouzit [Mon, 12 Feb 2007 18:25:29 +0000 (19:25 +0100)]
fix stupid problem with encrypted gpg mails.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomode flags.
Pierre Habouzit [Mon, 8 Jan 2007 09:57:12 +0000 (10:57 +0100)]
mode flags.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosimplify hooks code a lot.
Pierre Habouzit [Tue, 2 Jan 2007 07:06:54 +0000 (08:06 +0100)]
simplify hooks code a lot.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agostupid off by one: skip the last ')' in a comment !
Pierre Habouzit [Tue, 2 Jan 2007 06:45:52 +0000 (07:45 +0100)]
stupid off by one: skip the last ')' in a comment !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofixes and simplifications to fix gpg regression.
Pierre Habouzit [Tue, 2 Jan 2007 06:42:57 +0000 (07:42 +0100)]
fixes and simplifications to fix gpg regression.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoThe little Christmas candy bar: allow utf-8 chars in Tochars \o/
Pierre Habouzit [Wed, 27 Dec 2006 21:50:52 +0000 (22:50 +0100)]
The little Christmas candy bar: allow utf-8 chars in Tochars \o/

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoimprovements, fixes, parser progress, ...
Pierre Habouzit [Wed, 27 Dec 2006 18:57:10 +0000 (19:57 +0100)]
improvements, fixes, parser progress, ...
ongoing work.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoadd some very efficient utf8 routines. more to come.
Pierre Habouzit [Wed, 27 Dec 2006 08:21:20 +0000 (09:21 +0100)]
add some very efficient utf8 routines. more to come.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofix compilation warnings in hook.c
Pierre Habouzit [Mon, 25 Dec 2006 12:08:43 +0000 (13:08 +0100)]
fix compilation warnings in hook.c

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosimplifications
Pierre Habouzit [Mon, 18 Dec 2006 18:40:44 +0000 (19:40 +0100)]
simplifications

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosimplifications
Pierre Habouzit [Mon, 18 Dec 2006 18:31:06 +0000 (19:31 +0100)]
simplifications

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosimplifications
Pierre Habouzit [Mon, 18 Dec 2006 18:12:03 +0000 (19:12 +0100)]
simplifications

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agowibble
Pierre Habouzit [Mon, 18 Dec 2006 17:49:40 +0000 (18:49 +0100)]
wibble

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agouse some lists for score_t.
Pierre Habouzit [Mon, 18 Dec 2006 17:39:19 +0000 (18:39 +0100)]
use some lists for score_t.
remove some list last/ptr nonsense, rather use correct double pointers.
fix a memory leak in the score_t handling (yes, destructors are good ;)

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoReally check for fd
Julien Danjou [Thu, 14 Dec 2006 10:46:47 +0000 (11:46 +0100)]
Really check for fd

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agostyle.
Pierre Habouzit [Thu, 14 Dec 2006 10:53:18 +0000 (11:53 +0100)]
style.
support ` tokens also, but needs to be better integrated.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops debug code.
Pierre Habouzit [Thu, 14 Dec 2006 00:07:09 +0000 (01:07 +0100)]
oops debug code.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoimplement $-vars substitution.
Pierre Habouzit [Thu, 14 Dec 2006 00:05:54 +0000 (01:05 +0100)]
implement $-vars substitution.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofixes bad semantics (an invalid fd is -1 not 0).
Pierre Habouzit [Wed, 13 Dec 2006 19:05:25 +0000 (20:05 +0100)]
fixes bad semantics (an invalid fd is -1 not 0).
fix uninitialized variables.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoUse m_tempfile instead of mktemp in attach/recvattach
Julien Danjou [Wed, 13 Dec 2006 17:36:01 +0000 (18:36 +0100)]
Use m_tempfile instead of mktemp in attach/recvattach

This means we open temporary file before calling mutt_pipe_attach()

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoUse m_temp instead of mutt_mktemp in compress code
Julien Danjou [Wed, 13 Dec 2006 17:01:45 +0000 (18:01 +0100)]
Use m_temp instead of mutt_mktemp in compress code

This patch remove the static set_path() function which was used only twice.
in:
- mutt_open_read_compressed()
  We just create a temporary file and open it, so this is more secure
  against symlink attacks and then just call decompression cmd normaly
- mutt_open_append_compressed()
  Instead of creating the file if (cond), unlink() it if (!cond).

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosome fixes, make mutt_decode_save_attachment coherent (always closes the
Pierre Habouzit [Wed, 13 Dec 2006 13:41:49 +0000 (14:41 +0100)]
some fixes, make mutt_decode_save_attachment coherent (always closes the
fd).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoUse file descriptor instead of path for mutt_decode_save_attachment()
Julien Danjou [Wed, 13 Dec 2006 11:42:11 +0000 (12:42 +0100)]
Use file descriptor instead of path for mutt_decode_save_attachment()

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoMerge branch 'master' of pan:/git/madmutt
Pierre Habouzit [Mon, 11 Dec 2006 09:05:31 +0000 (10:05 +0100)]
Merge branch 'master' of pan:/git/madmutt

17 years agorc parser progress over the week-end.
Pierre Habouzit [Mon, 11 Dec 2006 09:05:23 +0000 (10:05 +0100)]
rc parser progress over the week-end.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofix makefile.am dependencies... got I hate automake.
Pierre Habouzit [Mon, 11 Dec 2006 09:04:14 +0000 (10:04 +0100)]
fix makefile.am dependencies... got I hate automake.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agovarious fixes.
Pierre Habouzit [Sun, 10 Dec 2006 22:17:23 +0000 (23:17 +0100)]
various fixes.
add *_list_rev function.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agovery temporary work on the new generation of config parser.
Pierre Habouzit [Sat, 9 Dec 2006 13:38:22 +0000 (14:38 +0100)]
very temporary work on the new generation of config parser.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoimport lemon in the source tree.
Pierre Habouzit [Sat, 9 Dec 2006 13:34:19 +0000 (14:34 +0100)]
import lemon in the source tree.

17 years agopreliminary work for the configuration parser.
Pierre Habouzit [Sat, 9 Dec 2006 00:48:25 +0000 (01:48 +0100)]
preliminary work for the configuration parser.

17 years agodo not make semicolons special in the config file anymore.
Pierre Habouzit [Wed, 6 Dec 2006 09:14:35 +0000 (10:14 +0100)]
do not make semicolons special in the config file anymore.
update documentation wrt that.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosmall regressions.
Pierre Habouzit [Mon, 4 Dec 2006 08:34:17 +0000 (09:34 +0100)]
small regressions.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomore strings simplifications.
Pierre Habouzit [Mon, 4 Dec 2006 00:18:21 +0000 (01:18 +0100)]
more strings simplifications.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoimpressive how mutt upstream don't get how list work.
Pierre Habouzit [Mon, 4 Dec 2006 00:03:58 +0000 (01:03 +0100)]
impressive how mutt upstream don't get how list work.
simplify lots of code, more to come.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agodrop some useless crap.
Pierre Habouzit [Sun, 3 Dec 2006 23:33:49 +0000 (00:33 +0100)]
drop some useless crap.
ifdef/ifndef is good but in fact used for wrong reasons. We should always
accept all the settings mutt-ng knows about, even if the features are not
here. full stop.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoyes, we always have colors, screw stupid antiquated ncurses.
Pierre Habouzit [Sun, 3 Dec 2006 23:18:13 +0000 (00:18 +0100)]
yes, we always have colors, screw stupid antiquated ncurses.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agocosmetics
Pierre Habouzit [Sun, 3 Dec 2006 22:45:26 +0000 (23:45 +0100)]
cosmetics

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooopsie, sometimes grep hurts :P
Pierre Habouzit [Sun, 3 Dec 2006 21:00:24 +0000 (22:00 +0100)]
oopsie, sometimes grep hurts :P

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agocode simplifications.
Pierre Habouzit [Sun, 3 Dec 2006 20:56:23 +0000 (21:56 +0100)]
code simplifications.
fix IMAP regression.
use a lot more mime_which_token

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops, d can be NULL !
Pierre Habouzit [Sun, 3 Dec 2006 19:29:09 +0000 (20:29 +0100)]
oops, d can be NULL !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops, I did it again: simplify a lot of code :]
Pierre Habouzit [Sun, 3 Dec 2006 15:41:30 +0000 (16:41 +0100)]
oops, I did it again: simplify a lot of code :]

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoUse p_new instead of xmalloc()
Julien Danjou [Sun, 3 Dec 2006 14:47:56 +0000 (15:47 +0100)]
Use p_new instead of xmalloc()

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosmall rewrite.
Pierre Habouzit [Sun, 3 Dec 2006 15:12:53 +0000 (16:12 +0100)]
small rewrite.
fix the 'extra space' bug in headers :]

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agosmall reorg.
Pierre Habouzit [Sun, 3 Dec 2006 14:52:26 +0000 (15:52 +0100)]
small reorg.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops :)
Pierre Habouzit [Sun, 3 Dec 2006 14:32:47 +0000 (15:32 +0100)]
oops :)

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomove some string functions in lib-lib !
Pierre Habouzit [Sun, 3 Dec 2006 14:28:10 +0000 (15:28 +0100)]
move some string functions in lib-lib !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agorework m_strformat so that it takes the cols number to use in case of
Pierre Habouzit [Sun, 3 Dec 2006 12:59:52 +0000 (13:59 +0100)]
rework m_strformat so that it takes the cols number to use in case of
right pad, rather than computing it. that makes the function suitable for
lib-lib inclusion real soon :]

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agolet m_strformat accept NULL formats.
Pierre Habouzit [Sun, 3 Dec 2006 12:13:18 +0000 (13:13 +0100)]
let m_strformat accept NULL formats.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooptimizations, remove horrors.
Pierre Habouzit [Sat, 2 Dec 2006 23:32:28 +0000 (00:32 +0100)]
optimizations, remove horrors.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agothe ‘kids don't do this at home’ commit.
Pierre Habouzit [Sat, 2 Dec 2006 22:54:35 +0000 (23:54 +0100)]
the ‘kids don't do this at home’ commit.

replace the unsigned long mutt API used to cast anything into ints pointer
and so on. Add 'anytype' that is a kind of dirty union that, thanks to gcc
__attribute__((transparent_union)) allows silent cast from any type into
that type.

eeeeeeek !

but that makes the code way easier to read !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofixes in the sidebar format, was completely braindead.
Pierre Habouzit [Sat, 2 Dec 2006 22:02:41 +0000 (23:02 +0100)]
fixes in the sidebar format, was completely braindead.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agolet the caller deal with M_FORMAT_ARROWCURSOR, not the callee.
Pierre Habouzit [Sat, 2 Dec 2006 20:18:33 +0000 (21:18 +0100)]
let the caller deal with M_FORMAT_ARROWCURSOR, not the callee.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomutt_FormatString -> m_strformat (will soon end up into the str lib \o/)
Pierre Habouzit [Sat, 2 Dec 2006 20:04:02 +0000 (21:04 +0100)]
mutt_FormatString -> m_strformat (will soon end up into the str lib \o/)
some tiny reworks, stylish issues.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agofully rework mutt_FormatString, fix a lot of issues, no more stack
Pierre Habouzit [Sat, 2 Dec 2006 19:55:57 +0000 (20:55 +0100)]
fully rework mutt_FormatString, fix a lot of issues, no more stack
squashing.

fix bugs with pads.

this is PASS1. soon, the number of columns to prepare the string for will
be computed by the caller rather than the callee.

enable nonliteral formats warning again, those are also meant to
disappear.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agoadd m_strpad to the string functions.
Pierre Habouzit [Sat, 2 Dec 2006 19:53:47 +0000 (20:53 +0100)]
add m_strpad to the string functions.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agooops, ascii_strncasecmp tried to compare one byte too far
Pierre Habouzit [Sat, 2 Dec 2006 13:34:23 +0000 (14:34 +0100)]
oops, ascii_strncasecmp tried to compare one byte too far

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agomore nonnull attributes.
Pierre Habouzit [Fri, 1 Dec 2006 22:54:28 +0000 (23:54 +0100)]
more nonnull attributes.
simplify skipspaces as !isspace('\0') holds

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 years agostring documentation.
Pierre Habouzit [Fri, 1 Dec 2006 22:40:30 +0000 (23:40 +0100)]
string documentation.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>