[go: up one dir, main page]

Opened 14 years ago

Last modified 14 years ago

#25466 assigned defect

mapm3 03.0, Revision 3, problem in calling int and log

Reported by: heckel@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: mapmaker Cc:
Port: mapm3

Description

I am running MacPorts 1.9.1 under OS 10.5.8 on a MacBook Pro, 2.5 GHz Intel Core 2 Duo

port mapm3 (Mapmaker 3) runs with two problems

1) running Mapmaker, in reader.c,

int new_magic_number()
{ return(((int)(randnum()*3275.0))*10 + F2VERSION); }

the call to int does not return the proper value. This results in a negative number being assigned to new_magic_number

2) running QTL, in qcmds.c,

command make_trait()

does not recognize "log" in command issued from console make trait logwt = log(weight)

Change History (3)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to ryandesign@…

Please remember to cc the maintainer.

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned

Ordinarily I would suggest you report this kind of problem to the developers of the software. However, since in this case they have not released a new version of this software in over seventeen years, I'm guessing they don't care anymore.

Do you have a patch that could fix these problems? I try not to be a C programmer and so I might not get it right if I try to fix it.

comment:3 Changed 14 years ago by heckel@…

I don't think either problem is in the source code, because they do not arise when running the Windows version.

Now I think the first problem is with randnum(), not the conversion of the type from real to integer. I'm not sure the correct random number generator is being used.

In line 8 of the patch-Makefile, perhaps

 -DUSE_RAND48

should be replaced by

 -DUSE_DRAND48

since line 204-5 of the original system.h dealing with which random number generator to use, read as follows

#ifdef _SYS_AUX
#define USE_DRAND48

or maybe patch-system.h needs to have

-#ifdef _SYS_AUX
+#ifdef _SYS_DARWIN
#define USE_DRAND48

since the patch-system.h doesn't seem to have any changes to the random number generators for DARWIN.

I'm sorry to sound so stupid, I just learned what a patch file is today, and found them under the mapm3 port, and have been comparing the Mapmaker source files with the patch files on the MacPort site. I installed MacPort specifically to run Mapmaker and have no other experience with it, and very little experience with unix and C.

Note: See TracTickets for help on using tickets.