projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reworked LINK, now named `altmsglink', similar to BACKUP_PREFIX.
[mmh]
/
sbr
/
folder_read.c
diff --git
a/sbr/folder_read.c
b/sbr/folder_read.c
index
8e3a3ff
..
f642ed3
100644
(file)
--- a/
sbr/folder_read.c
+++ b/
sbr/folder_read.c
@@
-2,8
+2,6
@@
/*
* folder_read.c -- initialize folder structure and read folder
*
/*
* folder_read.c -- initialize folder structure and read folder
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
@@
-59,7
+57,7
@@
folder_read (char *name)
if (access (name, W_OK) == -1)
set_readonly (mp);
if (access (name, W_OK) == -1)
set_readonly (mp);
- prefix_len = strlen(BACKUP_PREFIX);
+ prefix_len = strlen(backup_prefix);
/*
* Allocate a temporary place to record the
/*
* Allocate a temporary place to record the
@@
-76,10
+74,7
@@
folder_read (char *name)
*/
if (mp->nummsg >= len) {
len += NUMMSGS;
*/
if (mp->nummsg >= len) {
len += NUMMSGS;
- if (!(mi = (int *) realloc (mi,
- (size_t) (len * sizeof(*mi))))) {
- adios (NULL, "unable to allocate storage");
- }
+ mi = (int *) mh_xrealloc (mi, (size_t) (len * sizeof(*mi)));
}
/* Check if this is the first message we've seen */
}
/* Check if this is the first message we've seen */
@@
-111,11
+106,11
@@
folder_read (char *name)
default:
/* skip any files beginning with backup prefix */
default:
/* skip any files beginning with backup prefix */
- if (!strncmp (dp->d_name, BACKUP_PREFIX, prefix_len))
+ if (!strncmp (dp->d_name, backup_prefix, prefix_len))
continue;
continue;
- /* skip the LINK file */
- if (!strcmp (dp->d_name, LINK))
+ /* skip the altmsg link file */
+ if (!strcmp (dp->d_name, altmsglink))
continue;
/* indicate that there are other files in folder */
continue;
/* indicate that there are other files in folder */