projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix manpages (nroff code), as reported by tests/manpages/test-manpages
[mmh]
/
uip
/
new.c
diff --git
a/uip/new.c
b/uip/new.c
index
2ac56d6
..
a79845c
100644
(file)
--- a/
uip/new.c
+++ b/
uip/new.c
@@
-22,13
+22,13
@@
static struct swit switches[] = {
#define MODESW 0
static struct swit switches[] = {
#define MODESW 0
- { "mode", 1 },
+ { "mode", 0 },
#define FOLDERSSW 1
#define FOLDERSSW 1
- { "folders", 1 },
+ { "folders", 0 },
#define VERSIONSW 2
#define VERSIONSW 2
- { "version", 1 },
+ { "Version", 0 },
#define HELPSW 3
#define HELPSW 3
- { "help", 1 },
+ { "help", 0 },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-308,7
+308,7
@@
join_sequences(char *sequences[])
static struct node *
doit(char *cur, char *folders, char *sequences[])
{
static struct node *
doit(char *cur, char *folders, char *sequences[])
{
- struct node *first, *cur_node, *node, *last, *prev;
+ struct node *first, *cur_node, *node, *last = NULL, *prev;
size_t folder_len;
int count, total = 0;
char *command = NULL, *sequences_s = NULL;
size_t folder_len;
int count, total = 0;
char *command = NULL, *sequences_s = NULL;
@@
-432,9
+432,10
@@
main(int argc, char **argv)
char *unseen;
struct node *folder;
char *unseen;
struct node *folder;
-#ifdef LOCALE
+ sequences[0] = NULL;
+ sequences[1] = NULL;
+
setlocale(LC_ALL, "");
setlocale(LC_ALL, "");
-#endif
invo_name = mhbasename(argv[0]);
/* read user profile/context */
invo_name = mhbasename(argv[0]);
/* read user profile/context */
@@
-481,6
+482,7
@@
main(int argc, char **argv)
/* have a sequence argument */
if (!seq_in_list(cp, sequences)) {
sequences[i++] = cp;
/* have a sequence argument */
if (!seq_in_list(cp, sequences)) {
sequences[i++] = cp;
+ sequences[i] = NULL;
}
}
}
}