+ o Add $text T$ substitution
o Add $$ substitution
o Allow list texts to include real UTF-8 characters, as documented
o Fix bug where the normal listtext would be sent when unsubscribing from the
o Better techniques for locating support files in php-admin -- existing
installations will need to have their conf/config.php altered to set
the variable $confdir
- o Add $controlN$ substitution
+ o Add $control C$ substitution
o Fix theoretically possible memory corruption by chomp()
o Remove .sh from mlmmj-make-ml.sh; symlink original name
o Correct spelling of 'receive' and 'voodoo' throughout the code and
#include "chomp.h"
#include "memory.h"
-static char *ctrlval(const char *listdir, const char *ctrlstr, int oneline)
+static char *ctrlval(const char *listdir, const char *subdir,
+ const char *ctrlstr, int oneline)
{
char *filename, *value = NULL;
int ctrlfd, i;
if(listdir == NULL)
return NULL;
- filename = concatstr(3, listdir, "/control/", ctrlstr);
+ filename = concatstr(5, listdir, "/", subdir, "/", ctrlstr);
ctrlfd = open(filename, O_RDONLY);
myfree(filename);
char *ctrlvalue(const char *listdir, const char *ctrlstr)
{
- return ctrlval(listdir, ctrlstr, 1);
+ return ctrlval(listdir, "control", ctrlstr, 1);
}
char *ctrlcontent(const char *listdir, const char *ctrlstr)
{
- return ctrlval(listdir, ctrlstr, 0);
+ return ctrlval(listdir, "control", ctrlstr, 0);
}
+
+char *textcontent(const char *listdir, const char *ctrlstr)
+{
+ return ctrlval(listdir, "text", ctrlstr, 0);
+}
+
if (value == NULL)
value = mystrdup("");
goto concatandreturn;
- }
- if(data) {
+ } else if(strncmp(token, "text ", 5) == 0) {
+ value = token + 5;
+ if(*value == '\0') {
+ value = mystrdup("");
+ goto concatandreturn;
+ }
+ for(; *value != '\0'; value++) {
+ if(*value >= '0' && *value <= '9') continue;
+ if(*value >= 'A' && *value <= 'Z') continue;
+ if(*value >= 'a' && *value <= 'z') continue;
+ break;
+ }
+ if(*value != '\0') {
+ value = mystrdup(token + 5);
+ goto concatandreturn;
+ }
+ value = token + 5;
+ value = textcontent(listdir, value);
+ if (value == NULL)
+ value = mystrdup("");
+ goto concatandreturn;
+ } else if(data) {
for(i = 0; i < datacount; i++) {
if(strcmp(token, data[i*2]) == 0) {
value = mystrdup(data[(i*2)+1]);