www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/10/02:25:43

Date: Mon, 10 Jun 1996 07:24:16 +0200
Message-Id: <199606100524.HAA00293@alpha.at.ludmerfeld>
From: Ulrich Leodolter <ulrich AT pina2 DOT telecom DOT at>
To: eliz AT is DOT elta DOT co DOT il
CC: djgpp AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.960609181715.342l-100000@is> (message from Eli
Zaretskii on Sun, 9 Jun 1996 18:19:10 +0200 (IST))
Subject: Re: Problems with stubfiy -g foo.exe

> Date: Sun, 9 Jun 1996 18:19:10 +0200 (IST)
> From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
> X-Sender: eliz AT is
> Cc: djgpp AT delorie DOT com
> Mime-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-UIDL: 834383358.001
> 
> 
> On 3 Jun 1996, Ulrich Leodolter wrote:
> 
> > I have compiled netpbm-1mar94.p1 using a Linux->DJGPP cross compiler:
> > I have used stubify and stubedit to create "links", e.g.:
> > 
> > > stubify -g pcxtoppm.exe
> > > stubedit pcxtoppm.exe runfile=ppmmerge argv0=pcxtoppm
>                                            ^^^^^^^^^^^^^^
> This shouldn't be necessary.  Did you try without it?
> 
No, but here is head of main from ppmmerge.c:

int
main( argc, argv )
    int argc;
    char* argv[];
    {
    register char* cp;

again:
    if ( ( cp = rindex( argv[0], '/' ) ) != (char*) 0 )
	++cp;
    else
	cp = argv[0];
    if ( strcmp( cp, "ppmmerge" ) == 0 )
	{
	++argv;
	--argc;
	if(!*argv)	{
		fprintf(stderr, "Usage: ppmmerge ppm_program_name [args ...]\n");
		exit(1);
		}
	goto again;
	}

#define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) exit( m( argc, argv ) ); }

    TRY("bmptoppm", bmptoppm_main);
    TRY("gouldtoppm", gouldtoppm_main);
    TRY("ilbmtoppm", ilbmtoppm_main);
    ...

> > > pcxtoppm sample.pcx > sample.ppm
> > 
> > This command seems to work only once, after the first try I got the following
> > message written to stdout:
> > 
> > "C:\DJGPP\NETPBM\ppmmerge.EXE: cannot open"
> 
> Does this happen when you run `ppmmerge' directly, not through the link?
> 
No, I have done

> copy ppmmerge.exe pcxtoppm.exe
> stubedit pcxtoppm.exe argv0=pcxtoppm

and it works, but this method consumes 9MB instead of 1.5MB of disk space.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019