$Log$
+ Revision 580.79 2001/11/27 17:08:29 ajc
+ * When calling an external editor, set the environment variable
+ WINDOW_TITLE to an appropriate value.
+
Revision 580.78 2001/11/26 03:27:08 ajc
* new algorithm to load the use table
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
FILE *fp;
int a, b, e_ex_code;
long beg;
- char datestr[64];
+ char datestr[SIZ];
+ char header[SIZ];
int cksum = 0;
if (mode == 2)
}
fmt_date(datestr, time(NULL));
+ header[0] = 0;
if (room_flags & QR_ANONONLY) {
- printf(" ****");
+ sprintf(&header[strlen(header)], " ****");
}
else {
- printf(" %s from %s", datestr, fullname);
+ sprintf(&header[strlen(header)],
+ " %s from %s", datestr, fullname);
if (strlen(recipient) > 0) {
- printf(" to %s", recipient);
+ sprintf(&header[strlen(header)],
+ " to %s", recipient);
}
}
- printf("\n");
+ printf("%s\n", header);
beg = 0L;
if (editor_pid == 0) {
chmod(filename, 0600);
sttybbs(SB_RESTORE);
+ setenv("WINDOW_TITLE", header, 1);
execlp(editor_path, editor_path, filename, NULL);
exit(1);
}
cksum = file_checksum(temp);
if (strlen(editor_path) > 0) {
+ setenv("WINDOW_TITLE", desc, 1);
editor_pid = fork();
if (editor_pid == 0) {
chmod(temp, 0600);
if (editor_pid == 0) {
chmod(filename, 0600);
sttybbs(SB_RESTORE);
+ setenv("WINDOW_TITLE", "Network configuration", 1);
execlp(editor_path, editor_path, filename, NULL);
exit(1);
}