[2797] in SIPB bug reports

home help back first fref pref prev next nref lref last post

Re: problem printing from xfig

daemon@ATHENA.MIT.EDU (mhpower@Athena.MIT.EDU)
Tue May 5 17:29:04 1992

From: mhpower@Athena.MIT.EDU
To: jik@Athena.MIT.EDU
Cc: bug-sipb@Athena.MIT.EDU
Date: Tue, 05 May 92 17:27:38 EDT

>The reason it would overflow is that every character in the file name
>being printed has a backslash put before it ...

OK, but I think all those characters go into syspr before they go into
prcmd, so the problem would still exist unless we increase the size of
syspr. Otherwise, I think file names will have to be less than 20
characters:

   (2 * 20) + strlen("lpr -J ") + strlen(" -Pw20-east-4")

is 60.

Matt


*** u_print.c.old	Tue May  5 16:57:07 1992
--- u_print.c	Tue May  5 17:05:35 1992
***************
*** 58,64 ****
      int		    center;
      float	    mag;
  {
!     char	    prcmd[2*MAXPATHLEN+200], translator[60], syspr[60];
      char	    tmpfile[32];
  
      sprintf(tmpfile, "%s%06d", "/tmp/xfig-print", getpid());
--- 58,65 ----
      int		    center;
      float	    mag;
  {
!     char	    prcmd[2*MAXPATHLEN+200], translator[60];
!     char	    syspr[2*MAXPATHLEN+60];
      char	    tmpfile[32];
  
      sprintf(tmpfile, "%s%06d", "/tmp/xfig-print", getpid());

home help back first fref pref prev next nref lref last post