notes@ciprico.UUCP (02/07/85)
Here is another related problem with that of prtind.c, but this one is in dsply.c. Again, the name & system is printed out with a string format without regards whether or not the size is exactly the same as the array (which would not give the trailing zero byte). -------------Lines changed are marked with a leading + -------------- if (notenum != 0) { if (dispbuf.outcount) /* nth page */ printf ("[Continued] "); printf ("Note %d", notenum); } center (io -> descr.d_title, NNLEN, 1, 40 - NNLEN / 2); if (note -> n_nresp > 0) { at (1, 67); printf ("%d response", note -> n_nresp); if (note -> n_nresp > 1) printf ("s"); } at (2, 1); + printf ("%.*s", NAMESZ, note -> n_auth.aname); center (note -> ntitle, TITLEN, 2, 40 - TITLEN / 2); at (2, 59); prdate (¬e -> n_date); if (strcmp (System, note -> n_id.sys) && strcmp (Anon, note -> n_auth.aname)) { at (3, 1); + printf ("(at %.*s)", SYSSZ, note -> n_id.sys); /* print system name if not local */ } if (note -> n_stat & DIRMES) center (io -> descr.d_drmes, DMLEN, 3, 40 - DMLEN / 2); else if (note -> n_stat & WRITONLY) { at (3, 31); printf ("-- (Write Only) --"); } if (note -> n_stat & FRMNEWS) { ----------------End of context----------- -Dan A. Dickey