mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Fixed \n at end of message, fixed last message download
SVN revision: 2487
This commit is contained in:
parent
5b5699e04e
commit
9e5dbd1582
14
src/elog.c
14
src/elog.c
@ -685,7 +685,10 @@ INT submit_elog(char *host, int port, int ssl, char *subdir, char *experiment,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (download) {
|
if (download) {
|
||||||
puts(response);
|
if (strstr(response, "$@MID@$:"))
|
||||||
|
printf("%s", strstr(response, "$@MID@$:"));
|
||||||
|
else
|
||||||
|
printf("%s", response);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1081,9 +1084,12 @@ int main(int argc, char *argv[])
|
|||||||
reply = atoi(argv[++i]);
|
reply = atoi(argv[++i]);
|
||||||
else if (argv[i][1] == 'e')
|
else if (argv[i][1] == 'e')
|
||||||
edit = atoi(argv[++i]);
|
edit = atoi(argv[++i]);
|
||||||
else if (argv[i][1] == 'w')
|
else if (argv[i][1] == 'w') {
|
||||||
|
if (argv[i+1][0] == 'l')
|
||||||
|
download = -1;
|
||||||
|
else
|
||||||
download = atoi(argv[++i]);
|
download = atoi(argv[++i]);
|
||||||
else if (argv[i][1] == 'n')
|
} else if (argv[i][1] == 'n')
|
||||||
encoding = atoi(argv[++i]);
|
encoding = atoi(argv[++i]);
|
||||||
else if (argv[i][1] == 'm')
|
else if (argv[i][1] == 'm')
|
||||||
strcpy(textfile, argv[++i]);
|
strcpy(textfile, argv[++i]);
|
||||||
@ -1106,7 +1112,7 @@ int main(int argc, char *argv[])
|
|||||||
printf(" [-r <id>] Reply to existing message\n");
|
printf(" [-r <id>] Reply to existing message\n");
|
||||||
printf(" [-q] Quote original text on reply\n");
|
printf(" [-q] Quote original text on reply\n");
|
||||||
printf(" [-e <id>] Edit existing message\n");
|
printf(" [-e <id>] Edit existing message\n");
|
||||||
printf(" [-w <id>] Download existing message\n");
|
printf(" [-w <id>|last] Download existing message (last message)\n");
|
||||||
printf(" [-x] Suppress email notification\n");
|
printf(" [-x] Suppress email notification\n");
|
||||||
printf(" [-n 0|1|2] Encoding: 0:ELcode,1:plain,2:HTML\n");
|
printf(" [-n 0|1|2] Encoding: 0:ELcode,1:plain,2:HTML\n");
|
||||||
printf(" -m <textfile>] | <text>\n");
|
printf(" -m <textfile>] | <text>\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user