From: Henne Vogelsang <hvogel@opensuse.org>
To: mlmmj@mlmmj.org
Subject: default listtext dir
Date: Fri, 08 Sep 2006 13:29:22 +0000 [thread overview]
Message-ID: <20060908132922.GS24085@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]
Hi,
i frequently run into the problem that i update mlmmj and have to wade
trough all my lists and update the listtexts because some new one got
added (e.g. submod-moderator) or something is modified.
I would like to propose a default listtext directory (like there already
is in datadir/mlmmj/text.skel). So listtexts would be searched
1. in spool/list/text/file and if not there
2. in default/file
This would mean that spool/list/text/file is just an overwrite and you
can operate lists just with default texts (no text/ dir at all). Also
comes in handy if the translations are behind etc.
The following patch implements this in prestdreply.c. The only part that
is missing is making configure setting the dir in config.h instead of
hardcoding it. What do you think?
Henne
--
Henne Vogelsang, Core Services
"Rules change. The Game remains the same."
- Omar (The Wire)
[-- Attachment #2: mlmmj-defaulttextdir.patch --]
[-- Type: text/x-patch, Size: 703 bytes --]
--- config.h.in
+++ config.h.in
@@ -129,3 +129,6 @@
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
+
+/* Define to the location of the default listext directory */
+#define DEFAULTTEXTDIR "/usr/share/mlmmj/text.skel/"
--- src/prepstdreply.c
+++ src/prepstdreply.c
@@ -166,8 +166,13 @@
infd = open(tmp, O_RDONLY);
myfree(tmp);
if(infd < 0) {
- log_error(LOG_ARGS, "Could not open std mail %s", filename);
- return NULL;
+ tmp = concatstr(2, DEFAULTTEXTDIR, filename);
+ infd = open(tmp, O_RDONLY);
+ myfree(tmp);
+ if(infd < 0) {
+ log_error(LOG_ARGS, "Could not open std mail %s", filename);
+ return NULL;
+ }
}
listaddr = getlistaddr(listdir);
reply other threads:[~2006-09-08 13:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060908132922.GS24085@suse.de \
--to=hvogel@opensuse.org \
--cc=mlmmj@mlmmj.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.