Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!image.soe.clarkson.edu!news From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: alt.sources.d Subject: Re: face2ps Message-ID: Date: 26 Jul 89 13:45:59 GMT References: <17286@bellcore.bellcore.com> Sender: news@sun.soe.clarkson.edu Reply-To: nelson@clutx.clarkson.edu Distribution: alt Organization: Clarkson University, Postdam NY Lines: 55 In-reply-to: tr@madeleine's message of 26 Jul 89 02:38:29 GMT In article <17286@bellcore.bellcore.com> tr@madeleine (tom reingold) writes: Could someone please give me hints on using Russ Nelson's face2ps suite of programs? I compiled it on a Sun 3 running SunOS 4.0.3 using gcc version 1.35 and it just says "Memory fault". What are the command line args etc. anyway? Hmmmm... I suspect that the code to find the program name doesn't work. The command line args are given in the README file. Try the following patch: *** orig/face2ps.c Wed Jul 26 09:40:06 1989 --- face2ps.c Wed Jul 26 09:42:56 1989 *************** *** 19,24 **** --- 19,26 ---- char absolute_format[] = "./%s.ps"; /* full pathname to the prologs */ #endif + char version[] = "Version 1, patchlevel 1"; + #ifdef __TURBOC__ #include #else *************** *** 102,111 **** progend = strchr(program, '.'); if (progend) *progend = '\0'; #else program = strrchr(argv[0], '/'); #endif - program++; if (setvbuf(stdout, 0, _IOFBF, 4096)) { fprintf(stderr, "%s: ran out of memory on setvbuf to stdout\n", --- 104,117 ---- progend = strchr(program, '.'); if (progend) *progend = '\0'; + program++; #else program = strrchr(argv[0], '/'); + if (program) + program++; + else + program = argv[0]; #endif if (setvbuf(stdout, 0, _IOFBF, 4096)) { fprintf(stderr, "%s: ran out of memory on setvbuf to stdout\n", -- --russ (nelson@clutx [.bitnet | .clarkson.edu])|(70441.205@compuserve.com)