🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #1505

a bug in fig-fs

#1505
From: Saumen K Dutta
Date: Tue, 20 Mar 1990 22:46
34 lines
1968 bytes
I am using fig-fs which a pd software for inserting line drawings in LateX 
documents. It is a modified version fig written by:
 Supoj Sutanthavibul (supoj@sally.UTEXAS.EDU)
Here one of the user of our site has discovered a bug. After drawing the figure
on the canvas, when the user wants to save it, fig-fs prompts for
"Save on file :" and waits for the input. Instead of putting any file name
if the user now choose to press <enter> he comes out with a file stored in his
directory named "Save on file :" (i.e. the prompt string)!!.
	After going through the code (which is undocumented), I realised that
it is
is due to some uninitialised pointer to the file name. I just found a quick
solution 
this( which may be considered to be quite dirty by the designer). What I did
was
to replace line 42 from:
    42          if ((nl->count == 1)) {
to:
    42          if ((nl->count == 1)&&(strcmp(nl->names[0],"Save in file :")))
{

this solves the problem. 
	I would like to have a cleaner solution from the designer of the
software or
if somebody has already fixed it(I don't think it is worth reinventing the
wheel).

Thanks for any anticipated pointer

Note: Standard disclaimer apply

     _                                   ||Internet: skdutta@cssun.tamu.edu  
    (   /_     _ /   --/-/- _            ||Bitnet : skd8107@tamvenus.bitnet 
   __)_/(_____(_/_(_/_(_(__(_/_______    ||Uucp : uunet!cssun.tamu.edu!skdutta
                                 ..      ||Hollernet: (409) 846-8803
Technical Details
Message-ID: <4619@helios.TAMU.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!cs.tamu.edu!skdutta

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!cs.tamu.edu!skdutta
From: skdutta@cs.tamu.edu (Saumen K Dutta)
Newsgroups: comp.text,comp.text.tex
Subject: a bug in fig-fs
Message-ID: <4619@helios.TAMU.EDU>
Date: 20 Mar 90 22:46:26 GMT
Sender: usenet@helios.TAMU.EDU
Reply-To: skdutta@cs.tamu.edu (Saumen K Dutta)
Followup-To: comp.text
Organization: Computer Science Department, Texas A&M University
Lines: 34