X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsortm.c;h=d7dae6127be577772cd8c51b776749444370d20c;hp=5132c1f50e497b1c96f0adde78e96c5434c987fc;hb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;hpb=d39e2c447b0d163a5a63f480b23d06edb7a73aa0 diff --git a/uip/sortm.c b/uip/sortm.c index 5132c1f..d7dae61 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -28,7 +28,7 @@ static struct swit switches[] = { #define NVERBSW 7 { "noverbose", 0 }, #define VERSIONSW 8 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 9 { "help", 0 }, { NULL, 0 } @@ -43,8 +43,8 @@ struct smsg { static struct smsg *smsgs; int nmsgs; -char *subjsort = (char *) 0; /* sort on subject if != 0 */ -unsigned long datelimit = 0; +char *subjsort = NULL; /* sort on subject if != 0 */ +time_t datelimit = 0; int submajor = 0; /* if true, sort on subject-major */ int verbose; @@ -126,7 +126,7 @@ main(int argc, char **argv) subjsort = "subject"; continue; case NSUBJSW: - subjsort = (char *)0; + subjsort = NULL; continue; case LIMSW: @@ -165,7 +165,7 @@ main(int argc, char **argv) } if (!msgs.size) - app_msgarg(&msgs, "all"); + app_msgarg(&msgs, seq_all); if (!datesw) datesw = "date"; if (!folder) @@ -277,7 +277,7 @@ main(int argc, char **argv) rename_msgs(mp, dlist); - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ seq_save(mp); /* synchronize message sequences */ context_save(); /* save the context file */ folder_free(mp); /* free folder/message structure */ @@ -562,8 +562,8 @@ rename_msgs(struct msgs *mp, struct smsg **mlist) ** messages in the folder. */ - (void)snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, old); - (void)snprintf(newbuf, sizeof (newbuf), "%s/%d", + snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, old); + snprintf(newbuf, sizeof (newbuf), "%s/%d", mp->foldpath, mp->hghmsg + 1); ext_hook("ref-hook", f1, newbuf); @@ -579,7 +579,7 @@ rename_msgs(struct msgs *mp, struct smsg **mlist) ** to the real place. */ - (void)snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, new); + snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, new); ext_hook("ref-hook", newbuf, f1); if (rename(tmpfil, m_name(new)) == NOTOK)