int force_rescan = 0;
char buf[text_buffer_size];
struct stat statbuf;
+ struct ring_list *curr = 0, *prev = 0, *startlist = 0;
+ FILE *fp;
/* output was set to 1 after malloc'ing in conky.c */
/* -> beeing able to test it here for catching SIGUSR1 */
}
/* encapsulated with "'s find first occurrence of " */
if (args[strlen(args) - 1] == '"') {
+ char *start;
strncpy(mbox_mail_spool, args, DEFAULT_TEXT_BUFFER_SIZE);
- char *start = strchr(mbox_mail_spool, '"') + 1;
+ start = strchr(mbox_mail_spool, '"') + 1;
start[(long) (strrchr(mbox_mail_spool, '"') - start)] = '\0';
strncpy(mbox_mail_spool, start, DEFAULT_TEXT_BUFFER_SIZE);
/* build up double-linked ring-list to hold data, while scanning down the
* mbox */
- struct ring_list *curr = 0, *prev = 0, *startlist = 0;
-
for (i = 0; i < print_mails; i++) {
curr = (struct ring_list *) malloc(sizeof(struct ring_list));
curr->from = (char *) malloc(sizeof(char[from_width + 1]));
curr->next = startlist;
/* mbox */
- FILE *fp;
-
fp = fopen(mbox_mail_spool, "r");
if (!fp) {
return;
fclose(fp);
output[0] = '\0';
- struct ring_list *tmp;
i = print_mails;
while (i) {
+ struct ring_list *tmp;
if (curr->from[0] != '\0') {
if (i != print_mails) {
snprintf(buf, text_buffer_size, "\nF: %-*s S: %-*s", from_width,