Remove expired ports:

games/freetennis: depends on expired graphics/ocaml-images
2016-07-04 graphics/ocaml-images: Depends on expiring devel/omake
2016-07-04 devel/omake: Broken for more than 6 months
This commit is contained in:
Rene Ladan 2016-07-05 18:46:45 +00:00
parent b52cc06426
commit 3cb00dcfb0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418101
50 changed files with 3 additions and 3008 deletions

3
MOVED
View file

@ -8596,3 +8596,6 @@ ftp/fget||2016-07-04|Has expired: Broken for more than 6 months
net-mgmt/netmond||2016-07-04|Has expired: Broken for more than 6 months
net-mgmt/ipfm||2016-07-04|Has expired: Broken for more than 6 months
textproc/py-dbf|databases/py-dbf|2016-07-05|Duplicate port deleted
games/freetennis||2016-07-05|Depends on expired graphics/ocaml-images
graphics/ocaml-images||2016-07-05|Has expired: Depends on expiring devel/omake
devel/omake||2016-07-05|Has expired: Broken for more than 6 months

View file

@ -1587,7 +1587,6 @@
SUBDIR += ode
SUBDIR += ois
SUBDIR += okteta
SUBDIR += omake
SUBDIR += omniNotify
SUBDIR += omniORB
SUBDIR += omniORB-4.1

View file

@ -1,70 +0,0 @@
# Created by: Stanislav Sedov <ssedov@mbsd.msk.ru>
# $FreeBSD$
PORTNAME= omake
DISTVERSION= 0.9.8.6-0.rc1
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://main.metaprl.org/download/omake/
MAINTAINER= ports@FreeBSD.org
COMMENT= Flexible build system
BROKEN= unfetchable
DEPRECATED= Broken for more than 6 months
EXPIRATION_DATE= 2016-07-04
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:C|-.*||}
USE_OCAML= yes
NO_OCAML_RUNDEPENDS=yes
USES= ncurses readline
MAKE_ENV+= INSTALL_ROOT=${STAGEDIR}
MAKE_JOBS_UNSAFE= yes
INFO= omake-doc
OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
post-patch:
#
# Dirty hack for PREFIX safety
#
@${REINPLACE_CMD} -E -e \
's|(getenv[[:space:]]+)LIBDIR|\1PREFLIBDIR|' ${WRKSRC}/mk/defaults
#
# Permissions safety
#
.for f in OMakefile doc/OMakefile src/main/OMakefile
@${REINPLACE_CMD} -e \
's|cp -f -m 444|$$(BSD_INSTALL_DATA)| ; \
s|cp -f -m 555|$$(BSD_INSTALL_PROGRAM)|' ${WRKSRC}/${f}
.endfor
@${REINPLACE_CMD} -e 's| -j2 | |' ${WRKSRC}/Makefile
.if ${NCURSESBASE} == "/usr"
.for f in lib/configure/ncurses.om src/libmojave-external/cutil/lm_terminfo.c
@${REINPLACE_CMD} -E -e 's|ncurses/(term\.h)|\1|' ${WRKSRC}/${f}
.endfor
.endif
check regression-test test: build
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_ARGS} boot/omake check
@${FIND} -ds ${WRKSRC}/test -type f -name 'result.log' -print0 | \
${XARGS} -0tI @ ${CAT} @
bench: build
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_ARGS} boot/omake bench
post-install:
@(cd ${WRKSRC}/doc/info && ${INSTALL_DATA} omake-doc.info \
${STAGEDIR}${PREFIX}/${INFO_PATH})
@(cd ${WRKSRC}/doc/info && ${INSTALL_DATA} omake-doc.info-* \
${STAGEDIR}${PREFIX}/${INFO_PATH})
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.include <bsd.port.post.mk>

View file

@ -1,2 +0,0 @@
SHA256 (omake-0.9.8.6-0.rc1.tar.gz) = 23c498f071723621dd5e1e29c1abefd6937c73c67bb85d223fd514b9ae005ae9
SIZE (omake-0.9.8.6-0.rc1.tar.gz) = 3254283

View file

@ -1,15 +0,0 @@
$NetBSD: patch-aa,v 1.2 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- OMakefile.orig 2010-10-27 00:42:37.000000000 +0000
+++ OMakefile
@@ -57,7 +57,7 @@ if $(not $(defined CAMLLIB))
#
# OCaml options
#
-OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z)
+OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z-9-29)
if $(THREADS_ENABLED)
OCAMLFLAGS += -thread
export

View file

@ -1,19 +0,0 @@
$NetBSD: patch-lib_build_OCaml.om,v 1.1 2012/11/23 22:55:22 marino Exp $
Omake will break in over a dozen places on gcc 4.7.x if warnings are
treated as errors. All valid but unreferenced functions and constants
are warned about in gcc 4.7, and the alternative to removing the
warn-error flag is to remove all these unreferenced functions and
constants via patches.
--- lib/build/OCaml.om.orig 2008-03-05 01:07:25.000000000 +0000
+++ lib/build/OCaml.om
@@ -176,7 +176,7 @@ public.PREFIXED_OCAMLPACKS =\
#
declare OCAMLDEPFLAGS
public.OCAMLPPFLAGS =
-public.OCAMLFLAGS = -warn-error A
+public.OCAMLFLAGS =
public.OCAMLCFLAGS = -g
public.OCAMLOPTFLAGS =
public.OCAMLCPPFLAGS =

View file

@ -1,25 +0,0 @@
$NetBSD: patch-ac,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/build/omake_rule.ml.orig 2010-10-07 19:59:08.000000000 +0000
+++ src/build/omake_rule.ml
@@ -768,7 +768,7 @@ let lazy_command venv pos command =
let fv = free_vars_exp_list el in
CommandSection (eval_string_exp venv pos s, fv, el)
| ShellExp (loc, s) ->
- CommandValue (loc, ValStringExp (venv_get_env venv, s))
+ CommandValue (loc, venv_get_env venv, s)
| _ ->
let fv = free_vars_exp command in
CommandSection (ValData "eval", fv, [command])
@@ -1121,7 +1121,8 @@ and eval_rule venv loc target sources sl
let commands = ([], CommandEval e) :: commands in
let fv = free_vars_union fv fv' in
commands, fv
- | CommandValue (loc, v) ->
+ | CommandValue (loc, env, s) ->
+ let v = ValStringExp (env, s) in
let commands =
try
let flags, pipe = pipe_of_value venv find_alias options pos loc v in

View file

@ -1,17 +0,0 @@
$NetBSD: patch-ad,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/builtin/omake_builtin_target.ml.orig 2008-01-15 19:57:00.000000000 +0000
+++ src/builtin/omake_builtin_target.ml
@@ -221,8 +221,8 @@ let split_command venv (values1, lines1)
match line with
CommandSection (_, _, e) ->
ValBody (e, ExportNone)
- | CommandValue (_, v) ->
- v
+ | CommandValue (_, exp, v) ->
+ ValStringExp(exp,v)
in
v :: lines) lines1 lines2
in

View file

@ -1,177 +0,0 @@
$NetBSD: patch-ae,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/clib/omake_shell_sys.c.orig 2007-12-01 21:32:13.000000000 +0000
+++ src/clib/omake_shell_sys.c
@@ -551,7 +551,7 @@ value omake_shell_sys_suspend(value v_pg
fflush(stderr);
#endif
if(process_group_map(suspend_process, Int_val(v_pgrp)) < 0)
- failwith("omake_shell_sys_suspend");
+ caml_failwith("omake_shell_sys_suspend");
CAMLreturn(Val_unit);
}
@@ -563,7 +563,7 @@ value omake_shell_sys_resume(value v_pgr
fflush(stderr);
#endif
if(process_group_map(resume_process, Int_val(v_pgrp)) < 0)
- failwith("omake_shell_sys_resume");
+ caml_failwith("omake_shell_sys_resume");
CAMLreturn(Val_unit);
}
@@ -575,7 +575,7 @@ value omake_shell_sys_kill(value v_pgrp)
fflush(stderr);
#endif
if(process_group_map(kill_process, Int_val(v_pgrp)) < 0)
- failwith("omake_shell_sys_kill");
+ caml_failwith("omake_shell_sys_kill");
CAMLreturn(Val_unit);
}
@@ -600,14 +600,14 @@ value omake_shell_sys_create_thread_pid(
/* Allocate the process data */
processp = (Process *) malloc(sizeof(Process));
if(processp == 0)
- failwith("omake_shell_sys_create_thread_pid: out of memory");
+ caml_failwith("omake_shell_sys_create_thread_pid: out of memory");
memset(processp, 0, sizeof(Process));
/* Create an event for waiting on the thread */
event = CreateEvent(NULL, FALSE, FALSE, NULL);
if(event == NULL) {
free(processp);
- failwith("omake_shell_sys_create_thread_pid: can't create event");
+ caml_failwith("omake_shell_sys_create_thread_pid: can't create event");
}
pgrp = Int_val(v_pgrp);
@@ -645,7 +645,7 @@ value omake_shell_sys_init_thread_pid(va
break;
}
if(processp == 0)
- raise_not_found();
+ caml_raise_not_found();
/* Process has terminated */
processp->thread = GetCurrentThreadId();
@@ -679,7 +679,7 @@ value omake_shell_sys_release_thread_pid
break;
}
if(processp == 0)
- raise_not_found();
+ caml_raise_not_found();
/* Process has terminated */
processp->changed = 1;
@@ -771,7 +771,7 @@ value omake_shell_sys_wait(value v_pgrp,
goto done;
else {
if(ncount == MAXIMUM_WAIT_OBJECTS)
- invalid_argument("omake_shell_sys_wait: too many processes");
+ caml_invalid_argument("omake_shell_sys_wait: too many processes");
processes[ncount] = processp->pid;
handles[ncount] = processp->handle;
ncount++;
@@ -787,11 +787,11 @@ value omake_shell_sys_wait(value v_pgrp,
/* Wait for an event */
while(1) {
/* Perform the wait */
- enter_blocking_section();
+ caml_enter_blocking_section();
index = WaitForMultipleObjects(ncount, handles, FALSE, timeout);
if(index == WAIT_FAILED)
code = GetLastError();
- leave_blocking_section();
+ caml_leave_blocking_section();
/* See if something has changed */
if(index == WAIT_OBJECT_0) {
@@ -810,7 +810,7 @@ value omake_shell_sys_wait(value v_pgrp,
else if(index >= WAIT_ABANDONED_0 + 1 && index < WAIT_ABANDONED_0 + ncount)
index -= WAIT_ABANDONED_0;
else
- raise_not_found();
+ caml_raise_not_found();
/* Adjust process */
pid = processes[index];
@@ -863,7 +863,7 @@ value omake_shell_sys_wait(value v_pgrp,
break;
case STATUS_RUNNING:
default:
- invalid_argument("wait_process: process is running");
+ caml_invalid_argument("wait_process: process is running");
break;
}
@@ -908,7 +908,7 @@ value omake_shell_sys_create_process(val
strp = String_val(Field(v_envp, i));
length = strlen(strp);
if(index + length + 2 > SIZEOF_ENVIRONMENT)
- failwith("omake_shell_sys_create_process: environment is too big");
+ caml_failwith("omake_shell_sys_create_process: environment is too big");
strcpy(env + index, strp);
index += length + 1;
}
@@ -919,7 +919,7 @@ value omake_shell_sys_create_process(val
v_argvp = Field(v_info, CREATE_PROCESS_ARGV);
count = Wosize_val(v_argvp);
if(count == 0)
- invalid_argument("omake_shell_sys_create_process: command line is empty");
+ caml_invalid_argument("omake_shell_sys_create_process: command line is empty");
index = 0;
for(i = 0; i != count; i++) {
/* Win32 doesn't deal well when the command name differs from the executable */
@@ -930,7 +930,7 @@ value omake_shell_sys_create_process(val
length = strlen(argp);
white = string_escape_length(argp);
if(index + length + white + 4 >= SIZEOF_COMMAND)
- failwith("omake_shell_sys_create_process: command line is too long");
+ caml_failwith("omake_shell_sys_create_process: command line is too long");
if(index)
argv[index++] = ' ';
if(white)
@@ -1019,13 +1019,13 @@ value omake_shell_sys_create_process(val
if ((bufLen < 1) || (bufLen > 1024)) {
if (lpMsgBuf != NULL)
LocalFree( lpMsgBuf );
- failwith("omake_shell_sys_create_process: process creation failed");
+ caml_failwith("omake_shell_sys_create_process: process creation failed");
} else {
char err[2048];
sprintf(err, "omake_shell_sys_create_process: process creation failed: %s", (char *)lpMsgBuf);
if (lpMsgBuf != NULL)
LocalFree( lpMsgBuf );
- failwith(err);
+ caml_failwith(err);
}
}
CloseHandle(process.hThread);
@@ -1034,7 +1034,7 @@ value omake_shell_sys_create_process(val
processp = (Process *) malloc(sizeof(Process));
if(processp == 0) {
CloseHandle(process.hProcess);
- failwith("omake_shell_sys_create_process: out of memory");
+ caml_failwith("omake_shell_sys_create_process: out of memory");
}
memset(processp, 0, sizeof(Process));
processp->pid = pid;
@@ -1129,13 +1129,13 @@ value omake_shell_sys_init(value v_unit)
/* Allocate a struct for the current process */
processp = (Process *) malloc(sizeof(Process));
if(processp == 0)
- failwith("Omake_shell_csys.create_state: out of memory");
+ caml_failwith("Omake_shell_csys.create_state: out of memory");
memset(processp, 0, sizeof(Process));
/* Allocate the state */
state = (ShellState *) malloc(sizeof(ShellState));
if(state == 0)
- failwith("Omake_shell_csys.create_state: out of memory");
+ caml_failwith("Omake_shell_csys.create_state: out of memory");
memset(state, 0, sizeof(ShellState));
state->pid_counter = INIT_PID;
state->changed = CreateEvent(NULL, FALSE, FALSE, NULL);

View file

@ -1,127 +0,0 @@
$NetBSD: patch-af,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/clib/readline.c.orig 2007-05-15 19:03:03.000000000 +0000
+++ src/clib/readline.c
@@ -134,7 +134,7 @@ static char **readline_completion(char *
CAMLreturnT(char **, 0);
/* The callback returns an array of strings */
- request = copy_string(text);
+ request = caml_copy_string(text);
response = caml_callback(*callbackp, request);
/* Copy the array of strings */
@@ -726,9 +726,9 @@ static ProcessCode processor(ReadLine *r
/* Input loop */
while(1) {
- enter_blocking_section();
+ caml_enter_blocking_section();
status = ReadConsoleInput(readp->console_in, input, INPUT_COUNT, &count);
- leave_blocking_section();
+ caml_leave_blocking_section();
if(status == 0) {
print_error("ReadConsoleInput");
return CODE_EOF;
@@ -766,11 +766,11 @@ static void readline_cooked(ReadLine *re
{
char *s;
- enter_blocking_section();
+ caml_enter_blocking_section();
s = fgets(readp->current.buffer, LINE_MAX, stdin);
- leave_blocking_section();
+ caml_leave_blocking_section();
if(s == 0)
- raise_end_of_file();
+ caml_raise_end_of_file();
readp->current.length = strlen(readp->current.buffer);
}
@@ -1053,7 +1053,7 @@ value omake_readline(value v_prompt)
/* Copy it to a string */
linep = &readp->current;
- v_str = alloc_string(linep->length);
+ v_str = caml_alloc_string(linep->length);
memcpy(String_val(v_str), linep->buffer, linep->length);
/* Reset the current buffer */
@@ -1105,7 +1105,7 @@ value omake_readline_init(value v_unit)
c_stdin = GetStdHandle(STD_INPUT_HANDLE);
c_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
if(c_stdin == INVALID_HANDLE_VALUE || c_stdout == INVALID_HANDLE_VALUE)
- failwith("omake_readline_init: no standard channels");
+ caml_failwith("omake_readline_init: no standard channels");
/* Check if it is a console */
is_console = 1;
@@ -1179,18 +1179,18 @@ static ReadLine *AllocReadLine(int is_co
/* Allocate */
readp = (ReadLine *) malloc(sizeof(ReadLine));
if(readp == NULL)
- failwith("AllocReadLine: out of memory");
+ caml_failwith("AllocReadLine: out of memory");
memset(readp, 0, sizeof(ReadLine));
/* Initialize */
readp->buffer = malloc(LINE_MAX);
if (readp->buffer == NULL)
- failwith("AllocReadLine: out of memory");
+ caml_failwith("AllocReadLine: out of memory");
readp->buffer_size = LINE_MAX;
readp->prompt = malloc(MAX_PROMPT_LENGTH);
if (readp->prompt == NULL)
- failwith("AllocReadLine: out of memory");
+ caml_failwith("AllocReadLine: out of memory");
readp->prompt_size = MAX_PROMPT_LENGTH;
readp->console_in = console_in;
@@ -1262,7 +1262,7 @@ static void readline_raw(ReadLine *readp
if(length >= readp->buffer_size) {
char *new_buffer = malloc(length + 1);
if(new_buffer == NULL)
- failwith("readline_raw: out of memory");
+ caml_failwith("readline_raw: out of memory");
free(readp->buffer);
readp->buffer = new_buffer;
readp->buffer_size = length + 1;
@@ -1307,7 +1307,7 @@ static void do_readline(ReadLine *readp,
readp->prompt = malloc(new_size);
if (readp->prompt == NULL) {
readp->prompt = old_prompt;
- failwith("do_readline: out of memory");
+ caml_failwith("do_readline: out of memory");
} else {
memcpy(readp->prompt, old_prompt, i);
free(old_prompt);
@@ -1545,7 +1545,7 @@ value omake_readline(value v_prompt)
do_readline(readp, String_val(v_prompt));
/* Copy it to the buffer */
- v_str = alloc_string(readp->length);
+ v_str = caml_alloc_string(readp->length);
memcpy(String_val(v_str), readp->buffer, readp->length);
/* Reset the current buffer */
@@ -1609,7 +1609,7 @@ value omake_rl_prompt_wrappers(value v_u
CAMLlocal2(s1, s2);
s1 = caml_copy_string(begin);
s2 = caml_copy_string(end);
- buf = alloc_tuple(2);
+ buf = caml_alloc_tuple(2);
Field(buf, 0) = s1;
Field(buf, 1) = s2;
}
@@ -1617,7 +1617,7 @@ value omake_rl_prompt_wrappers(value v_u
{
CAMLlocal1(emptystr);
emptystr = caml_copy_string("");
- buf = alloc_tuple(2);
+ buf = caml_alloc_tuple(2);
Field(buf, 0) = emptystr;
Field(buf, 1) = emptystr;
}

View file

@ -1,45 +0,0 @@
$NetBSD: patch-ag,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/env/omake_env.ml.orig 2008-01-15 19:57:00.000000000 +0000
+++ src/env/omake_env.ml
@@ -404,8 +404,8 @@ let rec pp_print_command buf command =
match command with
CommandSection (arg, fv, e) ->
fprintf buf "@[<hv 3>section %a@ %a@]" pp_print_value arg pp_print_exp_list e
- | CommandValue (_, v) ->
- pp_print_value buf v
+ | CommandValue (_, _, v) ->
+ pp_print_string_exp buf v
and pp_print_commands buf commands =
List.iter (fun command -> fprintf buf "@ %a" pp_print_command command) commands
@@ -1928,6 +1928,14 @@ let venv_save_explicit_rules venv loc er
let venv_add_wild_match venv v =
venv_add_var venv wild_var v
+let command_add_wild venv wild command =
+ match command with
+ CommandSection _ ->
+ command
+ | CommandValue(loc, env, s) ->
+ let env = venv_get_env (venv_add_wild_match (venv_with_env venv env) wild) in
+ CommandValue(loc, env, s)
+
(*
* This is the standard way to add results of a pattern match.
*)
@@ -2699,8 +2707,10 @@ let venv_find_implicit_rules_inner venv
let scanner_args = List.map (subst_source venv target_dir subst) irule.irule_scanners in
let scanners = node_set_of_list scanner_args in
let core = wild_core subst in
- let venv = venv_add_wild_match venv (ValData core) in
- let commands = make_command_info venv source_args irule.irule_values irule.irule_body in
+ let core_val = ValData core in
+ let venv = venv_add_wild_match venv core_val in
+ let commands = List.map (command_add_wild venv core_val) irule.irule_body in
+ let commands = make_command_info venv source_args irule.irule_values commands in
let effects =
List.fold_left (fun effects pattern ->
let effect = wild_subst_in subst pattern in

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ah,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/ir/omake_value_type.ml.orig 2010-10-07 19:59:08.000000000 +0000
+++ src/ir/omake_value_type.ml
@@ -162,7 +162,7 @@ type path =
*)
type command =
CommandSection of value * free_vars * exp list (* Name of the section, its free variables, and the expression *)
- | CommandValue of loc * value
+ | CommandValue of loc * env * string_exp
(*
* Kinds of rules.

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src_libmojave-external_cutil_fam__pseudo.h,v 1.1 2012/11/16 00:46:04 joerg Exp $
--- src/libmojave-external/cutil/fam_pseudo.h.orig 2012-11-08 22:16:13.000000000 +0000
+++ src/libmojave-external/cutil/fam_pseudo.h
@@ -43,7 +43,10 @@
/*
* Maximum file name length.
*/
+#include <limits.h>
+#ifndef NAME_MAX
#define NAME_MAX 1024
+#endif
/*
* Possible events.

View file

@ -1,24 +0,0 @@
$NetBSD: patch-ai,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_channel.c.orig 2006-07-15 17:23:37.000000000 +0000
+++ src/libmojave-external/cutil/lm_channel.c
@@ -57,7 +57,7 @@ value omake_shell_peek_pipe(value v_fd)
&total, // Total number of bytes available
NULL); // Number of bytes in the next message
if(status == 0)
- failwith("Not a pipe");
+ caml_failwith("Not a pipe");
return total ? Val_int(1) : Val_int(0);
}
@@ -83,7 +83,7 @@ value omake_shell_pipe_kind(value v_fd)
value omake_shell_peek_pipe(value v_fd)
{
- failwith("omake_shell_peek_pipe: not available on Unix systems");
+ caml_failwith("omake_shell_peek_pipe: not available on Unix systems");
return Val_unit;
}

View file

@ -1,15 +0,0 @@
$NetBSD: patch-aj,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_ctype.c.orig 2006-12-01 21:13:14.000000000 +0000
+++ src/libmojave-external/cutil/lm_ctype.c
@@ -59,7 +59,7 @@ static value get_chars(int (*f)(int))
if(f(i))
*p++ = (char) i;
}
- s = alloc_string(p - buf);
+ s = caml_alloc_string(p - buf);
memcpy(String_val(s), buf, p - buf);
return s;
}

View file

@ -1,90 +0,0 @@
$NetBSD: patch-ak,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_notify.c.orig 2007-07-27 17:58:13.000000000 +0000
+++ src/libmojave-external/cutil/lm_notify.c
@@ -74,13 +74,13 @@ typedef struct {
#define CheckCode(fmt, expr) \
do { \
- enter_blocking_section(); \
+ caml_enter_blocking_section(); \
code = expr; \
- leave_blocking_section(); \
+ caml_leave_blocking_section(); \
if(code < 0) { \
char buffer[256]; \
ErrFmt(buffer, fmt); \
- failwith(buffer); \
+ caml_failwith(buffer); \
} \
} while(0)
@@ -145,11 +145,11 @@ value om_notify_open(value v_unit)
FAMInfo *info;
int code;
- v = alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1);
+ v = caml_alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1);
info = FAMInfo_val(v);
fc = malloc(sizeof(FAMConnection));
if(fc == 0)
- invalid_argument("om_notify_open: out of memory");
+ caml_invalid_argument("om_notify_open: out of memory");
info->fc = fc;
CheckCode("om_notify_open", FAMOpen(fc));
#ifdef HAVE_FAMNOEXISTS
@@ -180,7 +180,7 @@ value om_notify_fd(value v_fc)
fc = FAMConnection_val(v_fc);
return Val_int(fc->id);
#else /* FAM_PSEUDO && !FAM_INOTIFY */
- failwith("No file descriptors in pseudo-FAM");
+ caml_failwith("No file descriptors in pseudo-FAM");
return Val_unit;
#endif /* FAM_INOTIFY */
#else /* FAM_PSEUDO */
@@ -209,7 +209,7 @@ value om_notify_monitor_directory(value
#ifdef WIN32
CheckCode("om_notify_monitor_directory", FAMMonitorDirectoryTree(fc, name, &request, 0));
#else /* WIN32 */
- failwith("om_notify_monitor_directory: recursive monitoring is not allowed");
+ caml_failwith("om_notify_monitor_directory: recursive monitoring is not allowed");
#endif /* !WIN32 */
}
else
@@ -294,13 +294,13 @@ value om_notify_next_event(value v_fc)
CheckCode("om_notify_next_event", FAMNextEvent(fc, &event));
code = event.code;
if(code < 1 || code > 10)
- failwith("om_notify_next_event: code out of bounds");
+ caml_failwith("om_notify_next_event: code out of bounds");
/* Allocate the string name */
- v_name = copy_string(event.filename);
+ v_name = caml_copy_string(event.filename);
/* Allocate the tuple */
- v_tuple = alloc_tuple(3);
+ v_tuple = caml_alloc_tuple(3);
Field(v_tuple, 0) = Val_int(event.fr.reqnum);
Field(v_tuple, 1) = v_name;
Field(v_tuple, 2) = Val_int(code - 1);
@@ -330,7 +330,7 @@ value om_notify_open(value v_unit)
*/
value om_notify_fd(value v_fc)
{
- invalid_argument("FAM not enabled");
+ caml_invalid_argument("FAM not enabled");
return Val_unit;
}
@@ -389,7 +389,7 @@ value om_notify_pending(value v_fc)
*/
value om_notify_next_event(value v_fc)
{
- invalid_argument("FAM not enabled");
+ caml_invalid_argument("FAM not enabled");
return Val_unit;
}

View file

@ -1,96 +0,0 @@
$NetBSD: patch-al,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_printf.c.orig 2009-02-06 16:41:21.000000000 +0000
+++ src/libmojave-external/cutil/lm_printf.c
@@ -61,12 +61,12 @@ value ml_print_char(value v_fmt, value v
char c = (char) Int_val(v_char);
#ifdef HAVE_SNPRINTF
if(snprintf(buffer, sizeof(buffer), fmt, c) < 0)
- failwith("ml_print_char");
+ caml_failwith("ml_print_char");
#else
if(sprintf(buffer, fmt, c) < 0)
- failwith("ml_print_char");
+ caml_failwith("ml_print_char");
#endif
- return copy_string(buffer);
+ return caml_copy_string(buffer);
}
/*
@@ -79,12 +79,12 @@ value ml_print_int(value v_fmt, value v_
int i = Int_val(v_int);
#ifdef HAVE_SNPRINTF
if(snprintf(buffer, sizeof(buffer), fmt, i) < 0)
- failwith("ml_print_int");
+ caml_failwith("ml_print_int");
#else
if(sprintf(buffer, fmt, i) < 0)
- failwith("ml_print_int");
+ caml_failwith("ml_print_int");
#endif
- return copy_string(buffer);
+ return caml_copy_string(buffer);
}
@@ -98,12 +98,12 @@ value ml_print_float(value v_fmt, value
double x = Double_val(v_float);
#ifdef HAVE_SNPRINTF
if(snprintf(buffer, sizeof(buffer), fmt, x) < 0)
- failwith("ml_print_float");
+ caml_failwith("ml_print_float");
#else
if(sprintf(buffer, fmt, x) < 0)
- failwith("ml_print_float");
+ caml_failwith("ml_print_float");
#endif
- return copy_string(buffer);
+ return caml_copy_string(buffer);
}
/*
@@ -132,7 +132,7 @@ value ml_print_string(value v_fmt, value
size = len * 2;
bufp = malloc(size);
if(bufp == 0)
- failwith("ml_print_string");
+ caml_failwith("ml_print_string");
}
#ifdef HAVE_SNPRINTF
@@ -143,9 +143,9 @@ value ml_print_string(value v_fmt, value
if(code < 0) {
if(bufp != buffer)
free(bufp);
- failwith("ml_print_string");
+ caml_failwith("ml_print_string");
}
- v_result = copy_string(bufp);
+ v_result = caml_copy_string(bufp);
if(bufp != buffer)
free(bufp);
return v_result;
@@ -180,7 +180,7 @@ value ml_print_string2(value v_width, va
size = len * 2;
bufp = malloc(size);
if(bufp == 0)
- failwith("ml_print_string");
+ caml_failwith("ml_print_string");
}
#ifdef HAVE_SNPRINTF
@@ -191,9 +191,9 @@ value ml_print_string2(value v_width, va
if(code < 0) {
if(bufp != buffer)
free(bufp);
- failwith("ml_print_string");
+ caml_failwith("ml_print_string");
}
- v_result = copy_string(bufp);
+ v_result = caml_copy_string(bufp);
if(bufp != buffer)
free(bufp);
return v_result;

View file

@ -1,18 +0,0 @@
$NetBSD: patch-am,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_terminfo.c.orig 2007-05-15 19:03:32.000000000 +0000
+++ src/libmojave-external/cutil/lm_terminfo.c
@@ -75,9 +75,9 @@ value caml_tgetstr(value id) {
/* Note that tigetstr will return either 0 or -1 on error. */
if(termdata == NULL || termdata == (char *)(-1)) {
- result = copy_string("");
+ result = caml_copy_string("");
} else {
- result = copy_string(termdata);
+ result = caml_copy_string(termdata);
/* apparently we're not supposed to free termdata here */
/* TEMP: I cannot find specs on this! */
//free(termdata);

View file

@ -1,33 +0,0 @@
$NetBSD: patch-an,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_termsize.c.orig 2008-03-19 00:44:12.000000000 +0000
+++ src/libmojave-external/cutil/lm_termsize.c
@@ -45,7 +45,7 @@ value caml_term_size(value arg)
CAMLlocal1(buf);
/* Return a pair of numbers */
- buf = alloc_small(2, 0);
+ buf = caml_alloc_small(2, 0);
/* Get the terminal size, return None on failure */
#ifdef WIN32
@@ -53,7 +53,7 @@ value caml_term_size(value arg)
HANDLE fd = *(HANDLE *)Data_custom_val(arg);
CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo;
if (! GetConsoleScreenBufferInfo(fd, &ConsoleInfo))
- failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed");
+ caml_failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed");
Field(buf, 0) = Val_int(ConsoleInfo.dwSize.Y);
Field(buf, 1) = Val_int(ConsoleInfo.dwSize.X);
@@ -65,7 +65,7 @@ value caml_term_size(value arg)
struct winsize ws;
if(ioctl(fd, TIOCGWINSZ, &ws) < 0)
- failwith("lm_termsize.c: caml_term_size: not a terminal");
+ caml_failwith("lm_termsize.c: caml_term_size: not a terminal");
/* Return the pair of numbers */
Field(buf, 0) = Val_int(ws.ws_row);

View file

@ -1,35 +0,0 @@
$NetBSD: patch-ao,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_uname_ext.c.orig 2006-12-08 19:21:40.000000000 +0000
+++ src/libmojave-external/cutil/lm_uname_ext.c
@@ -147,21 +147,21 @@ value lm_uname(value x)
/* Get sysinfo */
if(uname(&name) < 0)
- failwith("uname");
+ caml_failwith("uname");
/* Copy data */
- result = alloc_tuple(5);
+ result = caml_alloc_tuple(5);
Field(result, 0) = Val_unit;
Field(result, 1) = Val_unit;
Field(result, 2) = Val_unit;
Field(result, 3) = Val_unit;
Field(result, 4) = Val_unit;
- Field(result, 0) = copy_string(name.sysname);
- Field(result, 1) = copy_string(name.nodename);
- Field(result, 2) = copy_string(name.release);
- Field(result, 3) = copy_string(name.version);
- Field(result, 4) = copy_string(name.machine);
+ Field(result, 0) = caml_copy_string(name.sysname);
+ Field(result, 1) = caml_copy_string(name.nodename);
+ Field(result, 2) = caml_copy_string(name.release);
+ Field(result, 3) = caml_copy_string(name.version);
+ Field(result, 4) = caml_copy_string(name.machine);
/* Return it */
CAMLreturn(result);

View file

@ -1,117 +0,0 @@
$NetBSD: patch-ap,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/cutil/lm_unix_cutil.c.orig 2007-07-18 17:42:32.000000000 +0000
+++ src/libmojave-external/cutil/lm_unix_cutil.c
@@ -87,9 +87,9 @@ value home_win32(value v_unit)
TCHAR path[MAX_PATH];
if(SUCCEEDED(CompatSHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path)))
- CAMLreturn(copy_string(path));
+ CAMLreturn(caml_copy_string(path));
- failwith("home_win32");
+ caml_failwith("home_win32");
return Val_unit;
}
@@ -138,7 +138,7 @@ value lockf_win32(value v_fd, value v_ki
flags = LOCKFILE_FAIL_IMMEDIATELY;
break;
default:
- invalid_argument("lockf_win32");
+ caml_invalid_argument("lockf_win32");
break;
}
@@ -147,11 +147,11 @@ value lockf_win32(value v_fd, value v_ki
overlapped.Offset = pos;
/* Perform the lock */
- enter_blocking_section();
+ caml_enter_blocking_section();
code = LockFileEx(fd, flags, 0, len, 0, &overlapped);
if(code == 0)
error = GetLastError();
- leave_blocking_section();
+ caml_leave_blocking_section();
/* Fail if the lock was not successful */
if(code == 0) {
@@ -165,14 +165,14 @@ value lockf_win32(value v_fd, value v_ki
* XXX: HACK: this exception is being caught
* Do not change the string w/o changing the wrapper code.
*/
- failwith("lockf_win32: already locked");
+ caml_failwith("lockf_win32: already locked");
break;
case ERROR_POSSIBLE_DEADLOCK:
/*
* XXX: HACK: this exception is being caught
* Do not change the string w/o changing the wrapper code.
*/
- failwith("lockf_win32: possible deadlock");
+ caml_failwith("lockf_win32: possible deadlock");
break;
default:
FormatMessage(
@@ -187,7 +187,7 @@ value lockf_win32(value v_fd, value v_ki
sprintf(szBuf, "lockf_win32 failed with error %d: %s", error, lpMsgBuf);
LocalFree(lpMsgBuf);
- failwith(szBuf);
+ caml_failwith(szBuf);
break;
}
}
@@ -289,7 +289,7 @@ value caml_registry_find(value v_hkey, v
#endif
/* Got the value */
- return copy_string(buffer);
+ return caml_copy_string(buffer);
}
#else /* WIN32 */
@@ -381,9 +381,9 @@ value lm_flock(value v_fd, value v_op)
op = Int_val(v_op);
#if defined(FLOCK_ENABLED)
cmd = flock_of_flock[op];
- enter_blocking_section();
+ caml_enter_blocking_section();
code = flock(fd, cmd);
- leave_blocking_section();
+ caml_leave_blocking_section();
#elif defined(FCNTL_ENABLED)
{
struct flock info;
@@ -392,9 +392,9 @@ value lm_flock(value v_fd, value v_op)
info.l_whence = SEEK_SET;
info.l_start = 0;
info.l_len = FLOCK_LEN;
- enter_blocking_section();
+ caml_enter_blocking_section();
code = fcntl(fd, cmd, &info);
- leave_blocking_section();
+ caml_leave_blocking_section();
}
#elif defined(LOCKF_ENABLED)
cmd = lockf_of_flock[op];
@@ -457,12 +457,12 @@ value lm_getpwents(value v_unit)
Store_field(entry, 2, Val_int(entryp->pw_uid));
Store_field(entry, 3, Val_int(entryp->pw_gid));
#ifdef __BEOS__
- Store_field(entry, 4, copy_string(""));
+ Store_field(entry, 4, caml_copy_string(""));
#else
- Store_field(entry, 4, copy_string(entryp->pw_gecos));
+ Store_field(entry, 4, caml_copy_string(entryp->pw_gecos));
#endif
- Store_field(entry, 5, copy_string(entryp->pw_dir));
- Store_field(entry, 6, copy_string(entryp->pw_shell));
+ Store_field(entry, 5, caml_copy_string(entryp->pw_dir));
+ Store_field(entry, 6, caml_copy_string(entryp->pw_shell));
cons = caml_alloc_tuple(2);
Store_field(cons, 0, entry);
Store_field(cons, 1, users);

View file

@ -1,58 +0,0 @@
$NetBSD: patch-aq,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/stdlib/lm_debug.ml.orig 2006-08-03 22:51:52.000000000 +0000
+++ src/libmojave-external/stdlib/lm_debug.ml
@@ -173,11 +173,10 @@ let create_debug
*)
let load_debug name =
let rec search = function
- { info_name = name'; info_flag = flag } :: t ->
- if name' = name then
- flag
- else
- search t
+ info :: _ when info.info_name = name ->
+ info.info_flag
+ | _ :: t ->
+ search t
| [] ->
raise (Failure (sprintf "Lm_debug.load_debug: variable '%s' has not been created" name))
in
@@ -189,11 +188,10 @@ let load_debug name =
let set_debug name flag =
let rec search = function
h :: t ->
- let { info_name = name'; info_flag = flag' } = h in
- if name' = name then
- flag' := flag
- else
- search t
+ if h.info_name = name then
+ h.info_flag := flag
+ else
+ search t
| [] ->
(*
(* Try a C function *)
@@ -227,9 +225,8 @@ let get_debug name =
let rec search = function
h :: t ->
if h.info_name = name then
- let { info_info = description; info_flag = flag } = h in
let description =
- match description with
+ match h.info_info with
Some desc ->
desc
| None ->
@@ -237,7 +234,7 @@ let get_debug name =
in
{ debug_name = name;
debug_description = description;
- debug_value = !flag
+ debug_value = !(h.info_flag)
}
else
search t

View file

@ -1,125 +0,0 @@
$NetBSD: patch-ar,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/stdlib/lm_string_util.ml.orig 2008-06-28 01:21:34.000000000 +0000
+++ src/libmojave-external/stdlib/lm_string_util.ml
@@ -613,18 +613,13 @@ let tokens_create wrap group =
* Get the tokens list.
*)
let tokens_flush info =
- let { tokens_group = group;
- tokens_list = tokens;
- tokens_prefix = prefix
- } = info
- in
let tokens =
- match prefix with
+ match info.tokens_prefix with
NoPrefix ->
- tokens
+ info.tokens_list
| WordPrefix prefix
| QuotePrefix (_, prefix) ->
- group prefix :: tokens
+ info.tokens_group prefix :: info.tokens_list
in
List.rev tokens
@@ -632,38 +627,29 @@ let tokens_flush info =
* End the current word.
*)
let tokens_break info =
- let { tokens_group = group;
- tokens_list = tokens;
- tokens_prefix = prefix
- } = info
- in
- match prefix with
- NoPrefix ->
- info
- | WordPrefix prefix
- | QuotePrefix (_, prefix) ->
- { info with tokens_list = group prefix :: tokens;
- tokens_prefix = NoPrefix
- }
+ match info.tokens_prefix with
+ NoPrefix ->
+ info
+ | WordPrefix prefix
+ | QuotePrefix (_, prefix) ->
+ { info with tokens_list = info.tokens_group prefix :: info.tokens_list;
+ tokens_prefix = NoPrefix
+ }
(*
* Add a value directly.
* This also performs a break.
*)
let tokens_atomic info x =
- let { tokens_group = group;
- tokens_list = tokens;
- tokens_prefix = prefix
- } = info
- in
- match prefix with
+ let tokens = info.tokens_list in
+ match info.tokens_prefix with
NoPrefix ->
{ info with tokens_list = x :: tokens;
tokens_prefix = NoPrefix
}
| WordPrefix prefix
| QuotePrefix (_, prefix) ->
- { info with tokens_list = x :: group prefix :: tokens;
+ { info with tokens_list = x :: info.tokens_group prefix :: tokens;
tokens_prefix = NoPrefix
}
@@ -758,11 +744,8 @@ let tokens_string info s =
if len = 0 then
info
else
- let { tokens_list = tokens;
- tokens_prefix = prefix
- } = info
- in
- match prefix with
+ let tokens = info.tokens_list in
+ match info.tokens_prefix with
NoPrefix ->
scan_white tokens 0
| WordPrefix prefix ->
@@ -809,13 +792,11 @@ let buffer_get_token lexer s i len =
BufChar
let tokens_lex info s =
- let { tokens_lexer = lexer;
- tokens_wrap_string = wrap_string;
- tokens_wrap_data = wrap_data;
- tokens_wrap_token = wrap_token;
- tokens_group = group
- } = info
- in
+ let lexer = info.tokens_lexer in
+ let wrap_string = info.tokens_wrap_string in
+ let wrap_data = info.tokens_wrap_data in
+ let wrap_token = info.tokens_wrap_token in
+ let group = info.tokens_group in
let len = String.length s in
(* Don't add empty strings *)
@@ -902,11 +883,8 @@ let tokens_lex info s =
if len = 0 then
info
else
- let { tokens_list = tokens;
- tokens_prefix = prefix
- } = info
- in
- match prefix with
+ let tokens = info.tokens_list in
+ match info.tokens_prefix with
NoPrefix ->
scan_white tokens 0
| WordPrefix prefix ->

View file

@ -1,127 +0,0 @@
$NetBSD: patch-as,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/unix/lm_notify.ml.orig 2007-07-19 21:06:05.000000000 +0000
+++ src/libmojave-external/unix/lm_notify.ml
@@ -153,10 +153,8 @@ let is_path_prefix (root1, path1) (root2
let is_monitored_name requests name =
let new_path = path_of_name name in
IntTable.exists (fun _ job ->
- let { job_path = path;
- job_recursive = recursive
- } = job
- in
+ let path = job.job_path in
+ let recursive = job.job_recursive in
new_path = path || (recursive && is_path_prefix path new_path)) requests
(************************************************************************
@@ -215,18 +213,16 @@ let close notify =
(*
* Get the file descriptor.
*)
-let file_descr { notify_fd = fd } =
- fd
+let file_descr notify =
+ notify.notify_fd
(*
* Monitoring.
*)
let monitor notify dir recursive =
- let { notify_info = info;
- notify_dirs = dirs;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let dirs = notify.notify_dirs in
+ let requests = notify.notify_requests in
let name = name_of_dir dir in
if not (is_monitored_name requests name) then begin
if !debug_notify then
@@ -250,11 +246,9 @@ let monitor notify dir recursive =
* Suspend notifications.
*)
let suspend notify dir =
- let { notify_info = info;
- notify_dirs = dirs;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let dirs = notify.notify_dirs in
+ let requests = notify.notify_requests in
let dir = name_of_dir dir in
let request =
try StringTable.find dirs dir with
@@ -269,10 +263,8 @@ let suspend notify dir =
end
let suspend_all notify =
- let { notify_info = info;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let requests = notify.notify_requests in
IntTable.iter (fun _ job ->
if job.job_running then
begin
@@ -281,11 +273,9 @@ let suspend_all notify =
end) requests
let resume notify dir =
- let { notify_info = info;
- notify_dirs = dirs;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let dirs = notify.notify_dirs in
+ let requests = notify.notify_requests in
let dir = name_of_dir dir in
let request =
try StringTable.find dirs dir with
@@ -300,10 +290,8 @@ let resume notify dir =
end
let resume_all notify =
- let { notify_info = info;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let requests = notify.notify_requests in
IntTable.iter (fun _ job ->
if not job.job_running then
begin
@@ -315,11 +303,9 @@ let resume_all notify =
* Cancel a request.
*)
let cancel notify dir =
- let { notify_info = info;
- notify_dirs = dirs;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let dirs = notify.notify_dirs in
+ let requests = notify.notify_requests in
let dir = name_of_dir dir in
let request =
try StringTable.find dirs dir with
@@ -332,10 +318,8 @@ let cancel notify dir =
notify.notify_requests <- IntTable.remove requests request
let cancel_all notify =
- let { notify_info = info;
- notify_requests = requests
- } = notify
- in
+ let info = notify.notify_info in
+ let requests = notify.notify_requests in
IntTable.iter (fun request _ -> notify_cancel info request) requests;
notify.notify_dirs <- StringTable.empty;
notify.notify_requests <- IntTable.empty

View file

@ -1,364 +0,0 @@
$NetBSD: patch-at,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/util/lm_channel.ml.orig 2007-07-16 21:10:43.000000000 +0000
+++ src/libmojave-external/util/lm_channel.ml
@@ -337,12 +337,10 @@ let of_string s =
of_string string_sym 1 0 (String.copy s)
let info channel =
- let { channel_id = id;
- channel_kind = kind;
- channel_mode = mode;
- channel_binary = binary
- } = channel
- in
+ let id = channel.channel_id in
+ let kind = channel.channel_kind in
+ let mode = channel.channel_mode in
+ let binary = channel.channel_binary in
id, kind, mode, binary
let name channel =
@@ -468,13 +466,11 @@ let squash_text buffer off amount =
* Get the line/char for a particular point in the input buffer.
*)
let line_of_index info buffer index =
- let { start_line = start_line;
- start_char = start_char;
- middle_index = middle_index;
- middle_line = middle_line;
- middle_char = middle_char
- } = info
- in
+ let start_line = info.start_line in
+ let start_char = info.start_char in
+ let middle_index = info.middle_index in
+ let middle_line = info.middle_line in
+ let middle_char = info.middle_char in
let rec search line char i =
if i = index then
begin
@@ -509,12 +505,10 @@ let reset_input_buffer info =
info.lex_index <- 0
let shift_input_buffer info =
- let { in_buffer = in_buffer;
- in_index = in_index;
- lex_index = lex_index;
- in_max = in_max
- } = info
- in
+ let in_buffer = info.in_buffer in
+ let in_index = info.in_index in
+ let lex_index = info.lex_index in
+ let in_max = info.in_max in
let line, char = line_of_index info in_buffer in_index in
String.blit in_buffer in_index in_buffer 0 (in_max - in_index);
info.start_line <- line;
@@ -562,10 +556,8 @@ let reset_output_buffer info =
* flushing.
*)
let expand_output info =
- let { out_buffer = buffer;
- out_max = max
- } = info
- in
+ let buffer = info.out_buffer in
+ let max = info.out_max in
if max = String.length buffer then begin
let buffer2 = String.create (max * 2) in
String.blit buffer 0 buffer2 0 max;
@@ -575,10 +567,8 @@ let expand_output info =
end
let to_string info =
- let { out_buffer = buffer;
- out_max = max
- } = info
- in
+ let buffer = info.out_buffer in
+ let max = info.out_max in
String.sub buffer 0 max
(************************************************************************
@@ -614,12 +604,10 @@ let setup_write_buffer info =
*)
let flush_output_once info =
setup_write_buffer info;
- let { write_index = off;
- write_max = max;
- write_buffer = buf;
- write_fun = write
- } = info
- in
+ let off = info.write_index in
+ let max = info.write_max in
+ let buf = info.write_buffer in
+ let write = info.write_fun in
let count = write buf off (max - off) in
let off' = off + count in
if off' = max then
@@ -632,17 +620,13 @@ let flush_output_once info =
*)
let flush_aux info =
setup_write_buffer info;
- let { write_buffer = buf;
- write_fun = writer
- } = info
- in
+ let buf = info.write_buffer in
+ let writer = info.write_fun in
(* Now write the data directly *)
let rec write () =
- let { write_index = index;
- write_max = max
- } = info
- in
+ let index = info.write_index in
+ let max = info.write_max in
let len = max - index in
if len <> 0 then
let count = writer buf index len in
@@ -701,10 +685,8 @@ let close info =
* Print a byte.
*)
let rec output_char info c =
- let { out_max = max;
- out_buffer = buffer
- } = info
- in
+ let max = info.out_max in
+ let buffer = info.out_buffer in
flush_input info;
if max = String.length buffer then
begin
@@ -724,10 +706,8 @@ let output_byte info c =
* Write a substring.
*)
let rec output_buffer info buf off len =
- let { out_max = max;
- out_buffer = buffer
- } = info
- in
+ let max = info.out_max in
+ let buffer = info.out_buffer in
let avail = String.length buffer - max in
flush_input info;
if len <> 0 then
@@ -758,21 +738,17 @@ let write info buf off len =
* Check if there is input already in the buffer.
*)
let poll info =
- let { in_index = index;
- in_max = max
- } = info
- in
+ let index = info.in_index in
+ let max = info.in_max in
index <> max
(*
* Get data when the buffer is empty.
*)
let fillbuf info =
- let { channel_binary = binary;
- in_buffer = buf;
- read_fun = reader
- } = info
- in
+ let binary = info.channel_binary in
+ let buf = info.in_buffer in
+ let reader = info.read_fun in
let count = reader buf 0 buf_size in
let count =
if count = 0 then
@@ -797,11 +773,9 @@ let fillbuf info =
* Get a single char.
*)
let rec input_char info =
- let { in_index = index;
- in_max = max;
- in_buffer = buf;
- } = info
- in
+ let index = info.in_index in
+ let max = info.in_max in
+ let buf = info.in_buffer in
flush_output info;
if index = max then
begin
@@ -823,11 +797,9 @@ let input_byte info =
* Read data into a buffer.
*)
let rec input_buffer info s off len =
- let { in_index = index;
- in_max = max;
- in_buffer = buf
- } = info
- in
+ let index = info.in_index in
+ let max = info.in_max in
+ let buf = info.in_buffer in
let avail = max - index in
flush_output info;
if len <> 0 then
@@ -884,12 +856,10 @@ let input_entire_line info =
* Read allows for partial reading.
*)
let read info s off len =
- let { in_index = index;
- in_max = max;
- in_buffer = buf;
- read_fun = reader
- } = info
- in
+ let index = info.in_index in
+ let max = info.in_max in
+ let buf = info.in_buffer in
+ let reader = info.read_fun in
let avail = max - index in
flush_output info;
if avail = 0 then
@@ -925,13 +895,11 @@ let seek info pos whence =
* Get the current location.
*)
let loc info =
- let { out_max = out_max;
- in_index = in_index;
- in_buffer = in_buffer;
- out_buffer = out_buffer;
- channel_file = file
- } = info
- in
+ let out_max = info.out_max in
+ let in_index = info.in_index in
+ let in_buffer = info.in_buffer in
+ let out_buffer = info.out_buffer in
+ let file = info.channel_file in
let line, char =
if out_max <> 0 then
line_of_index info out_buffer out_max
@@ -1132,10 +1100,8 @@ struct
* Start lex mode.
*)
let lex_start channel =
- let { in_index = index;
- in_buffer = buffer
- } = channel
- in
+ let index = channel.in_index in
+ let buffer = channel.in_buffer in
let prev =
if index = 0 then
bof
@@ -1149,10 +1115,8 @@ struct
* Restart at a previous position.
*)
let lex_restart channel pos =
- let { in_max = max;
- in_index = index
- } = channel
- in
+ let max = channel.in_max in
+ let index = channel.in_index in
assert (pos >= 0 && pos <= max - index);
channel.lex_index <- index + pos
@@ -1168,20 +1132,16 @@ struct
* Get the string matched by the lexer.
*)
let lex_string channel pos =
- let { in_index = start;
- in_buffer = buffer
- } = channel
- in
+ let start = channel.in_index in
+ let buffer = channel.in_buffer in
String.sub buffer start pos
(*
* Get the string matched by the lexer.
*)
let lex_substring channel off len =
- let { in_index = start;
- in_buffer = buffer
- } = channel
- in
+ let start = channel.in_index in
+ let buffer = channel.in_buffer in
String.sub buffer (start + off) len
(*
@@ -1189,13 +1149,11 @@ struct
* We can't discard any of the existing data.
*)
let rec lex_fill channel =
- let { in_max = max;
- in_buffer = buffer;
- in_index = start;
- read_fun = reader;
- channel_binary = binary
- } = channel
- in
+ let max = channel.in_max in
+ let buffer = channel.in_buffer in
+ let start = channel.in_index in
+ let reader = channel.read_fun in
+ let binary = channel.channel_binary in
let len = String.length buffer in
let amount = len - max in
(* If we have space, fill it *)
@@ -1245,11 +1203,9 @@ struct
* Get the next character in lex mode.
*)
let lex_next channel =
- let { in_max = max;
- in_buffer = buffer;
- lex_index = index
- } = channel
- in
+ let max = channel.in_max in
+ let buffer = channel.in_buffer in
+ let index = channel.lex_index in
if index = max then
lex_fill channel
else
@@ -1267,14 +1223,12 @@ struct
* Get the location of the buffer.
*)
let lex_loc channel off =
- let { start_line = line;
- start_char = char;
- channel_file = file;
- lex_index = index;
- in_buffer = buffer;
- in_max = max
- } = channel
- in
+ let line = channel.start_line in
+ let char = channel.start_char in
+ let file = channel.channel_file in
+ let index = channel.lex_index in
+ let buffer = channel.in_buffer in
+ let max = channel.in_max in
let line1, char1 =
if index > max then
line, char
@@ -1293,11 +1247,9 @@ struct
* Add any remaining buffered text to a buffer.
*)
let lex_buffer channel buf =
- let { in_max = max;
- in_buffer = buffer;
- in_index = start
- } = channel
- in
+ let max = channel.in_max in
+ let buffer = channel.in_buffer in
+ let start = channel.in_index in
Buffer.add_substring buf buffer start (max - start);
channel.in_index <- max
end

View file

@ -1,24 +0,0 @@
$NetBSD: patch-au,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/util/lm_filename_util.ml.orig 2007-01-29 20:14:42.000000000 +0000
+++ src/libmojave-external/util/lm_filename_util.ml
@@ -48,12 +48,11 @@ let groups =
let unix_is_executable s =
let flag =
try
- let { Unix.LargeFile.st_kind = kind;
- Unix.LargeFile.st_perm = perm;
- Unix.LargeFile.st_uid = uid;
- Unix.LargeFile.st_gid = gid
- } = Unix.LargeFile.stat s
- in
+ let st = Unix.LargeFile.stat s in
+ let kind = st.Unix.LargeFile.st_kind in
+ let perm = st.Unix.LargeFile.st_perm in
+ let uid = st.Unix.LargeFile.st_uid in
+ let gid = st.Unix.LargeFile.st_gid in
(kind = Unix.S_REG)
&& ((perm land 0o001) <> 0
|| (List.mem gid groups && (perm land 0o010) <> 0)

View file

@ -1,20 +0,0 @@
$NetBSD: patch-av,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/util/lm_glob.ml.orig 2007-09-04 16:12:33.000000000 +0000
+++ src/libmojave-external/util/lm_glob.ml
@@ -157,11 +157,8 @@ let home_dir =
let getusers () =
let users = Lm_unix_util.getpwents () in
List.map (fun entry ->
- let { Unix.pw_name = name;
- Unix.pw_dir = dir
- } = entry
- in
- tilde_insert dir name;
+ let name = entry.Unix.pw_name in
+ tilde_insert entry.Unix.pw_dir name;
name) users
(************************************************************************

View file

@ -1,343 +0,0 @@
$NetBSD: patch-aw,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/util/lm_lexer.ml.orig 2007-01-25 18:31:18.000000000 +0000
+++ src/libmojave-external/util/lm_lexer.ml
@@ -1325,10 +1325,8 @@ struct
* Expressions.
*)
let pp_print_exp buf exp =
- let { exp_clauses = clauses;
- exp_id = id
- } = exp
- in
+ let clauses = exp.exp_clauses in
+ let id = exp.exp_id in
fprintf buf "Id: %d" id;
List.iter (fun (action, id, regex) ->
fprintf buf "@ @[<hv 3>Clause:@ id = %d@ action = %a@ @[<hv 3>regex =@ %a@]@]" (**)
@@ -1370,10 +1368,8 @@ struct
let add_clause_exp exp action s =
let regex = regex_of_string s in
let arity = regex_arg_count 0 regex in
- let { exp_clauses = clauses;
- exp_id = id
- } = exp
- in
+ let clauses = exp.exp_clauses in
+ let id = exp.exp_id in
let exp =
{ exp_clauses = (action, id, regex) :: clauses;
exp_id = succ id
@@ -1395,11 +1391,9 @@ struct
* Take the union of two expression lists.
*)
let union_exp exp1 exp2 =
- let { exp_clauses = clauses1;
- exp_id = id1
- } = exp1
- in
- let { exp_clauses = clauses2 } = exp2 in
+ let clauses1 = exp1.exp_clauses in
+ let id1 = exp1.exp_id in
+ let clauses2 = exp2.exp_clauses in
let actions =
List.fold_left (fun actions (action, _, _) ->
ActionSet.add actions action) ActionSet.empty clauses1
@@ -1474,20 +1468,16 @@ struct
counter min final max start
let pp_print_nfa_state buf nfa_state =
- let { nfa_state_index = index;
- nfa_state_action = action
- } = nfa_state
- in
+ let index = nfa_state.nfa_state_index in
+ let action = nfa_state.nfa_state_action in
fprintf buf "@[<hv 3>NFA state %d:@ action %a@]" index pp_print_nfa_action action
let pp_print_nfa buf nfa =
- let { nfa_hash = hash;
- nfa_start = start;
- nfa_search_start = search;
- nfa_search_states = search_states;
- nfa_table = table
- } = nfa
- in
+ let hash = nfa.nfa_hash in
+ let start = nfa.nfa_start in
+ let search = nfa.nfa_search_start in
+ let search_states = nfa.nfa_search_states in
+ let table = nfa.nfa_table in
fprintf buf "@[<hv 3>NFA:@ start = %a@ search = %a@ @[<b 3>search-states =%a@]" (**)
(pp_print_nfa_id hash) start
(pp_print_nfa_id hash) search
@@ -1500,7 +1490,7 @@ struct
* Construct a new state.
*)
let nfa_state accum action =
- let { nfa_index = index } = accum in
+ let index = accum.nfa_index in
let state =
{ nfa_state_index = index;
nfa_state_action = action
@@ -1582,7 +1572,7 @@ struct
in
accum, info, start, start1 :: final1 :: states
| RegexInterval (regex, min, max) ->
- let { nfa_counter = counter } = accum in
+ let counter = accum.nfa_counter in
let accum, start1 = nfa_state accum NfaActionNone in
let accum, final1 =
nfa_state accum (NfaActionIncrCounter (counter, min, final.nfa_state_index, max, start1.nfa_state_index))
@@ -1605,11 +1595,11 @@ struct
(* Arguments *)
| RegexArg regex ->
- let { nfa_arg_index = argindex } = accum in
+ let argindex = accum.nfa_arg_index in
let accum, final1 = nfa_state accum (NfaActionArgStop (argindex, final.nfa_state_index)) in
let accum, start1 = nfa_state accum NfaActionNone in
let start = set_action start (NfaActionArgStart (argindex, start1.nfa_state_index)) in
- let { nfa_arg_number = argnumber } = info in
+ let argnumber = info.nfa_arg_number in
let accum = { accum with nfa_arg_index = succ argindex } in
let info = { info with nfa_arg_number = succ argnumber } in
let accum, info, start1, states =
@@ -1783,10 +1773,8 @@ struct
fprintf buf "search-stop at %d" off
let pp_print_dfa_actions nfa_hash buf action =
- let { dfa_action_final = final;
- dfa_action_actions = actions
- } = action
- in
+ let final = action.dfa_action_final in
+ let actions = action.dfa_action_actions in
let () =
fprintf buf "@[<hv 3>(action"
in
@@ -1798,20 +1786,16 @@ struct
()
in
NfaStateTable.iter (fun dst action ->
- let { dfa_action_src = src;
- dfa_action_args = args
- } = action
- in
+ let src = action.dfa_action_src in
+ let args = action.dfa_action_args in
fprintf buf "@ @[<hv 3>(%a -> %a" (pp_print_nfa_id nfa_hash) src (pp_print_nfa_id nfa_hash) dst;
List.iter (fun action -> fprintf buf "@ %a" pp_print_dfa_arg_action action) args;
fprintf buf ")@]") actions;
fprintf buf ")@]"
let pp_print_pre_actions buf action =
- let { pre_action_final = final;
- pre_action_args = args
- } = action
- in
+ let final = action.pre_action_final in
+ let args = action.pre_action_args in
let () =
fprintf buf "@[<hv 3>(pre-action@ "
in
@@ -1897,10 +1881,10 @@ struct
* DFA actions.
*)
let dfa_action_is_empty action =
- match action with
- { dfa_action_final = None; dfa_action_actions = actions } ->
- NfaStateTable.is_empty actions
- | { dfa_action_final = Some _ } ->
+ match action.dfa_action_final with
+ None ->
+ NfaStateTable.is_empty action.dfa_action_actions
+ | Some _ ->
false
(*
@@ -1920,21 +1904,15 @@ struct
ArgTable.add args ArgSearch pos
let dfa_eval_action dfa info action =
- let { dfa_channel = channel;
- dfa_args = args_table
- } = info
- in
- let { dfa_action_final = final;
- dfa_action_actions = actions
- } = action
- in
+ let channel = info.dfa_channel in
+ let args_table = info.dfa_args in
+ let final = action.dfa_action_final in
+ let actions = action.dfa_action_actions in
let pos = Input.lex_pos channel in
let args_table =
NfaStateTable.map (fun action ->
- let { dfa_action_src = src;
- dfa_action_args = actions
- } = action
- in
+ let src = action.dfa_action_src in
+ let actions = action.dfa_action_args in
let args =
try NfaStateTable.find args_table src with
Not_found ->
@@ -2140,10 +2118,8 @@ struct
* the DFA state.
*)
let close_state dfa table nids c =
- let { dfa_search_states = search_states;
- dfa_nfa_hash = nfa_hash
- } = dfa
- in
+ let search_states = dfa.dfa_search_states in
+ let nfa_hash = dfa.dfa_nfa_hash in
let final, actions =
List.fold_left (fun final_actions nid ->
let frontier =
@@ -2152,10 +2128,8 @@ struct
if !debug_lexgen then
eprintf "@[<v 3>Frontier:@ %a@]@." (pp_print_frontier nfa_hash) frontier;
NfaStateTable.fold (fun (final', actions) id action ->
- let { pre_action_final = final;
- pre_action_args = args
- } = action
- in
+ let final = action.pre_action_final in
+ let args = action.pre_action_args in
let final =
match final', final with
Some (clause_id', _nid'), Some clause_id ->
@@ -2264,11 +2238,9 @@ struct
extend_args ("" :: args) (succ len1) len2
let dfa_args dfa_info lexeme =
- let { dfa_start_pos = start;
- dfa_stop_pos = stop;
- dfa_stop_args = args
- } = dfa_info
- in
+ let start = dfa_info.dfa_start_pos in
+ let stop = dfa_info.dfa_stop_pos in
+ let args = dfa_info.dfa_stop_args in
(* Get the pairs of argument info *)
let info, start_pos =
@@ -2326,11 +2298,9 @@ struct
* Add a state to the DFA. It is initially empty.
*)
let dfa_find_state dfa nids =
- let { dfa_map = map;
- dfa_length = dfa_id;
- dfa_states = states
- } = dfa
- in
+ let map = dfa.dfa_map in
+ let dfa_id = dfa.dfa_length in
+ let states = dfa.dfa_states in
try DfaStateTable.find map nids with
Not_found ->
(* Make a new state *)
@@ -2362,14 +2332,10 @@ struct
* an entry in the transition table yet.
*)
let create_entry dfa dfa_state c =
- let { dfa_dfa_hash = dfa_hash;
- dfa_table = table
- } = dfa
- in
- let { dfa_state_set = nids;
- dfa_state_delta = delta
- } = dfa_state
- in
+ let dfa_hash = dfa.dfa_dfa_hash in
+ let table = dfa.dfa_table in
+ let nids = dfa_state.dfa_state_set in
+ let delta = dfa_state.dfa_state_delta in
let frontier, actions = close_next_state dfa table (DfaState.get dfa_hash nids) c in
if frontier = [] && dfa_action_is_empty actions then
dfa_state.dfa_state_delta <- TransTable.add delta c DfaNoTransition
@@ -2437,10 +2403,8 @@ struct
let () = loop dfa_state c in
(* Now figure out what happened *)
- let { dfa_stop_clause = clause;
- dfa_stop_pos = stop;
- } = dfa_info
- in
+ let clause = dfa_info.dfa_stop_clause in
+ let stop = dfa_info.dfa_stop_pos in
(*
* If we did not get a match, return the channel to
* the starting position, and raise an exception.
@@ -2489,10 +2453,8 @@ struct
let () = loop dfa_state c in
(* Now figure out what happened *)
- let { dfa_stop_clause = clause;
- dfa_stop_pos = stop;
- } = dfa_info
- in
+ let clause = dfa_info.dfa_stop_clause in
+ let stop = dfa_info.dfa_stop_pos in
(*
* If we did not get a match, return the channel to
* the starting position, and raise an exception.
@@ -2551,10 +2513,8 @@ struct
let () = loop dfa_state c in
(* Now figure out what happened *)
- let { dfa_stop_clause = clause;
- dfa_stop_pos = stop;
- } = dfa_info
- in
+ let clause = dfa_info.dfa_stop_clause in
+ let stop = dfa_info.dfa_stop_pos in
(*
* If we did not get a match, return all the text to
* the end of the channel.
@@ -2610,14 +2570,12 @@ struct
if !debug_lexgen || !debug_lex then
eprintf "%a@." pp_print_nfa nfa
in
- let { nfa_hash = nfa_hash;
- nfa_table = nfa_table;
- nfa_start = nfa_start;
- nfa_actions = actions;
- nfa_search_start = nfa_search_start;
- nfa_search_states = nfa_search_states
- } = nfa
- in
+ let nfa_hash = nfa.nfa_hash in
+ let nfa_table = nfa.nfa_table in
+ let nfa_start = nfa.nfa_start in
+ let actions = nfa.nfa_actions in
+ let nfa_search_start = nfa.nfa_search_start in
+ let nfa_search_states = nfa.nfa_search_states in
let dfa_hash = DfaState.create_state () in
let nfa_start = DfaState.create dfa_hash [nfa_start] in
let start =
@@ -2673,8 +2631,8 @@ struct
* then we have seen all the rest of the clauses too.
*)
let union info1 info2 =
- let { lex_exp = exp1 } = info1 in
- let { lex_exp = exp2 } = info2 in
+ let exp1 = info1.lex_exp in
+ let exp2 = info2.lex_exp in
(* Catch degenerate cases first *)
match exp1.exp_clauses, exp2.exp_clauses with
[], _ -> info2
@@ -2711,7 +2669,7 @@ struct
ignore (dfa_of_info info)
let pp_print_lexer buf info =
- let { lex_exp = exp } = info in
+ let exp = info.lex_exp in
let dfa = dfa_of_info info in
fprintf buf "@[<v 0>@[<hv 3>Lexer:@ %a@]" pp_print_exp exp;
fprintf buf "@ @[<hv 3>NFA:";

View file

@ -1,366 +0,0 @@
$NetBSD: patch-ax,v 1.1 2010/12/17 09:40:14 wiz Exp $
From upstream SVN.
--- src/libmojave-external/util/lm_parser.ml.orig 2007-01-25 18:31:18.000000000 +0000
+++ src/libmojave-external/util/lm_parser.ml
@@ -282,15 +282,11 @@ struct
let debug = "ProdItem"
let hash item =
- let { prod_item_name = name;
- prod_item_left = left;
- prod_item_right = right;
- prod_item_action = action
- } = item
- in
+ let name = item.prod_item_name in
+ let action = item.prod_item_action in
let hash = hash_combine (IVar.hash name) (IAction.hash action) in
- let hash = ivar_list_hash hash left in
- let hash = ivar_list_hash hash right in
+ let hash = ivar_list_hash hash item.prod_item_left in
+ let hash = ivar_list_hash hash item.prod_item_right in
hash
let compare item1 item2 =
@@ -657,18 +653,12 @@ struct
fprintf buf "@ %a: %a" (pp_print_ivar info) v (pp_print_pda_action info) action) actions
let pp_print_prod_item_core info buf item =
- let { prod_item_action = action;
- prod_item_name = name;
- prod_item_left = left;
- prod_item_right = right
- } = item
- in
let hash = info.info_hash in
fprintf buf "%a ::=%a .%a (%a)" (**)
- (pp_print_ivar hash) name
- (pp_print_ivars hash) (List.rev left)
- (pp_print_ivars hash) right
- (pp_print_iaction hash) action
+ (pp_print_ivar hash) item.prod_item_name
+ (pp_print_ivars hash) (List.rev item.prod_item_left)
+ (pp_print_ivars hash) item.prod_item_right
+ (pp_print_iaction hash) item.prod_item_action
let pp_print_prod_item info buf item =
pp_print_prod_item_core info buf (ProdItem.get info.info_hash.hash_prod_item_state item)
@@ -678,40 +668,27 @@ struct
fprintf buf "@ %a" (pp_print_prod_item info) item) items
let pp_print_state info buf state =
- let { info_state_items = items } = State.get info.info_hash.hash_state_state state in
+ let items = (State.get info.info_hash.hash_state_state state).info_state_items in
eprintf "@[<v 3>State %d" (State.hash state);
pp_print_prod_item_set info buf items;
eprintf "@]"
let pp_print_info_item info buf info_item =
- let { info_hash = hash;
- info_hash_state_item = hash_state_item
- } = info
- in
- let { info_item_index = index;
- info_item_entries = entries
- } = info_item
- in
- fprintf buf "@[<v 3>State %d:" index;
+ let hash = info.info_hash in
+ let hash_state_item = info.info_hash_state_item in
+ fprintf buf "@[<v 3>State %d:" info_item.info_item_index;
Array.iter (fun entry ->
- let { prop_state_item = state_item;
- prop_vars = lookahead
- } = entry
- in
+ let state_item = entry.prop_state_item in
+ let lookahead = entry.prop_vars in
let _, prod_item = StateItem.get hash_state_item state_item in
- fprintf buf "@ @[<hv 3>%a@ @[<b 2>#%a@]@]" (pp_print_prod_item info) prod_item (pp_print_ivar_set hash) lookahead) entries;
+ fprintf buf "@ @[<hv 3>%a@ @[<b 2>#%a@]@]" (pp_print_prod_item info) prod_item (pp_print_ivar_set hash) lookahead) info_item.info_item_entries;
fprintf buf "@]"
let pp_print_info buf info =
- let { info_grammar = gram;
- info_nullable = nullable;
- info_first = first;
- info_hash = hash
- } = info
- in
- fprintf buf "@[<v 0>%a" pp_print_grammar gram;
- fprintf buf "@ @[<b 3>Nullable:%a@]" (pp_print_ivar_set hash) nullable;
- fprintf buf "@ @[<v 3>First:%a@]" (pp_print_ivar_table hash) first;
+ let hash = info.info_hash in
+ fprintf buf "@[<v 0>%a" pp_print_grammar info.info_grammar;
+ fprintf buf "@ @[<b 3>Nullable:%a@]" (pp_print_ivar_set hash) info.info_nullable;
+ fprintf buf "@ @[<v 3>First:%a@]" (pp_print_ivar_table hash) info.info_first;
fprintf buf "@]"
let pp_print_lookahead hash buf look =
@@ -917,16 +894,11 @@ struct
let changed, prods =
VarMTable.fold_all (fun (changed, prods) _ prodlist ->
List.fold_left (fun (changed, prods) prod ->
- let { prod_action = action;
- prod_name = name;
- prod_prec = pre
- } = prod
- in
- if ActionSet.mem actions action then
- changed, prods
- else
- let prod = { prod with prod_prec = PrecTable.find prec_translate pre } in
- true, VarMTable.add prods name prod) (changed, prods) prodlist) (false, prod1) prod2
+ if ActionSet.mem actions prod.prod_action then
+ changed, prods
+ else
+ let prod = { prod with prod_prec = PrecTable.find prec_translate prod.prod_prec } in
+ true, VarMTable.add prods prod.prod_name prod) (changed, prods) prodlist) (false, prod1) prod2
in
(* Union of the start symbols *)
@@ -1012,12 +984,10 @@ struct
let step first prods =
IVarTable.fold (fun (first, changed) _ prods ->
List.fold_left (fun (first, changed) prod ->
- let { prod_item_name = x;
- prod_item_right = rhs
- } = ProdItem.get prod_state prod
- in
+ let prod_item = ProdItem.get prod_state prod in
+ let x = prod_item.prod_item_name in
let set = IVarTable.find first x in
- let set' = first_rhs nullable first set rhs in
+ let set' = first_rhs nullable first set prod_item.prod_item_right in
let set, changed =
if changed || IVarSet.cardinal set' <> IVarSet.cardinal set then
set', true
@@ -1059,10 +1029,8 @@ struct
* Get the set of first symbols that can begin a list.
*)
let lookahead info rhs =
- let { info_first = first;
- info_nullable = nullable
- } = info
- in
+ let first = info.info_first in
+ let nullable = info.info_nullable in
let rec search set rhs =
match rhs with
v :: rhs ->
@@ -1274,14 +1242,10 @@ struct
let hash = info.info_hash.hash_prod_item_state in
ProdItemSet.fold (fun delta prod_item ->
let core = ProdItem.get hash prod_item in
- let { prod_item_left = left;
- prod_item_right = right
- } = core
- in
- match right with
+ match core.prod_item_right with
v :: right ->
let core =
- { core with prod_item_left = v :: left;
+ { core with prod_item_left = v :: core.prod_item_left;
prod_item_right = right
}
in
@@ -1517,11 +1481,7 @@ struct
let goto_table = StateTable.find shift_table state in
let prod_item_hash = info.info_hash.hash_prod_item_state in
let prod_item_core = ProdItem.get prod_item_hash prod_item in
- let { prod_item_left = left;
- prod_item_right = right
- } = prod_item_core
- in
- match right with
+ match prod_item_core.prod_item_right with
v :: right ->
(* If v is a nonterminal, then also propagate to initial items *)
let prop_items =
@@ -1534,7 +1494,7 @@ struct
(* Propagate directly to the next state *)
let next_state = IVarTable.find goto_table v in
let next_item_core =
- { prod_item_core with prod_item_left = v :: left;
+ { prod_item_core with prod_item_left = v :: prod_item_core.prod_item_left;
prod_item_right = right
}
in
@@ -1833,8 +1793,8 @@ struct
item :: items ->
let core = ProdItem.get hash item in
let empty_flag =
- match core with
- { prod_item_left = []; prod_item_right = [] } ->
+ match core.prod_item_left, core.prod_item_right with
+ [], [] ->
true
| _ ->
false
@@ -1865,14 +1825,12 @@ struct
look)
let reduce_actions info empties prop_table =
- let { info_head_lookahead = look_table } = info in
+ let look_table = info.info_head_lookahead in
let hash = info.info_hash.hash_prod_item_state in
let hash_state_item = info.info_hash_state_item in
Array.fold_left (fun actions entry ->
- let { prop_state_item = state_item;
- prop_vars = look3
- } = entry
- in
+ let state_item = entry.prop_state_item in
+ let look3 = entry.prop_vars in
let state, item = StateItem.get hash_state_item state_item in
let core = ProdItem.get hash item in
match core.prod_item_right with
@@ -1902,8 +1860,8 @@ struct
* Error messages.
*)
let shift_reduce_conflict info state v shift_state reduce_item =
- let { info_hash = hash } = info in
- let { hash_prod_item_state = hash_prod_item } = hash in
+ let hash = info.info_hash in
+ let hash_prod_item = hash.hash_prod_item_state in
let pp_print_ivar = pp_print_ivar hash in
let pp_print_iaction = pp_print_iaction hash in
let reduce_core = ProdItem.get hash_prod_item reduce_item in
@@ -1917,8 +1875,8 @@ struct
raise (Invalid_argument "Lm_parser.shift_reduce_conflict\n\tset MP_DEBUG=parse_conflict_is_warning to ignore this error")
let reduce_reduce_conflict info state v reduce_item action =
- let { info_hash = hash } = info in
- let { hash_prod_item_state = hash_prod_item } = hash in
+ let hash = info.info_hash in
+ let hash_prod_item = hash.hash_prod_item_state in
let pp_print_ivar = pp_print_ivar hash in
let pp_print_iaction = pp_print_iaction hash in
let reduce_core = ProdItem.get hash_prod_item reduce_item in
@@ -1936,24 +1894,18 @@ struct
* This is finally the stage where we check for conflicts.
*)
let process_reduce_actions info reduce_actions action_table =
- let { info_grammar = gram;
- info_prec = var_prec_table;
- info_hash = { hash_prod_item_state = hash_prod_item }
- } = info
- in
- let { gram_prec_table = prec_table } = gram in
+ let gram = info.info_grammar in
+ let var_prec_table = info.info_prec in
+ let hash_prod_item = info.info_hash.hash_prod_item_state in
+ let prec_table = gram.gram_prec_table in
let state_item_hash = info.info_hash_state_item in
StateItemTable.fold (fun action_table state_item look ->
let look = lookahead_set look in
let state, item = StateItem.get state_item_hash state_item in
- let { prod_item_name = name;
- prod_item_action = action;
- prod_item_left = left;
- prod_item_prec = prec_name
- } = ProdItem.get hash_prod_item item
- in
+ let prod_item = ProdItem.get hash_prod_item item in
+ let prec_name = prod_item.prod_item_prec in
let assoc = Precedence.assoc prec_table prec_name in
- let reduce = ReduceAction (action, name, List.length left) in
+ let reduce = ReduceAction (prod_item.prod_item_action, prod_item.prod_item_name, List.length prod_item.prod_item_left) in
let actions = StateTable.find action_table state in
let actions =
IVarSet.fold (fun actions v ->
@@ -2006,7 +1958,8 @@ struct
{ prod_item_right = [];
prod_item_action = action;
prod_item_name = name;
- prod_item_left = left
+ prod_item_left = left;
+ prod_item_prec = _
} ->
let state_item = StateItem.create info.info_hash_state_item (state, item) in
let lookahead = prop_table.(StateItem.hash state_item).prop_vars in
@@ -2027,18 +1980,14 @@ struct
* Flatten a production state to a pda description.
*)
let pda_info_of_items info prop_table state items =
- let { info_first = first;
- info_hash_state_item = hash_state_item;
- info_hash = { hash_prod_item_state = hash_prod_item }
- } = info
- in
+ let first = info.info_first in
+ let hash_state_item = info.info_hash_state_item in
+ let hash_prod_item = info.info_hash.hash_prod_item_state in
let items, next =
ProdItemSet.fold (fun (items, next) prod_item ->
let core = ProdItem.get hash_prod_item prod_item in
- let { prod_item_left = left;
- prod_item_right = right
- } = core
- in
+ let left = core.prod_item_left in
+ let right = core.prod_item_right in
let item =
{ pda_item_left = left;
pda_item_right = right
@@ -2094,7 +2043,7 @@ struct
(* Build the PDA states *)
let table =
State.map_array (fun state core ->
- let { info_state_items = items } = core in
+ let items = core.info_state_items in
{ pda_delta = pda_delta (StateTable.find trans_table state);
pda_reduce = reduce_early info prop_table state items;
pda_info = pda_info_of_items info prop_table state items
@@ -2155,7 +2104,7 @@ struct
* Exceptions.
*)
let parse_error loc hash run _stack state (v : ivar) =
- let { pda_info = { pda_items = items; pda_next = next } } = run.run_states.(state) in
+ let { pda_items = items; pda_next = next } = run.run_states.(state).pda_info in
let pp_print_ivar = pp_print_ivar hash in
let buf = stdstr in
fprintf buf "@[<v 0>Syntax error on token %a" pp_print_ivar v;
@@ -2188,7 +2137,7 @@ struct
let pda_loop hash run arg start =
let rec pda_lookahead arg stack state tok =
- let { pda_delta = delta } = run.run_states.(state) in
+ let delta = run.run_states.(state).pda_delta in
let v, loc, x = tok in
match
(try IVarTable.find delta v with
@@ -2323,24 +2272,24 @@ struct
let prec_max = Precedence.prec_max
let add_assoc info pre assoc =
- let { parse_grammar = gram } = info in
- let { gram_prec_table = prec_table } = gram in
+ let gram = info.parse_grammar in
+ let prec_table = gram.gram_prec_table in
let prec_table = Precedence.add_assoc prec_table pre assoc in
let gram = { gram with gram_prec_table = prec_table } in
let info = { parse_grammar = gram; parse_pda = None } in
info
let create_prec_lt info pre assoc =
- let { parse_grammar = gram } = info in
- let { gram_prec_table = prec_table } = gram in
+ let gram = info.parse_grammar in
+ let prec_table = gram.gram_prec_table in
let prec_table, pre = Precedence.create_prec_lt prec_table pre assoc in
let gram = { gram with gram_prec_table = prec_table } in
let info = { parse_grammar = gram; parse_pda = None } in
info, pre
let create_prec_gt info pre assoc =
- let { parse_grammar = gram } = info in
- let { gram_prec_table = prec_table } = gram in
+ let gram = info.parse_grammar in
+ let prec_table = gram.gram_prec_table in
let prec_table, pre = Precedence.create_prec_gt prec_table pre assoc in
let gram = { gram with gram_prec_table = prec_table } in
let info = { parse_grammar = gram; parse_pda = None } in

View file

@ -1,5 +0,0 @@
OMake is a build system designed for scalability and portability. It uses
a syntax similar to make utilities you may have used, but it features
many additional enhancements.
WWW: http://omake.metaprl.org/

View file

@ -1,54 +0,0 @@
bin/cvs_realclean
bin/omake
bin/osh
lib/omake/OMakefile.default
lib/omake/OMakeroot.default
lib/omake/OMakeroot.om
lib/omake/Pervasives.om
lib/omake/build/C.om
lib/omake/build/Common.om
lib/omake/build/LaTeX.om
lib/omake/build/OCaml.om
lib/omake/build/svn_realclean.om
lib/omake/configure/Configure.om
lib/omake/configure/X.om
lib/omake/configure/fam.om
lib/omake/configure/fs_case_sensitive.om
lib/omake/configure/ncurses.om
lib/omake/configure/readline.om
lib/omake/configure/snprintf.om
lib/omake/parse/C/Lex.om
lib/omake/parse/C/Parse.om
lib/omake/parse/LaTeX/Lex.om
lib/omake/parse/LaTeX/Macros.om
lib/omake/parse/LaTeX/Parse.om
lib/omake/parse/LaTeX/Spell.om
lib/omake/web/simple-xml.om
%%PORTDOCS%%%%DOCSDIR%%/omake-all-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake-autoconf.html
%%PORTDOCS%%%%DOCSDIR%%/omake-base.html
%%PORTDOCS%%%%DOCSDIR%%/omake-build-examples.html
%%PORTDOCS%%%%DOCSDIR%%/omake-build.html
%%PORTDOCS%%%%DOCSDIR%%/omake-contents.html
%%PORTDOCS%%%%DOCSDIR%%/omake-detail.html
%%PORTDOCS%%%%DOCSDIR%%/omake-doc.css
%%PORTDOCS%%%%DOCSDIR%%/omake-doc.html
%%PORTDOCS%%%%DOCSDIR%%/omake-fun-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake-grammar.html
%%PORTDOCS%%%%DOCSDIR%%/omake-language-examples.html
%%PORTDOCS%%%%DOCSDIR%%/omake-language-naming.html
%%PORTDOCS%%%%DOCSDIR%%/omake-language.html
%%PORTDOCS%%%%DOCSDIR%%/omake-obj-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake-option-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake-options.html
%%PORTDOCS%%%%DOCSDIR%%/omake-pervasives.html
%%PORTDOCS%%%%DOCSDIR%%/omake-quickstart.html
%%PORTDOCS%%%%DOCSDIR%%/omake-references.html
%%PORTDOCS%%%%DOCSDIR%%/omake-rules.html
%%PORTDOCS%%%%DOCSDIR%%/omake-shell.html
%%PORTDOCS%%%%DOCSDIR%%/omake-system.html
%%PORTDOCS%%%%DOCSDIR%%/omake-target-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake-toc.html
%%PORTDOCS%%%%DOCSDIR%%/omake-var-index.html
%%PORTDOCS%%%%DOCSDIR%%/omake.html
%%PORTDOCS%%%%DOCSDIR%%/osh.html

View file

@ -294,7 +294,6 @@
SUBDIR += freera
SUBDIR += freesweep
SUBDIR += freesynd
SUBDIR += freetennis
SUBDIR += fretsonfire
SUBDIR += fretsonfire-data
SUBDIR += frikqcc

View file

@ -1,38 +0,0 @@
# Created by: Jean-Yves Lefort <jylefort@FreeBSD.org>
# $FreeBSD$
PORTNAME= freetennis
PORTVERSION= 0.4.8
PORTREVISION= 13
CATEGORIES= games
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Tennis simulation
BUILD_DEPENDS= ocamlopt:lang/ocaml \
ocaml-images>3.0:graphics/ocaml-images \
${OCAML_DEPENDS}
RUN_DEPENDS= ${OCAML_DEPENDS}
OCAML_DEPENDS= ${LOCALBASE}/lib/ocaml/site-lib/lablgtk2/gtk.ml:x11-toolkits/ocaml-lablgtk2 \
${LOCALBASE}/lib/ocaml/lablGL/gl.ml:graphics/ocaml-lablgl \
${LOCALBASE}/lib/ocaml/site-lib/sdl/sdl.mli:devel/ocaml-sdl
USES= tar:bzip2
PLIST_FILES= bin/freetennis
PORTDATA= *
post-patch:
@${REINPLACE_CMD} -e 's|sfxDir = "sfx"|sfxDir = "${DATADIR}/sfx"|; \
s|gfxDir = "graphics"|gfxDir = "${DATADIR}/graphics"|' \
${WRKSRC}/freetennis.ml
@${REINPLACE_CMD} -Ee 's@(\+)(lablgtk2)@\1site-lib/\2@' \
${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/freetennis ${STAGEDIR}${PREFIX}/bin
(cd ${WRKSRC} && ${COPYTREE_SHARE} "graphics sfx" ${STAGEDIR}${DATADIR})
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (freetennis-0.4.8.tar.bz2) = 0d4663d1c9ce5bbef4d87a9d9f85a4570016a2945c41d1d293fb1357e426bebf
SIZE (freetennis-0.4.8.tar.bz2) = 7119435

View file

@ -1,7 +0,0 @@
--- Makefile.orig 2005-11-21 13:20:33.000000000 -0800
+++ Makefile 2010-04-09 02:58:00.000000000 -0700
@@ -1,3 +1,3 @@
# add -noassert for speedup
all: freetennis.ml
- ocamlopt -I +camlimages -I +lablGL -I +lablgtk2 -I +sdl -o freetennis bigarray.cmxa sdl.cmxa lablgtk.cmxa lablgl.cmxa ci_core.cmxa sdlmixer.cmxa sdlttf.cmxa unix.cmxa freetennis.ml
+ ocamlopt -noassert -cclib -pthread -I +site-lib/camlimages -I +lablGL -I +lablgtk2 -I +site-lib/sdl -o freetennis bigarray.cmxa sdl.cmxa lablgtk.cmxa lablgl.cmxa camlimages_core.cmxa sdlmixer.cmxa sdlttf.cmxa unix.cmxa freetennis.ml

View file

@ -1,15 +0,0 @@
Free Tennis is a tennis simulation. The most notable features of Free Tennis
are:
- Real tactics are useful in the game. For example, it is best to take the net
with a slow, low shot (backspin); it is best to play diagonal when you are
decentered horizontally, in order not to give angles; you should get back to
center and behind the baseline after the shot, in order not to be caught in
No-Man's-Land when the opponent hits
- The A.I. is very advanced and reflects those tactics;
- You have total control over the parabola described by the shot;
- The graphic gestures are realistic and elegant;
- Different players have different skills;
- The game is developed by a former tennis player;
WWW: http://freetennis.sourceforge.net/

View file

@ -601,7 +601,6 @@
SUBDIR += npretty
SUBDIR += nurbs++
SUBDIR += nvidia-texture-tools
SUBDIR += ocaml-images
SUBDIR += ocaml-lablgl
SUBDIR += ocrad
SUBDIR += ocre

View file

@ -1,90 +0,0 @@
# Created by: ijliao
# $FreeBSD$
PORTNAME= images
PORTVERSION= 4.0.1
PORTREVISION= 7
PORTEPOCH= 2
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/camlspotter/camlimages/get/
PKGNAMEPREFIX= ocaml-
DISTNAME= v${PORTVERSION}
DIST_SUBDIR= ocaml-images
MAINTAINER= michael.grunewald@laposte.net
COMMENT= Objective Caml image processing library
DEPRECATED= Depends on expiring devel/omake
EXPIRATION_DATE= 2016-07-04
BUILD_DEPENDS= ${LOCALBASE}/share/aclocal/ocaml.m4:lang/ocaml-autoconf
BUILD_DEPENDS+= omake:devel/omake
USE_OCAML= yes
USE_OCAML_FINDLIB= yes
OCAMLFIND_DESTDIR= ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}
OCAML_PKGDIRS= camlimages
OCAML_LDLIBS= ${OCAML_SITELIBDIR}/camlimages
OMAKESUBS+= -e s@%%INCLUDESPORTS%%@${LOCALBASE}/include@
OMAKESUBS+= -e s@%%INCLUDESX11%%@${LOCALBASE}/include/X11@
OMAKESUBS+= -e s@%%INCLUDESPNG%%@${LOCALBASE}/include/libpng15@
OMAKESUBS+= -e s@%%LDFLAGSPORTS%%@-L${LOCALBASE}/lib@
OMAKE= omake 'PREFIX=${STAGEDIR}${PREFIX}'
OMARGS= --dotomake .omake --force-dotomake
WRKSRC= ${WRKDIR}/camlspotter-camlimages-c803efa9d5d3
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= PNG JPEG TIFF XPM GIF FREETYPE GHOSTSCRIPT GTK2 DOCS
OPTIONS_DEFAULT=PNG JPEG TIFF XPM GIF FREETYPE GHOSTSCRIPT
OPTIONS_SUB= yes
PNG_CONFIGURE_WITH= png
PNG_LIB_DEPENDS= libpng.so:graphics/png
JPEG_CONFIGURE_WITH= jpeg
JPEG_USES= jpeg
TIFF_CONFIGURE_WITH= tiff
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
XPM_CONFIGURE_WITH= xpm
GIF_CONFIGURE_WITH= gif
GIF_LIB_DEPENDS= libgif.so:graphics/giflib
FREETYPE_CONFIGURE_WITH=freetype
FREETYPE_LIB_DEPENDS= libttf.so:print/freetype
GHOSTSCRIPT_CONFIGURE_WITH= gs
GHOSTSCRIPT_USES= ghostscript
GTK2_CONFIGURE_WITH= liblgtk2
GTK2_BUILD_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2
GTK2_RUN_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MXPM}
USE_XORG= xpm
.endif
do-configure:
@(cd ${WRKSRC} && ${REINPLACE_CMD} ${OMAKESUBS} OMakefile)
(cd ${WRKSRC} && ${OMAKE} ${OMARGS} configure)
do-build:
(cd ${WRKSRC} && ${OMAKE} ${OMARGS})
ocaml-findlib:
# Overriding ocaml-findlib target which does not support stage
# The consequence is that pkg-plist must be manually supported
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${OCAML_LDLIBS}
(cd ${WRKSRC} && ${OMAKE} ${OMARGS} install)
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (ocaml-images/v4.0.1.tar.gz) = b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4
SIZE (ocaml-images/v4.0.1.tar.gz) = 2190274

View file

@ -1,20 +0,0 @@
--- OMakefile.orig 2012-11-07 22:03:19.000000000 +0100
+++ OMakefile 2012-11-07 22:04:26.000000000 +0100
@@ -22,13 +22,13 @@
# Specify non standard include directories
INCLUDES[]=
- /usr/include/X11
- /usr/local/include
+ %%INCLUDESPORTS%%
+ %%INCLUDESX11%%
+ %%INCLUDESPNG%%
# Specify non standard library directories
LDFLAGS[]+=
-# for example,
-# LDFLAGS[]+= -L/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/
+ %%LDFLAGSPORTS%%
# Specify directories where X's rgb.txt can be found
PATH_RGB_TXT[]=

View file

@ -1,15 +0,0 @@
--- src/OMakefile.orig 2012-11-07 22:43:27.000000000 +0100
+++ src/OMakefile 2012-11-07 22:44:22.000000000 +0100
@@ -262,10 +262,10 @@
$(glob i, *.so)
INSTALL()=
- value $(OCAMLFIND) install $(LIBRARY_PREFIX) $(INSTALL_TARGETS)
+ value $(OCAMLFIND) install -ldconf ignore -destdir $(PREFIX)/lib/ocaml/site-lib $(LIBRARY_PREFIX) $(INSTALL_TARGETS)
UNINSTALL()=
- value $(OCAMLFIND) remove $(LIBRARY_PREFIX)
+ value $(OCAMLFIND) remove -ldconf ignore -destdir $(PREFIX)/lib/ocaml/site-lib $(LIBRARY_PREFIX)
install: all
$(INSTALL)

View file

@ -1,34 +0,0 @@
--- src/gifread.c.orig 2011-06-22 18:04:32 UTC
+++ src/gifread.c
@@ -140,7 +140,11 @@ value dGifOpenFileName( value name )
GifFileType *GifFile;
int i;
+#if GIFLIB_MAJOR >= 5
+ if((GifFile = DGifOpenFileName( String_val(name), NULL )) == NULL){
+#else
if((GifFile = DGifOpenFileName( String_val(name) )) == NULL){
+#endif
failwith("DGifOpenFileName");
}
@@ -161,7 +165,11 @@ value dGifCloseFile( value hdl )
segmentation faults */
((GifFileType *)hdl)->Image.ColorMap = NULL;
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
+ DGifCloseFile( (GifFileType *) hdl, NULL );
+#else
DGifCloseFile( (GifFileType *) hdl );
+#endif
CAMLreturn(Val_unit);
}
@@ -200,7 +208,6 @@ value dGifGetLine( value hdl )
if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width )
== GIF_ERROR ){
- PrintGifError ();
failwith("DGifGetLine");
}
CAMLreturn(buf);

View file

@ -1,55 +0,0 @@
--- src/gifwrite.c.orig 2011-06-22 18:04:32 UTC
+++ src/gifwrite.c
@@ -25,7 +25,7 @@
#include <gif_lib.h>
-int list_length( value list )
+static int list_length( value list )
{
CAMLparam1(list);
CAMLlocal1(l);
@@ -52,7 +52,11 @@ ColorMapObject *ColorMapObject_val( valu
fprintf(stderr, "Creating map with length = %d ...\n", len);
fflush(stderr);
*/
+#if GIFLIB_MAJOR >= 5
+ cmapobj = GifMakeMapObject( len, NULL );
+#else
cmapobj = MakeMapObject( len, NULL );
+#endif
for(i=0; i< len; i++){
cmapobj->Colors[i].Red = Int_val(Field(Field(cmap,i),0));
cmapobj->Colors[i].Green = Int_val(Field(Field(cmap,i),1));
@@ -68,7 +72,11 @@ value eGifOpenFileName( name )
GifFileType *GifFileOut;
+#if GIFLIB_MAJOR >= 5
+ if ((GifFileOut = EGifOpenFileName( String_val( name ), 0, NULL) )== NULL) {
+#else
if ((GifFileOut = EGifOpenFileName( String_val( name ), 0) )== NULL) {
+#endif
failwith("EGifOpenFileName");
}
/* gcc -fwritable-strings is required to compile libungif */
@@ -88,7 +96,11 @@ value eGifCloseFile( value hdl )
segmentation faults */
((GifFileType *)hdl)->Image.ColorMap = NULL;
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
+ EGifCloseFile( (GifFileType *) hdl, NULL );
+#else
EGifCloseFile( (GifFileType *) hdl );
+#endif
CAMLreturn(Val_unit);
}
@@ -133,7 +145,6 @@ value eGifPutLine( value oc, value buf )
if ( EGifPutLine(GifFileOut, String_val(buf), GifFileOut->Image.Width)
== GIF_ERROR ){
- PrintGifError ();
failwith("EGifPutLine");
}
CAMLreturn(Val_unit);

View file

@ -1,11 +0,0 @@
--- src/jpegread.c.orig 2011-06-22 20:04:32.000000000 +0200
+++ src/jpegread.c
@@ -417,7 +417,7 @@
jpeg_read_scanlines( cinfop, row, 1 );
row[0] += scanline_bytes;
}
- CAMLreturn0;
+ CAMLreturn(0);
}
value close_jpeg_file_for_read( jpegh )

View file

@ -1,38 +0,0 @@
--- src/pngread.c.orig 2009-10-26 13:42:03.000000000 +0100
+++ src/pngread.c 2012-05-05 07:08:53.000000000 +0200
@@ -69,7 +69,7 @@
}
/* error handling */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fp);
@@ -134,7 +134,7 @@
png_set_rows(png_ptr, info_ptr, row_pointers);
/* Later, we can return something */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fp);
@@ -243,7 +243,7 @@
}
/* error handling */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fp);
@@ -302,7 +302,7 @@
png_set_rows(png_ptr, info_ptr, row_pointers);
/* Later, we can return something */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fp);

View file

@ -1,20 +0,0 @@
--- src/pngwrite.c.orig 2009-10-26 13:42:03.000000000 +0100
+++ src/pngwrite.c 2012-05-06 13:01:28.000000000 +0200
@@ -62,7 +62,7 @@
}
/* error handling */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);
@@ -171,7 +171,7 @@
}
/* error handling */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);

View file

@ -1,36 +0,0 @@
--- src/tiffread.c.orig 2011-06-22 20:04:32.000000000 +0200
+++ src/tiffread.c
@@ -23,14 +23,22 @@
#include "oversized.h"
+/* Avoid redefinitions */
+#undef int16
+#undef uint16
/* These are defined in caml/config.h */
#define int16 int16tiff
#define uint16 uint16tiff
#define int32 int32tiff
#define uint32 uint32tiff
+#define int64 int64tiff
+#define uint64 uint64tiff
#include <tiffio.h>
+#undef int64
+#undef uint64
+
extern value *imglib_error;
value open_tiff_file_for_read( name )
@@ -70,6 +78,10 @@
failwith_oversized("tiff");
}
+ if (oversized (imagewidth, imagelength)) {
+ failwith_oversized("tiff");
+ }
+
if( imagesample == 3 && photometric == PHOTOMETRIC_RGB ){
if( imagebits != 8 ){
failwith("Sorry, tiff rgb file must be 24bit-color");

View file

@ -1,28 +0,0 @@
--- src/tiffwrite.c.orig 2011-06-22 20:04:32.000000000 +0200
+++ src/tiffwrite.c
@@ -20,11 +20,16 @@
#include <caml/memory.h>
#include <caml/fail.h>
+/* Avoid redefinitions */
+#undef int16
+#undef uint16
/* These are defined in caml/config.h */
#define int16 int16tiff
#define uint16 uint16tiff
#define int32 int32tiff
#define uint32 uint32tiff
+#define int64 int64tiff
+#define uint64 uint64tiff
#include <tiffio.h>
@@ -32,6 +37,8 @@
#undef uint16
#undef int32
#undef uint32
+#undef int64
+#undef uint64
extern value *imglib_error;

View file

@ -1,7 +0,0 @@
This is an image processing library, which provides some basic functions of
image processing and loading/saving various image file formats. In addition
the library can handle huge images that cannot be (or can hardly be) stored
into the memory (the library automatically creates swap files and escapes
them to reduce the memory usage).
WWW: http://pauillac.inria.fr/camlimages/

View file

@ -1,146 +0,0 @@
lib/ocaml/site-lib/camlimages/META
lib/ocaml/site-lib/camlimages/bitmap.cmi
lib/ocaml/site-lib/camlimages/bitmap.mli
lib/ocaml/site-lib/camlimages/blend.cmi
lib/ocaml/site-lib/camlimages/blend.mli
lib/ocaml/site-lib/camlimages/bmp.cmi
lib/ocaml/site-lib/camlimages/bmp.mli
lib/ocaml/site-lib/camlimages/camlimages.cmi
lib/ocaml/site-lib/camlimages/camlimages_all.a
lib/ocaml/site-lib/camlimages/camlimages_all.cma
lib/ocaml/site-lib/camlimages/camlimages_all.cmxa
lib/ocaml/site-lib/camlimages/camlimages_core.a
lib/ocaml/site-lib/camlimages/camlimages_core.cma
lib/ocaml/site-lib/camlimages/camlimages_core.cmxa
lib/ocaml/site-lib/camlimages/camlimages_freetype.a
lib/ocaml/site-lib/camlimages/camlimages_freetype.cma
lib/ocaml/site-lib/camlimages/camlimages_freetype.cmxa
%%GIF%%lib/ocaml/site-lib/camlimages/camlimages_gif.a
%%GIF%%lib/ocaml/site-lib/camlimages/camlimages_gif.cma
%%GIF%%lib/ocaml/site-lib/camlimages/camlimages_gif.cmxa
lib/ocaml/site-lib/camlimages/camlimages_graphics.a
lib/ocaml/site-lib/camlimages/camlimages_graphics.cma
lib/ocaml/site-lib/camlimages/camlimages_graphics.cmxa
lib/ocaml/site-lib/camlimages/camlimages_jpeg.a
lib/ocaml/site-lib/camlimages/camlimages_jpeg.cma
lib/ocaml/site-lib/camlimages/camlimages_jpeg.cmxa
%%GTK2%%lib/ocaml/site-lib/camlimages/camlimages_lablgtk2.a
%%GTK2%%lib/ocaml/site-lib/camlimages/camlimages_lablgtk2.cma
%%GTK2%%lib/ocaml/site-lib/camlimages/camlimages_lablgtk2.cmxa
lib/ocaml/site-lib/camlimages/camlimages_png.a
lib/ocaml/site-lib/camlimages/camlimages_png.cma
lib/ocaml/site-lib/camlimages/camlimages_png.cmxa
lib/ocaml/site-lib/camlimages/camlimages_ps.a
lib/ocaml/site-lib/camlimages/camlimages_ps.cma
lib/ocaml/site-lib/camlimages/camlimages_ps.cmxa
lib/ocaml/site-lib/camlimages/camlimages_supported.a
lib/ocaml/site-lib/camlimages/camlimages_supported.cma
lib/ocaml/site-lib/camlimages/camlimages_supported.cmxa
lib/ocaml/site-lib/camlimages/camlimages_tiff.a
lib/ocaml/site-lib/camlimages/camlimages_tiff.cma
lib/ocaml/site-lib/camlimages/camlimages_tiff.cmxa
lib/ocaml/site-lib/camlimages/camlimages_xpm.a
lib/ocaml/site-lib/camlimages/camlimages_xpm.cma
lib/ocaml/site-lib/camlimages/camlimages_xpm.cmxa
lib/ocaml/site-lib/camlimages/cmyk32.cmi
lib/ocaml/site-lib/camlimages/cmyk32.mli
lib/ocaml/site-lib/camlimages/color.cmi
lib/ocaml/site-lib/camlimages/color.mli
lib/ocaml/site-lib/camlimages/colorhist.cmi
lib/ocaml/site-lib/camlimages/colorhist.mli
lib/ocaml/site-lib/camlimages/dllcamlimages_all.so
lib/ocaml/site-lib/camlimages/dllcamlimages_freetype.so
lib/ocaml/site-lib/camlimages/dllcamlimages_gif.so
lib/ocaml/site-lib/camlimages/dllcamlimages_jpeg.so
lib/ocaml/site-lib/camlimages/dllcamlimages_png.so
lib/ocaml/site-lib/camlimages/dllcamlimages_supported.so
lib/ocaml/site-lib/camlimages/dllcamlimages_tiff.so
lib/ocaml/site-lib/camlimages/dllcamlimages_xpm.so
lib/ocaml/site-lib/camlimages/freetype.cmi
lib/ocaml/site-lib/camlimages/freetype.mli
lib/ocaml/site-lib/camlimages/ftlow.cmi
lib/ocaml/site-lib/camlimages/ftlow.mli
lib/ocaml/site-lib/camlimages/fttext.cmi
lib/ocaml/site-lib/camlimages/fttext.mli
lib/ocaml/site-lib/camlimages/genimage.cmi
lib/ocaml/site-lib/camlimages/genimage.mli
lib/ocaml/site-lib/camlimages/geometry.cmi
lib/ocaml/site-lib/camlimages/geometry.mli
lib/ocaml/site-lib/camlimages/gif.cmi
lib/ocaml/site-lib/camlimages/gif.mli
lib/ocaml/site-lib/camlimages/graphic_image.cmi
lib/ocaml/site-lib/camlimages/graphic_image.mli
lib/ocaml/site-lib/camlimages/image_intf.cmi
lib/ocaml/site-lib/camlimages/image_intf.mli
%%GTK2%%lib/ocaml/site-lib/camlimages/imagegdk.cmi
lib/ocaml/site-lib/camlimages/imagegdk.mli
lib/ocaml/site-lib/camlimages/images.cmi
lib/ocaml/site-lib/camlimages/images.mli
lib/ocaml/site-lib/camlimages/index16.cmi
lib/ocaml/site-lib/camlimages/index16.mli
lib/ocaml/site-lib/camlimages/index8.cmi
lib/ocaml/site-lib/camlimages/index8.mli
lib/ocaml/site-lib/camlimages/info.cmi
lib/ocaml/site-lib/camlimages/info.mli
lib/ocaml/site-lib/camlimages/jis_table.cmi
lib/ocaml/site-lib/camlimages/jis_unicode.cmi
lib/ocaml/site-lib/camlimages/jis_unicode.mli
lib/ocaml/site-lib/camlimages/jpeg.cmi
lib/ocaml/site-lib/camlimages/jpeg.mli
lib/ocaml/site-lib/camlimages/libcamlimages_all.a
lib/ocaml/site-lib/camlimages/libcamlimages_freetype.a
lib/ocaml/site-lib/camlimages/libcamlimages_gif.a
lib/ocaml/site-lib/camlimages/libcamlimages_jpeg.a
lib/ocaml/site-lib/camlimages/libcamlimages_png.a
lib/ocaml/site-lib/camlimages/libcamlimages_supported.a
lib/ocaml/site-lib/camlimages/libcamlimages_tiff.a
lib/ocaml/site-lib/camlimages/libcamlimages_xpm.a
lib/ocaml/site-lib/camlimages/mstring.cmi
lib/ocaml/site-lib/camlimages/mstring.mli
lib/ocaml/site-lib/camlimages/oBmp.cmi
lib/ocaml/site-lib/camlimages/oColor.cmi
lib/ocaml/site-lib/camlimages/oColor.mli
lib/ocaml/site-lib/camlimages/oFreetype.cmi
lib/ocaml/site-lib/camlimages/oGif.cmi
lib/ocaml/site-lib/camlimages/oGraphic.cmi
lib/ocaml/site-lib/camlimages/oImages.cmi
lib/ocaml/site-lib/camlimages/oImages.mli
lib/ocaml/site-lib/camlimages/oJpeg.cmi
lib/ocaml/site-lib/camlimages/oJpeg.mli
lib/ocaml/site-lib/camlimages/oPng.cmi
lib/ocaml/site-lib/camlimages/oPng.mli
lib/ocaml/site-lib/camlimages/oPpm.cmi
lib/ocaml/site-lib/camlimages/oPs.cmi
lib/ocaml/site-lib/camlimages/oTiff.cmi
%%GTK2%%lib/ocaml/site-lib/camlimages/oXimage.cmi
lib/ocaml/site-lib/camlimages/oXimage.mli
%%GTK2%%lib/ocaml/site-lib/camlimages/oXimage2.cmi
lib/ocaml/site-lib/camlimages/oXpm.cmi
lib/ocaml/site-lib/camlimages/oXvthumb.cmi
lib/ocaml/site-lib/camlimages/oXvthumb.mli
lib/ocaml/site-lib/camlimages/png.cmi
lib/ocaml/site-lib/camlimages/png.mli
lib/ocaml/site-lib/camlimages/ppm.cmi
lib/ocaml/site-lib/camlimages/ppm.mli
lib/ocaml/site-lib/camlimages/ps.cmi
lib/ocaml/site-lib/camlimages/ps.mli
lib/ocaml/site-lib/camlimages/reduce.cmi
lib/ocaml/site-lib/camlimages/reduce.mli
lib/ocaml/site-lib/camlimages/region.cmi
lib/ocaml/site-lib/camlimages/region.mli
lib/ocaml/site-lib/camlimages/rgb24.cmi
lib/ocaml/site-lib/camlimages/rgb24.mli
lib/ocaml/site-lib/camlimages/rgba32.cmi
lib/ocaml/site-lib/camlimages/rgba32.mli
lib/ocaml/site-lib/camlimages/tiff.cmi
lib/ocaml/site-lib/camlimages/tiff.mli
lib/ocaml/site-lib/camlimages/tmpfile.cmi
lib/ocaml/site-lib/camlimages/tmpfile.mli
lib/ocaml/site-lib/camlimages/units.cmi
%%GTK2%%lib/ocaml/site-lib/camlimages/ximage.cmi
lib/ocaml/site-lib/camlimages/ximage.mli
%%GTK2%%lib/ocaml/site-lib/camlimages/ximage2.cmi
lib/ocaml/site-lib/camlimages/xpm.cmi
lib/ocaml/site-lib/camlimages/xpm.mli
lib/ocaml/site-lib/camlimages/xvthumb.cmi
lib/ocaml/site-lib/camlimages/xvthumb.mli