{
gboolean retVal;
gchar *indexfile;
- struct stat filestat;
+ GStatBuf filestat;
if(tl->g_slist == NULL)
return TRUE;
indexfile = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ADDRESSBOOK_INDEX_FILE, NULL);
- if((stat(indexfile,&filestat) == 0) && filestat.st_mtime <= tl->mtime)
+ if((g_stat(indexfile,&filestat) == 0) && filestat.st_mtime <= tl->mtime)
retVal = FALSE;
else
retVal = TRUE;
static void init_email_slist(void)
{
gchar *indexfile;
- struct stat filestat;
+ GStatBuf filestat;
if(email_slist->g_slist != NULL) {
free_PerlPluginEmailEntry_slist(email_slist->g_slist);
addrindex_load_person_attribute(NULL,add_to_email_slist);
indexfile = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ADDRESSBOOK_INDEX_FILE, NULL);
- if(stat(indexfile,&filestat) == 0)
+ if(g_stat(indexfile,&filestat) == 0)
email_slist->mtime = filestat.st_mtime;
g_free(indexfile);
debug_print("Initialisation of email slist completed\n");
{
PerlPluginTimedSList *tl;
gchar *indexfile;
- struct stat filestat;
+ GStatBuf filestat;
/* Check if key exists. Free it if it does. */
if((tl = g_hash_table_lookup(attribute_hash,attr)) != NULL) {
addrindex_load_person_attribute(attribute_key,add_to_attribute_hash);
indexfile = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ADDRESSBOOK_INDEX_FILE, NULL);
- if(stat(indexfile,&filestat) == 0)
+ if(g_stat(indexfile,&filestat) == 0)
tl->mtime = filestat.st_mtime;
g_free(indexfile);
gchar buf[BUFFSIZE];
GSList *walk;
int ii;
+ gchar *xface;
dXSARGS;
if(items != 1) {
case 10:
msginfo->xref ? XSRETURN_PV(msginfo->xref) : XSRETURN_UNDEF;
case 11:
- (msginfo->extradata && msginfo->extradata->xface) ?
- XSRETURN_PV(msginfo->extradata->xface) : XSRETURN_UNDEF;
+ xface = procmsg_msginfo_get_avatar(msginfo, AVATAR_XFACE);
+ xface ? XSRETURN_PV(xface) : XSRETURN_UNDEF;
case 12:
(msginfo->extradata && msginfo->extradata->dispositionnotificationto) ?
XSRETURN_PV(msginfo->extradata->dispositionnotificationto) : XSRETURN_UNDEF;
static XS(XS_ClawsMail_make_sure_tag_exists)
{
gchar *tag_str;
- gint tag_id;
dXSARGS;
if(items != 1) {
" qw(forwarded locked colorlabel match matchcase),\n"
" qw(regexp regexpcase test),\n"
" qw(to cc subject from to_or_cc newsgroups inreplyto),\n"
-" qw(references body_part headers_part message),\n"
+" qw(references body_part headers_part headers_cont message),\n"
" qw(size_greater size_smaller size_equal),\n"
" qw(score_greater score_lower score_equal),\n"
" qw(age_greater age_lower partial tagged $permanent));\n"
"sub references { return \"references\"; }\n"
"sub body_part { return \"body_part\"; }\n"
"sub headers_part { return \"headers_part\"; }\n"
+"sub headers_cont { return \"headers_cont\"; }\n"
"sub message { return \"message\"; }\n"
"# access the mail directly\n"
"sub header {\n"
" return ($myheader =~ m/$what/) unless $nocase;\n"
" return ($myheader =~ m/$what/i);\n"
" }\n"
+" } elsif($where eq \"headers_cont\") {\n"
+" (my $myheader = header_as_string_()) =~ s{^\\S+:\\s*}{};\n"
+" if(not $regexp) {\n"
+" $myheader =~ s/\\s+/ /g;\n"
+" return (index($myheader,$what) != -1) unless $nocase;\n"
+" return (index(lc2_($myheader),lc2_($what)) != -1);\n"
+" } else {\n"
+" return ($myheader =~ m/$what/) unless $nocase;\n"
+" return ($myheader =~ m/$what/i);\n"
+" }\n"
" } elsif($where eq \"message\") {\n"
" my $message = header_as_string_();\n"
" $message .= \"\\n\".body();\n"