ports/122452: New port: biology/mapm3
Tassilo Philipp
tphilipp at potion-studios.com
Fri Apr 4 19:10:03 UTC 2008
>Number: 122452
>Category: ports
>Synopsis: New port: biology/mapm3
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 04 19:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Tassilo Philipp
>Release: 6.3
>Organization:
Potion Studios
>Environment:
FreeBSD 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 01:43:02 UTC 2008 root at palmer.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP amd64
>Description:
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# mapm3
# mapm3/Makefile
# mapm3/pkg-descr
# mapm3/files
# mapm3/files/patch-Makefile
# mapm3/files/patch-lib-iolib.c
# mapm3/files/patch-lib-iolib.h
# mapm3/files/patch-lib-makehelp.c
# mapm3/files/patch-lib-shell.c
# mapm3/files/patch-lib-syscode.c
# mapm3/files/patch-lib-system.h
# mapm3/files/patch-mapm-chroms.c
# mapm3/files/patch-mapm-database.c
# mapm3/files/patch-mapm-info.c
# mapm3/files/patch-mapm-map_info.h
# mapm3/files/patch-mapm-mapm.h
# mapm3/files/patch-mapm-maps.c
# mapm3/files/patch-mapm-npt_cmds.c
# mapm3/files/patch-mapm-print.c
# mapm3/files/patch-mapm-reader.c
# mapm3/files/patch-mapm-state.c
# mapm3/files/patch-mapm-sys_cmds.c
# mapm3/files/patch-mapm-two_cmds.c
# mapm3/files/patch-quant-qcmds.c
# mapm3/files/patch-quant-qraw.c
# mapm3/files/patch-sun-xqtl
# mapm3/files/patch-sun-xmapmaker
# mapm3/pkg-plist
# mapm3/distinfo
#
echo c - mapm3
mkdir -p mapm3 > /dev/null 2>&1
echo x - mapm3/Makefile
sed 's/^X//' >mapm3/Makefile << 'END-of-mapm3/Makefile'
X# New ports collection makefile for: mapm3
X# Date created: 26 March 2008
X# Whom: Tassilo Philipp <tphilipp at potion-studios.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= mapm3
XPORTVERSION= 3.0
XCATEGORIES= biology
XMASTER_SITES= http://www.broad.mit.edu/ftp/distribution/software/mapmaker3/ \
X ftp://ftp.ibiblio.org/pub/academic/biology/molbio/mapmaker/ \
X http://iubio.bio.indiana.edu/soft/molbio/qtl/mapmaker/ \
X http://www.mirrorservice.org/sites/iubio.bio.indiana.edu/molbio/qtl/mapmaker/
XDISTNAME= mapm3-source
XEXTRACT_SUFX= .tar.Z
X
XMAINTAINER= tphilipp at potion-studios.com
XCOMMENT= Constructs linkage maps of markers segregating in experimental crosses
X
XNO_WRKSUBDIR= yes
X
Xpost-patch:
X ${CP} ${WRKSRC}/sun/* ${WRKSRC}
X
X.include <bsd.port.mk>
END-of-mapm3/Makefile
echo x - mapm3/pkg-descr
sed 's/^X//' >mapm3/pkg-descr << 'END-of-mapm3/pkg-descr'
XMAPMAKER/EXP is a linkage analysis package designed to help construct primary
Xlinkage maps of markers segregating in experimental crosses. MAPMAKER/EXP
Xperforms full multipoint linkage analysis (simultaneous estimation of all
Xrecombination fractions from the primary data) for dominant, recessive, and co-
Xdominant (e.g. RFLP-like) markers. MAPMAKER/EXP is an experimental-cross-only
Xsuccessor to the original MAPMAKER program.
X
XMAPMAKER/QTL is a companion program to MAPMAKER/EXP which allows one to map
Xgenes controlling polygenic quantitative traits in F2 intercrosses and BC1
Xbackcrosses relative to a genetic linkage map. More information on MAPMAKER/QTL
Xcan be found in the technical report (included with MAPMAKER/QTL).
X
XWWW: http://www.broad.mit.edu/ftp/distribution/software/mapmaker3/
END-of-mapm3/pkg-descr
echo c - mapm3/files
mkdir -p mapm3/files > /dev/null 2>&1
echo x - mapm3/files/patch-Makefile
sed 's/^X//' >mapm3/files/patch-Makefile << 'END-of-mapm3/files/patch-Makefile'
X--- Makefile.orig 2008-04-04 20:05:29.000000000 +0000
X+++ Makefile 2008-04-04 19:51:04.000000000 +0000
X@@ -16,6 +16,7 @@
X ####
X #### For Macs with A/UX, use: SYS= -D_SYS_AUX
X #### For DECStations, use: SYS= -D_SYS_ULTRIX
X+#### For modern BSD systems (added for FreeBSD 6.3 port) use: SYS= -D_SYS_BSD
X #### For PC's with WATCOM C/386 use the special Makefile instead,
X #### No other ports are built in yet. Please do them, and tell us how!
X #### Refer to lib/system.h and lib/syscode.c for ideas.
X@@ -24,7 +25,7 @@
X #### datasets (roughly 5000 loci vs 1000 loci). For even bigger datasets,
X #### modify mapm/mapm.h.
X
X-SYS= -D_SYS_SUNOS
X+SYS= -D_SYS_BSD -D_BIG_DATASETS
X
X #### Next define the system libraries to link with Mapmaker. On SunOS, Ultrix
X #### and other vanilla-ish BSD systems, the correct setting is:
X@@ -46,7 +47,7 @@
X #### Be sure that you have write permission to this directory (e.g. you may
X #### need to be logged in as "root" to install MAPMAKER in some directories).
X
X-DIR= /usr/local/bin
X+DIR= ${PREFIX}/bin
X
X #### RDLN below refers to the GNU Readline library, which can (optionally) be
X #### used by MAPMAKER to provide interactive command line editing. See the
X@@ -70,9 +71,11 @@
X #### (see the end of readline/readline.c). Readline will not compile on
X #### A/UX without using GCC instead of A/UX's cc (because it needs alloca).
X
X-OUR_LIB= gnu.o
X-GNU_OPT= -D_GNU_READLINE -I.
X-GNU_LIBS= -L$(RDLN) -lreadline
X+#OUR_LIB= gnu.o
X+#GNU_OPT= -D_GNU_READLINE -I.
X+OUR_LIB= lib.o
X+GNU_OPT=
X+#GNU_LIBS= -L$(RDLN) -lreadline
X
X #### Now we specify the commands used to compile MAPMAKER. The stuff
X #### below works on Sun SPARCStations running SunOS 4.1.x (aka Solaris 1.x)
X@@ -82,8 +85,8 @@
X #### person at your site should be able to figure out what to do almost
X #### trivially. See the file INSTALL.ME for details.
X
X-COMPILE= cc
X-LINKALL= cc
X+COMPILE= gcc
X+LINKALL= gcc
X LINKLIB= ld -r
X DELETE= rm -f
X INSTALL= cp
END-of-mapm3/files/patch-Makefile
echo x - mapm3/files/patch-lib-iolib.c
sed 's/^X//' >mapm3/files/patch-lib-iolib.c << 'END-of-mapm3/files/patch-lib-iolib.c'
X--- lib/iolib.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/iolib.c 2008-03-23 15:39:56.000000000 +0000
X@@ -299,7 +299,7 @@
X }
X
X
X-void fgetln(fp) /* ln is side-effected. */
X+void fgetln_(fp) /* ln is side-effected. */
X FILE *fp;
X {
X if (fp==stdin) { getln("? "); return; }
END-of-mapm3/files/patch-lib-iolib.c
echo x - mapm3/files/patch-lib-iolib.h
sed 's/^X//' >mapm3/files/patch-lib-iolib.h << 'END-of-mapm3/files/patch-lib-iolib.h'
X--- lib/iolib.h.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/iolib.h 2008-04-03 20:00:49.000000000 +0000
X@@ -53,9 +53,9 @@
X conditions. Assume its really only one (or maybe 2-3) lines. ps_ is similar,
X but for internal use only by the functions in this library.
X
X-Ln is a global input string side-effected by getln() and fgetln().
X+Ln is a global input string side-effected by getln() and fgetln_().
X The pointer ln itself may be side-effected, (eg: by the token parsing
X-routines) as it is reset during each call to getln() or fgetln().
X+routines) as it is reset during each call to getln() or fgetln_().
X However, the string space used to hold the input line is reused, and
X any pointers into the ln string which you saved may point to trash
X after one of these calls. Ln is alloced for 2K chars, leaving lots of
X@@ -66,7 +66,7 @@
X word breaks, converting tabs to spaces (every 8 chars), buffering
X output (perhaps multiple lines!) and more. The do_fwrite() function does
X not do this. Similarly, the getln() function despace()es,
X-lowercase()es, and filter()s its input, while fgetln(), input(), and
X+lowercase()es, and filter()s its input, while fgetln_(), input(), and
X finput() functions do not [yes, it's a somewhat odd inconsistancy, but
X it's handy].
X
X@@ -254,6 +254,14 @@
X files! (The obvious exception is logging and input redirection, for which
X you should use the rather carefuly crafted routines described above!) */
X
X+/* Mimics 'writable string' behaviour which wasn't problematic in some old
X+ pre '89 code. GCC supported it for a long time via the -fwritable-strings
X+ option. However, as of version 3.4, it was declared deprecated, and removed
X+ in later versions. A lot of the code depends on this questionable behaviour,
X+ so the following macro is used throughout this *BSD port. */
X+#define WRS(s) (char[]){(s)}
X+
X+
X bool make_filename(); /* args: char *name; int mode; char *extension;
X This turns name into a perfectly valid file name, and returns TRUE if this
X was possible. The name may include a directory specification - otherwise it
X@@ -277,7 +285,7 @@
X #define APPEND "a"
X void close_file(); /* args: FILE *fp; */
X
X-bool end_of_file(); /* args: FILE *fp; returns TRUE if finput() or fgetln()
X+bool end_of_file(); /* args: FILE *fp; returns TRUE if finput() or fgetln_()
X will be able to grab a new line from the file. */
X bool end_of_text(); /* args: FILE *fp; Like an end-of-file test, except it also
X returns TRUE if rest of the file is white. As a side-effect, it will step
X@@ -289,17 +297,17 @@
X
X #define fpr(fp) fprint(fp,ps)
X #define fwp(fp) fwrite(fp,ps)
X-#define fnl(fp) fwrite(fp,"\n")
X+#define fnl(fp) fwrite(fp,WRS("\n"))
X
X void finput(); /* args: FILE *fp; char *str; int max_input_chars; */
X-void fgetln(); /* args: FILE *fp; side-effects global char *ln;
X- Finput() and fgetln() both return a filter()ed line, and on end-of-file, the
X+void fgetln_(); /* args: FILE *fp; side-effects global char *ln;
X+ Finput() and fgetln_() both return a filter()ed line, and on end-of-file, the
X ENDOFILE message is sent. Str must have room for max_input_chars+1 chars,
X and only max_input_chars-1 chars can usually be read, as a '\n' may be read
X in at the end and then deleted from the string. */
X
X void fgetdataln(); /* args: FILE *fp; int *count; side-effects global ln;
X- Like fgetln(), although this skips null (white) and comment lines (those
X+ Like fgetln_(), although this skips null (white) and comment lines (those
X beginning with a '#' in the leftmost position. Also, each time any line is
X read from the file (data, null, or comment), *count is incremented. */
X
X@@ -329,7 +337,7 @@
X
X extern char *ps_, *ln_; /* input and output strings for the library only */
X extern char *linebuf; /* tty output buffer */
X-extern char *gotln, *lnptr; /* input line for getln(), fgetln() */
X+extern char *gotln, *lnptr; /* input line for getln(), fgetln_() */
X
X extern FILE **in_fp; /* the "stack" of input files for redirecting input */
X extern int redirs;
END-of-mapm3/files/patch-lib-iolib.h
echo x - mapm3/files/patch-lib-makehelp.c
sed 's/^X//' >mapm3/files/patch-lib-makehelp.c << 'END-of-mapm3/files/patch-lib-makehelp.c'
X--- lib/makehelp.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/makehelp.c 2008-03-27 21:52:37.000000000 +0000
X@@ -131,7 +131,7 @@
X {
X close_file(file);
X
X- fwrite(hlp,"@end\n");
X+ fwrite(hlp,WRS("@end\n"));
X close_file(hlp);
X
X write_topics_and_end();
X@@ -172,9 +172,9 @@
X strcpy(man_name, argv[4]);
X
X strcpy(code_failed,code_name);
X- make_filename(code_failed,FORCE_EXTENSION,"failed");
X+ make_filename(code_failed,FORCE_EXTENSION,WRS("failed"));
X strcpy(final_hlp_name,hlp_name);
X- make_filename_in_dir(final_hlp_name,FORCE_EXTENSION,"help",
X+ make_filename_in_dir(final_hlp_name,FORCE_EXTENSION,WRS("help"),
X FORCE_DIR,argv[5]);
X
X file= open_file(file_name,READ);
X@@ -187,16 +187,16 @@
X matrix(entry,MAX_COMMANDS,MAXLINE+1,char);
X
X /* start help file 12345678901234567890123456789012345 */
X- fwrite(hlp, "#MAPMAKER help file - do not edit!\n");
X+ fwrite(hlp,WRS("#MAPMAKER help file - do not edit!\n"));
X pos= 34l + LINE_BREAK_LEN;
X
X /* code file */
X- fwrite(code,"/* MAPMAKER help code file - do not edit! */ \n\n");
X- fwrite(code,"#define INC_LIB \n#define INC_SHELL \n");
X- fwrite(code,"#include \"system.h\" \n\n");
X+ fwrite(code,WRS("/* MAPMAKER help code file - do not edit! */ \n\n"));
X+ fwrite(code,WRS("#define INC_LIB \n#define INC_SHELL \n"));
X+ fwrite(code,WRS("#include \"system.h\" \n\n"));
X /* sf(ps,"char help_filename[]= \"%s\";\n\n",final_hlp_name);
X fwrite(code,ps); */
X- fwrite(code,"void make_help_entries()\n{\n");
X+ fwrite(code,WRS("void make_help_entries()\n{\n"));
X
X /* man file */
X man_write_title();
X@@ -242,7 +242,7 @@
X strcpy(name,str+i); despace(name);
X nextstr();
X sf(ps,"\t%s... ",name); pr(); flush();
X-
X+
X if (streq(type,"cmd")) parse_entry(CMD,name,abbreviation);
X else if (streq(type,"opt")) parse_entry(OPT,name,abbreviation);
X else if (streq(type,"param")) parse_entry(PAR,name,abbreviation);
X@@ -419,7 +419,7 @@
X sf(ps," mktopic(%d,\"%s\",TOP,%ldl);\n",s,temp,position[s]);
X fpr(code); s++;
X }
X- fprint(code,"}\n");
X+ fprint(code,WRS("}\n"));
X }
X
X
X@@ -681,7 +681,7 @@
X case TOP:
X man_write_line("");
X strcpy(upcase,section[s]); uppercase(upcase);
X- sf(temp," %s\(%d\) %s ",(s>=10 ? "":" "),s,upcase); s++; break;
X+ sf(temp," %s(%d) %s ",(s>=10 ? "":" "),s,upcase); s++; break;
X case CMD:
X strcpy(upcase,entry[i]); uppercase(upcase);
X sf(temp," %s Command ",upcase); break;
X@@ -718,7 +718,7 @@
X if (entry_type[i]==TOP) {
X man_write_line("");
X strcpy(upcase,section[s]); uppercase(upcase);
X- sf(temp,"%s\(%d\) %s ",(s>=10 ? "":""),s,upcase); s++;
X+ sf(temp,"%s(%d) %s ",(s>=10 ? "":""),s,upcase); s++;
X man_write_line(temp);
X } else {
X sf(temp,"%s%s",entry[i],(entry_type[i]==HLP ? "*":""));
END-of-mapm3/files/patch-lib-makehelp.c
echo x - mapm3/files/patch-lib-shell.c
sed 's/^X//' >mapm3/files/patch-lib-shell.c << 'END-of-mapm3/files/patch-lib-shell.c'
X--- lib/shell.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/shell.c 2008-03-27 21:24:20.000000000 +0000
X@@ -129,7 +129,7 @@
X
X run {
X strcpy(name,version_filename);
X- if (!make_filename_in_dir(name,FORCE_EXTENSION,".v",
X+ if (!make_filename_in_dir(name,FORCE_EXTENSION,WRS(".v"),
X FORCE_DIR,CODE_DIR)) send(CANTOPEN);
X fp=open_file(name,READ);
X finput(fp,ln_,MAXLINE); p=ln_; /* don't hack &ln_ */
X@@ -226,7 +226,7 @@
X help_uses_wimp_help= FALSE;
X
X help_file=NULL;
X- if (make_filename_in_dir(help_filename,FORCE_EXTENSION,HELP_EXT,
X+ if (make_filename_in_dir(help_filename,FORCE_EXTENSION,WRS(HELP_EXT),
X DEFAULT_DIR,CODE_DIR)) {
X run help_file=open_file(help_filename,READ);
X except_when(CANTOPEN) {}
X@@ -950,7 +950,7 @@
X use_uncrunched_args();
X get_one_arg(stoken,sREQUIRED,file_name);
X
X- if (!make_filename(file_name,DEFAULT_EXTENSION,"in"))
X+ if (!make_filename(file_name,DEFAULT_EXTENSION,WRS("in")))
X error("bad input file name");
X else redirect_input(file_name,TRUE); /* verbose -> messages */
X }
X@@ -972,7 +972,7 @@
X usage_error(1);
X
X } else if (!nullstr(file_name)) {
X- if (!make_filename(file_name,DEFAULT_EXTENSION,"out"))
X+ if (!make_filename(file_name,DEFAULT_EXTENSION,WRS("out")))
X sf(ps,"error: Bad photo file name");
X if (!photo_to_file(file_name,"a"))
X sf(ps,"error: Unable to open photo file '%s'\n",file_name);
X@@ -1080,12 +1080,12 @@
X else if (topic_help_key[i]==HELPLESS) print(NO_HELP_KEY);
X else {
X fgoto_line(help_file,topic_help_key[i]);
X- fgetln(help_file);
X+ fgetln_(help_file);
X got_any=FALSE;
X while (ln[0]!='@') {
X got_any=TRUE;
X print(ln); nl();
X- fgetln(help_file);
X+ fgetln_(help_file);
X }
X if (!got_any) print(NO_HELP_KEY);
X }
X@@ -1131,12 +1131,12 @@
X else if (cmd[i]->help_key==HELPLESS) print(NO_HELP_KEY);
X else {
X fgoto_line(help_file,cmd[i]->help_key);
X- fgetln(help_file);
X+ fgetln_(help_file);
X got_any=FALSE;
X while (ln[0]!='@') {
X got_any=TRUE;
X print(ln); nl();
X- fgetln(help_file);
X+ fgetln_(help_file);
X }
X if (!got_any) print(NO_HELP_KEY);
X }
X@@ -1164,10 +1164,10 @@
X { print(NO_HELP_KEY); nl(); print(SURROGATE_ABOUT); }
X else {
X fgoto_line(help_file,n);
X- fgetln(help_file);
X+ fgetln_(help_file);
X while (ln[0]!='@') {
X print(ln); nl();
X- fgetln(help_file);
X+ fgetln_(help_file);
X }
X }
X nl(); print(MOREHELP0); print(MOREHELP1); print(MOREHELP2);
END-of-mapm3/files/patch-lib-shell.c
echo x - mapm3/files/patch-lib-syscode.c
sed 's/^X//' >mapm3/files/patch-lib-syscode.c << 'END-of-mapm3/files/patch-lib-syscode.c'
X--- lib/syscode.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/syscode.c 2008-03-27 21:03:12.000000000 +0000
X@@ -198,7 +198,7 @@
X long fseekvalue= 0L;
X frewind(fp);
X run while (fseekvalue < index-1) {
X- fgetln(help_file);
X+ fgetln_(help_file);
X fseekvalue+=len(ln)+1;
X } except_when(ENDOFILE) return(FALSE);
X return(TRUE);
X@@ -742,26 +742,26 @@
X
X } else if (matches(argv[i]+1,"load")) {
X check_file_arg(*argc_ptr-i,argv[i+1],file_arg[LOAD_FILE_ARG],
X- "load","data",argv[0],READ);
X+ WRS("load"),WRS("data"),argv[0],READ);
X prep_it=FALSE;
X argv[i++][0]='\0'; argv[i][0]='\0';
X } else if (matches(argv[i]+1,"prep")) {
X check_file_arg(*argc_ptr-i,argv[i+1],file_arg[LOAD_FILE_ARG],
X- "prep","raw",argv[0],READ);
X+ WRS("prep"),WRS("raw"),argv[0],READ);
X prep_it=TRUE;
X argv[i++][0]='\0'; argv[i][0]='\0';
X } else if (matches(argv[i]+1,"run")) {
X check_file_arg(*argc_ptr-i,argv[i+1],file_arg[RUN_FILE_ARG],
X- "run","in",argv[0],READ);
X+ WRS("run"),WRS("in"),argv[0],READ);
X argv[i++][0]='\0'; argv[i][0]='\0';
X } else if (matches(argv[i]+1,"photo")) {
X check_file_arg(*argc_ptr-i,argv[i+1],file_arg[PHOTO_FILE_ARG],
X- "photo","out",argv[0],APPEND);
X+ WRS("photo"),WRS("out"),argv[0],APPEND);
X append_it=TRUE;
X argv[i++][0]='\0'; argv[i][0]='\0';
X } else if (matches(argv[i]+1,"out")) {
X check_file_arg(*argc_ptr-i,argv[i+1],file_arg[PHOTO_FILE_ARG],
X- "photo","out",argv[0],WRITE);
X+ WRS("photo"),WRS("out"),argv[0],WRITE);
X append_it=FALSE;
X argv[i++][0]='\0'; argv[i][0]='\0';
X } else if (matches(argv[i]+1,"help")) {
END-of-mapm3/files/patch-lib-syscode.c
echo x - mapm3/files/patch-lib-system.h
sed 's/^X//' >mapm3/files/patch-lib-system.h << 'END-of-mapm3/files/patch-lib-system.h'
X--- lib/system.h.orig 2008-04-04 20:05:29.000000000 +0000
X+++ lib/system.h 2008-03-27 20:49:34.000000000 +0000
X@@ -43,6 +43,7 @@
X _SYS_OSF Specifics for OSF/1 for DEC Alpha (like, if it ever ships)
X _SYS_AIX Specifics for the inferior but marketable AIX (RISC or other?)
X _SYS_HPUX Specifics for HP-UX (8.x?) for HP 9000/700 series.
X+ _SYS_BSD Specifics for modern BSD systems (tested on FreeBSD 6.3)
X _SYS_UNIX Basic Unix semantics, defined if any one of the above is
X
X _SYS_WATCOM Specifics for WATCOM C/386 9.0 with apropriate libraries
X@@ -86,6 +87,11 @@
X #else
X #ifdef _SYS_AUX
X #define _SYS_UNIX /* Note: NOT _SYS_MAC */
X+#else
X+#ifdef _SYS_BSD
X+#define _SYS_UNIX
X+#else
X+#endif
X #endif
X #endif
X #endif
X@@ -191,6 +197,9 @@
X #ifdef _SYS_ULTRIX
X #define SIGHANDLE void
X #endif
X+#ifdef _SYS_BSD
X+#define SIGHANDLE void
X+#endif
X
X
X
X@@ -210,10 +219,14 @@
X #ifdef _SYS_ULTRIX
X #define USE_RANDOM
X #else
X+#ifdef _SYS_BSD
X+#define USE_DRAND48 /* bsd has 'random' */
X+#else
X #define USE_SRAND
X #endif
X #endif
X #endif
X+#endif
X
X
X /***************************** C-Library **************************************
X@@ -282,6 +295,14 @@
X #define QSORT_LENGTH int /* actually width is an int, not a unsigned */
X #endif
X
X+#ifdef _SYS_BSD /* modern BSD systems (tested on FreeBSD 6.3) */
X+#define CALLOC_PTR_TO char
X+#define CALLOC_NUM_TYPE size_t /* unsigned in man page is wrong? */
X+#define SIZEOF_TYPE size_t
X+#define QSORT_DATA_PTR_TO char
X+#define QSORT_LENGTH int /* actually width is an int, not a unsigned */
X+#endif
X+
X #ifdef _SYS_AUX /* just like ULTRIX? */
X #define CALLOC_PTR_TO char
X #define CALLOC_NUM_TYPE size_t /* unsigned in man page is wrong? */
X@@ -583,7 +604,7 @@
X #include <signal.h>
X #include <errno.h>
X #include <time.h> /* for ctime() def - Who does not have this file? */
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <sys/types.h>
X
X #ifdef TRY_WINSIZE
END-of-mapm3/files/patch-lib-system.h
echo x - mapm3/files/patch-mapm-chroms.c
sed 's/^X//' >mapm3/files/patch-mapm-chroms.c << 'END-of-mapm3/files/patch-mapm-chroms.c'
X--- mapm/chroms.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/chroms.c 2008-03-27 21:25:42.000000000 +0000
X@@ -909,7 +909,7 @@
X write_map(fp, chromosome->map_list[i]);
X }
X
X- fprint(fp,"*Assignments and Placements:\n");
X+ fprint(fp,WRS("*Assignments and Placements:\n"));
X for (locus=0; locus< raw.num_markers; locus++) {
X sf(ps,"*%-8s %2d",raw.locus_name[locus],assignment[locus]->status);
X fpr(fp);
X@@ -943,7 +943,7 @@
X MAP *map;
X
X /* chromosomes */
X- fgetln(fp);
X+ fgetln_(fp);
X stoken(&ln,sREQUIRED,word);
X if (!streq(word,"*Chromosomes:") || !itoken(&ln,iREQUIRED,&num_chroms)) {
X baddata("error finding *Chromosomes:");
X@@ -957,7 +957,7 @@
X baddata("listed number of chromosomes and actual number do not agree");
X }
X
X- fgetln(fp);
X+ fgetln_(fp);
X if (!streq(ln,"*Assignments and Placements:"))
X baddata("error finding *Assignments and Placements:");
X for (locus=0; locus < raw.num_markers; locus++) {
END-of-mapm3/files/patch-mapm-chroms.c
echo x - mapm3/files/patch-mapm-database.c
sed 's/^X//' >mapm3/files/patch-mapm-database.c << 'END-of-mapm3/files/patch-mapm-database.c'
X--- mapm/database.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/database.c 2008-03-27 21:26:48.000000000 +0000
X@@ -45,7 +45,7 @@
X get_one_arg(stoken, sREQUIRED, out_name);
X
X /* force file extension to be ".data" */
X- make_filename(out_name, FORCE_EXTENSION, ".data");
X+ make_filename(out_name, FORCE_EXTENSION, WRS(".data"));
X
X /* make a function call to a procedure which connects to the database */
X get_from_database();
END-of-mapm3/files/patch-mapm-database.c
echo x - mapm3/files/patch-mapm-info.c
sed 's/^X//' >mapm3/files/patch-mapm-info.c << 'END-of-mapm3/files/patch-mapm-info.c'
X--- mapm/info.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/info.c 2008-03-27 21:26:18.000000000 +0000
X@@ -966,9 +966,9 @@
X class[locus]);
X fpr(fp);
X }
X- fprint(fp,"*Classes:\n");
X+ fprint(fp,WRS("*Classes:\n"));
X for (i=0; i<NUM_CLASSES; i++)
X- { fprint(fp,"*"); fprint(fp,class_name[i]); fnl(fp); }
X+ { fprint(fp,WRS("*")); fprint(fp,class_name[i]); fnl(fp); }
X }
X
X
X@@ -980,12 +980,12 @@
X real rate;
X char temp_locus_name[NAME_LEN+2], word[TOKLEN+1];
X
X- fgetln(fp);
X+ fgetln_(fp);
X if (sscanf(ln,"%s %d %d",word,&num_groups,&num_orders)!=3 ||
X !streq(word,"*OrderInfo:")) baddata("expected '*OrderInfo: # #'");
X
X for (locus=0; locus < raw.num_markers; locus++) {
X- fgetln(fp);
X+ fgetln_(fp);
X
X if (!nstoken(&ln,sREQUIRED,temp_locus_name,NAME_LEN+1) ||
X temp_locus_name[0]!='*' || len(temp_locus_name)<2)
X@@ -1007,9 +1007,9 @@
X order_next[locus]= ord_next;
X class[locus]= class_num;
X }
X- fgetln(fp); if (!streq(ln,"*Classes:")) baddata("bad classes");
X+ fgetln_(fp); if (!streq(ln,"*Classes:")) baddata("bad classes");
X for (i=0; i<NUM_CLASSES; i++)
X- { fgetln(fp); strcpy(class_name[i],ln+1); }
X+ { fgetln_(fp); strcpy(class_name[i],ln+1); }
X }
X
X
END-of-mapm3/files/patch-mapm-info.c
echo x - mapm3/files/patch-mapm-map_info.h
sed 's/^X//' >mapm3/files/patch-mapm-map_info.h << 'END-of-mapm3/files/patch-mapm-map_info.h'
X--- mapm/map_info.h.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/map_info.h 2008-03-31 00:14:48.000000000 +0000
X@@ -215,7 +215,7 @@
X /***** Chromosome framework, assignment, and placement stuff - chroms.c *****/
X
X extern SAVED_LIST *chromosome; /* malloced by allocate_mapping_structs() */
X-#define chrom2str(x) ((x)>=0 ? chromosome->map_list[x]->map_name : "none")
X+#define chrom2str(x) ((x)>=0 ? chromosome->map_list[x]->map_name : WRS("none"))
X bool isa_chrom(); /* args: char *name; int *chrom; side-effected if TRUE */
X #define num_chromosomes (chromosome->num_maps)
X extern int current_chrom; /* set by the sequence command or reset_state() */
END-of-mapm3/files/patch-mapm-map_info.h
echo x - mapm3/files/patch-mapm-mapm.h
sed 's/^X//' >mapm3/files/patch-mapm-mapm.h << 'END-of-mapm3/files/patch-mapm-mapm.h'
X--- mapm/mapm.h.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/mapm.h 2008-03-16 13:53:32.000000000 +0000
X@@ -19,7 +19,7 @@
X #define command void /* needed if INC_SHELL was not defined */
X #endif
X
X-#include "system.h"
X+#include "../lib/system.h"
X
X
X /***************** MAPM Constants *****************/
END-of-mapm3/files/patch-mapm-mapm.h
echo x - mapm3/files/patch-mapm-maps.c
sed 's/^X//' >mapm3/files/patch-mapm-maps.c << 'END-of-mapm3/files/patch-mapm-maps.c'
X--- mapm/maps.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/maps.c 2008-03-23 15:39:56.000000000 +0000
X@@ -592,7 +592,7 @@
X
X clean_map(map);
X
X- fgetln(fp);
X+ fgetln_(fp);
X if (!nstoken(&ln,sREQUIRED,name,NAME_LEN+1) || name[0]!='*' ||
X sscanf(ln,"%d %d %d %d %lf",&num_loci,&unlink,&sex,&errors,&like)!=5)
X baddata("expected *chrom-name # # # #");
X@@ -603,31 +603,31 @@
X strcpy(map->map_name,name+1); map->allow_errors= errors;
X map->num_loci=num_loci; map->log_like=like;
X
X- fgetln(fp);
X+ fgetln_(fp);
X for (i=0; i<num_loci; i++) {
X- if (nullstr(ln)) fgetln(fp);
X+ if (nullstr(ln)) fgetln_(fp);
X if (!itoken(&ln,iREQUIRED,&num)) send(CRASH);
X map->locus[i]=num;
X }
X- fgetln(fp);
X+ fgetln_(fp);
X for (i=0; i<num_loci-1; i++) {
X- if (nullstr(ln)) fgetln(fp);
X+ if (nullstr(ln)) fgetln_(fp);
X if (!rtoken(&ln,rREQUIRED,&rnum)) send(CRASH);
X map->rec_frac[i][MALE]=rnum;
X }
X
X if (raw.data_type==CEPH && sex) {
X- fgetln(fp);
X+ fgetln_(fp);
X for(i=0; i<num_loci-1; i++) {
X- if (nullstr(ln)) fgetln(fp);
X+ if (nullstr(ln)) fgetln_(fp);
X if (!rtoken(&ln,rREQUIRED,&rnum)) send(CRASH);
X map->rec_frac[i][FEMALE]=rnum;
X }
X } else for (i=0; i<num_loci-1; i++) map->rec_frac[i][FEMALE]=0.0;
X
X- fgetln(fp);
X+ fgetln_(fp);
X for(i=0; i<num_loci-1; i++) {
X- if (nullstr(ln)) fgetln(fp);
X+ if (nullstr(ln)) fgetln_(fp);
X if (!itoken(&ln,iREQUIRED,&num)) send(CRASH);
X map->fix_interval[i]=num;
X }
X@@ -637,7 +637,7 @@
X matrix(map->error_lod,map->max_loci,raw.data.f2.num_indivs,real);
X }
X for (i=0; i<map->num_loci; i++) {
X- fgetln(fp);
X+ fgetln_(fp);
X if (!stoken(&ln,sREQUIRED,str) || !streq(str,"errors"))
X send(CRASH);
X if (!rtoken(&ln,rREQUIRED,&rnum)) send(CRASH);
X@@ -646,9 +646,9 @@
X for(j=0; j<raw.data.f2.num_indivs; j++)
X map->error_lod[i][j]= 0.0;
X } else {
X- fgetln(fp);
X+ fgetln_(fp);
X for (j=0; j<raw.data.f2.num_indivs; j++) {
X- if (nullstr(ln)) fgetln(fp);
X+ if (nullstr(ln)) fgetln_(fp);
X if (!rtoken(&ln,rREQUIRED,&rnum)) send(CRASH);
X map->error_lod[i][j]=rnum;
X }
END-of-mapm3/files/patch-mapm-maps.c
echo x - mapm3/files/patch-mapm-npt_cmds.c
sed 's/^X//' >mapm3/files/patch-mapm-npt_cmds.c << 'END-of-mapm3/files/patch-mapm-npt_cmds.c'
X--- mapm/npt_cmds.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/npt_cmds.c 2008-03-27 21:27:12.000000000 +0000
X@@ -78,7 +78,7 @@
X nomore_args(num_args);
X
X run {
X- if (!make_filename(name,FORCE_EXTENSION,PS_EXT))
X+ if (!make_filename(name,FORCE_EXTENSION,WRS(PS_EXT)))
X { sf(ps,"illegal filename '%s'",name); error(ps); }
X fp= open_file(name,WRITE);
X sf(ps,"Drawing map in PostScript file '%s'... \n",name); pr();
END-of-mapm3/files/patch-mapm-npt_cmds.c
echo x - mapm3/files/patch-mapm-print.c
sed 's/^X//' >mapm3/files/patch-mapm-print.c << 'END-of-mapm3/files/patch-mapm-print.c'
X--- mapm/print.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/print.c 2008-03-27 21:34:40.000000000 +0000
X@@ -540,7 +540,7 @@
X }
X }
X
X-#define MAPPING_HEAD1\
X+#define MAPPING_HEAD1 \
X " 2nd Left "
X #define MAPPING_HEAD2 \
X " Num Name Assignment Chrom LOD Mapping Like Locus Errors"
END-of-mapm3/files/patch-mapm-print.c
echo x - mapm3/files/patch-mapm-reader.c
sed 's/^X//' >mapm3/files/patch-mapm-reader.c << 'END-of-mapm3/files/patch-mapm-reader.c'
X--- mapm/reader.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/reader.c 2008-03-27 21:10:18.000000000 +0000
X@@ -81,7 +81,7 @@
X
X void getdataln(fp) /* get next nonblank,noncomment data file line */
X FILE *fp;
X-{ do { fgetln(fp); data_line++; } while (nullstr(ln)||ln[0]=='#'); }
X+{ do { fgetln_(fp); data_line++; } while (nullstr(ln)||ln[0]=='#'); }
X
X
X void baddata(reason) /* send data reading error message */
X@@ -135,7 +135,7 @@
X char tmpname[PATH_LENGTH+1];
X
X make_filename(name,FORCE_EXTENSION,ext);
X- strcpy(tmpname,name); make_filename(tmpname,FORCE_EXTENSION,TEMP_EXT);
X+ strcpy(tmpname,name); make_filename(tmpname,FORCE_EXTENSION,WRS(TEMP_EXT));
X
X fp=NULL; *exists=FALSE;
X run {
X@@ -162,7 +162,7 @@
X bool exists;
X {
X char tmpname[PATH_LENGTH+1], oldname[PATH_LENGTH+1];
X- strcpy(tmpname,name); make_filename(tmpname,FORCE_EXTENSION,TEMP_EXT);
X+ strcpy(tmpname,name); make_filename(tmpname,FORCE_EXTENSION,WRS(TEMP_EXT));
X strcpy(oldname,name); make_filename(oldname,FORCE_EXTENSION,oldext);
X
X if (exists) { rename_file(name,oldname); }
X@@ -214,7 +214,7 @@
X raw.data.f2.cross_type);
X print(" ok\n");
X
X- make_filename(name,FORCE_EXTENSION,MAPS_EXT); strcpy(type,"map");
X+ make_filename(name,FORCE_EXTENSION,WRS(MAPS_EXT)); strcpy(type,"map");
X run {
X fp2=NULL;
X fp2=open_file(name,READ);
X@@ -228,7 +228,7 @@
X close_file(fp2);
X } except_when(CANTOPEN) { } /* need a better handler */
X
X- make_filename(name,FORCE_EXTENSION,TWO_EXT); strcpy(type,"two-point");
X+ make_filename(name,FORCE_EXTENSION,WRS(TWO_EXT)); strcpy(type,"two-point");
X run {
X fp2=NULL;
X fp2=open_file(name,READ);
X@@ -240,7 +240,7 @@
X close_file(fp2);
X } except_when(CANTOPEN) { } /* need a better handler */
X
X- make_filename(name,FORCE_EXTENSION,THREE_EXT); strcpy(type,"three-point");
X+ make_filename(name,FORCE_EXTENSION,WRS(THREE_EXT)); strcpy(type,"three-point");
X run {
X fp2=NULL;
X fp2=open_file(name,READ);
X@@ -285,39 +285,39 @@
X run {
X strcpy(name,base_name);
X if (save_genos_too) {
X- fp= start_save_to_file(name,DATA_EXT,"genotype",&exists);
X+ fp= start_save_to_file(name,WRS(DATA_EXT),"genotype",&exists);
X write_f2_data(fp); /* deals with header and magic number */
X close_file(fp); fp=NULL;
X- finish_save_to_file(name,DATA_OLD,exists);
X+ finish_save_to_file(name,WRS(DATA_OLD),exists);
X }
X- fp= start_save_to_file(name,MAPS_EXT,"map",&exists);
X+ fp= start_save_to_file(name,WRS(MAPS_EXT),"map",&exists);
X write_magic_number(fp,"map");
X write_order_data(fp);
X write_mapping_data(fp);
X write_status(fp);
X close_file(fp); fp=NULL;
X- finish_save_to_file(name,MAPS_OLD,exists);
X+ finish_save_to_file(name,WRS(MAPS_OLD),exists);
X
X if (two_pt_touched) {
X- fp= start_save_to_file(name,TWO_EXT,"two-point",&exists);
X+ fp= start_save_to_file(name,WRS(TWO_EXT),"two-point",&exists);
X write_magic_number(fp,"two-point");
X write_two_pt(fp);
X close_file(fp); fp=NULL;
X- finish_save_to_file(name,TWO_OLD,exists);
X+ finish_save_to_file(name,WRS(TWO_OLD),exists);
X }
X if (three_pt_touched) {
X- fp= start_save_to_file(name,THREE_EXT,"three-point",&exists);
X+ fp= start_save_to_file(name,WRS(THREE_EXT),"three-point",&exists);
X write_magic_number(fp,"three-point");
X write_three_pt(fp);
X close_file(fp); fp=NULL;
X- finish_save_to_file(name,THREE_OLD,exists);
X+ finish_save_to_file(name,WRS(THREE_OLD),exists);
X }
X if (num_traits>0) {
X- fp= start_save_to_file(name,TRAIT_EXT,"traits",&exists);
X+ fp= start_save_to_file(name,WRS(TRAIT_EXT),"traits",&exists);
X write_magic_number(fp,"trait");
X write_traits(fp);
X close_file(fp); fp=NULL;
X- finish_save_to_file(name,TRAIT_OLD,exists);
X+ finish_save_to_file(name,WRS(TRAIT_OLD),exists);
X free_traits();
X }
X two_pt_touched= FALSE;
X@@ -576,15 +576,15 @@
X char header[MAXLINE+1];
X
X if (raw.data.f2.cross_type==F2_INTERCROSS)
X- fprint(fp,"prepared data f2 intercross\n");
X+ fprint(fp,WRS("prepared data f2 intercross\n"));
X else if (raw.data.f2.cross_type==F2_BACKCROSS)
X- fprint(fp,"prepared data f2 backcross\n");
X+ fprint(fp,WRS("prepared data f2 backcross\n"));
X else if (raw.data.f2.cross_type==RI_SIB)
X- fprint(fp,"prepared data f2 ri-sib\n");
X+ fprint(fp,WRS("prepared data f2 ri-sib\n"));
X else if (raw.data.f2.cross_type==RI_SELF)
X- fprint(fp,"prepared data f2 ri-self\n");
X+ fprint(fp,WRS("prepared data f2 ri-self\n"));
X else if (raw.data.f2.cross_type==F3_SELF)
X- fprint(fp,"prepared data f3\n");
X+ fprint(fp,WRS("prepared data f3\n"));
X
X sf(header,"%d %d %d\n",raw.filenumber,raw.data.f2.num_indivs,
X raw.num_markers); fprint(fp,header);
X@@ -593,7 +593,7 @@
X sf(ps,"*%-10s ", raw.locus_name[i]);
X fpr(fp);
X for (j=0; j<raw.data.f2.num_indivs; j++) {
X- if (j%50==0 && j!=0) fprint(fp,"\n ");
X+ if (j%50==0 && j!=0) fprint(fp,WRS("\n "));
X sf(ps,"%c",raw.data.f2.allele[i][j]);
X fpr(fp);
X }
X@@ -828,9 +828,7 @@
X char *symb;
X {
X /* CHANGED FOR THIS VERION - NOW READS "-AHBCD" */
X-
X- if (chr==symb[0]) return(MISSING_DATA);
X- else if (chr==symb[1]) return(PARENTAL_TYPE_A);
X+if (chr==symb[0]) return(MISSING_DATA); else if (chr==symb[1]) return(PARENTAL_TYPE_A);
X else if (chr==symb[2]) return(HYBRID_TYPE_H);
X else if (chr==symb[3]) return(PARENTAL_TYPE_B);
X else if (chr==symb[4]) return(TYPE_NOT_A);
X@@ -856,26 +854,26 @@
X fnl(fp);
X }
X fnl(fp);
X- fprint(fp,"#QTL only variables:\n");
X- fprint(fp,"*Print mapm loci: 1\n");
X- fprint(fp,"*Like tolerance: 0.001\n");
X- fprint(fp,"*Brute force: 1\n");
X- fprint(fp,"*Max intervals: -7\n");
X- fprint(fp,"*Max continuous vars: -3\n");
X- fprint(fp,"*Max wiggles: 0\n");
X- fprint(fp,"*Max compares: 0\n");
X- fprint(fp,"*Default units: 1\n");
X- fprint(fp,"*Chromosomes: 0\n");
X- fprint(fp,"*Number of contexts: 1\n");
X- fprint(fp,"*Active context: 0\n");
X+ fprint(fp,WRS("#QTL only variables:\n"));
X+ fprint(fp,WRS("*Print mapm loci: 1\n"));
X+ fprint(fp,WRS("*Like tolerance: 0.001\n"));
X+ fprint(fp,WRS("*Brute force: 1\n"));
X+ fprint(fp,WRS("*Max intervals: -7\n"));
X+ fprint(fp,WRS("*Max continuous vars: -3\n"));
X+ fprint(fp,WRS("*Max wiggles: 0\n"));
X+ fprint(fp,WRS("*Max compares: 0\n"));
X+ fprint(fp,WRS("*Default units: 1\n"));
X+ fprint(fp,WRS("*Chromosomes: 0\n"));
X+ fprint(fp,WRS("*Number of contexts: 1\n"));
X+ fprint(fp,WRS("*Active context: 0\n"));
X fnl(fp);
X- fprint(fp,"*Context 1\n");
X+ fprint(fp,WRS("*Context 1\n"));
X if(num_traits == 1)
X- fprint(fp,"*Trait: 0\n");
X+ fprint(fp,WRS("*Trait: 0\n"));
X else
X- fprint(fp,"*Trait: -1\n");
X- fprint(fp,"*Named sequences: 0\n");
X- fprint(fp,"*Sequence history: 0\n");
X+ fprint(fp,WRS("*Trait: -1\n"));
X+ fprint(fp,WRS("*Named sequences: 0\n"));
X+ fprint(fp,WRS("*Sequence history: 0\n"));
X }
X
X
END-of-mapm3/files/patch-mapm-reader.c
echo x - mapm3/files/patch-mapm-state.c
sed 's/^X//' >mapm3/files/patch-mapm-state.c << 'END-of-mapm3/files/patch-mapm-state.c'
X--- mapm/state.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/state.c 2008-04-03 19:37:40.000000000 +0000
X@@ -734,7 +734,7 @@
X {
X int i, usenum;
X
X- fprint(fp,"*MapmakerStatusInfo:\n");
X+ fprint(fp,WRS("*MapmakerStatusInfo:\n"));
X
X sf(ps,"*PrintNames: %d\n",print_names); fpr(fp);
X sf(ps,"*Tolerance: %lf\n",tolerance); fpr(fp);
X@@ -852,5 +852,5 @@
X load_table(context[i]->sequence_history,fp,INDEX_BY_NUMBER,num);
X }
X
X- if (the_seq_history_num>0) set_current_seq("none",FALSE);
X+ if (the_seq_history_num>0) set_current_seq(WRS("none"),FALSE);
X }
END-of-mapm3/files/patch-mapm-state.c
echo x - mapm3/files/patch-mapm-sys_cmds.c
sed 's/^X//' >mapm3/files/patch-mapm-sys_cmds.c << 'END-of-mapm3/files/patch-mapm-sys_cmds.c'
X--- mapm/sys_cmds.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/sys_cmds.c 2008-03-27 21:28:05.000000000 +0000
X@@ -98,7 +98,7 @@
X close_file(fp);
X if (raw) {
X strcpy(run_file,name);
X- make_filename(run_file,FORCE_EXTENSION,PREP_EXT);
X+ make_filename(run_file,FORCE_EXTENSION,WRS(PREP_EXT));
X if (!redirect_input(run_file,FALSE)) {
X sf(ps,"unable to run file '%s'... skipping initialization\n",
X run_file); pr();
X@@ -145,7 +145,7 @@
X if (!prev_data) print("no data are loaded\n");
X else { sf(ps,DATA_LOADED,raw.filename,data_info(TRUE)); pr(); }
X } else {
X- fp=try_to_open(name,FORCE_EXTENSION,DATA_EXT,prev_data);
X+ fp=try_to_open(name,FORCE_EXTENSION,WRS(DATA_EXT),prev_data);
X if (prev_data) try_to_unload(fp,TRUE,auto_save,TRUE,just_prepared);
X try_to_load(fp,name,prev_data,FALSE);
X just_prepared=FALSE;
X@@ -169,7 +169,7 @@
X if (streq(&name[end-4],DATA_EXT) || streq(&name[end-4],DATA_OLD) ||...
X error(RAW_EXTENSION); */
X
X- fp= try_to_open(name,DEFAULT_EXTENSION,RAW_EXT,prev_data);
X+ fp= try_to_open(name,DEFAULT_EXTENSION,WRS(RAW_EXT),prev_data);
X if (prev_data) try_to_unload(fp,TRUE,auto_save,TRUE,just_prepared);
X try_to_load(fp,name,prev_data,TRUE);
X just_prepared=TRUE;
X@@ -186,7 +186,7 @@
X get_one_arg(stoken,"",name); new_name= !nullstr(name);
X /* want to change this so it sets raw.filename only AFTER it writes OK */
X
X- if (new_name && !make_filename(name,FORCE_EXTENSION,DATA_EXT))
X+ if (new_name && !make_filename(name,FORCE_EXTENSION,WRS(DATA_EXT)))
X { sf(ps,BAD_FILENAME,name); error(ps); }
X
X run {
X@@ -621,7 +621,7 @@
X for (j=num_seq_tokens-1; j>i; j--)
X strcpy(seq_tokens[j+1],seq_tokens[j]);
X /* this is severly broken, if len(appendage) > TOKLEN */
X- strcpy(seq_tokens[i+i],appendage);
X+ strcpy(seq_tokens[i+1],appendage);
X num_seq_tokens++;
X
X untokenize_seq(new_seq,seq_tokens,num_seq_tokens);
END-of-mapm3/files/patch-mapm-sys_cmds.c
echo x - mapm3/files/patch-mapm-two_cmds.c
sed 's/^X//' >mapm3/files/patch-mapm-two_cmds.c << 'END-of-mapm3/files/patch-mapm-two_cmds.c'
X--- mapm/two_cmds.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ mapm/two_cmds.c 2008-04-03 19:58:42.000000000 +0000
X@@ -698,11 +698,11 @@
X
X if (!print_names) {
X print("\n log-likelihood differences\n");
X-print( " count markers a-b-c b-a-c a-c-b\n");
X+print(" count markers a-b-c b-a-c a-c-b\n");
X /* 12345: 1234 1234 1234 */
X } else {
X print("\n log-likelihood differences\n");
X-print( " count markers a-b-c b-a-c a-c-b\n");
X+print(" count markers a-b-c b-a-c a-c-b\n");
X /* 12345: 123456789 123456789 123456789 */
X }
X
END-of-mapm3/files/patch-mapm-two_cmds.c
echo x - mapm3/files/patch-quant-qcmds.c
sed 's/^X//' >mapm3/files/patch-quant-qcmds.c << 'END-of-mapm3/files/patch-quant-qcmds.c'
X--- quant/qcmds.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ quant/qcmds.c 2008-03-27 21:30:08.000000000 +0000
X@@ -1348,7 +1348,7 @@
X if (nullstr(args)) {
X if (!data_loaded()) print(NO_LOADED_DATA); else {
X strcpy(tfile,raw.file);
X- make_filename(tfile,FORCE_EXTENSION,TRAIT_EXT);
X+ make_filename(tfile,FORCE_EXTENSION,WRS(TRAIT_EXT));
X sf(ps,LOADED_DATA,raw.file,tfile,"",raw.n_indivs,
X (raw.data_type==BACKCROSS ? "backcross":"intercross"),
X raw.n_loci,raw.n_traits,maybe_s(raw.n_traits)); pr();
X@@ -1363,9 +1363,9 @@
X nstoken(&args,sREQUIRED,dfile,PATH_LENGTH); tfile[0]='\0';
X nomore_args(num_args);
X run {
X- if (!make_filename(dfile,FORCE_EXTENSION,DATA_EXT)) send(CANTOPEN);
X+ if (!make_filename(dfile,FORCE_EXTENSION,WRS(DATA_EXT))) send(CANTOPEN);
X fpa= open_file(dfile,READ);
X- fgetln(fpa);
X+ fgetln_(fpa);
X
X if (streq(ln,"prepared data f2 backcross")) {
X strcpy(geno_chars,default_backcross_chars);
X@@ -1384,11 +1384,11 @@
X }
X
X strcpy(tfile,dfile);
X- if (!make_filename(tfile,FORCE_EXTENSION,TRAIT_EXT))
X+ if (!make_filename(tfile,FORCE_EXTENSION,WRS(TRAIT_EXT)))
X send(CANTOPEN);
X fpb = open_file(tfile,READ);
X strcpy(mfile,dfile);
X- if (!make_filename(mfile,FORCE_EXTENSION,MAPS_EXT))
X+ if (!make_filename(mfile,FORCE_EXTENSION,WRS(MAPS_EXT)))
X send(CANTOPEN);
X fpc = open_file(mfile,READ);
X
X@@ -1449,7 +1449,7 @@
X
X out_name = get_temp_string();
X strcpy(out_name,in_name);
X- make_filename(out_name,FORCE_EXTENSION,DATA_EXT);
X+ make_filename(out_name,FORCE_EXTENSION,WRS(DATA_EXT));
X
X fp = open_file(in_name,READ);
X getdataln(fp); crunch(ln);
X@@ -1488,7 +1488,7 @@
X name = mkstrcpy(raw.file);
X name3 = mkstrcpy(raw.file);
X name2 = "dummy.qtls";
X- make_filename(name, FORCE_EXTENSION, QTL_EXT);
X+ make_filename(name, FORCE_EXTENSION, WRS(QTL_EXT));
X
X /* The following accounts for the case where there is no file 'name'
X (i.e. it makes one) */
X@@ -1500,7 +1500,7 @@
X close_file(fp);
X }
X
X- make_filename(name3, FORCE_EXTENSION, QTL_OLD);
X+ make_filename(name3, FORCE_EXTENSION, WRS(QTL_OLD));
X run {
X fp = open_file(name2, WRITE);
X sf(ps,"Now saving %s...\n",name); pr();
X@@ -1520,8 +1520,8 @@
X }
X
X name2="dummy.traits";
X- make_filename(name, FORCE_EXTENSION, TRAIT_EXT);
X- make_filename(name3, FORCE_EXTENSION, TRAIT_OLD);
X+ make_filename(name, FORCE_EXTENSION, WRS(TRAIT_EXT));
X+ make_filename(name3, FORCE_EXTENSION, WRS(TRAIT_OLD));
X run {
X fp = open_file(name2, WRITE);
X sf(ps,"Now saving %s...\n",name); pr();
X@@ -1560,7 +1560,7 @@
X save_wiggle(fp,i);
X }
X
X- fprint(fp,"#Compares\n");
X+ fprint(fp,WRS("#Compares\n"));
X
X fprintf(fp,"%d %d\n",num_compares,first_compare);
X for(i = 0; i < num_compares; i++) {
X@@ -1587,7 +1587,7 @@
X
X run {
X strcpy(name,raw.file);
X- make_filename(name,FORCE_EXTENSION,QTL_EXT);
X+ make_filename(name,FORCE_EXTENSION,WRS(QTL_EXT));
X fp= open_file(name,READ);
X
X if(fscanf(fp,"%d\n",&filenum) != 1) send(IOERROR); /* KLUDGE */
END-of-mapm3/files/patch-quant-qcmds.c
echo x - mapm3/files/patch-quant-qraw.c
sed 's/^X//' >mapm3/files/patch-quant-qraw.c << 'END-of-mapm3/files/patch-quant-qraw.c'
X--- quant/qraw.c.orig 2008-04-04 20:05:29.000000000 +0000
X+++ quant/qraw.c 2008-03-27 21:30:39.000000000 +0000
X@@ -124,7 +124,7 @@
X
X void getdataln(fp) /* get next nonblank/noncomment data file line */
X FILE *fp;
X-{ do { fgetln(fp); BADDATA_line_num++; } while(nullstr(ln) || ln[0]=='#');
X+{ do { fgetln_(fp); BADDATA_line_num++; } while(nullstr(ln) || ln[0]=='#');
X BADDATA_ln= ln; }
X real read_map_distance();
X void read_map_locus();
X@@ -426,13 +426,13 @@
X
X for(j=0;j<raw.n_indivs;j++) {
X if(j % 5 == 0 && j != 0)
X- fprint(fp,"\n ");
X+ fprint(fp,WRS("\n "));
X sf(ps,"%12.3lf ", raw.trait[j][i]);fpr(fp);
X }
X fnl(fp);
X }
X
X- fprint(fp,"#QTL only variables:\n");
X+ fprint(fp,WRS("#QTL only variables:\n"));
X sf(ps,"*Print mapm loci: %d\n", print_mapm_loci);fpr(fp);
X sf(ps,"*Like tolerance: %lf\n",like_tolerance);fpr(fp);
X sf(ps,"*Brute force: %d\n",brute_force);fpr(fp);
X@@ -452,21 +452,21 @@
X sf(ps, "chr%d %d\n", i+1, raw.chrom_n_loci[i]); fpr(fp);
X for(j=0;j<raw.chrom_n_loci[i];j++) {
X if(j % 18 == 0 && j != 0)
X- fprint(fp,"\n");
X+ fprint(fp,WRS("\n"));
X sf(ps, "%d ",order[loci_tot]);fpr(fp);
X loci_tot++;
X }
X fnl(fp);
X for(j=0;j<raw.chrom_n_loci[i]-1;j++) {
X if(j % 12 == 0 && j != 0)
X- fprint(fp,"\n");
X+ fprint(fp,WRS("\n"));
X sf(ps, "%.4lf ",map_space[map_tot]);fpr(fp);
X map_tot++;
X }
X fnl(fp);
X map_tot++;
X- fprint(fp,"0\n");
X- fprint(fp,"0\n");
X+ fprint(fp,WRS("0\n"));
X+ fprint(fp,WRS("0\n"));
X }
X sf(ps,"*Number of contexts: %d\n",num_contexts);
X fpr(fp);
END-of-mapm3/files/patch-quant-qraw.c
echo x - mapm3/files/patch-sun-xqtl
sed 's/^X//' >mapm3/files/patch-sun-xqtl << 'END-of-mapm3/files/patch-sun-xqtl'
X--- sun/xqtl.orig 2008-04-04 20:05:29.000000000 +0000
X+++ sun/xqtl 2008-04-04 19:59:41.000000000 +0000
X@@ -10,5 +10,5 @@
X else if (-e /usr/openwin/demo/xterm) then
X exec /usr/openwin/demo/xterm $xoptions $fontsize -e $program $*
X else
X- exec xterm $options $fontsize -e $program
X+ exec xterm $xoptions $fontsize -e $program
X endif
END-of-mapm3/files/patch-sun-xqtl
echo x - mapm3/files/patch-sun-xmapmaker
sed 's/^X//' >mapm3/files/patch-sun-xmapmaker << 'END-of-mapm3/files/patch-sun-xmapmaker'
X--- sun/xmapmaker.orig 2008-04-04 20:05:29.000000000 +0000
X+++ sun/xmapmaker 2008-04-04 19:59:32.000000000 +0000
X@@ -10,5 +10,5 @@
X else if (-e /usr/openwin/demo/xterm) then
X exec /usr/openwin/demo/xterm $xoptions $fontsize -e $program $*
X else
X- exec xterm $options $fontsize -e $program
X+ exec xterm $xoptions $fontsize -e $program
X endif
END-of-mapm3/files/patch-sun-xmapmaker
echo x - mapm3/pkg-plist
sed 's/^X//' >mapm3/pkg-plist << 'END-of-mapm3/pkg-plist'
Xbin/mapmaker
Xbin/mapmaker.help
Xbin/qtl
Xbin/qtl.help
Xbin/xmapmaker
Xbin/xqtl
END-of-mapm3/pkg-plist
echo x - mapm3/distinfo
sed 's/^X//' >mapm3/distinfo << 'END-of-mapm3/distinfo'
XMD5 (mapm3-source.tar.Z) = 8aa7a061d32a49c8704c1a5c4b31aa2d
XSHA256 (mapm3-source.tar.Z) = 107c8d0e7e89e2fe43fe17233d38c22161def851c8094435f3440a39c0cdca4c
XSIZE (mapm3-source.tar.Z) = 1321227
END-of-mapm3/distinfo
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list