Pcomm bug fix
Jonathan Bayer
jbayer at ispi.UUCP
Tue Jun 13 04:26:50 AEST 1989
This patch makes the following modifications to Pcomm:
1. It writes the system name on the log file as well as the phone number.
2. Also, when doing a manual dial it now requests a system name instead
of making the system name the phone number.
3. A bug when starting Pcomm without any parameters was that the
cursor was being left in the lower-right corner of the screen, and
as soon as a ctrl-A was pressed the entire screen was put into
reverse video was due to the screen not being refreshed at the
end of st_line().
Also, a note for users who are using the SCO 2.3 development system.
There appears to be a bug in the terminfo routines in that if the
keypad is enabled then the program cannot read a single escape key.
This problem will manifest itself when you are in the dialing window
which requires an "ESC" to exit it, and typing "ESC" doesn't.
Apparently typing a ctrl-A after the "ESC" will trigger terminfo to
return the escape character.
JB
*** old/admin.c Fri May 26 08:48:24 1989
--- admin.c Mon Jun 12 12:32:03 1989
***************
*** 38,44 ****
error_win(1, buf, "Contact your system administrator");
}
! fprintf(fp, "pcomm: %s called %s at %s on %s\n", getlogin(), number, &date[11], date);
fclose(fp);
#endif /* LOG_CALLS */
return;
--- 38,44 ----
error_win(1, buf, "Contact your system administrator");
}
! fprintf(fp, "pcomm: %s called %s %s at %s on %s\n", getlogin(), dir->name[dir->q_num[i]], number, &date[11], date);
fclose(fp);
#endif /* LOG_CALLS */
return;
*** old/d_manual.c Fri May 26 08:48:26 1989
--- d_manual.c Mon Jun 12 12:09:28 1989
***************
*** 16,25 ****
extern int xmc;
extern char *null_ptr;
WINDOW *m_win, *newwin();
! char *number, *strdup(), *get_str(), ld_code, *strchr();
void fix_xmc(), free_ptr();
! m_win = newwin(5, 50, 0, 20);
box(m_win, VERT, HORZ);
mvwaddstr(m_win, 2, 3, "Phone Number: ");
--- 16,25 ----
extern int xmc;
extern char *null_ptr;
WINDOW *m_win, *newwin();
! char *number, *name, *strdup(), *get_str(), ld_code, *strchr();
void fix_xmc(), free_ptr();
! m_win = newwin(7, 50, 0, 20);
box(m_win, VERT, HORZ);
mvwaddstr(m_win, 2, 3, "Phone Number: ");
***************
*** 48,59 ****
/* build the entry zero */
free_ptr(dir->name[0]);
free_ptr(dir->number[0]);
! dir->name[0] = strdup(number);
/* if space, change to null_ptr */
if (!strcmp(number, " "))
dir->number[0] = null_ptr;
else
dir->number[0] = strdup(number);
/* it overlaps dm_win, so erase it */
werase(m_win);
wrefresh(m_win);
--- 48,65 ----
/* build the entry zero */
free_ptr(dir->name[0]);
free_ptr(dir->number[0]);
!
/* if space, change to null_ptr */
if (!strcmp(number, " "))
dir->number[0] = null_ptr;
else
dir->number[0] = strdup(number);
+
+ mvwaddstr(m_win, 4, 3, "System Name: ");
+ wrefresh(m_win);
+ name = get_str(m_win, 30, "", "\n");
+ dir->name[0] = strdup(name);
+
/* it overlaps dm_win, so erase it */
werase(m_win);
wrefresh(m_win);
*** old/st_line.c Fri May 26 08:48:49 1989
--- st_line.c Mon Jun 12 13:16:16 1989
***************
*** 75,79 ****
--- 75,80 ----
/* go ahead and delete it now */
delwin(sl_win);
move(y, x);
+ refresh();
return;
}
--
Jonathan Bayer Beware: The light at the end of the
Intelligent Software Products, Inc. tunnel may be an oncoming dragon
500 Oakwood Ave. ...uunet!ispi!root
Roselle Park, NJ 07204 (201) 245-5922 jbayer at ispi.UUCP
More information about the Comp.sources.bugs
mailing list