jmb@patton.SGI.COM (Jim Barton) (05/31/88)
Hello fellow prisoners in segmented hell. I've received a few requests for what I did to make 'Pcomm' work on uport286. Well, the original author was kind enough to post a patch recently (patch #5) which fixes almost all uport286 problems. Tacked on below are a few lines I changed to clean up the help window a bit (some differences in the way curses works internally, I'm afraid) and changed 'lpr' from the printer destination to 'lp' [ I don't know why /usr/bin/lpr is set as the default spool program for a System V program ... ]. Finally, the trivial makefile changes I made to compile large model are attached. It purposely adds a search for a libxmalloc.a. This is because I cannot get Pcomm to work with uport286 malloc. I tried libmalloc.a as well, but it croaked the linker. I then turned to the excellent version of malloc posted recently by Charles Hedrick (hedrick@athos.rutgers.edu) to this newsgroup. The problems I was having evaporated. Well done! If you don't have a copy of this around, I can send one to you. -- Jim Barton Silicon Graphics Computing Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb "I used to be disgusted, now I'm just amused." - Elvis Costello, 'Red Shoes' -- *** old/help.c Mon May 30 16:21:04 1988 --- help.c Mon May 30 10:07:44 1988 *************** *** 20,32 mvwattrstr(h_win, 1, 29, A_BOLD, "P C O M M H E L P\n"); waddstr(h_win, "-------------------------------------------------------------------------------\n\n"); ! wattrstr(h_win, A_BOLD, " Major Functions Utility Functions File Functions\n\n"); ! wprintw(h_win, " Dialing Directory .%4.4s-D Program Info .....%4.4s-I Send files ....%4.4s-up\n", hot, hot, hot); ! wprintw(h_win, " Auto Redial .......%4.4s-R Setup Screen .....%4.4s-S Receive files .%4.4s-dn\n", hot, hot, hot); ! wprintw(h_win, " Keyboard Macros ...%4.4s-M Change Directory .%4.4s-B Directory .....%4.4s-F\n", hot, hot, hot); ! wprintw(h_win, " Line Settings .....%4.4s-P Clear Screen .....%4.4s-C Screen Dump ...%4.4s-G\n", hot, hot, hot); ! wprintw(h_win, " Exit Pcomm ........%4.4s-X Toggle Duplex ....%4.4s-E Data Logging ..%4.4s-1\n", hot, hot, hot); ! wprintw(h_win, " Unix Gateway ......%4.4s-4 Hangup Phone .....%4.4s-H Toggle Log ....%4.4s-2\n", hot, hot, hot); mvwprintw(h_win, 12, 29, "Printer On/Off ...%4.4s-L", hot); mvwprintw(h_win, 13, 29, "Toggle CR/CR-LF ..%4.4s-3", hot); mvwprintw(h_win, 14, 29, "Break Key ........%4.4s-7", hot); --- 20,32 ----- mvwattrstr(h_win, 1, 29, A_BOLD, "P C O M M H E L P\n"); waddstr(h_win, "-------------------------------------------------------------------------------\n\n"); ! wattrstr(h_win, A_BOLD, " Major Functions Utility Functions File Functions\n\n"); ! wprintw(h_win, " Dialing Directory .%4.4s-D Program Info .....%4.4s-I Send files ....%4.4s-up\n", hot, hot, hot); ! wprintw(h_win, " Auto Redial .......%4.4s-R Setup Screen .....%4.4s-S Receive files .%4.4s-dn\n", hot, hot, hot); ! wprintw(h_win, " Keyboard Macros ...%4.4s-M Change Directory .%4.4s-B Directory .....%4.4s-F\n", hot, hot, hot); ! wprintw(h_win, " Line Settings .....%4.4s-P Clear Screen .....%4.4s-C Screen Dump ...%4.4s-G\n", hot, hot, hot); ! wprintw(h_win, " Exit Pcomm ........%4.4s-X Toggle Duplex ....%4.4s-E Data Logging ..%4.4s-1\n", hot, hot, hot); ! wprintw(h_win, " Unix Gateway ......%4.4s-4 Hangup Phone .....%4.4s-H Toggle Log ....%4.4s-2\n", hot, hot, hot); mvwprintw(h_win, 12, 29, "Printer On/Off ...%4.4s-L", hot); mvwprintw(h_win, 13, 29, "Toggle CR/CR-LF ..%4.4s-3", hot); mvwprintw(h_win, 14, 29, "Break Key ........%4.4s-7", hot); *** old/input.c Mon May 30 16:21:13 1988 --- input.c Mon May 30 09:56:53 1988 *************** *** 3,9 * main pcomm program. */ ! #define LPR "/usr/bin/lpr" #define MAX_ROW 64 #define MAX_COL 128 --- 3,9 ----- * main pcomm program. */ ! #define LPR "/usr/bin/lp" #define MAX_ROW 64 #define MAX_COL 128 *** old/Makefile Mon May 30 16:20:09 1988 --- Makefile Mon May 30 08:37:07 1988 *************** *** 12,19 #GETCWD = getcwd.o #GETOPT = getopt.o ! CC = cc -O ! CFLAGS = #CURSES = -lcurses -ltermlib CURSES = -lcurses LDFLAGS = --- 12,19 ----- #GETCWD = getcwd.o #GETOPT = getopt.o ! CC = cc -g ! CFLAGS = -Ml #CURSES = -lcurses -ltermlib CURSES = -lcurses -lxmalloc LDFLAGS = -Ml *************** *** 15,22 CC = cc -O CFLAGS = #CURSES = -lcurses -ltermlib ! CURSES = -lcurses ! LDFLAGS = SHAR = shar -a OBJECTS = $(GETCWD) $(GETOPT) admin.o chg_dir.o curses.o d_delete.o d_lib.o \ --- 15,22 ----- CC = cc -g CFLAGS = -Ml #CURSES = -lcurses -ltermlib ! CURSES = -lcurses -lxmalloc ! LDFLAGS = -Ml SHAR = shar -a OBJECTS = $(GETCWD) $(GETOPT) admin.o chg_dir.o curses.o d_delete.o d_lib.o \