face2ps

Russ Nelson nelson at sun.soe.clarkson.edu
Wed Jul 26 23:45:59 AEST 1989


In article <17286 at bellcore.bellcore.com> tr at 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 <stdlib.h>
  #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 at clutx [.bitnet | .clarkson.edu])|(70441.205 at compuserve.com)



More information about the Alt.sources.d mailing list